xref: /freebsd/contrib/unbound/configure (revision 3d32dc633c5e21bf15dd0d968734efe72776afdc)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for unbound 1.7.3.
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.3'
594PACKAGE_STRING='unbound 1.7.3'
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.3 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.3:";;
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.3
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.3, 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=3
2787
2788
2789LIBUNBOUND_CURRENT=7
2790LIBUNBOUND_REVISION=11
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# 1.7.2 had 7:10:5
2852# 1.7.3 had 7:11:5
2853
2854#   Current  -- the number of the binary API that we're implementing
2855#   Revision -- which iteration of the implementation of the binary
2856#               API are we supplying?
2857#   Age      -- How many previous binary API versions do we also
2858#               support?
2859#
2860# If we release a new version that does not change the binary API,
2861# increment Revision.
2862#
2863# If we release a new version that changes the binary API, but does
2864# not break programs compiled against the old binary API, increment
2865# Current and Age.  Set Revision to 0, since this is the first
2866# implementation of the new API.
2867#
2868# Otherwise, we're changing the binary API and breaking backward
2869# compatibility with old binaries.  Increment Current.  Set Age to 0,
2870# since we're backward compatible with no previous APIs.  Set Revision
2871# to 0 too.
2872
2873
2874
2875
2876CFLAGS="$CFLAGS"
2877ac_ext=c
2878ac_cpp='$CPP $CPPFLAGS'
2879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2881ac_compiler_gnu=$ac_cv_c_compiler_gnu
2882if test -n "$ac_tool_prefix"; then
2883  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2884set dummy ${ac_tool_prefix}gcc; ac_word=$2
2885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2886$as_echo_n "checking for $ac_word... " >&6; }
2887if ${ac_cv_prog_CC+:} false; then :
2888  $as_echo_n "(cached) " >&6
2889else
2890  if test -n "$CC"; then
2891  ac_cv_prog_CC="$CC" # Let the user override the test.
2892else
2893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2894for as_dir in $PATH
2895do
2896  IFS=$as_save_IFS
2897  test -z "$as_dir" && as_dir=.
2898    for ac_exec_ext in '' $ac_executable_extensions; do
2899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2900    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2902    break 2
2903  fi
2904done
2905  done
2906IFS=$as_save_IFS
2907
2908fi
2909fi
2910CC=$ac_cv_prog_CC
2911if test -n "$CC"; then
2912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2913$as_echo "$CC" >&6; }
2914else
2915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2916$as_echo "no" >&6; }
2917fi
2918
2919
2920fi
2921if test -z "$ac_cv_prog_CC"; then
2922  ac_ct_CC=$CC
2923  # Extract the first word of "gcc", so it can be a program name with args.
2924set dummy gcc; ac_word=$2
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
2927if ${ac_cv_prog_ac_ct_CC+:} false; then :
2928  $as_echo_n "(cached) " >&6
2929else
2930  if test -n "$ac_ct_CC"; then
2931  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2932else
2933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934for as_dir in $PATH
2935do
2936  IFS=$as_save_IFS
2937  test -z "$as_dir" && as_dir=.
2938    for ac_exec_ext in '' $ac_executable_extensions; do
2939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2940    ac_cv_prog_ac_ct_CC="gcc"
2941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2942    break 2
2943  fi
2944done
2945  done
2946IFS=$as_save_IFS
2947
2948fi
2949fi
2950ac_ct_CC=$ac_cv_prog_ac_ct_CC
2951if test -n "$ac_ct_CC"; then
2952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2953$as_echo "$ac_ct_CC" >&6; }
2954else
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956$as_echo "no" >&6; }
2957fi
2958
2959  if test "x$ac_ct_CC" = x; then
2960    CC=""
2961  else
2962    case $cross_compiling:$ac_tool_warned in
2963yes:)
2964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2966ac_tool_warned=yes ;;
2967esac
2968    CC=$ac_ct_CC
2969  fi
2970else
2971  CC="$ac_cv_prog_CC"
2972fi
2973
2974if test -z "$CC"; then
2975          if test -n "$ac_tool_prefix"; then
2976    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2977set dummy ${ac_tool_prefix}cc; ac_word=$2
2978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2979$as_echo_n "checking for $ac_word... " >&6; }
2980if ${ac_cv_prog_CC+:} false; then :
2981  $as_echo_n "(cached) " >&6
2982else
2983  if test -n "$CC"; then
2984  ac_cv_prog_CC="$CC" # Let the user override the test.
2985else
2986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2987for as_dir in $PATH
2988do
2989  IFS=$as_save_IFS
2990  test -z "$as_dir" && as_dir=.
2991    for ac_exec_ext in '' $ac_executable_extensions; do
2992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2993    ac_cv_prog_CC="${ac_tool_prefix}cc"
2994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995    break 2
2996  fi
2997done
2998  done
2999IFS=$as_save_IFS
3000
3001fi
3002fi
3003CC=$ac_cv_prog_CC
3004if test -n "$CC"; then
3005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3006$as_echo "$CC" >&6; }
3007else
3008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3009$as_echo "no" >&6; }
3010fi
3011
3012
3013  fi
3014fi
3015if test -z "$CC"; then
3016  # Extract the first word of "cc", so it can be a program name with args.
3017set dummy cc; ac_word=$2
3018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3019$as_echo_n "checking for $ac_word... " >&6; }
3020if ${ac_cv_prog_CC+:} false; then :
3021  $as_echo_n "(cached) " >&6
3022else
3023  if test -n "$CC"; then
3024  ac_cv_prog_CC="$CC" # Let the user override the test.
3025else
3026  ac_prog_rejected=no
3027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3028for as_dir in $PATH
3029do
3030  IFS=$as_save_IFS
3031  test -z "$as_dir" && as_dir=.
3032    for ac_exec_ext in '' $ac_executable_extensions; do
3033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3034    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3035       ac_prog_rejected=yes
3036       continue
3037     fi
3038    ac_cv_prog_CC="cc"
3039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3040    break 2
3041  fi
3042done
3043  done
3044IFS=$as_save_IFS
3045
3046if test $ac_prog_rejected = yes; then
3047  # We found a bogon in the path, so make sure we never use it.
3048  set dummy $ac_cv_prog_CC
3049  shift
3050  if test $# != 0; then
3051    # We chose a different compiler from the bogus one.
3052    # However, it has the same basename, so the bogon will be chosen
3053    # first if we set CC to just the basename; use the full file name.
3054    shift
3055    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3056  fi
3057fi
3058fi
3059fi
3060CC=$ac_cv_prog_CC
3061if test -n "$CC"; then
3062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3063$as_echo "$CC" >&6; }
3064else
3065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066$as_echo "no" >&6; }
3067fi
3068
3069
3070fi
3071if test -z "$CC"; then
3072  if test -n "$ac_tool_prefix"; then
3073  for ac_prog in cl.exe
3074  do
3075    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3078$as_echo_n "checking for $ac_word... " >&6; }
3079if ${ac_cv_prog_CC+:} false; then :
3080  $as_echo_n "(cached) " >&6
3081else
3082  if test -n "$CC"; then
3083  ac_cv_prog_CC="$CC" # Let the user override the test.
3084else
3085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3086for as_dir in $PATH
3087do
3088  IFS=$as_save_IFS
3089  test -z "$as_dir" && as_dir=.
3090    for ac_exec_ext in '' $ac_executable_extensions; do
3091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3092    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3094    break 2
3095  fi
3096done
3097  done
3098IFS=$as_save_IFS
3099
3100fi
3101fi
3102CC=$ac_cv_prog_CC
3103if test -n "$CC"; then
3104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3105$as_echo "$CC" >&6; }
3106else
3107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3108$as_echo "no" >&6; }
3109fi
3110
3111
3112    test -n "$CC" && break
3113  done
3114fi
3115if test -z "$CC"; then
3116  ac_ct_CC=$CC
3117  for ac_prog in cl.exe
3118do
3119  # Extract the first word of "$ac_prog", so it can be a program name with args.
3120set dummy $ac_prog; ac_word=$2
3121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3122$as_echo_n "checking for $ac_word... " >&6; }
3123if ${ac_cv_prog_ac_ct_CC+:} false; then :
3124  $as_echo_n "(cached) " >&6
3125else
3126  if test -n "$ac_ct_CC"; then
3127  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3128else
3129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3130for as_dir in $PATH
3131do
3132  IFS=$as_save_IFS
3133  test -z "$as_dir" && as_dir=.
3134    for ac_exec_ext in '' $ac_executable_extensions; do
3135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3136    ac_cv_prog_ac_ct_CC="$ac_prog"
3137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3138    break 2
3139  fi
3140done
3141  done
3142IFS=$as_save_IFS
3143
3144fi
3145fi
3146ac_ct_CC=$ac_cv_prog_ac_ct_CC
3147if test -n "$ac_ct_CC"; then
3148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3149$as_echo "$ac_ct_CC" >&6; }
3150else
3151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3152$as_echo "no" >&6; }
3153fi
3154
3155
3156  test -n "$ac_ct_CC" && break
3157done
3158
3159  if test "x$ac_ct_CC" = x; then
3160    CC=""
3161  else
3162    case $cross_compiling:$ac_tool_warned in
3163yes:)
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3166ac_tool_warned=yes ;;
3167esac
3168    CC=$ac_ct_CC
3169  fi
3170fi
3171
3172fi
3173
3174
3175test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3177as_fn_error $? "no acceptable C compiler found in \$PATH
3178See \`config.log' for more details" "$LINENO" 5; }
3179
3180# Provide some information about the compiler.
3181$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3182set X $ac_compile
3183ac_compiler=$2
3184for ac_option in --version -v -V -qversion; do
3185  { { ac_try="$ac_compiler $ac_option >&5"
3186case "(($ac_try" in
3187  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3188  *) ac_try_echo=$ac_try;;
3189esac
3190eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3191$as_echo "$ac_try_echo"; } >&5
3192  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3193  ac_status=$?
3194  if test -s conftest.err; then
3195    sed '10a\
3196... rest of stderr output deleted ...
3197         10q' conftest.err >conftest.er1
3198    cat conftest.er1 >&5
3199  fi
3200  rm -f conftest.er1 conftest.err
3201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202  test $ac_status = 0; }
3203done
3204
3205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3206/* end confdefs.h.  */
3207
3208int
3209main ()
3210{
3211
3212  ;
3213  return 0;
3214}
3215_ACEOF
3216ac_clean_files_save=$ac_clean_files
3217ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3218# Try to create an executable without -o first, disregard a.out.
3219# It will help us diagnose broken compilers, and finding out an intuition
3220# of exeext.
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3222$as_echo_n "checking whether the C compiler works... " >&6; }
3223ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3224
3225# The possible output files:
3226ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3227
3228ac_rmfiles=
3229for ac_file in $ac_files
3230do
3231  case $ac_file in
3232    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3233    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3234  esac
3235done
3236rm -f $ac_rmfiles
3237
3238if { { ac_try="$ac_link_default"
3239case "(($ac_try" in
3240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3241  *) ac_try_echo=$ac_try;;
3242esac
3243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3244$as_echo "$ac_try_echo"; } >&5
3245  (eval "$ac_link_default") 2>&5
3246  ac_status=$?
3247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3248  test $ac_status = 0; }; then :
3249  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3250# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3251# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3252# so that the user can short-circuit this test for compilers unknown to
3253# Autoconf.
3254for ac_file in $ac_files ''
3255do
3256  test -f "$ac_file" || continue
3257  case $ac_file in
3258    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3259	;;
3260    [ab].out )
3261	# We found the default executable, but exeext='' is most
3262	# certainly right.
3263	break;;
3264    *.* )
3265	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3266	then :; else
3267	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3268	fi
3269	# We set ac_cv_exeext here because the later test for it is not
3270	# safe: cross compilers may not add the suffix if given an `-o'
3271	# argument, so we may need to know it at that point already.
3272	# Even if this section looks crufty: it has the advantage of
3273	# actually working.
3274	break;;
3275    * )
3276	break;;
3277  esac
3278done
3279test "$ac_cv_exeext" = no && ac_cv_exeext=
3280
3281else
3282  ac_file=''
3283fi
3284if test -z "$ac_file"; then :
3285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3286$as_echo "no" >&6; }
3287$as_echo "$as_me: failed program was:" >&5
3288sed 's/^/| /' conftest.$ac_ext >&5
3289
3290{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3292as_fn_error 77 "C compiler cannot create executables
3293See \`config.log' for more details" "$LINENO" 5; }
3294else
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3296$as_echo "yes" >&6; }
3297fi
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3299$as_echo_n "checking for C compiler default output file name... " >&6; }
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3301$as_echo "$ac_file" >&6; }
3302ac_exeext=$ac_cv_exeext
3303
3304rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3305ac_clean_files=$ac_clean_files_save
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3307$as_echo_n "checking for suffix of executables... " >&6; }
3308if { { ac_try="$ac_link"
3309case "(($ac_try" in
3310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3311  *) ac_try_echo=$ac_try;;
3312esac
3313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3314$as_echo "$ac_try_echo"; } >&5
3315  (eval "$ac_link") 2>&5
3316  ac_status=$?
3317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3318  test $ac_status = 0; }; then :
3319  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3320# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3321# work properly (i.e., refer to `conftest.exe'), while it won't with
3322# `rm'.
3323for ac_file in conftest.exe conftest conftest.*; do
3324  test -f "$ac_file" || continue
3325  case $ac_file in
3326    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3327    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3328	  break;;
3329    * ) break;;
3330  esac
3331done
3332else
3333  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3336See \`config.log' for more details" "$LINENO" 5; }
3337fi
3338rm -f conftest conftest$ac_cv_exeext
3339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3340$as_echo "$ac_cv_exeext" >&6; }
3341
3342rm -f conftest.$ac_ext
3343EXEEXT=$ac_cv_exeext
3344ac_exeext=$EXEEXT
3345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3346/* end confdefs.h.  */
3347#include <stdio.h>
3348int
3349main ()
3350{
3351FILE *f = fopen ("conftest.out", "w");
3352 return ferror (f) || fclose (f) != 0;
3353
3354  ;
3355  return 0;
3356}
3357_ACEOF
3358ac_clean_files="$ac_clean_files conftest.out"
3359# Check that the compiler produces executables we can run.  If not, either
3360# the compiler is broken, or we cross compile.
3361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3362$as_echo_n "checking whether we are cross compiling... " >&6; }
3363if test "$cross_compiling" != yes; then
3364  { { ac_try="$ac_link"
3365case "(($ac_try" in
3366  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3367  *) ac_try_echo=$ac_try;;
3368esac
3369eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3370$as_echo "$ac_try_echo"; } >&5
3371  (eval "$ac_link") 2>&5
3372  ac_status=$?
3373  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3374  test $ac_status = 0; }
3375  if { ac_try='./conftest$ac_cv_exeext'
3376  { { case "(($ac_try" in
3377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3378  *) ac_try_echo=$ac_try;;
3379esac
3380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3381$as_echo "$ac_try_echo"; } >&5
3382  (eval "$ac_try") 2>&5
3383  ac_status=$?
3384  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3385  test $ac_status = 0; }; }; then
3386    cross_compiling=no
3387  else
3388    if test "$cross_compiling" = maybe; then
3389	cross_compiling=yes
3390    else
3391	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3393as_fn_error $? "cannot run C compiled programs.
3394If you meant to cross compile, use \`--host'.
3395See \`config.log' for more details" "$LINENO" 5; }
3396    fi
3397  fi
3398fi
3399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3400$as_echo "$cross_compiling" >&6; }
3401
3402rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3403ac_clean_files=$ac_clean_files_save
3404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3405$as_echo_n "checking for suffix of object files... " >&6; }
3406if ${ac_cv_objext+:} false; then :
3407  $as_echo_n "(cached) " >&6
3408else
3409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3410/* end confdefs.h.  */
3411
3412int
3413main ()
3414{
3415
3416  ;
3417  return 0;
3418}
3419_ACEOF
3420rm -f conftest.o conftest.obj
3421if { { ac_try="$ac_compile"
3422case "(($ac_try" in
3423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3424  *) ac_try_echo=$ac_try;;
3425esac
3426eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3427$as_echo "$ac_try_echo"; } >&5
3428  (eval "$ac_compile") 2>&5
3429  ac_status=$?
3430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3431  test $ac_status = 0; }; then :
3432  for ac_file in conftest.o conftest.obj conftest.*; do
3433  test -f "$ac_file" || continue;
3434  case $ac_file in
3435    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3436    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3437       break;;
3438  esac
3439done
3440else
3441  $as_echo "$as_me: failed program was:" >&5
3442sed 's/^/| /' conftest.$ac_ext >&5
3443
3444{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3446as_fn_error $? "cannot compute suffix of object files: cannot compile
3447See \`config.log' for more details" "$LINENO" 5; }
3448fi
3449rm -f conftest.$ac_cv_objext conftest.$ac_ext
3450fi
3451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3452$as_echo "$ac_cv_objext" >&6; }
3453OBJEXT=$ac_cv_objext
3454ac_objext=$OBJEXT
3455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3456$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3457if ${ac_cv_c_compiler_gnu+:} false; then :
3458  $as_echo_n "(cached) " >&6
3459else
3460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3461/* end confdefs.h.  */
3462
3463int
3464main ()
3465{
3466#ifndef __GNUC__
3467       choke me
3468#endif
3469
3470  ;
3471  return 0;
3472}
3473_ACEOF
3474if ac_fn_c_try_compile "$LINENO"; then :
3475  ac_compiler_gnu=yes
3476else
3477  ac_compiler_gnu=no
3478fi
3479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3480ac_cv_c_compiler_gnu=$ac_compiler_gnu
3481
3482fi
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3484$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3485if test $ac_compiler_gnu = yes; then
3486  GCC=yes
3487else
3488  GCC=
3489fi
3490ac_test_CFLAGS=${CFLAGS+set}
3491ac_save_CFLAGS=$CFLAGS
3492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3493$as_echo_n "checking whether $CC accepts -g... " >&6; }
3494if ${ac_cv_prog_cc_g+:} false; then :
3495  $as_echo_n "(cached) " >&6
3496else
3497  ac_save_c_werror_flag=$ac_c_werror_flag
3498   ac_c_werror_flag=yes
3499   ac_cv_prog_cc_g=no
3500   CFLAGS="-g"
3501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3502/* end confdefs.h.  */
3503
3504int
3505main ()
3506{
3507
3508  ;
3509  return 0;
3510}
3511_ACEOF
3512if ac_fn_c_try_compile "$LINENO"; then :
3513  ac_cv_prog_cc_g=yes
3514else
3515  CFLAGS=""
3516      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3517/* end confdefs.h.  */
3518
3519int
3520main ()
3521{
3522
3523  ;
3524  return 0;
3525}
3526_ACEOF
3527if ac_fn_c_try_compile "$LINENO"; then :
3528
3529else
3530  ac_c_werror_flag=$ac_save_c_werror_flag
3531	 CFLAGS="-g"
3532	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3533/* end confdefs.h.  */
3534
3535int
3536main ()
3537{
3538
3539  ;
3540  return 0;
3541}
3542_ACEOF
3543if ac_fn_c_try_compile "$LINENO"; then :
3544  ac_cv_prog_cc_g=yes
3545fi
3546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3547fi
3548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3549fi
3550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3551   ac_c_werror_flag=$ac_save_c_werror_flag
3552fi
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3554$as_echo "$ac_cv_prog_cc_g" >&6; }
3555if test "$ac_test_CFLAGS" = set; then
3556  CFLAGS=$ac_save_CFLAGS
3557elif test $ac_cv_prog_cc_g = yes; then
3558  if test "$GCC" = yes; then
3559    CFLAGS="-g -O2"
3560  else
3561    CFLAGS="-g"
3562  fi
3563else
3564  if test "$GCC" = yes; then
3565    CFLAGS="-O2"
3566  else
3567    CFLAGS=
3568  fi
3569fi
3570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3571$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3572if ${ac_cv_prog_cc_c89+:} false; then :
3573  $as_echo_n "(cached) " >&6
3574else
3575  ac_cv_prog_cc_c89=no
3576ac_save_CC=$CC
3577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3578/* end confdefs.h.  */
3579#include <stdarg.h>
3580#include <stdio.h>
3581struct stat;
3582/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3583struct buf { int x; };
3584FILE * (*rcsopen) (struct buf *, struct stat *, int);
3585static char *e (p, i)
3586     char **p;
3587     int i;
3588{
3589  return p[i];
3590}
3591static char *f (char * (*g) (char **, int), char **p, ...)
3592{
3593  char *s;
3594  va_list v;
3595  va_start (v,p);
3596  s = g (p, va_arg (v,int));
3597  va_end (v);
3598  return s;
3599}
3600
3601/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3602   function prototypes and stuff, but not '\xHH' hex character constants.
3603   These don't provoke an error unfortunately, instead are silently treated
3604   as 'x'.  The following induces an error, until -std is added to get
3605   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3606   array size at least.  It's necessary to write '\x00'==0 to get something
3607   that's true only with -std.  */
3608int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3609
3610/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3611   inside strings and character constants.  */
3612#define FOO(x) 'x'
3613int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3614
3615int test (int i, double x);
3616struct s1 {int (*f) (int a);};
3617struct s2 {int (*f) (double a);};
3618int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3619int argc;
3620char **argv;
3621int
3622main ()
3623{
3624return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3625  ;
3626  return 0;
3627}
3628_ACEOF
3629for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3630	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3631do
3632  CC="$ac_save_CC $ac_arg"
3633  if ac_fn_c_try_compile "$LINENO"; then :
3634  ac_cv_prog_cc_c89=$ac_arg
3635fi
3636rm -f core conftest.err conftest.$ac_objext
3637  test "x$ac_cv_prog_cc_c89" != "xno" && break
3638done
3639rm -f conftest.$ac_ext
3640CC=$ac_save_CC
3641
3642fi
3643# AC_CACHE_VAL
3644case "x$ac_cv_prog_cc_c89" in
3645  x)
3646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3647$as_echo "none needed" >&6; } ;;
3648  xno)
3649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3650$as_echo "unsupported" >&6; } ;;
3651  *)
3652    CC="$CC $ac_cv_prog_cc_c89"
3653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3654$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3655esac
3656if test "x$ac_cv_prog_cc_c89" != xno; then :
3657
3658fi
3659
3660ac_ext=c
3661ac_cpp='$CPP $CPPFLAGS'
3662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3664ac_compiler_gnu=$ac_cv_c_compiler_gnu
3665
3666
3667ac_ext=c
3668ac_cpp='$CPP $CPPFLAGS'
3669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3671ac_compiler_gnu=$ac_cv_c_compiler_gnu
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3673$as_echo_n "checking how to run the C preprocessor... " >&6; }
3674# On Suns, sometimes $CPP names a directory.
3675if test -n "$CPP" && test -d "$CPP"; then
3676  CPP=
3677fi
3678if test -z "$CPP"; then
3679  if ${ac_cv_prog_CPP+:} false; then :
3680  $as_echo_n "(cached) " >&6
3681else
3682      # Double quotes because CPP needs to be expanded
3683    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3684    do
3685      ac_preproc_ok=false
3686for ac_c_preproc_warn_flag in '' yes
3687do
3688  # Use a header file that comes with gcc, so configuring glibc
3689  # with a fresh cross-compiler works.
3690  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3691  # <limits.h> exists even on freestanding compilers.
3692  # On the NeXT, cc -E runs the code through the compiler's parser,
3693  # not just through cpp. "Syntax error" is here to catch this case.
3694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3695/* end confdefs.h.  */
3696#ifdef __STDC__
3697# include <limits.h>
3698#else
3699# include <assert.h>
3700#endif
3701		     Syntax error
3702_ACEOF
3703if ac_fn_c_try_cpp "$LINENO"; then :
3704
3705else
3706  # Broken: fails on valid input.
3707continue
3708fi
3709rm -f conftest.err conftest.i conftest.$ac_ext
3710
3711  # OK, works on sane cases.  Now check whether nonexistent headers
3712  # can be detected and how.
3713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3714/* end confdefs.h.  */
3715#include <ac_nonexistent.h>
3716_ACEOF
3717if ac_fn_c_try_cpp "$LINENO"; then :
3718  # Broken: success on invalid input.
3719continue
3720else
3721  # Passes both tests.
3722ac_preproc_ok=:
3723break
3724fi
3725rm -f conftest.err conftest.i conftest.$ac_ext
3726
3727done
3728# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3729rm -f conftest.i conftest.err conftest.$ac_ext
3730if $ac_preproc_ok; then :
3731  break
3732fi
3733
3734    done
3735    ac_cv_prog_CPP=$CPP
3736
3737fi
3738  CPP=$ac_cv_prog_CPP
3739else
3740  ac_cv_prog_CPP=$CPP
3741fi
3742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3743$as_echo "$CPP" >&6; }
3744ac_preproc_ok=false
3745for ac_c_preproc_warn_flag in '' yes
3746do
3747  # Use a header file that comes with gcc, so configuring glibc
3748  # with a fresh cross-compiler works.
3749  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3750  # <limits.h> exists even on freestanding compilers.
3751  # On the NeXT, cc -E runs the code through the compiler's parser,
3752  # not just through cpp. "Syntax error" is here to catch this case.
3753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3754/* end confdefs.h.  */
3755#ifdef __STDC__
3756# include <limits.h>
3757#else
3758# include <assert.h>
3759#endif
3760		     Syntax error
3761_ACEOF
3762if ac_fn_c_try_cpp "$LINENO"; then :
3763
3764else
3765  # Broken: fails on valid input.
3766continue
3767fi
3768rm -f conftest.err conftest.i conftest.$ac_ext
3769
3770  # OK, works on sane cases.  Now check whether nonexistent headers
3771  # can be detected and how.
3772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773/* end confdefs.h.  */
3774#include <ac_nonexistent.h>
3775_ACEOF
3776if ac_fn_c_try_cpp "$LINENO"; then :
3777  # Broken: success on invalid input.
3778continue
3779else
3780  # Passes both tests.
3781ac_preproc_ok=:
3782break
3783fi
3784rm -f conftest.err conftest.i conftest.$ac_ext
3785
3786done
3787# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3788rm -f conftest.i conftest.err conftest.$ac_ext
3789if $ac_preproc_ok; then :
3790
3791else
3792  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3794as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3795See \`config.log' for more details" "$LINENO" 5; }
3796fi
3797
3798ac_ext=c
3799ac_cpp='$CPP $CPPFLAGS'
3800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803
3804
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3806$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3807if ${ac_cv_path_GREP+:} false; then :
3808  $as_echo_n "(cached) " >&6
3809else
3810  if test -z "$GREP"; then
3811  ac_path_GREP_found=false
3812  # Loop through the user's path and test for each of PROGNAME-LIST
3813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3815do
3816  IFS=$as_save_IFS
3817  test -z "$as_dir" && as_dir=.
3818    for ac_prog in grep ggrep; do
3819    for ac_exec_ext in '' $ac_executable_extensions; do
3820      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3821      as_fn_executable_p "$ac_path_GREP" || continue
3822# Check for GNU ac_path_GREP and select it if it is found.
3823  # Check for GNU $ac_path_GREP
3824case `"$ac_path_GREP" --version 2>&1` in
3825*GNU*)
3826  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3827*)
3828  ac_count=0
3829  $as_echo_n 0123456789 >"conftest.in"
3830  while :
3831  do
3832    cat "conftest.in" "conftest.in" >"conftest.tmp"
3833    mv "conftest.tmp" "conftest.in"
3834    cp "conftest.in" "conftest.nl"
3835    $as_echo 'GREP' >> "conftest.nl"
3836    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3837    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3838    as_fn_arith $ac_count + 1 && ac_count=$as_val
3839    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3840      # Best one so far, save it but keep looking for a better one
3841      ac_cv_path_GREP="$ac_path_GREP"
3842      ac_path_GREP_max=$ac_count
3843    fi
3844    # 10*(2^10) chars as input seems more than enough
3845    test $ac_count -gt 10 && break
3846  done
3847  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3848esac
3849
3850      $ac_path_GREP_found && break 3
3851    done
3852  done
3853  done
3854IFS=$as_save_IFS
3855  if test -z "$ac_cv_path_GREP"; then
3856    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3857  fi
3858else
3859  ac_cv_path_GREP=$GREP
3860fi
3861
3862fi
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3864$as_echo "$ac_cv_path_GREP" >&6; }
3865 GREP="$ac_cv_path_GREP"
3866
3867
3868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3869$as_echo_n "checking for egrep... " >&6; }
3870if ${ac_cv_path_EGREP+:} false; then :
3871  $as_echo_n "(cached) " >&6
3872else
3873  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3874   then ac_cv_path_EGREP="$GREP -E"
3875   else
3876     if test -z "$EGREP"; then
3877  ac_path_EGREP_found=false
3878  # Loop through the user's path and test for each of PROGNAME-LIST
3879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3880for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3881do
3882  IFS=$as_save_IFS
3883  test -z "$as_dir" && as_dir=.
3884    for ac_prog in egrep; do
3885    for ac_exec_ext in '' $ac_executable_extensions; do
3886      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3887      as_fn_executable_p "$ac_path_EGREP" || continue
3888# Check for GNU ac_path_EGREP and select it if it is found.
3889  # Check for GNU $ac_path_EGREP
3890case `"$ac_path_EGREP" --version 2>&1` in
3891*GNU*)
3892  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3893*)
3894  ac_count=0
3895  $as_echo_n 0123456789 >"conftest.in"
3896  while :
3897  do
3898    cat "conftest.in" "conftest.in" >"conftest.tmp"
3899    mv "conftest.tmp" "conftest.in"
3900    cp "conftest.in" "conftest.nl"
3901    $as_echo 'EGREP' >> "conftest.nl"
3902    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3903    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3904    as_fn_arith $ac_count + 1 && ac_count=$as_val
3905    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3906      # Best one so far, save it but keep looking for a better one
3907      ac_cv_path_EGREP="$ac_path_EGREP"
3908      ac_path_EGREP_max=$ac_count
3909    fi
3910    # 10*(2^10) chars as input seems more than enough
3911    test $ac_count -gt 10 && break
3912  done
3913  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3914esac
3915
3916      $ac_path_EGREP_found && break 3
3917    done
3918  done
3919  done
3920IFS=$as_save_IFS
3921  if test -z "$ac_cv_path_EGREP"; then
3922    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3923  fi
3924else
3925  ac_cv_path_EGREP=$EGREP
3926fi
3927
3928   fi
3929fi
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3931$as_echo "$ac_cv_path_EGREP" >&6; }
3932 EGREP="$ac_cv_path_EGREP"
3933
3934
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3936$as_echo_n "checking for ANSI C header files... " >&6; }
3937if ${ac_cv_header_stdc+:} false; then :
3938  $as_echo_n "(cached) " >&6
3939else
3940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3941/* end confdefs.h.  */
3942#include <stdlib.h>
3943#include <stdarg.h>
3944#include <string.h>
3945#include <float.h>
3946
3947int
3948main ()
3949{
3950
3951  ;
3952  return 0;
3953}
3954_ACEOF
3955if ac_fn_c_try_compile "$LINENO"; then :
3956  ac_cv_header_stdc=yes
3957else
3958  ac_cv_header_stdc=no
3959fi
3960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3961
3962if test $ac_cv_header_stdc = yes; then
3963  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3965/* end confdefs.h.  */
3966#include <string.h>
3967
3968_ACEOF
3969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3970  $EGREP "memchr" >/dev/null 2>&1; then :
3971
3972else
3973  ac_cv_header_stdc=no
3974fi
3975rm -f conftest*
3976
3977fi
3978
3979if test $ac_cv_header_stdc = yes; then
3980  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982/* end confdefs.h.  */
3983#include <stdlib.h>
3984
3985_ACEOF
3986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3987  $EGREP "free" >/dev/null 2>&1; then :
3988
3989else
3990  ac_cv_header_stdc=no
3991fi
3992rm -f conftest*
3993
3994fi
3995
3996if test $ac_cv_header_stdc = yes; then
3997  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3998  if test "$cross_compiling" = yes; then :
3999  :
4000else
4001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h.  */
4003#include <ctype.h>
4004#include <stdlib.h>
4005#if ((' ' & 0x0FF) == 0x020)
4006# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4007# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4008#else
4009# define ISLOWER(c) \
4010		   (('a' <= (c) && (c) <= 'i') \
4011		     || ('j' <= (c) && (c) <= 'r') \
4012		     || ('s' <= (c) && (c) <= 'z'))
4013# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4014#endif
4015
4016#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4017int
4018main ()
4019{
4020  int i;
4021  for (i = 0; i < 256; i++)
4022    if (XOR (islower (i), ISLOWER (i))
4023	|| toupper (i) != TOUPPER (i))
4024      return 2;
4025  return 0;
4026}
4027_ACEOF
4028if ac_fn_c_try_run "$LINENO"; then :
4029
4030else
4031  ac_cv_header_stdc=no
4032fi
4033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4034  conftest.$ac_objext conftest.beam conftest.$ac_ext
4035fi
4036
4037fi
4038fi
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4040$as_echo "$ac_cv_header_stdc" >&6; }
4041if test $ac_cv_header_stdc = yes; then
4042
4043$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4044
4045fi
4046
4047# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4048for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4049		  inttypes.h stdint.h unistd.h
4050do :
4051  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4052ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4053"
4054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4055  cat >>confdefs.h <<_ACEOF
4056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4057_ACEOF
4058
4059fi
4060
4061done
4062
4063
4064
4065  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4066if test "x$ac_cv_header_minix_config_h" = xyes; then :
4067  MINIX=yes
4068else
4069  MINIX=
4070fi
4071
4072
4073  if test "$MINIX" = yes; then
4074
4075$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4076
4077
4078$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4079
4080
4081$as_echo "#define _MINIX 1" >>confdefs.h
4082
4083  fi
4084
4085
4086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4087$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4088if ${ac_cv_safe_to_define___extensions__+:} false; then :
4089  $as_echo_n "(cached) " >&6
4090else
4091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4092/* end confdefs.h.  */
4093
4094#         define __EXTENSIONS__ 1
4095          $ac_includes_default
4096int
4097main ()
4098{
4099
4100  ;
4101  return 0;
4102}
4103_ACEOF
4104if ac_fn_c_try_compile "$LINENO"; then :
4105  ac_cv_safe_to_define___extensions__=yes
4106else
4107  ac_cv_safe_to_define___extensions__=no
4108fi
4109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4110fi
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4112$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4113  test $ac_cv_safe_to_define___extensions__ = yes &&
4114    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4115
4116  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4117
4118  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4119
4120  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4121
4122  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4123
4124
4125
4126if test "$ac_cv_header_minix_config_h" = "yes"; then
4127
4128$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4129
4130fi
4131
4132case "$prefix" in
4133        NONE)
4134		prefix="/usr/local"
4135        ;;
4136esac
4137case "$exec_prefix" in
4138        NONE)
4139		exec_prefix="$prefix"
4140        ;;
4141esac
4142
4143# are we on MinGW?
4144if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4145else
4146	if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4147	else on_mingw="no"; fi
4148fi
4149
4150#
4151# Determine configuration file
4152# the eval is to evaluate shell expansion twice
4153UNBOUND_SBIN_DIR=`eval echo "${sbindir}"`
4154
4155UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"`
4156
4157UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"`
4158
4159if test $on_mingw = "no"; then
4160  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4161else
4162  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4163fi
4164
4165# Check whether --with-conf_file was given.
4166if test "${with_conf_file+set}" = set; then :
4167  withval=$with_conf_file; ub_conf_file="$withval"
4168fi
4169
4170
4171hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4172
4173
4174cat >>confdefs.h <<_ACEOF
4175#define CONFIGFILE "$hdr_config"
4176_ACEOF
4177
4178ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4179$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4180	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4181	 X"$ub_conf_file" : 'X\(//\)$' \| \
4182	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4183$as_echo X"$ub_conf_file" |
4184    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4185	    s//\1/
4186	    q
4187	  }
4188	  /^X\(\/\/\)[^/].*/{
4189	    s//\1/
4190	    q
4191	  }
4192	  /^X\(\/\/\)$/{
4193	    s//\1/
4194	    q
4195	  }
4196	  /^X\(\/\).*/{
4197	    s//\1/
4198	    q
4199	  }
4200	  s/.*/./; q'`
4201
4202
4203# Determine run, chroot directory and pidfile locations
4204
4205# Check whether --with-run-dir was given.
4206if test "${with_run_dir+set}" = set; then :
4207  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4208else
4209  if test $on_mingw = no; then
4210    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4211else
4212    UNBOUND_RUN_DIR=""
4213fi
4214
4215fi
4216
4217
4218hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4219
4220
4221cat >>confdefs.h <<_ACEOF
4222#define RUN_DIR "$hdr_run"
4223_ACEOF
4224
4225
4226
4227# Check whether --with-chroot-dir was given.
4228if test "${with_chroot_dir+set}" = set; then :
4229  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4230else
4231  if test $on_mingw = no; then
4232    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4233else
4234    UNBOUND_CHROOT_DIR=""
4235fi
4236
4237fi
4238
4239
4240hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4241
4242
4243cat >>confdefs.h <<_ACEOF
4244#define CHROOT_DIR "$hdr_chroot"
4245_ACEOF
4246
4247
4248
4249# Check whether --with-share-dir was given.
4250if test "${with_share_dir+set}" = set; then :
4251  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4252else
4253  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4254fi
4255
4256
4257
4258cat >>confdefs.h <<_ACEOF
4259#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4260_ACEOF
4261
4262
4263
4264# Check whether --with-pidfile was given.
4265if test "${with_pidfile+set}" = set; then :
4266  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4267else
4268  if test $on_mingw = no; then
4269    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4270else
4271    UNBOUND_PIDFILE=""
4272fi
4273
4274fi
4275
4276
4277hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4278
4279
4280cat >>confdefs.h <<_ACEOF
4281#define PIDFILE "$hdr_pid"
4282_ACEOF
4283
4284
4285
4286# Check whether --with-rootkey-file was given.
4287if test "${with_rootkey_file+set}" = set; then :
4288  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4289else
4290  if test $on_mingw = no; then
4291    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4292else
4293    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4294fi
4295
4296fi
4297
4298
4299hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4300
4301
4302cat >>confdefs.h <<_ACEOF
4303#define ROOT_ANCHOR_FILE "$hdr_rkey"
4304_ACEOF
4305
4306
4307
4308# Check whether --with-rootcert-file was given.
4309if test "${with_rootcert_file+set}" = set; then :
4310  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4311else
4312  if test $on_mingw = no; then
4313    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4314else
4315    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4316fi
4317
4318fi
4319
4320
4321hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4322
4323
4324cat >>confdefs.h <<_ACEOF
4325#define ROOT_CERT_FILE "$hdr_rpem"
4326_ACEOF
4327
4328
4329
4330# Check whether --with-username was given.
4331if test "${with_username+set}" = set; then :
4332  withval=$with_username; UNBOUND_USERNAME="$withval"
4333else
4334  UNBOUND_USERNAME="unbound"
4335fi
4336
4337
4338
4339cat >>confdefs.h <<_ACEOF
4340#define UB_USERNAME "$UNBOUND_USERNAME"
4341_ACEOF
4342
4343
4344
4345$as_echo "#define WINVER 0x0502" >>confdefs.h
4346
4347wnvs=`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/' `
4348
4349
4350cat >>confdefs.h <<_ACEOF
4351#define RSRC_PACKAGE_VERSION $wnvs
4352_ACEOF
4353
4354
4355# Checks for typedefs, structures, and compiler characteristics.
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4357$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4358if ${ac_cv_c_const+:} false; then :
4359  $as_echo_n "(cached) " >&6
4360else
4361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362/* end confdefs.h.  */
4363
4364int
4365main ()
4366{
4367
4368#ifndef __cplusplus
4369  /* Ultrix mips cc rejects this sort of thing.  */
4370  typedef int charset[2];
4371  const charset cs = { 0, 0 };
4372  /* SunOS 4.1.1 cc rejects this.  */
4373  char const *const *pcpcc;
4374  char **ppc;
4375  /* NEC SVR4.0.2 mips cc rejects this.  */
4376  struct point {int x, y;};
4377  static struct point const zero = {0,0};
4378  /* AIX XL C 1.02.0.0 rejects this.
4379     It does not let you subtract one const X* pointer from another in
4380     an arm of an if-expression whose if-part is not a constant
4381     expression */
4382  const char *g = "string";
4383  pcpcc = &g + (g ? g-g : 0);
4384  /* HPUX 7.0 cc rejects these. */
4385  ++pcpcc;
4386  ppc = (char**) pcpcc;
4387  pcpcc = (char const *const *) ppc;
4388  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4389    char tx;
4390    char *t = &tx;
4391    char const *s = 0 ? (char *) 0 : (char const *) 0;
4392
4393    *t++ = 0;
4394    if (s) return 0;
4395  }
4396  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4397    int x[] = {25, 17};
4398    const int *foo = &x[0];
4399    ++foo;
4400  }
4401  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4402    typedef const int *iptr;
4403    iptr p = 0;
4404    ++p;
4405  }
4406  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4407       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4408    struct s { int j; const int *ap[3]; } bx;
4409    struct s *b = &bx; b->j = 5;
4410  }
4411  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4412    const int foo = 10;
4413    if (!foo) return 0;
4414  }
4415  return !cs[0] && !zero.x;
4416#endif
4417
4418  ;
4419  return 0;
4420}
4421_ACEOF
4422if ac_fn_c_try_compile "$LINENO"; then :
4423  ac_cv_c_const=yes
4424else
4425  ac_cv_c_const=no
4426fi
4427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4428fi
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4430$as_echo "$ac_cv_c_const" >&6; }
4431if test $ac_cv_c_const = no; then
4432
4433$as_echo "#define const /**/" >>confdefs.h
4434
4435fi
4436
4437ac_ext=c
4438ac_cpp='$CPP $CPPFLAGS'
4439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4441ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442
4443# allow user to override the -g -O2 flags.
4444default_cflags=no
4445if test "x$CFLAGS" = "x" ; then
4446
4447
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4449$as_echo_n "checking whether $CC supports -g... " >&6; }
4450cache=`echo g | sed 'y%.=/+-%___p_%'`
4451if eval \${cv_prog_cc_flag_$cache+:} false; then :
4452  $as_echo_n "(cached) " >&6
4453else
4454
4455echo 'void f(void){}' >conftest.c
4456if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4457eval "cv_prog_cc_flag_$cache=yes"
4458else
4459eval "cv_prog_cc_flag_$cache=no"
4460fi
4461rm -f conftest conftest.o conftest.c
4462
4463fi
4464
4465if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4467$as_echo "yes" >&6; }
4468:
4469CFLAGS="$CFLAGS -g"
4470else
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472$as_echo "no" >&6; }
4473:
4474
4475fi
4476
4477
4478
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4480$as_echo_n "checking whether $CC supports -O2... " >&6; }
4481cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4482if eval \${cv_prog_cc_flag_$cache+:} false; then :
4483  $as_echo_n "(cached) " >&6
4484else
4485
4486echo 'void f(void){}' >conftest.c
4487if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4488eval "cv_prog_cc_flag_$cache=yes"
4489else
4490eval "cv_prog_cc_flag_$cache=no"
4491fi
4492rm -f conftest conftest.o conftest.c
4493
4494fi
4495
4496if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4498$as_echo "yes" >&6; }
4499:
4500CFLAGS="$CFLAGS -O2"
4501else
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4503$as_echo "no" >&6; }
4504:
4505
4506fi
4507
4508default_cflags=yes
4509fi
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515if test -n "$ac_tool_prefix"; then
4516  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4517set dummy ${ac_tool_prefix}gcc; ac_word=$2
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4519$as_echo_n "checking for $ac_word... " >&6; }
4520if ${ac_cv_prog_CC+:} false; then :
4521  $as_echo_n "(cached) " >&6
4522else
4523  if test -n "$CC"; then
4524  ac_cv_prog_CC="$CC" # Let the user override the test.
4525else
4526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH
4528do
4529  IFS=$as_save_IFS
4530  test -z "$as_dir" && as_dir=.
4531    for ac_exec_ext in '' $ac_executable_extensions; do
4532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4533    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4535    break 2
4536  fi
4537done
4538  done
4539IFS=$as_save_IFS
4540
4541fi
4542fi
4543CC=$ac_cv_prog_CC
4544if test -n "$CC"; then
4545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4546$as_echo "$CC" >&6; }
4547else
4548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4549$as_echo "no" >&6; }
4550fi
4551
4552
4553fi
4554if test -z "$ac_cv_prog_CC"; then
4555  ac_ct_CC=$CC
4556  # Extract the first word of "gcc", so it can be a program name with args.
4557set dummy gcc; ac_word=$2
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4559$as_echo_n "checking for $ac_word... " >&6; }
4560if ${ac_cv_prog_ac_ct_CC+:} false; then :
4561  $as_echo_n "(cached) " >&6
4562else
4563  if test -n "$ac_ct_CC"; then
4564  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4565else
4566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in $PATH
4568do
4569  IFS=$as_save_IFS
4570  test -z "$as_dir" && as_dir=.
4571    for ac_exec_ext in '' $ac_executable_extensions; do
4572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573    ac_cv_prog_ac_ct_CC="gcc"
4574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575    break 2
4576  fi
4577done
4578  done
4579IFS=$as_save_IFS
4580
4581fi
4582fi
4583ac_ct_CC=$ac_cv_prog_ac_ct_CC
4584if test -n "$ac_ct_CC"; then
4585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4586$as_echo "$ac_ct_CC" >&6; }
4587else
4588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
4590fi
4591
4592  if test "x$ac_ct_CC" = x; then
4593    CC=""
4594  else
4595    case $cross_compiling:$ac_tool_warned in
4596yes:)
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4599ac_tool_warned=yes ;;
4600esac
4601    CC=$ac_ct_CC
4602  fi
4603else
4604  CC="$ac_cv_prog_CC"
4605fi
4606
4607if test -z "$CC"; then
4608          if test -n "$ac_tool_prefix"; then
4609    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4610set dummy ${ac_tool_prefix}cc; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_prog_CC+:} false; then :
4614  $as_echo_n "(cached) " >&6
4615else
4616  if test -n "$CC"; then
4617  ac_cv_prog_CC="$CC" # Let the user override the test.
4618else
4619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620for as_dir in $PATH
4621do
4622  IFS=$as_save_IFS
4623  test -z "$as_dir" && as_dir=.
4624    for ac_exec_ext in '' $ac_executable_extensions; do
4625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626    ac_cv_prog_CC="${ac_tool_prefix}cc"
4627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628    break 2
4629  fi
4630done
4631  done
4632IFS=$as_save_IFS
4633
4634fi
4635fi
4636CC=$ac_cv_prog_CC
4637if test -n "$CC"; then
4638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4639$as_echo "$CC" >&6; }
4640else
4641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642$as_echo "no" >&6; }
4643fi
4644
4645
4646  fi
4647fi
4648if test -z "$CC"; then
4649  # Extract the first word of "cc", so it can be a program name with args.
4650set dummy cc; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if ${ac_cv_prog_CC+:} false; then :
4654  $as_echo_n "(cached) " >&6
4655else
4656  if test -n "$CC"; then
4657  ac_cv_prog_CC="$CC" # Let the user override the test.
4658else
4659  ac_prog_rejected=no
4660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661for as_dir in $PATH
4662do
4663  IFS=$as_save_IFS
4664  test -z "$as_dir" && as_dir=.
4665    for ac_exec_ext in '' $ac_executable_extensions; do
4666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4667    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4668       ac_prog_rejected=yes
4669       continue
4670     fi
4671    ac_cv_prog_CC="cc"
4672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673    break 2
4674  fi
4675done
4676  done
4677IFS=$as_save_IFS
4678
4679if test $ac_prog_rejected = yes; then
4680  # We found a bogon in the path, so make sure we never use it.
4681  set dummy $ac_cv_prog_CC
4682  shift
4683  if test $# != 0; then
4684    # We chose a different compiler from the bogus one.
4685    # However, it has the same basename, so the bogon will be chosen
4686    # first if we set CC to just the basename; use the full file name.
4687    shift
4688    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4689  fi
4690fi
4691fi
4692fi
4693CC=$ac_cv_prog_CC
4694if test -n "$CC"; then
4695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4696$as_echo "$CC" >&6; }
4697else
4698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699$as_echo "no" >&6; }
4700fi
4701
4702
4703fi
4704if test -z "$CC"; then
4705  if test -n "$ac_tool_prefix"; then
4706  for ac_prog in cl.exe
4707  do
4708    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4709set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
4712if ${ac_cv_prog_CC+:} false; then :
4713  $as_echo_n "(cached) " >&6
4714else
4715  if test -n "$CC"; then
4716  ac_cv_prog_CC="$CC" # Let the user override the test.
4717else
4718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in $PATH
4720do
4721  IFS=$as_save_IFS
4722  test -z "$as_dir" && as_dir=.
4723    for ac_exec_ext in '' $ac_executable_extensions; do
4724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4725    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4727    break 2
4728  fi
4729done
4730  done
4731IFS=$as_save_IFS
4732
4733fi
4734fi
4735CC=$ac_cv_prog_CC
4736if test -n "$CC"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4738$as_echo "$CC" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745    test -n "$CC" && break
4746  done
4747fi
4748if test -z "$CC"; then
4749  ac_ct_CC=$CC
4750  for ac_prog in cl.exe
4751do
4752  # Extract the first word of "$ac_prog", so it can be a program name with args.
4753set dummy $ac_prog; ac_word=$2
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
4756if ${ac_cv_prog_ac_ct_CC+:} false; then :
4757  $as_echo_n "(cached) " >&6
4758else
4759  if test -n "$ac_ct_CC"; then
4760  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4761else
4762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in $PATH
4764do
4765  IFS=$as_save_IFS
4766  test -z "$as_dir" && as_dir=.
4767    for ac_exec_ext in '' $ac_executable_extensions; do
4768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4769    ac_cv_prog_ac_ct_CC="$ac_prog"
4770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4771    break 2
4772  fi
4773done
4774  done
4775IFS=$as_save_IFS
4776
4777fi
4778fi
4779ac_ct_CC=$ac_cv_prog_ac_ct_CC
4780if test -n "$ac_ct_CC"; then
4781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4782$as_echo "$ac_ct_CC" >&6; }
4783else
4784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
4786fi
4787
4788
4789  test -n "$ac_ct_CC" && break
4790done
4791
4792  if test "x$ac_ct_CC" = x; then
4793    CC=""
4794  else
4795    case $cross_compiling:$ac_tool_warned in
4796yes:)
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4799ac_tool_warned=yes ;;
4800esac
4801    CC=$ac_ct_CC
4802  fi
4803fi
4804
4805fi
4806
4807
4808test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4810as_fn_error $? "no acceptable C compiler found in \$PATH
4811See \`config.log' for more details" "$LINENO" 5; }
4812
4813# Provide some information about the compiler.
4814$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4815set X $ac_compile
4816ac_compiler=$2
4817for ac_option in --version -v -V -qversion; do
4818  { { ac_try="$ac_compiler $ac_option >&5"
4819case "(($ac_try" in
4820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4821  *) ac_try_echo=$ac_try;;
4822esac
4823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4824$as_echo "$ac_try_echo"; } >&5
4825  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4826  ac_status=$?
4827  if test -s conftest.err; then
4828    sed '10a\
4829... rest of stderr output deleted ...
4830         10q' conftest.err >conftest.er1
4831    cat conftest.er1 >&5
4832  fi
4833  rm -f conftest.er1 conftest.err
4834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4835  test $ac_status = 0; }
4836done
4837
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4839$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4840if ${ac_cv_c_compiler_gnu+:} false; then :
4841  $as_echo_n "(cached) " >&6
4842else
4843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844/* end confdefs.h.  */
4845
4846int
4847main ()
4848{
4849#ifndef __GNUC__
4850       choke me
4851#endif
4852
4853  ;
4854  return 0;
4855}
4856_ACEOF
4857if ac_fn_c_try_compile "$LINENO"; then :
4858  ac_compiler_gnu=yes
4859else
4860  ac_compiler_gnu=no
4861fi
4862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4863ac_cv_c_compiler_gnu=$ac_compiler_gnu
4864
4865fi
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4867$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4868if test $ac_compiler_gnu = yes; then
4869  GCC=yes
4870else
4871  GCC=
4872fi
4873ac_test_CFLAGS=${CFLAGS+set}
4874ac_save_CFLAGS=$CFLAGS
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4876$as_echo_n "checking whether $CC accepts -g... " >&6; }
4877if ${ac_cv_prog_cc_g+:} false; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  ac_save_c_werror_flag=$ac_c_werror_flag
4881   ac_c_werror_flag=yes
4882   ac_cv_prog_cc_g=no
4883   CFLAGS="-g"
4884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4885/* end confdefs.h.  */
4886
4887int
4888main ()
4889{
4890
4891  ;
4892  return 0;
4893}
4894_ACEOF
4895if ac_fn_c_try_compile "$LINENO"; then :
4896  ac_cv_prog_cc_g=yes
4897else
4898  CFLAGS=""
4899      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h.  */
4901
4902int
4903main ()
4904{
4905
4906  ;
4907  return 0;
4908}
4909_ACEOF
4910if ac_fn_c_try_compile "$LINENO"; then :
4911
4912else
4913  ac_c_werror_flag=$ac_save_c_werror_flag
4914	 CFLAGS="-g"
4915	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4916/* end confdefs.h.  */
4917
4918int
4919main ()
4920{
4921
4922  ;
4923  return 0;
4924}
4925_ACEOF
4926if ac_fn_c_try_compile "$LINENO"; then :
4927  ac_cv_prog_cc_g=yes
4928fi
4929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4930fi
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932fi
4933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934   ac_c_werror_flag=$ac_save_c_werror_flag
4935fi
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4937$as_echo "$ac_cv_prog_cc_g" >&6; }
4938if test "$ac_test_CFLAGS" = set; then
4939  CFLAGS=$ac_save_CFLAGS
4940elif test $ac_cv_prog_cc_g = yes; then
4941  if test "$GCC" = yes; then
4942    CFLAGS="-g -O2"
4943  else
4944    CFLAGS="-g"
4945  fi
4946else
4947  if test "$GCC" = yes; then
4948    CFLAGS="-O2"
4949  else
4950    CFLAGS=
4951  fi
4952fi
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4954$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4955if ${ac_cv_prog_cc_c89+:} false; then :
4956  $as_echo_n "(cached) " >&6
4957else
4958  ac_cv_prog_cc_c89=no
4959ac_save_CC=$CC
4960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961/* end confdefs.h.  */
4962#include <stdarg.h>
4963#include <stdio.h>
4964struct stat;
4965/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4966struct buf { int x; };
4967FILE * (*rcsopen) (struct buf *, struct stat *, int);
4968static char *e (p, i)
4969     char **p;
4970     int i;
4971{
4972  return p[i];
4973}
4974static char *f (char * (*g) (char **, int), char **p, ...)
4975{
4976  char *s;
4977  va_list v;
4978  va_start (v,p);
4979  s = g (p, va_arg (v,int));
4980  va_end (v);
4981  return s;
4982}
4983
4984/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4985   function prototypes and stuff, but not '\xHH' hex character constants.
4986   These don't provoke an error unfortunately, instead are silently treated
4987   as 'x'.  The following induces an error, until -std is added to get
4988   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4989   array size at least.  It's necessary to write '\x00'==0 to get something
4990   that's true only with -std.  */
4991int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4992
4993/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4994   inside strings and character constants.  */
4995#define FOO(x) 'x'
4996int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4997
4998int test (int i, double x);
4999struct s1 {int (*f) (int a);};
5000struct s2 {int (*f) (double a);};
5001int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5002int argc;
5003char **argv;
5004int
5005main ()
5006{
5007return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5008  ;
5009  return 0;
5010}
5011_ACEOF
5012for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5013	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5014do
5015  CC="$ac_save_CC $ac_arg"
5016  if ac_fn_c_try_compile "$LINENO"; then :
5017  ac_cv_prog_cc_c89=$ac_arg
5018fi
5019rm -f core conftest.err conftest.$ac_objext
5020  test "x$ac_cv_prog_cc_c89" != "xno" && break
5021done
5022rm -f conftest.$ac_ext
5023CC=$ac_save_CC
5024
5025fi
5026# AC_CACHE_VAL
5027case "x$ac_cv_prog_cc_c89" in
5028  x)
5029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5030$as_echo "none needed" >&6; } ;;
5031  xno)
5032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5033$as_echo "unsupported" >&6; } ;;
5034  *)
5035    CC="$CC $ac_cv_prog_cc_c89"
5036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5037$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5038esac
5039if test "x$ac_cv_prog_cc_c89" != xno; then :
5040
5041fi
5042
5043ac_ext=c
5044ac_cpp='$CPP $CPPFLAGS'
5045ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5046ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5047ac_compiler_gnu=$ac_cv_c_compiler_gnu
5048
5049
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
5051$as_echo_n "checking $CC dependency flag... " >&6; }
5052echo 'void f(){}' >conftest.c
5053if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5054	DEPFLAG="-MM"
5055else
5056  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5057	DEPFLAG="-xM1"
5058  else
5059	DEPFLAG="-MM"  # dunno do something
5060  fi
5061fi
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5063$as_echo "$DEPFLAG" >&6; }
5064rm -f conftest.c
5065
5066
5067
5068
5069
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5071$as_echo_n "checking whether $CC supports -Werror... " >&6; }
5072cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5073if eval \${cv_prog_cc_flag_$cache+:} false; then :
5074  $as_echo_n "(cached) " >&6
5075else
5076
5077echo 'void f(void){}' >conftest.c
5078if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5079eval "cv_prog_cc_flag_$cache=yes"
5080else
5081eval "cv_prog_cc_flag_$cache=no"
5082fi
5083rm -f conftest conftest.o conftest.c
5084
5085fi
5086
5087if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5089$as_echo "yes" >&6; }
5090:
5091ERRFLAG="-Werror"
5092else
5093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095:
5096ERRFLAG="-errwarn"
5097fi
5098
5099
5100
5101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5102$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5103cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5104if eval \${cv_prog_cc_flag_$cache+:} false; then :
5105  $as_echo_n "(cached) " >&6
5106else
5107
5108echo 'void f(void){}' >conftest.c
5109if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5110eval "cv_prog_cc_flag_$cache=yes"
5111else
5112eval "cv_prog_cc_flag_$cache=no"
5113fi
5114rm -f conftest conftest.o conftest.c
5115
5116fi
5117
5118if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5120$as_echo "yes" >&6; }
5121:
5122ERRFLAG="$ERRFLAG -Wall"
5123else
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
5126:
5127ERRFLAG="$ERRFLAG -errfmt"
5128fi
5129
5130
5131
5132
5133
5134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5135$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5136cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5137if eval \${cv_prog_cc_flag_$cache+:} false; then :
5138  $as_echo_n "(cached) " >&6
5139else
5140
5141echo 'void f(void){}' >conftest.c
5142if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5143eval "cv_prog_cc_flag_$cache=yes"
5144else
5145eval "cv_prog_cc_flag_$cache=no"
5146fi
5147rm -f conftest conftest.o conftest.c
5148
5149fi
5150
5151if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5153$as_echo "yes" >&6; }
5154:
5155C99FLAG="-std=c99"
5156else
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159:
5160
5161fi
5162
5163
5164
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5166$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5167cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5168if eval \${cv_prog_cc_flag_$cache+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171
5172echo 'void f(void){}' >conftest.c
5173if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5174eval "cv_prog_cc_flag_$cache=yes"
5175else
5176eval "cv_prog_cc_flag_$cache=no"
5177fi
5178rm -f conftest conftest.o conftest.c
5179
5180fi
5181
5182if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5184$as_echo "yes" >&6; }
5185:
5186C99FLAG="-xc99"
5187else
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190:
5191
5192fi
5193
5194
5195for ac_header in getopt.h time.h
5196do :
5197  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5199"
5200if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5201  cat >>confdefs.h <<_ACEOF
5202#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5203_ACEOF
5204
5205fi
5206
5207done
5208
5209
5210
5211
5212
5213{ $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
5214$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; }
5215cache=`$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`
5216if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219
5220echo '
5221#include "confdefs.h"
5222#include <stdlib.h>
5223#include <ctype.h>
5224#include <sys/time.h>
5225#ifdef HAVE_TIME_H
5226#include <time.h>
5227#endif
5228#include <unistd.h>
5229#include <netdb.h>
5230#ifdef HAVE_GETOPT_H
5231#include <getopt.h>
5232#endif
5233
5234int test() {
5235	int a;
5236	char **opts = NULL;
5237	struct timeval tv;
5238	char *t;
5239	time_t time = 0;
5240	char *buf = NULL;
5241	const char* str = NULL;
5242	struct msghdr msg;
5243	msg.msg_control = 0;
5244	t = ctime_r(&time, buf);
5245	tv.tv_usec = 10;
5246	srandom(32);
5247	a = getopt(2, opts, "a");
5248	a = isascii(32);
5249	str = gai_strerror(0);
5250	if(str && t && tv.tv_usec && msg.msg_control)
5251		a = 0;
5252	return a;
5253}
5254' > conftest.c
5255echo 'void f(){}' >>conftest.c
5256if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5257eval "cv_prog_cc_flag_needed_$cache=no"
5258else
5259
5260if 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
5261eval "cv_prog_cc_flag_needed_$cache=yes"
5262else
5263eval "cv_prog_cc_flag_needed_$cache=fail"
5264#echo 'Test with flag fails too!'
5265#cat conftest.c
5266#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"
5267#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`
5268#exit 1
5269fi
5270
5271fi
5272rm -f conftest conftest.c conftest.o
5273
5274fi
5275
5276if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5278$as_echo "yes" >&6; }
5279:
5280CFLAGS="$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"
5281else
5282if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5284$as_echo "no" >&6; }
5285#echo 'Test with flag is no!'
5286#cat conftest.c
5287#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"
5288#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`
5289#exit 1
5290:
5291
5292else
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5294$as_echo "failed" >&6; }
5295:
5296
5297fi
5298fi
5299
5300
5301
5302
5303
5304{ $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
5305$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; }
5306cache=`$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`
5307if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5308  $as_echo_n "(cached) " >&6
5309else
5310
5311echo '
5312#include "confdefs.h"
5313#include <stdlib.h>
5314#include <ctype.h>
5315#include <sys/time.h>
5316#ifdef HAVE_TIME_H
5317#include <time.h>
5318#endif
5319#include <unistd.h>
5320#include <netdb.h>
5321#ifdef HAVE_GETOPT_H
5322#include <getopt.h>
5323#endif
5324
5325int test() {
5326	int a;
5327	char **opts = NULL;
5328	struct timeval tv;
5329	char *t;
5330	time_t time = 0;
5331	char *buf = NULL;
5332	const char* str = NULL;
5333	struct msghdr msg;
5334	msg.msg_control = 0;
5335	t = ctime_r(&time, buf);
5336	tv.tv_usec = 10;
5337	srandom(32);
5338	a = getopt(2, opts, "a");
5339	a = isascii(32);
5340	str = gai_strerror(0);
5341	if(str && t && tv.tv_usec && msg.msg_control)
5342		a = 0;
5343	return a;
5344}
5345' > conftest.c
5346echo 'void f(){}' >>conftest.c
5347if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5348eval "cv_prog_cc_flag_needed_$cache=no"
5349else
5350
5351if 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
5352eval "cv_prog_cc_flag_needed_$cache=yes"
5353else
5354eval "cv_prog_cc_flag_needed_$cache=fail"
5355#echo 'Test with flag fails too!'
5356#cat conftest.c
5357#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"
5358#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`
5359#exit 1
5360fi
5361
5362fi
5363rm -f conftest conftest.c conftest.o
5364
5365fi
5366
5367if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
5370:
5371CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5372else
5373if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
5376#echo 'Test with flag is no!'
5377#cat conftest.c
5378#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"
5379#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`
5380#exit 1
5381:
5382
5383else
5384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5385$as_echo "failed" >&6; }
5386:
5387
5388fi
5389fi
5390
5391
5392
5393
5394
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5396$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5397cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5398if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5399  $as_echo_n "(cached) " >&6
5400else
5401
5402echo '
5403#include <stdbool.h>
5404#include <ctype.h>
5405int test() {
5406        int a = 0;
5407        return a;
5408}
5409' > conftest.c
5410echo 'void f(){}' >>conftest.c
5411if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5412eval "cv_prog_cc_flag_needed_$cache=no"
5413else
5414
5415if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5416eval "cv_prog_cc_flag_needed_$cache=yes"
5417else
5418eval "cv_prog_cc_flag_needed_$cache=fail"
5419#echo 'Test with flag fails too!'
5420#cat conftest.c
5421#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5422#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5423#exit 1
5424fi
5425
5426fi
5427rm -f conftest conftest.c conftest.o
5428
5429fi
5430
5431if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5433$as_echo "yes" >&6; }
5434:
5435CFLAGS="$CFLAGS $C99FLAG"
5436else
5437if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5440#echo 'Test with flag is no!'
5441#cat conftest.c
5442#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5443#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5444#exit 1
5445:
5446
5447else
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5449$as_echo "failed" >&6; }
5450:
5451
5452fi
5453fi
5454
5455
5456
5457
5458
5459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5460$as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5461cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5462if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5463  $as_echo_n "(cached) " >&6
5464else
5465
5466echo '
5467#include <ctype.h>
5468
5469int test() {
5470        int a;
5471        a = isascii(32);
5472        return a;
5473}
5474' > conftest.c
5475echo 'void f(){}' >>conftest.c
5476if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5477eval "cv_prog_cc_flag_needed_$cache=no"
5478else
5479
5480if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5481eval "cv_prog_cc_flag_needed_$cache=yes"
5482else
5483eval "cv_prog_cc_flag_needed_$cache=fail"
5484#echo 'Test with flag fails too!'
5485#cat conftest.c
5486#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5487#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5488#exit 1
5489fi
5490
5491fi
5492rm -f conftest conftest.c conftest.o
5493
5494fi
5495
5496if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5498$as_echo "yes" >&6; }
5499:
5500CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5501else
5502if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504$as_echo "no" >&6; }
5505#echo 'Test with flag is no!'
5506#cat conftest.c
5507#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5508#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5509#exit 1
5510:
5511
5512else
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5514$as_echo "failed" >&6; }
5515:
5516
5517fi
5518fi
5519
5520
5521
5522
5523
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5525$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5526cache=_D_GNU_SOURCE
5527if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5528  $as_echo_n "(cached) " >&6
5529else
5530
5531echo '
5532#include <netinet/in.h>
5533
5534int test() {
5535        struct in6_pktinfo inf;
5536	int a = (int)sizeof(inf);
5537        return a;
5538}
5539' > conftest.c
5540echo 'void f(){}' >>conftest.c
5541if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5542eval "cv_prog_cc_flag_needed_$cache=no"
5543else
5544
5545if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5546eval "cv_prog_cc_flag_needed_$cache=yes"
5547else
5548eval "cv_prog_cc_flag_needed_$cache=fail"
5549#echo 'Test with flag fails too!'
5550#cat conftest.c
5551#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5552#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5553#exit 1
5554fi
5555
5556fi
5557rm -f conftest conftest.c conftest.o
5558
5559fi
5560
5561if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5563$as_echo "yes" >&6; }
5564:
5565CFLAGS="$CFLAGS -D_GNU_SOURCE"
5566else
5567if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570#echo 'Test with flag is no!'
5571#cat conftest.c
5572#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5573#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5574#exit 1
5575:
5576
5577else
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5579$as_echo "failed" >&6; }
5580:
5581
5582fi
5583fi
5584
5585
5586# check again for GNU_SOURCE for setresgid. May fail if setresgid
5587# is not available at all. -D_FRSRESGID is to make this check unique.
5588# otherwise we would get the previous cached result.
5589
5590
5591
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5593$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5594cache=_D_GNU_SOURCE__D_FRSRESGID
5595if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5596  $as_echo_n "(cached) " >&6
5597else
5598
5599echo '
5600#include <unistd.h>
5601
5602int test() {
5603	int a = setresgid(0,0,0);
5604	a = setresuid(0,0,0);
5605        return a;
5606}
5607' > conftest.c
5608echo 'void f(){}' >>conftest.c
5609if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5610eval "cv_prog_cc_flag_needed_$cache=no"
5611else
5612
5613if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5614eval "cv_prog_cc_flag_needed_$cache=yes"
5615else
5616eval "cv_prog_cc_flag_needed_$cache=fail"
5617#echo 'Test with flag fails too!'
5618#cat conftest.c
5619#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5620#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5621#exit 1
5622fi
5623
5624fi
5625rm -f conftest conftest.c conftest.o
5626
5627fi
5628
5629if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5631$as_echo "yes" >&6; }
5632:
5633CFLAGS="$CFLAGS -D_GNU_SOURCE"
5634else
5635if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638#echo 'Test with flag is no!'
5639#cat conftest.c
5640#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5641#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5642#exit 1
5643:
5644
5645else
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5647$as_echo "failed" >&6; }
5648:
5649
5650fi
5651fi
5652
5653
5654
5655
5656
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5658$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5659cache=_D_POSIX_C_SOURCE_200112
5660if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663
5664echo '
5665#include "confdefs.h"
5666#ifdef HAVE_TIME_H
5667#include <time.h>
5668#endif
5669#include <netdb.h>
5670
5671int test() {
5672        int a = 0;
5673        char *t;
5674        time_t time = 0;
5675        char *buf = NULL;
5676	const char* str = NULL;
5677        t = ctime_r(&time, buf);
5678	str = gai_strerror(0);
5679	if(t && str)
5680		a = 0;
5681        return a;
5682}
5683' > conftest.c
5684echo 'void f(){}' >>conftest.c
5685if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5686eval "cv_prog_cc_flag_needed_$cache=no"
5687else
5688
5689if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5690eval "cv_prog_cc_flag_needed_$cache=yes"
5691else
5692eval "cv_prog_cc_flag_needed_$cache=fail"
5693#echo 'Test with flag fails too!'
5694#cat conftest.c
5695#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5696#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5697#exit 1
5698fi
5699
5700fi
5701rm -f conftest conftest.c conftest.o
5702
5703fi
5704
5705if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5707$as_echo "yes" >&6; }
5708:
5709CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5710else
5711if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713$as_echo "no" >&6; }
5714#echo 'Test with flag is no!'
5715#cat conftest.c
5716#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5717#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5718#exit 1
5719:
5720
5721else
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5723$as_echo "failed" >&6; }
5724:
5725
5726fi
5727fi
5728
5729
5730
5731
5732
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5734$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5735cache=_D__EXTENSIONS__
5736if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5737  $as_echo_n "(cached) " >&6
5738else
5739
5740echo '
5741#include "confdefs.h"
5742#include <stdlib.h>
5743#include <ctype.h>
5744#include <sys/time.h>
5745#ifdef HAVE_TIME_H
5746#include <time.h>
5747#endif
5748#include <unistd.h>
5749#ifdef HAVE_GETOPT_H
5750#include <getopt.h>
5751#endif
5752
5753int test() {
5754        int a;
5755        char **opts = NULL;
5756        struct timeval tv;
5757        tv.tv_usec = 10;
5758        srandom(32);
5759        a = getopt(2, opts, "a");
5760        a = isascii(32);
5761	if(tv.tv_usec)
5762		a = 0;
5763        return a;
5764}
5765' > conftest.c
5766echo 'void f(){}' >>conftest.c
5767if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5768eval "cv_prog_cc_flag_needed_$cache=no"
5769else
5770
5771if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5772eval "cv_prog_cc_flag_needed_$cache=yes"
5773else
5774eval "cv_prog_cc_flag_needed_$cache=fail"
5775#echo 'Test with flag fails too!'
5776#cat conftest.c
5777#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5778#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5779#exit 1
5780fi
5781
5782fi
5783rm -f conftest conftest.c conftest.o
5784
5785fi
5786
5787if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5789$as_echo "yes" >&6; }
5790:
5791CFLAGS="$CFLAGS -D__EXTENSIONS__"
5792else
5793if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796#echo 'Test with flag is no!'
5797#cat conftest.c
5798#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5799#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5800#exit 1
5801:
5802
5803else
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5805$as_echo "failed" >&6; }
5806:
5807
5808fi
5809fi
5810
5811
5812
5813
5814# debug mode flags warnings
5815# Check whether --enable-checking was given.
5816if test "${enable_checking+set}" = set; then :
5817  enableval=$enable_checking;
5818fi
5819
5820# Check whether --enable-debug was given.
5821if test "${enable_debug+set}" = set; then :
5822  enableval=$enable_debug;
5823fi
5824
5825if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5826else debug_enabled="$enable_checking"; fi
5827
5828case "$debug_enabled" in
5829        yes)
5830
5831
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5833$as_echo_n "checking whether $CC supports -W... " >&6; }
5834cache=`echo W | sed 'y%.=/+-%___p_%'`
5835if eval \${cv_prog_cc_flag_$cache+:} false; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838
5839echo 'void f(void){}' >conftest.c
5840if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5841eval "cv_prog_cc_flag_$cache=yes"
5842else
5843eval "cv_prog_cc_flag_$cache=no"
5844fi
5845rm -f conftest conftest.o conftest.c
5846
5847fi
5848
5849if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5851$as_echo "yes" >&6; }
5852:
5853CFLAGS="$CFLAGS -W"
5854else
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5856$as_echo "no" >&6; }
5857:
5858
5859fi
5860
5861
5862
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5864$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5865cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5866if eval \${cv_prog_cc_flag_$cache+:} false; then :
5867  $as_echo_n "(cached) " >&6
5868else
5869
5870echo 'void f(void){}' >conftest.c
5871if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5872eval "cv_prog_cc_flag_$cache=yes"
5873else
5874eval "cv_prog_cc_flag_$cache=no"
5875fi
5876rm -f conftest conftest.o conftest.c
5877
5878fi
5879
5880if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5882$as_echo "yes" >&6; }
5883:
5884CFLAGS="$CFLAGS -Wall"
5885else
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888:
5889
5890fi
5891
5892
5893
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5895$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5896cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5897if eval \${cv_prog_cc_flag_$cache+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900
5901echo 'void f(void){}' >conftest.c
5902if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5903eval "cv_prog_cc_flag_$cache=yes"
5904else
5905eval "cv_prog_cc_flag_$cache=no"
5906fi
5907rm -f conftest conftest.o conftest.c
5908
5909fi
5910
5911if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5913$as_echo "yes" >&6; }
5914:
5915CFLAGS="$CFLAGS -Wextra"
5916else
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5918$as_echo "no" >&6; }
5919:
5920
5921fi
5922
5923
5924
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5926$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5927cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5928if eval \${cv_prog_cc_flag_$cache+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931
5932echo 'void f(void){}' >conftest.c
5933if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5934eval "cv_prog_cc_flag_$cache=yes"
5935else
5936eval "cv_prog_cc_flag_$cache=no"
5937fi
5938rm -f conftest conftest.o conftest.c
5939
5940fi
5941
5942if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5944$as_echo "yes" >&6; }
5945:
5946CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5947else
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5949$as_echo "no" >&6; }
5950:
5951
5952fi
5953
5954
5955$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5956
5957		;;
5958	no|*)
5959		# nothing to do.
5960		;;
5961esac
5962if test "$default_cflags" = "yes"; then
5963	# only when CFLAGS was "" at the start, if the users wants to
5964	# override we shouldn't add default cflags, because they wouldn't
5965	# be able to turn off these options and set the CFLAGS wanted.
5966
5967    # Check whether --enable-flto was given.
5968if test "${enable_flto+set}" = set; then :
5969  enableval=$enable_flto;
5970fi
5971
5972    if test "x$enable_flto" != "xno"; then :
5973
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5975$as_echo_n "checking if $CC supports -flto... " >&6; }
5976        BAKCFLAGS="$CFLAGS"
5977        CFLAGS="$CFLAGS -flto"
5978        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979/* end confdefs.h.  */
5980
5981int
5982main ()
5983{
5984
5985  ;
5986  return 0;
5987}
5988_ACEOF
5989if ac_fn_c_try_link "$LINENO"; then :
5990
5991            if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5992                CFLAGS="$BAKCFLAGS"
5993                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994$as_echo "no" >&6; }
5995            else
5996                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5997$as_echo "yes" >&6; }
5998            fi
5999            rm -f conftest conftest.c conftest.o
6000
6001else
6002  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005rm -f core conftest.err conftest.$ac_objext \
6006    conftest$ac_exeext conftest.$ac_ext
6007
6008fi
6009
6010
6011    # Check whether --enable-pie was given.
6012if test "${enable_pie+set}" = set; then :
6013  enableval=$enable_pie;
6014fi
6015
6016    if test "x$enable_pie" = "xyes"; then :
6017
6018	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
6019$as_echo_n "checking if $CC supports PIE... " >&6; }
6020	BAKLDFLAGS="$LDFLAGS"
6021	BAKCFLAGS="$CFLAGS"
6022	LDFLAGS="$LDFLAGS -pie"
6023	CFLAGS="$CFLAGS -fPIE"
6024	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6025/* end confdefs.h.  */
6026
6027int
6028main ()
6029{
6030
6031  ;
6032  return 0;
6033}
6034_ACEOF
6035if ac_fn_c_try_link "$LINENO"; then :
6036
6037	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6038		LDFLAGS="$BAKLDFLAGS"
6039		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041	    else
6042		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6043$as_echo "yes" >&6; }
6044	    fi
6045	    rm -f conftest conftest.c conftest.o
6046
6047else
6048  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049$as_echo "no" >&6; }
6050fi
6051rm -f core conftest.err conftest.$ac_objext \
6052    conftest$ac_exeext conftest.$ac_ext
6053
6054fi
6055
6056
6057    # Check whether --enable-relro_now was given.
6058if test "${enable_relro_now+set}" = set; then :
6059  enableval=$enable_relro_now;
6060fi
6061
6062    if test "x$enable_relro_now" = "xyes"; then :
6063
6064	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6065$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6066	BAKLDFLAGS="$LDFLAGS"
6067	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6068	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6069/* end confdefs.h.  */
6070
6071int
6072main ()
6073{
6074
6075  ;
6076  return 0;
6077}
6078_ACEOF
6079if ac_fn_c_try_link "$LINENO"; then :
6080
6081	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6082		LDFLAGS="$BAKLDFLAGS"
6083		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085	    else
6086		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6087$as_echo "yes" >&6; }
6088	    fi
6089	    rm -f conftest conftest.c conftest.o
6090
6091else
6092  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095rm -f core conftest.err conftest.$ac_objext \
6096    conftest$ac_exeext conftest.$ac_ext
6097
6098fi
6099
6100fi
6101
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6103$as_echo_n "checking for inline... " >&6; }
6104if ${ac_cv_c_inline+:} false; then :
6105  $as_echo_n "(cached) " >&6
6106else
6107  ac_cv_c_inline=no
6108for ac_kw in inline __inline__ __inline; do
6109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6110/* end confdefs.h.  */
6111#ifndef __cplusplus
6112typedef int foo_t;
6113static $ac_kw foo_t static_foo () {return 0; }
6114$ac_kw foo_t foo () {return 0; }
6115#endif
6116
6117_ACEOF
6118if ac_fn_c_try_compile "$LINENO"; then :
6119  ac_cv_c_inline=$ac_kw
6120fi
6121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6122  test "$ac_cv_c_inline" != no && break
6123done
6124
6125fi
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6127$as_echo "$ac_cv_c_inline" >&6; }
6128
6129case $ac_cv_c_inline in
6130  inline | yes) ;;
6131  *)
6132    case $ac_cv_c_inline in
6133      no) ac_val=;;
6134      *) ac_val=$ac_cv_c_inline;;
6135    esac
6136    cat >>confdefs.h <<_ACEOF
6137#ifndef __cplusplus
6138#define inline $ac_val
6139#endif
6140_ACEOF
6141    ;;
6142esac
6143
6144
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6146$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6147if ${ac_cv_c_format_attribute+:} false; then :
6148  $as_echo_n "(cached) " >&6
6149else
6150  ac_cv_c_format_attribute=no
6151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6152/* end confdefs.h.  */
6153#include <stdio.h>
6154void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6155void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6156
6157int
6158main ()
6159{
6160
6161   f ("%s", "str");
6162
6163  ;
6164  return 0;
6165}
6166_ACEOF
6167if ac_fn_c_try_compile "$LINENO"; then :
6168  ac_cv_c_format_attribute="yes"
6169else
6170  ac_cv_c_format_attribute="no"
6171fi
6172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6173
6174fi
6175
6176
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6178$as_echo "$ac_cv_c_format_attribute" >&6; }
6179if test $ac_cv_c_format_attribute = yes; then
6180
6181$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6182
6183fi
6184
6185
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6187$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6188if ${ac_cv_c_unused_attribute+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  ac_cv_c_unused_attribute=no
6192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193/* end confdefs.h.  */
6194#include <stdio.h>
6195void f (char *u __attribute__((unused)));
6196
6197int
6198main ()
6199{
6200
6201   f ("x");
6202
6203  ;
6204  return 0;
6205}
6206_ACEOF
6207if ac_fn_c_try_compile "$LINENO"; then :
6208  ac_cv_c_unused_attribute="yes"
6209else
6210  ac_cv_c_unused_attribute="no"
6211fi
6212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6213
6214fi
6215
6216
6217
6218
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6220$as_echo "$ac_cv_c_unused_attribute" >&6; }
6221if test $ac_cv_c_unused_attribute = yes; then
6222
6223$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6224
6225fi
6226
6227
6228
6229
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6231$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6232if ${ac_cv_c_weak_attribute+:} false; then :
6233  $as_echo_n "(cached) " >&6
6234else
6235  ac_cv_c_weak_attribute=no
6236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6237/* end confdefs.h.  */
6238 #include <stdio.h>
6239__attribute__((weak)) void f(int x) { printf("%d", x); }
6240
6241int
6242main ()
6243{
6244
6245   f(1);
6246
6247  ;
6248  return 0;
6249}
6250_ACEOF
6251if ac_fn_c_try_compile "$LINENO"; then :
6252  ac_cv_c_weak_attribute="yes"
6253else
6254  ac_cv_c_weak_attribute="no"
6255fi
6256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6257
6258fi
6259
6260
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6262$as_echo "$ac_cv_c_weak_attribute" >&6; }
6263if test $ac_cv_c_weak_attribute = yes; then
6264
6265$as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6266
6267fi
6268
6269
6270if test "$srcdir" != "."; then
6271	CPPFLAGS="$CPPFLAGS -I$srcdir"
6272fi
6273
6274
6275
6276for ac_prog in flex lex
6277do
6278  # Extract the first word of "$ac_prog", so it can be a program name with args.
6279set dummy $ac_prog; ac_word=$2
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281$as_echo_n "checking for $ac_word... " >&6; }
6282if ${ac_cv_prog_LEX+:} false; then :
6283  $as_echo_n "(cached) " >&6
6284else
6285  if test -n "$LEX"; then
6286  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6287else
6288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6295    ac_cv_prog_LEX="$ac_prog"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303fi
6304fi
6305LEX=$ac_cv_prog_LEX
6306if test -n "$LEX"; then
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6308$as_echo "$LEX" >&6; }
6309else
6310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315  test -n "$LEX" && break
6316done
6317test -n "$LEX" || LEX=":"
6318
6319if test "x$LEX" != "x:"; then
6320  cat >conftest.l <<_ACEOF
6321%%
6322a { ECHO; }
6323b { REJECT; }
6324c { yymore (); }
6325d { yyless (1); }
6326e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6327    yyless ((input () != 0)); }
6328f { unput (yytext[0]); }
6329. { BEGIN INITIAL; }
6330%%
6331#ifdef YYTEXT_POINTER
6332extern char *yytext;
6333#endif
6334int
6335main (void)
6336{
6337  return ! yylex () + ! yywrap ();
6338}
6339_ACEOF
6340{ { ac_try="$LEX conftest.l"
6341case "(($ac_try" in
6342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6343  *) ac_try_echo=$ac_try;;
6344esac
6345eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6346$as_echo "$ac_try_echo"; } >&5
6347  (eval "$LEX conftest.l") 2>&5
6348  ac_status=$?
6349  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6350  test $ac_status = 0; }
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6352$as_echo_n "checking lex output file root... " >&6; }
6353if ${ac_cv_prog_lex_root+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356
6357if test -f lex.yy.c; then
6358  ac_cv_prog_lex_root=lex.yy
6359elif test -f lexyy.c; then
6360  ac_cv_prog_lex_root=lexyy
6361else
6362  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6363fi
6364fi
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6366$as_echo "$ac_cv_prog_lex_root" >&6; }
6367LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6368
6369if test -z "${LEXLIB+set}"; then
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6371$as_echo_n "checking lex library... " >&6; }
6372if ${ac_cv_lib_lex+:} false; then :
6373  $as_echo_n "(cached) " >&6
6374else
6375
6376    ac_save_LIBS=$LIBS
6377    ac_cv_lib_lex='none needed'
6378    for ac_lib in '' -lfl -ll; do
6379      LIBS="$ac_lib $ac_save_LIBS"
6380      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381/* end confdefs.h.  */
6382`cat $LEX_OUTPUT_ROOT.c`
6383_ACEOF
6384if ac_fn_c_try_link "$LINENO"; then :
6385  ac_cv_lib_lex=$ac_lib
6386fi
6387rm -f core conftest.err conftest.$ac_objext \
6388    conftest$ac_exeext conftest.$ac_ext
6389      test "$ac_cv_lib_lex" != 'none needed' && break
6390    done
6391    LIBS=$ac_save_LIBS
6392
6393fi
6394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6395$as_echo "$ac_cv_lib_lex" >&6; }
6396  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6397fi
6398
6399
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6401$as_echo_n "checking whether yytext is a pointer... " >&6; }
6402if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6403  $as_echo_n "(cached) " >&6
6404else
6405  # POSIX says lex can declare yytext either as a pointer or an array; the
6406# default is implementation-dependent.  Figure out which it is, since
6407# not all implementations provide the %pointer and %array declarations.
6408ac_cv_prog_lex_yytext_pointer=no
6409ac_save_LIBS=$LIBS
6410LIBS="$LEXLIB $ac_save_LIBS"
6411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6412/* end confdefs.h.  */
6413
6414  #define YYTEXT_POINTER 1
6415`cat $LEX_OUTPUT_ROOT.c`
6416_ACEOF
6417if ac_fn_c_try_link "$LINENO"; then :
6418  ac_cv_prog_lex_yytext_pointer=yes
6419fi
6420rm -f core conftest.err conftest.$ac_objext \
6421    conftest$ac_exeext conftest.$ac_ext
6422LIBS=$ac_save_LIBS
6423
6424fi
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6426$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6427if test $ac_cv_prog_lex_yytext_pointer = yes; then
6428
6429$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6430
6431fi
6432rm -f conftest.l $LEX_OUTPUT_ROOT.c
6433
6434fi
6435
6436	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6437$as_echo_n "checking for yylex_destroy... " >&6; }
6438	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6439
6440$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6441
6442		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; }
6444	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }; fi
6446
6447for ac_prog in 'bison -y' byacc
6448do
6449  # Extract the first word of "$ac_prog", so it can be a program name with args.
6450set dummy $ac_prog; ac_word=$2
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6452$as_echo_n "checking for $ac_word... " >&6; }
6453if ${ac_cv_prog_YACC+:} false; then :
6454  $as_echo_n "(cached) " >&6
6455else
6456  if test -n "$YACC"; then
6457  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6458else
6459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462  IFS=$as_save_IFS
6463  test -z "$as_dir" && as_dir=.
6464    for ac_exec_ext in '' $ac_executable_extensions; do
6465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6466    ac_cv_prog_YACC="$ac_prog"
6467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6468    break 2
6469  fi
6470done
6471  done
6472IFS=$as_save_IFS
6473
6474fi
6475fi
6476YACC=$ac_cv_prog_YACC
6477if test -n "$YACC"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6479$as_echo "$YACC" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$YACC" && break
6487done
6488test -n "$YACC" || YACC="yacc"
6489
6490# Extract the first word of "doxygen", so it can be a program name with args.
6491set dummy doxygen; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_prog_doxygen+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  if test -n "$doxygen"; then
6498  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6499else
6500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_prog_doxygen="doxygen"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515fi
6516fi
6517doxygen=$ac_cv_prog_doxygen
6518if test -n "$doxygen"; then
6519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6520$as_echo "$doxygen" >&6; }
6521else
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; }
6524fi
6525
6526
6527if test -n "$ac_tool_prefix"; then
6528  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6529set dummy ${ac_tool_prefix}strip; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_prog_STRIP+:} false; then :
6533  $as_echo_n "(cached) " >&6
6534else
6535  if test -n "$STRIP"; then
6536  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6537else
6538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539for as_dir in $PATH
6540do
6541  IFS=$as_save_IFS
6542  test -z "$as_dir" && as_dir=.
6543    for ac_exec_ext in '' $ac_executable_extensions; do
6544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6545    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547    break 2
6548  fi
6549done
6550  done
6551IFS=$as_save_IFS
6552
6553fi
6554fi
6555STRIP=$ac_cv_prog_STRIP
6556if test -n "$STRIP"; then
6557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6558$as_echo "$STRIP" >&6; }
6559else
6560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }
6562fi
6563
6564
6565fi
6566if test -z "$ac_cv_prog_STRIP"; then
6567  ac_ct_STRIP=$STRIP
6568  # Extract the first word of "strip", so it can be a program name with args.
6569set dummy strip; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  if test -n "$ac_ct_STRIP"; then
6576  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6577else
6578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6579for as_dir in $PATH
6580do
6581  IFS=$as_save_IFS
6582  test -z "$as_dir" && as_dir=.
6583    for ac_exec_ext in '' $ac_executable_extensions; do
6584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6585    ac_cv_prog_ac_ct_STRIP="strip"
6586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6587    break 2
6588  fi
6589done
6590  done
6591IFS=$as_save_IFS
6592
6593fi
6594fi
6595ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6596if test -n "$ac_ct_STRIP"; then
6597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6598$as_echo "$ac_ct_STRIP" >&6; }
6599else
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604  if test "x$ac_ct_STRIP" = x; then
6605    STRIP=""
6606  else
6607    case $cross_compiling:$ac_tool_warned in
6608yes:)
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6611ac_tool_warned=yes ;;
6612esac
6613    STRIP=$ac_ct_STRIP
6614  fi
6615else
6616  STRIP="$ac_cv_prog_STRIP"
6617fi
6618
6619ac_aux_dir=
6620for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6621  if test -f "$ac_dir/install-sh"; then
6622    ac_aux_dir=$ac_dir
6623    ac_install_sh="$ac_aux_dir/install-sh -c"
6624    break
6625  elif test -f "$ac_dir/install.sh"; then
6626    ac_aux_dir=$ac_dir
6627    ac_install_sh="$ac_aux_dir/install.sh -c"
6628    break
6629  elif test -f "$ac_dir/shtool"; then
6630    ac_aux_dir=$ac_dir
6631    ac_install_sh="$ac_aux_dir/shtool install -c"
6632    break
6633  fi
6634done
6635if test -z "$ac_aux_dir"; then
6636  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6637fi
6638
6639# These three variables are undocumented and unsupported,
6640# and are intended to be withdrawn in a future Autoconf release.
6641# They can cause serious problems if a builder's source tree is in a directory
6642# whose full name contains unusual characters.
6643ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6644ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6645ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6646
6647
6648# Make sure we can run config.sub.
6649$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6650  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6651
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6653$as_echo_n "checking build system type... " >&6; }
6654if ${ac_cv_build+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  ac_build_alias=$build_alias
6658test "x$ac_build_alias" = x &&
6659  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6660test "x$ac_build_alias" = x &&
6661  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6662ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6663  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6664
6665fi
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6667$as_echo "$ac_cv_build" >&6; }
6668case $ac_cv_build in
6669*-*-*) ;;
6670*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6671esac
6672build=$ac_cv_build
6673ac_save_IFS=$IFS; IFS='-'
6674set x $ac_cv_build
6675shift
6676build_cpu=$1
6677build_vendor=$2
6678shift; shift
6679# Remember, the first character of IFS is used to create $*,
6680# except with old shells:
6681build_os=$*
6682IFS=$ac_save_IFS
6683case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6684
6685
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6687$as_echo_n "checking host system type... " >&6; }
6688if ${ac_cv_host+:} false; then :
6689  $as_echo_n "(cached) " >&6
6690else
6691  if test "x$host_alias" = x; then
6692  ac_cv_host=$ac_cv_build
6693else
6694  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6695    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6696fi
6697
6698fi
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6700$as_echo "$ac_cv_host" >&6; }
6701case $ac_cv_host in
6702*-*-*) ;;
6703*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6704esac
6705host=$ac_cv_host
6706ac_save_IFS=$IFS; IFS='-'
6707set x $ac_cv_host
6708shift
6709host_cpu=$1
6710host_vendor=$2
6711shift; shift
6712# Remember, the first character of IFS is used to create $*,
6713# except with old shells:
6714host_os=$*
6715IFS=$ac_save_IFS
6716case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6717
6718
6719
6720# skip these tests, we do not need them.
6721
6722
6723
6724
6725
6726
6727
6728
6729# always use ./libtool unless override from commandline (libtool=mylibtool)
6730if test -z "$libtool"; then
6731	libtool="./libtool"
6732fi
6733
6734# avoid libtool max commandline length test on systems that fork slowly.
6735
6736if echo "$host_os" | grep "sunos4" >/dev/null; then
6737	lt_cv_sys_max_cmd_len=32750;
6738fi
6739if test -n "$ac_tool_prefix"; then
6740  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6741set dummy ${ac_tool_prefix}ar; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_AR+:} false; then :
6745  $as_echo_n "(cached) " >&6
6746else
6747  case $AR in
6748  [\\/]* | ?:[\\/]*)
6749  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6750  ;;
6751  *)
6752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755  IFS=$as_save_IFS
6756  test -z "$as_dir" && as_dir=.
6757    for ac_exec_ext in '' $ac_executable_extensions; do
6758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761    break 2
6762  fi
6763done
6764  done
6765IFS=$as_save_IFS
6766
6767  ;;
6768esac
6769fi
6770AR=$ac_cv_path_AR
6771if test -n "$AR"; then
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6773$as_echo "$AR" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778
6779
6780fi
6781if test -z "$ac_cv_path_AR"; then
6782  ac_pt_AR=$AR
6783  # Extract the first word of "ar", so it can be a program name with args.
6784set dummy ar; ac_word=$2
6785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6786$as_echo_n "checking for $ac_word... " >&6; }
6787if ${ac_cv_path_ac_pt_AR+:} false; then :
6788  $as_echo_n "(cached) " >&6
6789else
6790  case $ac_pt_AR in
6791  [\\/]* | ?:[\\/]*)
6792  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6793  ;;
6794  *)
6795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6796for as_dir in $PATH
6797do
6798  IFS=$as_save_IFS
6799  test -z "$as_dir" && as_dir=.
6800    for ac_exec_ext in '' $ac_executable_extensions; do
6801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6802    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6804    break 2
6805  fi
6806done
6807  done
6808IFS=$as_save_IFS
6809
6810  ;;
6811esac
6812fi
6813ac_pt_AR=$ac_cv_path_ac_pt_AR
6814if test -n "$ac_pt_AR"; then
6815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6816$as_echo "$ac_pt_AR" >&6; }
6817else
6818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6819$as_echo "no" >&6; }
6820fi
6821
6822  if test "x$ac_pt_AR" = x; then
6823    AR="false"
6824  else
6825    case $cross_compiling:$ac_tool_warned in
6826yes:)
6827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6829ac_tool_warned=yes ;;
6830esac
6831    AR=$ac_pt_AR
6832  fi
6833else
6834  AR="$ac_cv_path_AR"
6835fi
6836
6837if test $AR = false; then
6838	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6839fi
6840
6841case `pwd` in
6842  *\ * | *\	*)
6843    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6844$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6845esac
6846
6847
6848
6849macro_version='2.4.6'
6850macro_revision='2.4.6'
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864ltmain=$ac_aux_dir/ltmain.sh
6865
6866# Backslashify metacharacters that are still active within
6867# double-quoted strings.
6868sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6869
6870# Same as above, but do not quote variable references.
6871double_quote_subst='s/\(["`\\]\)/\\\1/g'
6872
6873# Sed substitution to delay expansion of an escaped shell variable in a
6874# double_quote_subst'ed string.
6875delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6876
6877# Sed substitution to delay expansion of an escaped single quote.
6878delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6879
6880# Sed substitution to avoid accidental globbing in evaled expressions
6881no_glob_subst='s/\*/\\\*/g'
6882
6883ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6884ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6885ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6886
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6888$as_echo_n "checking how to print strings... " >&6; }
6889# Test print first, because it will be a builtin if present.
6890if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6891   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6892  ECHO='print -r --'
6893elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6894  ECHO='printf %s\n'
6895else
6896  # Use this function as a fallback that always works.
6897  func_fallback_echo ()
6898  {
6899    eval 'cat <<_LTECHO_EOF
6900$1
6901_LTECHO_EOF'
6902  }
6903  ECHO='func_fallback_echo'
6904fi
6905
6906# func_echo_all arg...
6907# Invoke $ECHO with all args, space-separated.
6908func_echo_all ()
6909{
6910    $ECHO ""
6911}
6912
6913case $ECHO in
6914  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6915$as_echo "printf" >&6; } ;;
6916  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6917$as_echo "print -r" >&6; } ;;
6918  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6919$as_echo "cat" >&6; } ;;
6920esac
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6936$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6937if ${ac_cv_path_SED+:} false; then :
6938  $as_echo_n "(cached) " >&6
6939else
6940            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6941     for ac_i in 1 2 3 4 5 6 7; do
6942       ac_script="$ac_script$as_nl$ac_script"
6943     done
6944     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6945     { ac_script=; unset ac_script;}
6946     if test -z "$SED"; then
6947  ac_path_SED_found=false
6948  # Loop through the user's path and test for each of PROGNAME-LIST
6949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950for as_dir in $PATH
6951do
6952  IFS=$as_save_IFS
6953  test -z "$as_dir" && as_dir=.
6954    for ac_prog in sed gsed; do
6955    for ac_exec_ext in '' $ac_executable_extensions; do
6956      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6957      as_fn_executable_p "$ac_path_SED" || continue
6958# Check for GNU ac_path_SED and select it if it is found.
6959  # Check for GNU $ac_path_SED
6960case `"$ac_path_SED" --version 2>&1` in
6961*GNU*)
6962  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6963*)
6964  ac_count=0
6965  $as_echo_n 0123456789 >"conftest.in"
6966  while :
6967  do
6968    cat "conftest.in" "conftest.in" >"conftest.tmp"
6969    mv "conftest.tmp" "conftest.in"
6970    cp "conftest.in" "conftest.nl"
6971    $as_echo '' >> "conftest.nl"
6972    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6973    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6974    as_fn_arith $ac_count + 1 && ac_count=$as_val
6975    if test $ac_count -gt ${ac_path_SED_max-0}; then
6976      # Best one so far, save it but keep looking for a better one
6977      ac_cv_path_SED="$ac_path_SED"
6978      ac_path_SED_max=$ac_count
6979    fi
6980    # 10*(2^10) chars as input seems more than enough
6981    test $ac_count -gt 10 && break
6982  done
6983  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6984esac
6985
6986      $ac_path_SED_found && break 3
6987    done
6988  done
6989  done
6990IFS=$as_save_IFS
6991  if test -z "$ac_cv_path_SED"; then
6992    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6993  fi
6994else
6995  ac_cv_path_SED=$SED
6996fi
6997
6998fi
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7000$as_echo "$ac_cv_path_SED" >&6; }
7001 SED="$ac_cv_path_SED"
7002  rm -f conftest.sed
7003
7004test -z "$SED" && SED=sed
7005Xsed="$SED -e 1s/^X//"
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7018$as_echo_n "checking for fgrep... " >&6; }
7019if ${ac_cv_path_FGREP+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7023   then ac_cv_path_FGREP="$GREP -F"
7024   else
7025     if test -z "$FGREP"; then
7026  ac_path_FGREP_found=false
7027  # Loop through the user's path and test for each of PROGNAME-LIST
7028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7030do
7031  IFS=$as_save_IFS
7032  test -z "$as_dir" && as_dir=.
7033    for ac_prog in fgrep; do
7034    for ac_exec_ext in '' $ac_executable_extensions; do
7035      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7036      as_fn_executable_p "$ac_path_FGREP" || continue
7037# Check for GNU ac_path_FGREP and select it if it is found.
7038  # Check for GNU $ac_path_FGREP
7039case `"$ac_path_FGREP" --version 2>&1` in
7040*GNU*)
7041  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7042*)
7043  ac_count=0
7044  $as_echo_n 0123456789 >"conftest.in"
7045  while :
7046  do
7047    cat "conftest.in" "conftest.in" >"conftest.tmp"
7048    mv "conftest.tmp" "conftest.in"
7049    cp "conftest.in" "conftest.nl"
7050    $as_echo 'FGREP' >> "conftest.nl"
7051    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7052    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7053    as_fn_arith $ac_count + 1 && ac_count=$as_val
7054    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7055      # Best one so far, save it but keep looking for a better one
7056      ac_cv_path_FGREP="$ac_path_FGREP"
7057      ac_path_FGREP_max=$ac_count
7058    fi
7059    # 10*(2^10) chars as input seems more than enough
7060    test $ac_count -gt 10 && break
7061  done
7062  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7063esac
7064
7065      $ac_path_FGREP_found && break 3
7066    done
7067  done
7068  done
7069IFS=$as_save_IFS
7070  if test -z "$ac_cv_path_FGREP"; then
7071    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7072  fi
7073else
7074  ac_cv_path_FGREP=$FGREP
7075fi
7076
7077   fi
7078fi
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7080$as_echo "$ac_cv_path_FGREP" >&6; }
7081 FGREP="$ac_cv_path_FGREP"
7082
7083
7084test -z "$GREP" && GREP=grep
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104# Check whether --with-gnu-ld was given.
7105if test "${with_gnu_ld+set}" = set; then :
7106  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7107else
7108  with_gnu_ld=no
7109fi
7110
7111ac_prog=ld
7112if test yes = "$GCC"; then
7113  # Check if gcc -print-prog-name=ld gives a path.
7114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7115$as_echo_n "checking for ld used by $CC... " >&6; }
7116  case $host in
7117  *-*-mingw*)
7118    # gcc leaves a trailing carriage return, which upsets mingw
7119    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7120  *)
7121    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7122  esac
7123  case $ac_prog in
7124    # Accept absolute paths.
7125    [\\/]* | ?:[\\/]*)
7126      re_direlt='/[^/][^/]*/\.\./'
7127      # Canonicalize the pathname of ld
7128      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7129      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7130	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7131      done
7132      test -z "$LD" && LD=$ac_prog
7133      ;;
7134  "")
7135    # If it fails, then pretend we aren't using GCC.
7136    ac_prog=ld
7137    ;;
7138  *)
7139    # If it is relative, then search for the first ld in PATH.
7140    with_gnu_ld=unknown
7141    ;;
7142  esac
7143elif test yes = "$with_gnu_ld"; then
7144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7145$as_echo_n "checking for GNU ld... " >&6; }
7146else
7147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7148$as_echo_n "checking for non-GNU ld... " >&6; }
7149fi
7150if ${lt_cv_path_LD+:} false; then :
7151  $as_echo_n "(cached) " >&6
7152else
7153  if test -z "$LD"; then
7154  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7155  for ac_dir in $PATH; do
7156    IFS=$lt_save_ifs
7157    test -z "$ac_dir" && ac_dir=.
7158    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7159      lt_cv_path_LD=$ac_dir/$ac_prog
7160      # Check to see if the program is GNU ld.  I'd rather use --version,
7161      # but apparently some variants of GNU ld only accept -v.
7162      # Break only if it was the GNU/non-GNU ld that we prefer.
7163      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7164      *GNU* | *'with BFD'*)
7165	test no != "$with_gnu_ld" && break
7166	;;
7167      *)
7168	test yes != "$with_gnu_ld" && break
7169	;;
7170      esac
7171    fi
7172  done
7173  IFS=$lt_save_ifs
7174else
7175  lt_cv_path_LD=$LD # Let the user override the test with a path.
7176fi
7177fi
7178
7179LD=$lt_cv_path_LD
7180if test -n "$LD"; then
7181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7182$as_echo "$LD" >&6; }
7183else
7184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185$as_echo "no" >&6; }
7186fi
7187test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7189$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7190if ${lt_cv_prog_gnu_ld+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7194case `$LD -v 2>&1 </dev/null` in
7195*GNU* | *'with BFD'*)
7196  lt_cv_prog_gnu_ld=yes
7197  ;;
7198*)
7199  lt_cv_prog_gnu_ld=no
7200  ;;
7201esac
7202fi
7203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7204$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7205with_gnu_ld=$lt_cv_prog_gnu_ld
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7216$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7217if ${lt_cv_path_NM+:} false; then :
7218  $as_echo_n "(cached) " >&6
7219else
7220  if test -n "$NM"; then
7221  # Let the user override the test.
7222  lt_cv_path_NM=$NM
7223else
7224  lt_nm_to_check=${ac_tool_prefix}nm
7225  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7226    lt_nm_to_check="$lt_nm_to_check nm"
7227  fi
7228  for lt_tmp_nm in $lt_nm_to_check; do
7229    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7230    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7231      IFS=$lt_save_ifs
7232      test -z "$ac_dir" && ac_dir=.
7233      tmp_nm=$ac_dir/$lt_tmp_nm
7234      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7235	# Check to see if the nm accepts a BSD-compat flag.
7236	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7237	#   nm: unknown option "B" ignored
7238	# Tru64's nm complains that /dev/null is an invalid object file
7239	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7240	case $build_os in
7241	mingw*) lt_bad_file=conftest.nm/nofile ;;
7242	*) lt_bad_file=/dev/null ;;
7243	esac
7244	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7245	*$lt_bad_file* | *'Invalid file or object type'*)
7246	  lt_cv_path_NM="$tmp_nm -B"
7247	  break 2
7248	  ;;
7249	*)
7250	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7251	  */dev/null*)
7252	    lt_cv_path_NM="$tmp_nm -p"
7253	    break 2
7254	    ;;
7255	  *)
7256	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7257	    continue # so that we can try to find one that supports BSD flags
7258	    ;;
7259	  esac
7260	  ;;
7261	esac
7262      fi
7263    done
7264    IFS=$lt_save_ifs
7265  done
7266  : ${lt_cv_path_NM=no}
7267fi
7268fi
7269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7270$as_echo "$lt_cv_path_NM" >&6; }
7271if test no != "$lt_cv_path_NM"; then
7272  NM=$lt_cv_path_NM
7273else
7274  # Didn't find any BSD compatible name lister, look for dumpbin.
7275  if test -n "$DUMPBIN"; then :
7276    # Let the user override the test.
7277  else
7278    if test -n "$ac_tool_prefix"; then
7279  for ac_prog in dumpbin "link -dump"
7280  do
7281    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7282set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_prog_DUMPBIN+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  if test -n "$DUMPBIN"; then
7289  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7290else
7291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7292for as_dir in $PATH
7293do
7294  IFS=$as_save_IFS
7295  test -z "$as_dir" && as_dir=.
7296    for ac_exec_ext in '' $ac_executable_extensions; do
7297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7298    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7300    break 2
7301  fi
7302done
7303  done
7304IFS=$as_save_IFS
7305
7306fi
7307fi
7308DUMPBIN=$ac_cv_prog_DUMPBIN
7309if test -n "$DUMPBIN"; then
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7311$as_echo "$DUMPBIN" >&6; }
7312else
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7314$as_echo "no" >&6; }
7315fi
7316
7317
7318    test -n "$DUMPBIN" && break
7319  done
7320fi
7321if test -z "$DUMPBIN"; then
7322  ac_ct_DUMPBIN=$DUMPBIN
7323  for ac_prog in dumpbin "link -dump"
7324do
7325  # Extract the first word of "$ac_prog", so it can be a program name with args.
7326set dummy $ac_prog; ac_word=$2
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7328$as_echo_n "checking for $ac_word... " >&6; }
7329if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7330  $as_echo_n "(cached) " >&6
7331else
7332  if test -n "$ac_ct_DUMPBIN"; then
7333  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7334else
7335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350fi
7351fi
7352ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7353if test -n "$ac_ct_DUMPBIN"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7355$as_echo "$ac_ct_DUMPBIN" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362  test -n "$ac_ct_DUMPBIN" && break
7363done
7364
7365  if test "x$ac_ct_DUMPBIN" = x; then
7366    DUMPBIN=":"
7367  else
7368    case $cross_compiling:$ac_tool_warned in
7369yes:)
7370{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7371$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7372ac_tool_warned=yes ;;
7373esac
7374    DUMPBIN=$ac_ct_DUMPBIN
7375  fi
7376fi
7377
7378    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7379    *COFF*)
7380      DUMPBIN="$DUMPBIN -symbols -headers"
7381      ;;
7382    *)
7383      DUMPBIN=:
7384      ;;
7385    esac
7386  fi
7387
7388  if test : != "$DUMPBIN"; then
7389    NM=$DUMPBIN
7390  fi
7391fi
7392test -z "$NM" && NM=nm
7393
7394
7395
7396
7397
7398
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7400$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7401if ${lt_cv_nm_interface+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  lt_cv_nm_interface="BSD nm"
7405  echo "int some_variable = 0;" > conftest.$ac_ext
7406  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7407  (eval "$ac_compile" 2>conftest.err)
7408  cat conftest.err >&5
7409  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7410  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7411  cat conftest.err >&5
7412  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7413  cat conftest.out >&5
7414  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7415    lt_cv_nm_interface="MS dumpbin"
7416  fi
7417  rm -f conftest*
7418fi
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7420$as_echo "$lt_cv_nm_interface" >&6; }
7421
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7423$as_echo_n "checking whether ln -s works... " >&6; }
7424LN_S=$as_ln_s
7425if test "$LN_S" = "ln -s"; then
7426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7427$as_echo "yes" >&6; }
7428else
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7430$as_echo "no, using $LN_S" >&6; }
7431fi
7432
7433# find the maximum length of command line arguments
7434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7435$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7436if ${lt_cv_sys_max_cmd_len+:} false; then :
7437  $as_echo_n "(cached) " >&6
7438else
7439    i=0
7440  teststring=ABCD
7441
7442  case $build_os in
7443  msdosdjgpp*)
7444    # On DJGPP, this test can blow up pretty badly due to problems in libc
7445    # (any single argument exceeding 2000 bytes causes a buffer overrun
7446    # during glob expansion).  Even if it were fixed, the result of this
7447    # check would be larger than it should be.
7448    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7449    ;;
7450
7451  gnu*)
7452    # Under GNU Hurd, this test is not required because there is
7453    # no limit to the length of command line arguments.
7454    # Libtool will interpret -1 as no limit whatsoever
7455    lt_cv_sys_max_cmd_len=-1;
7456    ;;
7457
7458  cygwin* | mingw* | cegcc*)
7459    # On Win9x/ME, this test blows up -- it succeeds, but takes
7460    # about 5 minutes as the teststring grows exponentially.
7461    # Worse, since 9x/ME are not pre-emptively multitasking,
7462    # you end up with a "frozen" computer, even though with patience
7463    # the test eventually succeeds (with a max line length of 256k).
7464    # Instead, let's just punt: use the minimum linelength reported by
7465    # all of the supported platforms: 8192 (on NT/2K/XP).
7466    lt_cv_sys_max_cmd_len=8192;
7467    ;;
7468
7469  mint*)
7470    # On MiNT this can take a long time and run out of memory.
7471    lt_cv_sys_max_cmd_len=8192;
7472    ;;
7473
7474  amigaos*)
7475    # On AmigaOS with pdksh, this test takes hours, literally.
7476    # So we just punt and use a minimum line length of 8192.
7477    lt_cv_sys_max_cmd_len=8192;
7478    ;;
7479
7480  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7481    # This has been around since 386BSD, at least.  Likely further.
7482    if test -x /sbin/sysctl; then
7483      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7484    elif test -x /usr/sbin/sysctl; then
7485      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7486    else
7487      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7488    fi
7489    # And add a safety zone
7490    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7491    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7492    ;;
7493
7494  interix*)
7495    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7496    lt_cv_sys_max_cmd_len=196608
7497    ;;
7498
7499  os2*)
7500    # The test takes a long time on OS/2.
7501    lt_cv_sys_max_cmd_len=8192
7502    ;;
7503
7504  osf*)
7505    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7506    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7507    # nice to cause kernel panics so lets avoid the loop below.
7508    # First set a reasonable default.
7509    lt_cv_sys_max_cmd_len=16384
7510    #
7511    if test -x /sbin/sysconfig; then
7512      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7513        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7514      esac
7515    fi
7516    ;;
7517  sco3.2v5*)
7518    lt_cv_sys_max_cmd_len=102400
7519    ;;
7520  sysv5* | sco5v6* | sysv4.2uw2*)
7521    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7522    if test -n "$kargmax"; then
7523      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7524    else
7525      lt_cv_sys_max_cmd_len=32768
7526    fi
7527    ;;
7528  *)
7529    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7530    if test -n "$lt_cv_sys_max_cmd_len" && \
7531       test undefined != "$lt_cv_sys_max_cmd_len"; then
7532      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7533      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7534    else
7535      # Make teststring a little bigger before we do anything with it.
7536      # a 1K string should be a reasonable start.
7537      for i in 1 2 3 4 5 6 7 8; do
7538        teststring=$teststring$teststring
7539      done
7540      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7541      # If test is not a shell built-in, we'll probably end up computing a
7542      # maximum length that is only half of the actual maximum length, but
7543      # we can't tell.
7544      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7545	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7546	      test 17 != "$i" # 1/2 MB should be enough
7547      do
7548        i=`expr $i + 1`
7549        teststring=$teststring$teststring
7550      done
7551      # Only check the string length outside the loop.
7552      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7553      teststring=
7554      # Add a significant safety factor because C++ compilers can tack on
7555      # massive amounts of additional arguments before passing them to the
7556      # linker.  It appears as though 1/2 is a usable value.
7557      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7558    fi
7559    ;;
7560  esac
7561
7562fi
7563
7564if test -n "$lt_cv_sys_max_cmd_len"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7566$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7569$as_echo "none" >&6; }
7570fi
7571max_cmd_len=$lt_cv_sys_max_cmd_len
7572
7573
7574
7575
7576
7577
7578: ${CP="cp -f"}
7579: ${MV="mv -f"}
7580: ${RM="rm -f"}
7581
7582if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7583  lt_unset=unset
7584else
7585  lt_unset=false
7586fi
7587
7588
7589
7590
7591
7592# test EBCDIC or ASCII
7593case `echo X|tr X '\101'` in
7594 A) # ASCII based system
7595    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7596  lt_SP2NL='tr \040 \012'
7597  lt_NL2SP='tr \015\012 \040\040'
7598  ;;
7599 *) # EBCDIC based system
7600  lt_SP2NL='tr \100 \n'
7601  lt_NL2SP='tr \r\n \100\100'
7602  ;;
7603esac
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7614$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7615if ${lt_cv_to_host_file_cmd+:} false; then :
7616  $as_echo_n "(cached) " >&6
7617else
7618  case $host in
7619  *-*-mingw* )
7620    case $build in
7621      *-*-mingw* ) # actually msys
7622        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7623        ;;
7624      *-*-cygwin* )
7625        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7626        ;;
7627      * ) # otherwise, assume *nix
7628        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7629        ;;
7630    esac
7631    ;;
7632  *-*-cygwin* )
7633    case $build in
7634      *-*-mingw* ) # actually msys
7635        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7636        ;;
7637      *-*-cygwin* )
7638        lt_cv_to_host_file_cmd=func_convert_file_noop
7639        ;;
7640      * ) # otherwise, assume *nix
7641        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7642        ;;
7643    esac
7644    ;;
7645  * ) # unhandled hosts (and "normal" native builds)
7646    lt_cv_to_host_file_cmd=func_convert_file_noop
7647    ;;
7648esac
7649
7650fi
7651
7652to_host_file_cmd=$lt_cv_to_host_file_cmd
7653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7654$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7655
7656
7657
7658
7659
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7661$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7662if ${lt_cv_to_tool_file_cmd+:} false; then :
7663  $as_echo_n "(cached) " >&6
7664else
7665  #assume ordinary cross tools, or native build.
7666lt_cv_to_tool_file_cmd=func_convert_file_noop
7667case $host in
7668  *-*-mingw* )
7669    case $build in
7670      *-*-mingw* ) # actually msys
7671        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7672        ;;
7673    esac
7674    ;;
7675esac
7676
7677fi
7678
7679to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7681$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7682
7683
7684
7685
7686
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7688$as_echo_n "checking for $LD option to reload object files... " >&6; }
7689if ${lt_cv_ld_reload_flag+:} false; then :
7690  $as_echo_n "(cached) " >&6
7691else
7692  lt_cv_ld_reload_flag='-r'
7693fi
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7695$as_echo "$lt_cv_ld_reload_flag" >&6; }
7696reload_flag=$lt_cv_ld_reload_flag
7697case $reload_flag in
7698"" | " "*) ;;
7699*) reload_flag=" $reload_flag" ;;
7700esac
7701reload_cmds='$LD$reload_flag -o $output$reload_objs'
7702case $host_os in
7703  cygwin* | mingw* | pw32* | cegcc*)
7704    if test yes != "$GCC"; then
7705      reload_cmds=false
7706    fi
7707    ;;
7708  darwin*)
7709    if test yes = "$GCC"; then
7710      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7711    else
7712      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7713    fi
7714    ;;
7715esac
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725if test -n "$ac_tool_prefix"; then
7726  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7727set dummy ${ac_tool_prefix}objdump; ac_word=$2
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7729$as_echo_n "checking for $ac_word... " >&6; }
7730if ${ac_cv_prog_OBJDUMP+:} false; then :
7731  $as_echo_n "(cached) " >&6
7732else
7733  if test -n "$OBJDUMP"; then
7734  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7735else
7736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7737for as_dir in $PATH
7738do
7739  IFS=$as_save_IFS
7740  test -z "$as_dir" && as_dir=.
7741    for ac_exec_ext in '' $ac_executable_extensions; do
7742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7743    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7745    break 2
7746  fi
7747done
7748  done
7749IFS=$as_save_IFS
7750
7751fi
7752fi
7753OBJDUMP=$ac_cv_prog_OBJDUMP
7754if test -n "$OBJDUMP"; then
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7756$as_echo "$OBJDUMP" >&6; }
7757else
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7759$as_echo "no" >&6; }
7760fi
7761
7762
7763fi
7764if test -z "$ac_cv_prog_OBJDUMP"; then
7765  ac_ct_OBJDUMP=$OBJDUMP
7766  # Extract the first word of "objdump", so it can be a program name with args.
7767set dummy objdump; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  if test -n "$ac_ct_OBJDUMP"; then
7774  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7775else
7776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7777for as_dir in $PATH
7778do
7779  IFS=$as_save_IFS
7780  test -z "$as_dir" && as_dir=.
7781    for ac_exec_ext in '' $ac_executable_extensions; do
7782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7783    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7785    break 2
7786  fi
7787done
7788  done
7789IFS=$as_save_IFS
7790
7791fi
7792fi
7793ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7794if test -n "$ac_ct_OBJDUMP"; then
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7796$as_echo "$ac_ct_OBJDUMP" >&6; }
7797else
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799$as_echo "no" >&6; }
7800fi
7801
7802  if test "x$ac_ct_OBJDUMP" = x; then
7803    OBJDUMP="false"
7804  else
7805    case $cross_compiling:$ac_tool_warned in
7806yes:)
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7809ac_tool_warned=yes ;;
7810esac
7811    OBJDUMP=$ac_ct_OBJDUMP
7812  fi
7813else
7814  OBJDUMP="$ac_cv_prog_OBJDUMP"
7815fi
7816
7817test -z "$OBJDUMP" && OBJDUMP=objdump
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7828$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7829if ${lt_cv_deplibs_check_method+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  lt_cv_file_magic_cmd='$MAGIC_CMD'
7833lt_cv_file_magic_test_file=
7834lt_cv_deplibs_check_method='unknown'
7835# Need to set the preceding variable on all platforms that support
7836# interlibrary dependencies.
7837# 'none' -- dependencies not supported.
7838# 'unknown' -- same as none, but documents that we really don't know.
7839# 'pass_all' -- all dependencies passed with no checks.
7840# 'test_compile' -- check by making test program.
7841# 'file_magic [[regex]]' -- check by looking for files in library path
7842# that responds to the $file_magic_cmd with a given extended regex.
7843# If you have 'file' or equivalent on your system and you're not sure
7844# whether 'pass_all' will *always* work, you probably want this one.
7845
7846case $host_os in
7847aix[4-9]*)
7848  lt_cv_deplibs_check_method=pass_all
7849  ;;
7850
7851beos*)
7852  lt_cv_deplibs_check_method=pass_all
7853  ;;
7854
7855bsdi[45]*)
7856  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7857  lt_cv_file_magic_cmd='/usr/bin/file -L'
7858  lt_cv_file_magic_test_file=/shlib/libc.so
7859  ;;
7860
7861cygwin*)
7862  # func_win32_libid is a shell function defined in ltmain.sh
7863  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7864  lt_cv_file_magic_cmd='func_win32_libid'
7865  ;;
7866
7867mingw* | pw32*)
7868  # Base MSYS/MinGW do not provide the 'file' command needed by
7869  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7870  # unless we find 'file', for example because we are cross-compiling.
7871  if ( file / ) >/dev/null 2>&1; then
7872    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7873    lt_cv_file_magic_cmd='func_win32_libid'
7874  else
7875    # Keep this pattern in sync with the one in func_win32_libid.
7876    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7877    lt_cv_file_magic_cmd='$OBJDUMP -f'
7878  fi
7879  ;;
7880
7881cegcc*)
7882  # use the weaker test based on 'objdump'. See mingw*.
7883  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7884  lt_cv_file_magic_cmd='$OBJDUMP -f'
7885  ;;
7886
7887darwin* | rhapsody*)
7888  lt_cv_deplibs_check_method=pass_all
7889  ;;
7890
7891freebsd* | dragonfly*)
7892  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7893    case $host_cpu in
7894    i*86 )
7895      # Not sure whether the presence of OpenBSD here was a mistake.
7896      # Let's accept both of them until this is cleared up.
7897      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7898      lt_cv_file_magic_cmd=/usr/bin/file
7899      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7900      ;;
7901    esac
7902  else
7903    lt_cv_deplibs_check_method=pass_all
7904  fi
7905  ;;
7906
7907haiku*)
7908  lt_cv_deplibs_check_method=pass_all
7909  ;;
7910
7911hpux10.20* | hpux11*)
7912  lt_cv_file_magic_cmd=/usr/bin/file
7913  case $host_cpu in
7914  ia64*)
7915    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7916    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7917    ;;
7918  hppa*64*)
7919    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]'
7920    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7921    ;;
7922  *)
7923    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7924    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7925    ;;
7926  esac
7927  ;;
7928
7929interix[3-9]*)
7930  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7931  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7932  ;;
7933
7934irix5* | irix6* | nonstopux*)
7935  case $LD in
7936  *-32|*"-32 ") libmagic=32-bit;;
7937  *-n32|*"-n32 ") libmagic=N32;;
7938  *-64|*"-64 ") libmagic=64-bit;;
7939  *) libmagic=never-match;;
7940  esac
7941  lt_cv_deplibs_check_method=pass_all
7942  ;;
7943
7944# This must be glibc/ELF.
7945linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7946  lt_cv_deplibs_check_method=pass_all
7947  ;;
7948
7949netbsd*)
7950  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7951    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7952  else
7953    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7954  fi
7955  ;;
7956
7957newos6*)
7958  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7959  lt_cv_file_magic_cmd=/usr/bin/file
7960  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7961  ;;
7962
7963*nto* | *qnx*)
7964  lt_cv_deplibs_check_method=pass_all
7965  ;;
7966
7967openbsd* | bitrig*)
7968  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7969    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7970  else
7971    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7972  fi
7973  ;;
7974
7975osf3* | osf4* | osf5*)
7976  lt_cv_deplibs_check_method=pass_all
7977  ;;
7978
7979rdos*)
7980  lt_cv_deplibs_check_method=pass_all
7981  ;;
7982
7983solaris*)
7984  lt_cv_deplibs_check_method=pass_all
7985  ;;
7986
7987sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7988  lt_cv_deplibs_check_method=pass_all
7989  ;;
7990
7991sysv4 | sysv4.3*)
7992  case $host_vendor in
7993  motorola)
7994    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]'
7995    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7996    ;;
7997  ncr)
7998    lt_cv_deplibs_check_method=pass_all
7999    ;;
8000  sequent)
8001    lt_cv_file_magic_cmd='/bin/file'
8002    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8003    ;;
8004  sni)
8005    lt_cv_file_magic_cmd='/bin/file'
8006    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8007    lt_cv_file_magic_test_file=/lib/libc.so
8008    ;;
8009  siemens)
8010    lt_cv_deplibs_check_method=pass_all
8011    ;;
8012  pc)
8013    lt_cv_deplibs_check_method=pass_all
8014    ;;
8015  esac
8016  ;;
8017
8018tpf*)
8019  lt_cv_deplibs_check_method=pass_all
8020  ;;
8021os2*)
8022  lt_cv_deplibs_check_method=pass_all
8023  ;;
8024esac
8025
8026fi
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8028$as_echo "$lt_cv_deplibs_check_method" >&6; }
8029
8030file_magic_glob=
8031want_nocaseglob=no
8032if test "$build" = "$host"; then
8033  case $host_os in
8034  mingw* | pw32*)
8035    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8036      want_nocaseglob=yes
8037    else
8038      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8039    fi
8040    ;;
8041  esac
8042fi
8043
8044file_magic_cmd=$lt_cv_file_magic_cmd
8045deplibs_check_method=$lt_cv_deplibs_check_method
8046test -z "$deplibs_check_method" && deplibs_check_method=unknown
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069if test -n "$ac_tool_prefix"; then
8070  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8071set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8073$as_echo_n "checking for $ac_word... " >&6; }
8074if ${ac_cv_prog_DLLTOOL+:} false; then :
8075  $as_echo_n "(cached) " >&6
8076else
8077  if test -n "$DLLTOOL"; then
8078  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8079else
8080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8081for as_dir in $PATH
8082do
8083  IFS=$as_save_IFS
8084  test -z "$as_dir" && as_dir=.
8085    for ac_exec_ext in '' $ac_executable_extensions; do
8086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8087    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8089    break 2
8090  fi
8091done
8092  done
8093IFS=$as_save_IFS
8094
8095fi
8096fi
8097DLLTOOL=$ac_cv_prog_DLLTOOL
8098if test -n "$DLLTOOL"; then
8099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8100$as_echo "$DLLTOOL" >&6; }
8101else
8102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
8104fi
8105
8106
8107fi
8108if test -z "$ac_cv_prog_DLLTOOL"; then
8109  ac_ct_DLLTOOL=$DLLTOOL
8110  # Extract the first word of "dlltool", so it can be a program name with args.
8111set dummy dlltool; ac_word=$2
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8113$as_echo_n "checking for $ac_word... " >&6; }
8114if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8115  $as_echo_n "(cached) " >&6
8116else
8117  if test -n "$ac_ct_DLLTOOL"; then
8118  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8119else
8120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121for as_dir in $PATH
8122do
8123  IFS=$as_save_IFS
8124  test -z "$as_dir" && as_dir=.
8125    for ac_exec_ext in '' $ac_executable_extensions; do
8126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8127    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129    break 2
8130  fi
8131done
8132  done
8133IFS=$as_save_IFS
8134
8135fi
8136fi
8137ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8138if test -n "$ac_ct_DLLTOOL"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8140$as_echo "$ac_ct_DLLTOOL" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146  if test "x$ac_ct_DLLTOOL" = x; then
8147    DLLTOOL="false"
8148  else
8149    case $cross_compiling:$ac_tool_warned in
8150yes:)
8151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8153ac_tool_warned=yes ;;
8154esac
8155    DLLTOOL=$ac_ct_DLLTOOL
8156  fi
8157else
8158  DLLTOOL="$ac_cv_prog_DLLTOOL"
8159fi
8160
8161test -z "$DLLTOOL" && DLLTOOL=dlltool
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8173$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8174if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8175  $as_echo_n "(cached) " >&6
8176else
8177  lt_cv_sharedlib_from_linklib_cmd='unknown'
8178
8179case $host_os in
8180cygwin* | mingw* | pw32* | cegcc*)
8181  # two different shell functions defined in ltmain.sh;
8182  # decide which one to use based on capabilities of $DLLTOOL
8183  case `$DLLTOOL --help 2>&1` in
8184  *--identify-strict*)
8185    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8186    ;;
8187  *)
8188    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8189    ;;
8190  esac
8191  ;;
8192*)
8193  # fallback: assume linklib IS sharedlib
8194  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8195  ;;
8196esac
8197
8198fi
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8200$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8201sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8202test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8203
8204
8205
8206
8207
8208
8209
8210if test -n "$ac_tool_prefix"; then
8211  for ac_prog in ar
8212  do
8213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_prog_AR+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  if test -n "$AR"; then
8221  ac_cv_prog_AR="$AR" # Let the user override the test.
8222else
8223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238fi
8239fi
8240AR=$ac_cv_prog_AR
8241if test -n "$AR"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8243$as_echo "$AR" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250    test -n "$AR" && break
8251  done
8252fi
8253if test -z "$AR"; then
8254  ac_ct_AR=$AR
8255  for ac_prog in ar
8256do
8257  # Extract the first word of "$ac_prog", so it can be a program name with args.
8258set dummy $ac_prog; ac_word=$2
8259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8260$as_echo_n "checking for $ac_word... " >&6; }
8261if ${ac_cv_prog_ac_ct_AR+:} false; then :
8262  $as_echo_n "(cached) " >&6
8263else
8264  if test -n "$ac_ct_AR"; then
8265  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8266else
8267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270  IFS=$as_save_IFS
8271  test -z "$as_dir" && as_dir=.
8272    for ac_exec_ext in '' $ac_executable_extensions; do
8273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8274    ac_cv_prog_ac_ct_AR="$ac_prog"
8275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8276    break 2
8277  fi
8278done
8279  done
8280IFS=$as_save_IFS
8281
8282fi
8283fi
8284ac_ct_AR=$ac_cv_prog_ac_ct_AR
8285if test -n "$ac_ct_AR"; then
8286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8287$as_echo "$ac_ct_AR" >&6; }
8288else
8289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290$as_echo "no" >&6; }
8291fi
8292
8293
8294  test -n "$ac_ct_AR" && break
8295done
8296
8297  if test "x$ac_ct_AR" = x; then
8298    AR="false"
8299  else
8300    case $cross_compiling:$ac_tool_warned in
8301yes:)
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8304ac_tool_warned=yes ;;
8305esac
8306    AR=$ac_ct_AR
8307  fi
8308fi
8309
8310: ${AR=ar}
8311: ${AR_FLAGS=cru}
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8324$as_echo_n "checking for archiver @FILE support... " >&6; }
8325if ${lt_cv_ar_at_file+:} false; then :
8326  $as_echo_n "(cached) " >&6
8327else
8328  lt_cv_ar_at_file=no
8329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8330/* end confdefs.h.  */
8331
8332int
8333main ()
8334{
8335
8336  ;
8337  return 0;
8338}
8339_ACEOF
8340if ac_fn_c_try_compile "$LINENO"; then :
8341  echo conftest.$ac_objext > conftest.lst
8342      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8343      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8344  (eval $lt_ar_try) 2>&5
8345  ac_status=$?
8346  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8347  test $ac_status = 0; }
8348      if test 0 -eq "$ac_status"; then
8349	# Ensure the archiver fails upon bogus file names.
8350	rm -f conftest.$ac_objext libconftest.a
8351	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8352  (eval $lt_ar_try) 2>&5
8353  ac_status=$?
8354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8355  test $ac_status = 0; }
8356	if test 0 -ne "$ac_status"; then
8357          lt_cv_ar_at_file=@
8358        fi
8359      fi
8360      rm -f conftest.* libconftest.a
8361
8362fi
8363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8364
8365fi
8366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8367$as_echo "$lt_cv_ar_at_file" >&6; }
8368
8369if test no = "$lt_cv_ar_at_file"; then
8370  archiver_list_spec=
8371else
8372  archiver_list_spec=$lt_cv_ar_at_file
8373fi
8374
8375
8376
8377
8378
8379
8380
8381if test -n "$ac_tool_prefix"; then
8382  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8383set dummy ${ac_tool_prefix}strip; ac_word=$2
8384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8385$as_echo_n "checking for $ac_word... " >&6; }
8386if ${ac_cv_prog_STRIP+:} false; then :
8387  $as_echo_n "(cached) " >&6
8388else
8389  if test -n "$STRIP"; then
8390  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8391else
8392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8393for as_dir in $PATH
8394do
8395  IFS=$as_save_IFS
8396  test -z "$as_dir" && as_dir=.
8397    for ac_exec_ext in '' $ac_executable_extensions; do
8398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8399    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8401    break 2
8402  fi
8403done
8404  done
8405IFS=$as_save_IFS
8406
8407fi
8408fi
8409STRIP=$ac_cv_prog_STRIP
8410if test -n "$STRIP"; then
8411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8412$as_echo "$STRIP" >&6; }
8413else
8414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415$as_echo "no" >&6; }
8416fi
8417
8418
8419fi
8420if test -z "$ac_cv_prog_STRIP"; then
8421  ac_ct_STRIP=$STRIP
8422  # Extract the first word of "strip", so it can be a program name with args.
8423set dummy strip; ac_word=$2
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8425$as_echo_n "checking for $ac_word... " >&6; }
8426if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8427  $as_echo_n "(cached) " >&6
8428else
8429  if test -n "$ac_ct_STRIP"; then
8430  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8431else
8432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433for as_dir in $PATH
8434do
8435  IFS=$as_save_IFS
8436  test -z "$as_dir" && as_dir=.
8437    for ac_exec_ext in '' $ac_executable_extensions; do
8438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439    ac_cv_prog_ac_ct_STRIP="strip"
8440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441    break 2
8442  fi
8443done
8444  done
8445IFS=$as_save_IFS
8446
8447fi
8448fi
8449ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8450if test -n "$ac_ct_STRIP"; then
8451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8452$as_echo "$ac_ct_STRIP" >&6; }
8453else
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455$as_echo "no" >&6; }
8456fi
8457
8458  if test "x$ac_ct_STRIP" = x; then
8459    STRIP=":"
8460  else
8461    case $cross_compiling:$ac_tool_warned in
8462yes:)
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8465ac_tool_warned=yes ;;
8466esac
8467    STRIP=$ac_ct_STRIP
8468  fi
8469else
8470  STRIP="$ac_cv_prog_STRIP"
8471fi
8472
8473test -z "$STRIP" && STRIP=:
8474
8475
8476
8477
8478
8479
8480if test -n "$ac_tool_prefix"; then
8481  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8482set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_prog_RANLIB+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  if test -n "$RANLIB"; then
8489  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8490else
8491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506fi
8507fi
8508RANLIB=$ac_cv_prog_RANLIB
8509if test -n "$RANLIB"; then
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8511$as_echo "$RANLIB" >&6; }
8512else
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
8515fi
8516
8517
8518fi
8519if test -z "$ac_cv_prog_RANLIB"; then
8520  ac_ct_RANLIB=$RANLIB
8521  # Extract the first word of "ranlib", so it can be a program name with args.
8522set dummy ranlib; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  if test -n "$ac_ct_RANLIB"; then
8529  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8530else
8531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8532for as_dir in $PATH
8533do
8534  IFS=$as_save_IFS
8535  test -z "$as_dir" && as_dir=.
8536    for ac_exec_ext in '' $ac_executable_extensions; do
8537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8538    ac_cv_prog_ac_ct_RANLIB="ranlib"
8539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8540    break 2
8541  fi
8542done
8543  done
8544IFS=$as_save_IFS
8545
8546fi
8547fi
8548ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8549if test -n "$ac_ct_RANLIB"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8551$as_echo "$ac_ct_RANLIB" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557  if test "x$ac_ct_RANLIB" = x; then
8558    RANLIB=":"
8559  else
8560    case $cross_compiling:$ac_tool_warned in
8561yes:)
8562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8564ac_tool_warned=yes ;;
8565esac
8566    RANLIB=$ac_ct_RANLIB
8567  fi
8568else
8569  RANLIB="$ac_cv_prog_RANLIB"
8570fi
8571
8572test -z "$RANLIB" && RANLIB=:
8573
8574
8575
8576
8577
8578
8579# Determine commands to create old-style static archives.
8580old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8581old_postinstall_cmds='chmod 644 $oldlib'
8582old_postuninstall_cmds=
8583
8584if test -n "$RANLIB"; then
8585  case $host_os in
8586  bitrig* | openbsd*)
8587    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8588    ;;
8589  *)
8590    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8591    ;;
8592  esac
8593  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8594fi
8595
8596case $host_os in
8597  darwin*)
8598    lock_old_archive_extraction=yes ;;
8599  *)
8600    lock_old_archive_extraction=no ;;
8601esac
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623for ac_prog in gawk mawk nawk awk
8624do
8625  # Extract the first word of "$ac_prog", so it can be a program name with args.
8626set dummy $ac_prog; ac_word=$2
8627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8628$as_echo_n "checking for $ac_word... " >&6; }
8629if ${ac_cv_prog_AWK+:} false; then :
8630  $as_echo_n "(cached) " >&6
8631else
8632  if test -n "$AWK"; then
8633  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8634else
8635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8636for as_dir in $PATH
8637do
8638  IFS=$as_save_IFS
8639  test -z "$as_dir" && as_dir=.
8640    for ac_exec_ext in '' $ac_executable_extensions; do
8641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8642    ac_cv_prog_AWK="$ac_prog"
8643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8644    break 2
8645  fi
8646done
8647  done
8648IFS=$as_save_IFS
8649
8650fi
8651fi
8652AWK=$ac_cv_prog_AWK
8653if test -n "$AWK"; then
8654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8655$as_echo "$AWK" >&6; }
8656else
8657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8658$as_echo "no" >&6; }
8659fi
8660
8661
8662  test -n "$AWK" && break
8663done
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683# If no C compiler was specified, use CC.
8684LTCC=${LTCC-"$CC"}
8685
8686# If no C compiler flags were specified, use CFLAGS.
8687LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8688
8689# Allow CC to be a program name with arguments.
8690compiler=$CC
8691
8692
8693# Check for command to grab the raw symbol name followed by C symbol from nm.
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8695$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8696if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8697  $as_echo_n "(cached) " >&6
8698else
8699
8700# These are sane defaults that work on at least a few old systems.
8701# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8702
8703# Character class describing NM global symbol codes.
8704symcode='[BCDEGRST]'
8705
8706# Regexp to match symbols that can be accessed directly from C.
8707sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8708
8709# Define system-specific variables.
8710case $host_os in
8711aix*)
8712  symcode='[BCDT]'
8713  ;;
8714cygwin* | mingw* | pw32* | cegcc*)
8715  symcode='[ABCDGISTW]'
8716  ;;
8717hpux*)
8718  if test ia64 = "$host_cpu"; then
8719    symcode='[ABCDEGRST]'
8720  fi
8721  ;;
8722irix* | nonstopux*)
8723  symcode='[BCDEGRST]'
8724  ;;
8725osf*)
8726  symcode='[BCDEGQRST]'
8727  ;;
8728solaris*)
8729  symcode='[BDRT]'
8730  ;;
8731sco3.2v5*)
8732  symcode='[DT]'
8733  ;;
8734sysv4.2uw2*)
8735  symcode='[DT]'
8736  ;;
8737sysv5* | sco5v6* | unixware* | OpenUNIX*)
8738  symcode='[ABDT]'
8739  ;;
8740sysv4)
8741  symcode='[DFNSTU]'
8742  ;;
8743esac
8744
8745# If we're using GNU nm, then use its standard symbol codes.
8746case `$NM -V 2>&1` in
8747*GNU* | *'with BFD'*)
8748  symcode='[ABCDGIRSTW]' ;;
8749esac
8750
8751if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8752  # Gets list of data symbols to import.
8753  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8754  # Adjust the below global symbol transforms to fixup imported variables.
8755  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8756  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8757  lt_c_name_lib_hook="\
8758  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8759  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8760else
8761  # Disable hooks by default.
8762  lt_cv_sys_global_symbol_to_import=
8763  lt_cdecl_hook=
8764  lt_c_name_hook=
8765  lt_c_name_lib_hook=
8766fi
8767
8768# Transform an extracted symbol line into a proper C declaration.
8769# Some systems (esp. on ia64) link data and code symbols differently,
8770# so use this general approach.
8771lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8772$lt_cdecl_hook\
8773" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8774" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8775
8776# Transform an extracted symbol line into symbol name and symbol address
8777lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8778$lt_c_name_hook\
8779" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8780" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8781
8782# Transform an extracted symbol line into symbol name with lib prefix and
8783# symbol address.
8784lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8785$lt_c_name_lib_hook\
8786" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8787" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8788" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8789
8790# Handle CRLF in mingw tool chain
8791opt_cr=
8792case $build_os in
8793mingw*)
8794  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8795  ;;
8796esac
8797
8798# Try without a prefix underscore, then with it.
8799for ac_symprfx in "" "_"; do
8800
8801  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8802  symxfrm="\\1 $ac_symprfx\\2 \\2"
8803
8804  # Write the raw and C identifiers.
8805  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8806    # Fake it for dumpbin and say T for any non-static function,
8807    # D for any global variable and I for any imported variable.
8808    # Also find C++ and __fastcall symbols from MSVC++,
8809    # which start with @ or ?.
8810    lt_cv_sys_global_symbol_pipe="$AWK '"\
8811"     {last_section=section; section=\$ 3};"\
8812"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8813"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8814"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8815"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8816"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8817"     \$ 0!~/External *\|/{next};"\
8818"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8819"     {if(hide[section]) next};"\
8820"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8821"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8822"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8823"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8824"     ' prfx=^$ac_symprfx"
8825  else
8826    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8827  fi
8828  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8829
8830  # Check to see that the pipe works correctly.
8831  pipe_works=no
8832
8833  rm -f conftest*
8834  cat > conftest.$ac_ext <<_LT_EOF
8835#ifdef __cplusplus
8836extern "C" {
8837#endif
8838char nm_test_var;
8839void nm_test_func(void);
8840void nm_test_func(void){}
8841#ifdef __cplusplus
8842}
8843#endif
8844int main(){nm_test_var='a';nm_test_func();return(0);}
8845_LT_EOF
8846
8847  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8848  (eval $ac_compile) 2>&5
8849  ac_status=$?
8850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8851  test $ac_status = 0; }; then
8852    # Now try to grab the symbols.
8853    nlist=conftest.nm
8854    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8855  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8856  ac_status=$?
8857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8858  test $ac_status = 0; } && test -s "$nlist"; then
8859      # Try sorting and uniquifying the output.
8860      if sort "$nlist" | uniq > "$nlist"T; then
8861	mv -f "$nlist"T "$nlist"
8862      else
8863	rm -f "$nlist"T
8864      fi
8865
8866      # Make sure that we snagged all the symbols we need.
8867      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8868	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8869	  cat <<_LT_EOF > conftest.$ac_ext
8870/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8871#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8872/* DATA imports from DLLs on WIN32 can't be const, because runtime
8873   relocations are performed -- see ld's documentation on pseudo-relocs.  */
8874# define LT_DLSYM_CONST
8875#elif defined __osf__
8876/* This system does not cope well with relocations in const data.  */
8877# define LT_DLSYM_CONST
8878#else
8879# define LT_DLSYM_CONST const
8880#endif
8881
8882#ifdef __cplusplus
8883extern "C" {
8884#endif
8885
8886_LT_EOF
8887	  # Now generate the symbol file.
8888	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8889
8890	  cat <<_LT_EOF >> conftest.$ac_ext
8891
8892/* The mapping between symbol names and symbols.  */
8893LT_DLSYM_CONST struct {
8894  const char *name;
8895  void       *address;
8896}
8897lt__PROGRAM__LTX_preloaded_symbols[] =
8898{
8899  { "@PROGRAM@", (void *) 0 },
8900_LT_EOF
8901	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8902	  cat <<\_LT_EOF >> conftest.$ac_ext
8903  {0, (void *) 0}
8904};
8905
8906/* This works around a problem in FreeBSD linker */
8907#ifdef FREEBSD_WORKAROUND
8908static const void *lt_preloaded_setup() {
8909  return lt__PROGRAM__LTX_preloaded_symbols;
8910}
8911#endif
8912
8913#ifdef __cplusplus
8914}
8915#endif
8916_LT_EOF
8917	  # Now try linking the two files.
8918	  mv conftest.$ac_objext conftstm.$ac_objext
8919	  lt_globsym_save_LIBS=$LIBS
8920	  lt_globsym_save_CFLAGS=$CFLAGS
8921	  LIBS=conftstm.$ac_objext
8922	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8923	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8924  (eval $ac_link) 2>&5
8925  ac_status=$?
8926  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8927  test $ac_status = 0; } && test -s conftest$ac_exeext; then
8928	    pipe_works=yes
8929	  fi
8930	  LIBS=$lt_globsym_save_LIBS
8931	  CFLAGS=$lt_globsym_save_CFLAGS
8932	else
8933	  echo "cannot find nm_test_func in $nlist" >&5
8934	fi
8935      else
8936	echo "cannot find nm_test_var in $nlist" >&5
8937      fi
8938    else
8939      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8940    fi
8941  else
8942    echo "$progname: failed program was:" >&5
8943    cat conftest.$ac_ext >&5
8944  fi
8945  rm -rf conftest* conftst*
8946
8947  # Do not use the global_symbol_pipe unless it works.
8948  if test yes = "$pipe_works"; then
8949    break
8950  else
8951    lt_cv_sys_global_symbol_pipe=
8952  fi
8953done
8954
8955fi
8956
8957if test -z "$lt_cv_sys_global_symbol_pipe"; then
8958  lt_cv_sys_global_symbol_to_cdecl=
8959fi
8960if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8962$as_echo "failed" >&6; }
8963else
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8965$as_echo "ok" >&6; }
8966fi
8967
8968# Response file support.
8969if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8970  nm_file_list_spec='@'
8971elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8972  nm_file_list_spec='@'
8973fi
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
9010
9011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9012$as_echo_n "checking for sysroot... " >&6; }
9013
9014# Check whether --with-sysroot was given.
9015if test "${with_sysroot+set}" = set; then :
9016  withval=$with_sysroot;
9017else
9018  with_sysroot=no
9019fi
9020
9021
9022lt_sysroot=
9023case $with_sysroot in #(
9024 yes)
9025   if test yes = "$GCC"; then
9026     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9027   fi
9028   ;; #(
9029 /*)
9030   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9031   ;; #(
9032 no|'')
9033   ;; #(
9034 *)
9035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9036$as_echo "$with_sysroot" >&6; }
9037   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9038   ;;
9039esac
9040
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9042$as_echo "${lt_sysroot:-no}" >&6; }
9043
9044
9045
9046
9047
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9049$as_echo_n "checking for a working dd... " >&6; }
9050if ${ac_cv_path_lt_DD+:} false; then :
9051  $as_echo_n "(cached) " >&6
9052else
9053  printf 0123456789abcdef0123456789abcdef >conftest.i
9054cat conftest.i conftest.i >conftest2.i
9055: ${lt_DD:=$DD}
9056if test -z "$lt_DD"; then
9057  ac_path_lt_DD_found=false
9058  # Loop through the user's path and test for each of PROGNAME-LIST
9059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9060for as_dir in $PATH
9061do
9062  IFS=$as_save_IFS
9063  test -z "$as_dir" && as_dir=.
9064    for ac_prog in dd; do
9065    for ac_exec_ext in '' $ac_executable_extensions; do
9066      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9067      as_fn_executable_p "$ac_path_lt_DD" || continue
9068if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9069  cmp -s conftest.i conftest.out \
9070  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9071fi
9072      $ac_path_lt_DD_found && break 3
9073    done
9074  done
9075  done
9076IFS=$as_save_IFS
9077  if test -z "$ac_cv_path_lt_DD"; then
9078    :
9079  fi
9080else
9081  ac_cv_path_lt_DD=$lt_DD
9082fi
9083
9084rm -f conftest.i conftest2.i conftest.out
9085fi
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9087$as_echo "$ac_cv_path_lt_DD" >&6; }
9088
9089
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9091$as_echo_n "checking how to truncate binary pipes... " >&6; }
9092if ${lt_cv_truncate_bin+:} false; then :
9093  $as_echo_n "(cached) " >&6
9094else
9095  printf 0123456789abcdef0123456789abcdef >conftest.i
9096cat conftest.i conftest.i >conftest2.i
9097lt_cv_truncate_bin=
9098if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9099  cmp -s conftest.i conftest.out \
9100  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9101fi
9102rm -f conftest.i conftest2.i conftest.out
9103test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9104fi
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9106$as_echo "$lt_cv_truncate_bin" >&6; }
9107
9108
9109
9110
9111
9112
9113
9114# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9115func_cc_basename ()
9116{
9117    for cc_temp in $*""; do
9118      case $cc_temp in
9119        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9120        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9121        \-*) ;;
9122        *) break;;
9123      esac
9124    done
9125    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9126}
9127
9128# Check whether --enable-libtool-lock was given.
9129if test "${enable_libtool_lock+set}" = set; then :
9130  enableval=$enable_libtool_lock;
9131fi
9132
9133test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9134
9135# Some flags need to be propagated to the compiler or linker for good
9136# libtool support.
9137case $host in
9138ia64-*-hpux*)
9139  # Find out what ABI is being produced by ac_compile, and set mode
9140  # options accordingly.
9141  echo 'int i;' > conftest.$ac_ext
9142  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9143  (eval $ac_compile) 2>&5
9144  ac_status=$?
9145  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9146  test $ac_status = 0; }; then
9147    case `/usr/bin/file conftest.$ac_objext` in
9148      *ELF-32*)
9149	HPUX_IA64_MODE=32
9150	;;
9151      *ELF-64*)
9152	HPUX_IA64_MODE=64
9153	;;
9154    esac
9155  fi
9156  rm -rf conftest*
9157  ;;
9158*-*-irix6*)
9159  # Find out what ABI is being produced by ac_compile, and set linker
9160  # options accordingly.
9161  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9162  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9163  (eval $ac_compile) 2>&5
9164  ac_status=$?
9165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9166  test $ac_status = 0; }; then
9167    if test yes = "$lt_cv_prog_gnu_ld"; then
9168      case `/usr/bin/file conftest.$ac_objext` in
9169	*32-bit*)
9170	  LD="${LD-ld} -melf32bsmip"
9171	  ;;
9172	*N32*)
9173	  LD="${LD-ld} -melf32bmipn32"
9174	  ;;
9175	*64-bit*)
9176	  LD="${LD-ld} -melf64bmip"
9177	;;
9178      esac
9179    else
9180      case `/usr/bin/file conftest.$ac_objext` in
9181	*32-bit*)
9182	  LD="${LD-ld} -32"
9183	  ;;
9184	*N32*)
9185	  LD="${LD-ld} -n32"
9186	  ;;
9187	*64-bit*)
9188	  LD="${LD-ld} -64"
9189	  ;;
9190      esac
9191    fi
9192  fi
9193  rm -rf conftest*
9194  ;;
9195
9196mips64*-*linux*)
9197  # Find out what ABI is being produced by ac_compile, and set linker
9198  # options accordingly.
9199  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9200  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9201  (eval $ac_compile) 2>&5
9202  ac_status=$?
9203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9204  test $ac_status = 0; }; then
9205    emul=elf
9206    case `/usr/bin/file conftest.$ac_objext` in
9207      *32-bit*)
9208	emul="${emul}32"
9209	;;
9210      *64-bit*)
9211	emul="${emul}64"
9212	;;
9213    esac
9214    case `/usr/bin/file conftest.$ac_objext` in
9215      *MSB*)
9216	emul="${emul}btsmip"
9217	;;
9218      *LSB*)
9219	emul="${emul}ltsmip"
9220	;;
9221    esac
9222    case `/usr/bin/file conftest.$ac_objext` in
9223      *N32*)
9224	emul="${emul}n32"
9225	;;
9226    esac
9227    LD="${LD-ld} -m $emul"
9228  fi
9229  rm -rf conftest*
9230  ;;
9231
9232x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9233s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9234  # Find out what ABI is being produced by ac_compile, and set linker
9235  # options accordingly.  Note that the listed cases only cover the
9236  # situations where additional linker options are needed (such as when
9237  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9238  # vice versa); the common cases where no linker options are needed do
9239  # not appear in the list.
9240  echo 'int i;' > conftest.$ac_ext
9241  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9242  (eval $ac_compile) 2>&5
9243  ac_status=$?
9244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9245  test $ac_status = 0; }; then
9246    case `/usr/bin/file conftest.o` in
9247      *32-bit*)
9248	case $host in
9249	  x86_64-*kfreebsd*-gnu)
9250	    LD="${LD-ld} -m elf_i386_fbsd"
9251	    ;;
9252	  x86_64-*linux*)
9253	    case `/usr/bin/file conftest.o` in
9254	      *x86-64*)
9255		LD="${LD-ld} -m elf32_x86_64"
9256		;;
9257	      *)
9258		LD="${LD-ld} -m elf_i386"
9259		;;
9260	    esac
9261	    ;;
9262	  powerpc64le-*linux*)
9263	    LD="${LD-ld} -m elf32lppclinux"
9264	    ;;
9265	  powerpc64-*linux*)
9266	    LD="${LD-ld} -m elf32ppclinux"
9267	    ;;
9268	  s390x-*linux*)
9269	    LD="${LD-ld} -m elf_s390"
9270	    ;;
9271	  sparc64-*linux*)
9272	    LD="${LD-ld} -m elf32_sparc"
9273	    ;;
9274	esac
9275	;;
9276      *64-bit*)
9277	case $host in
9278	  x86_64-*kfreebsd*-gnu)
9279	    LD="${LD-ld} -m elf_x86_64_fbsd"
9280	    ;;
9281	  x86_64-*linux*)
9282	    LD="${LD-ld} -m elf_x86_64"
9283	    ;;
9284	  powerpcle-*linux*)
9285	    LD="${LD-ld} -m elf64lppc"
9286	    ;;
9287	  powerpc-*linux*)
9288	    LD="${LD-ld} -m elf64ppc"
9289	    ;;
9290	  s390*-*linux*|s390*-*tpf*)
9291	    LD="${LD-ld} -m elf64_s390"
9292	    ;;
9293	  sparc*-*linux*)
9294	    LD="${LD-ld} -m elf64_sparc"
9295	    ;;
9296	esac
9297	;;
9298    esac
9299  fi
9300  rm -rf conftest*
9301  ;;
9302
9303*-*-sco3.2v5*)
9304  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9305  SAVE_CFLAGS=$CFLAGS
9306  CFLAGS="$CFLAGS -belf"
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9308$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9309if ${lt_cv_cc_needs_belf+:} false; then :
9310  $as_echo_n "(cached) " >&6
9311else
9312  ac_ext=c
9313ac_cpp='$CPP $CPPFLAGS'
9314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9316ac_compiler_gnu=$ac_cv_c_compiler_gnu
9317
9318     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9319/* end confdefs.h.  */
9320
9321int
9322main ()
9323{
9324
9325  ;
9326  return 0;
9327}
9328_ACEOF
9329if ac_fn_c_try_link "$LINENO"; then :
9330  lt_cv_cc_needs_belf=yes
9331else
9332  lt_cv_cc_needs_belf=no
9333fi
9334rm -f core conftest.err conftest.$ac_objext \
9335    conftest$ac_exeext conftest.$ac_ext
9336     ac_ext=c
9337ac_cpp='$CPP $CPPFLAGS'
9338ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9339ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9340ac_compiler_gnu=$ac_cv_c_compiler_gnu
9341
9342fi
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9344$as_echo "$lt_cv_cc_needs_belf" >&6; }
9345  if test yes != "$lt_cv_cc_needs_belf"; then
9346    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9347    CFLAGS=$SAVE_CFLAGS
9348  fi
9349  ;;
9350*-*solaris*)
9351  # Find out what ABI is being produced by ac_compile, and set linker
9352  # options accordingly.
9353  echo 'int i;' > conftest.$ac_ext
9354  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9355  (eval $ac_compile) 2>&5
9356  ac_status=$?
9357  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9358  test $ac_status = 0; }; then
9359    case `/usr/bin/file conftest.o` in
9360    *64-bit*)
9361      case $lt_cv_prog_gnu_ld in
9362      yes*)
9363        case $host in
9364        i?86-*-solaris*|x86_64-*-solaris*)
9365          LD="${LD-ld} -m elf_x86_64"
9366          ;;
9367        sparc*-*-solaris*)
9368          LD="${LD-ld} -m elf64_sparc"
9369          ;;
9370        esac
9371        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9372        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9373          LD=${LD-ld}_sol2
9374        fi
9375        ;;
9376      *)
9377	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9378	  LD="${LD-ld} -64"
9379	fi
9380	;;
9381      esac
9382      ;;
9383    esac
9384  fi
9385  rm -rf conftest*
9386  ;;
9387esac
9388
9389need_locks=$enable_libtool_lock
9390
9391if test -n "$ac_tool_prefix"; then
9392  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9393set dummy ${ac_tool_prefix}mt; ac_word=$2
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395$as_echo_n "checking for $ac_word... " >&6; }
9396if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9397  $as_echo_n "(cached) " >&6
9398else
9399  if test -n "$MANIFEST_TOOL"; then
9400  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9401else
9402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9403for as_dir in $PATH
9404do
9405  IFS=$as_save_IFS
9406  test -z "$as_dir" && as_dir=.
9407    for ac_exec_ext in '' $ac_executable_extensions; do
9408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9409    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9411    break 2
9412  fi
9413done
9414  done
9415IFS=$as_save_IFS
9416
9417fi
9418fi
9419MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9420if test -n "$MANIFEST_TOOL"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9422$as_echo "$MANIFEST_TOOL" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429fi
9430if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9431  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9432  # Extract the first word of "mt", so it can be a program name with args.
9433set dummy mt; ac_word=$2
9434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9435$as_echo_n "checking for $ac_word... " >&6; }
9436if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9437  $as_echo_n "(cached) " >&6
9438else
9439  if test -n "$ac_ct_MANIFEST_TOOL"; then
9440  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9441else
9442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9443for as_dir in $PATH
9444do
9445  IFS=$as_save_IFS
9446  test -z "$as_dir" && as_dir=.
9447    for ac_exec_ext in '' $ac_executable_extensions; do
9448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9449    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9451    break 2
9452  fi
9453done
9454  done
9455IFS=$as_save_IFS
9456
9457fi
9458fi
9459ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9460if test -n "$ac_ct_MANIFEST_TOOL"; then
9461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9462$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9463else
9464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
9466fi
9467
9468  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9469    MANIFEST_TOOL=":"
9470  else
9471    case $cross_compiling:$ac_tool_warned in
9472yes:)
9473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9475ac_tool_warned=yes ;;
9476esac
9477    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9478  fi
9479else
9480  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9481fi
9482
9483test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9485$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9486if ${lt_cv_path_mainfest_tool+:} false; then :
9487  $as_echo_n "(cached) " >&6
9488else
9489  lt_cv_path_mainfest_tool=no
9490  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9491  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9492  cat conftest.err >&5
9493  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9494    lt_cv_path_mainfest_tool=yes
9495  fi
9496  rm -f conftest*
9497fi
9498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9499$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9500if test yes != "$lt_cv_path_mainfest_tool"; then
9501  MANIFEST_TOOL=:
9502fi
9503
9504
9505
9506
9507
9508
9509  case $host_os in
9510    rhapsody* | darwin*)
9511    if test -n "$ac_tool_prefix"; then
9512  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9513set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9515$as_echo_n "checking for $ac_word... " >&6; }
9516if ${ac_cv_prog_DSYMUTIL+:} false; then :
9517  $as_echo_n "(cached) " >&6
9518else
9519  if test -n "$DSYMUTIL"; then
9520  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9521else
9522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523for as_dir in $PATH
9524do
9525  IFS=$as_save_IFS
9526  test -z "$as_dir" && as_dir=.
9527    for ac_exec_ext in '' $ac_executable_extensions; do
9528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9529    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9531    break 2
9532  fi
9533done
9534  done
9535IFS=$as_save_IFS
9536
9537fi
9538fi
9539DSYMUTIL=$ac_cv_prog_DSYMUTIL
9540if test -n "$DSYMUTIL"; then
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9542$as_echo "$DSYMUTIL" >&6; }
9543else
9544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
9546fi
9547
9548
9549fi
9550if test -z "$ac_cv_prog_DSYMUTIL"; then
9551  ac_ct_DSYMUTIL=$DSYMUTIL
9552  # Extract the first word of "dsymutil", so it can be a program name with args.
9553set dummy dsymutil; ac_word=$2
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9555$as_echo_n "checking for $ac_word... " >&6; }
9556if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9557  $as_echo_n "(cached) " >&6
9558else
9559  if test -n "$ac_ct_DSYMUTIL"; then
9560  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9561else
9562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563for as_dir in $PATH
9564do
9565  IFS=$as_save_IFS
9566  test -z "$as_dir" && as_dir=.
9567    for ac_exec_ext in '' $ac_executable_extensions; do
9568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9569    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571    break 2
9572  fi
9573done
9574  done
9575IFS=$as_save_IFS
9576
9577fi
9578fi
9579ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9580if test -n "$ac_ct_DSYMUTIL"; then
9581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9582$as_echo "$ac_ct_DSYMUTIL" >&6; }
9583else
9584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585$as_echo "no" >&6; }
9586fi
9587
9588  if test "x$ac_ct_DSYMUTIL" = x; then
9589    DSYMUTIL=":"
9590  else
9591    case $cross_compiling:$ac_tool_warned in
9592yes:)
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9594$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9595ac_tool_warned=yes ;;
9596esac
9597    DSYMUTIL=$ac_ct_DSYMUTIL
9598  fi
9599else
9600  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9601fi
9602
9603    if test -n "$ac_tool_prefix"; then
9604  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9605set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9607$as_echo_n "checking for $ac_word... " >&6; }
9608if ${ac_cv_prog_NMEDIT+:} false; then :
9609  $as_echo_n "(cached) " >&6
9610else
9611  if test -n "$NMEDIT"; then
9612  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9613else
9614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9615for as_dir in $PATH
9616do
9617  IFS=$as_save_IFS
9618  test -z "$as_dir" && as_dir=.
9619    for ac_exec_ext in '' $ac_executable_extensions; do
9620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9621    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9623    break 2
9624  fi
9625done
9626  done
9627IFS=$as_save_IFS
9628
9629fi
9630fi
9631NMEDIT=$ac_cv_prog_NMEDIT
9632if test -n "$NMEDIT"; then
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9634$as_echo "$NMEDIT" >&6; }
9635else
9636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
9638fi
9639
9640
9641fi
9642if test -z "$ac_cv_prog_NMEDIT"; then
9643  ac_ct_NMEDIT=$NMEDIT
9644  # Extract the first word of "nmedit", so it can be a program name with args.
9645set dummy nmedit; ac_word=$2
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
9648if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  if test -n "$ac_ct_NMEDIT"; then
9652  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9653else
9654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655for as_dir in $PATH
9656do
9657  IFS=$as_save_IFS
9658  test -z "$as_dir" && as_dir=.
9659    for ac_exec_ext in '' $ac_executable_extensions; do
9660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9661    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9663    break 2
9664  fi
9665done
9666  done
9667IFS=$as_save_IFS
9668
9669fi
9670fi
9671ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9672if test -n "$ac_ct_NMEDIT"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9674$as_echo "$ac_ct_NMEDIT" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680  if test "x$ac_ct_NMEDIT" = x; then
9681    NMEDIT=":"
9682  else
9683    case $cross_compiling:$ac_tool_warned in
9684yes:)
9685{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9687ac_tool_warned=yes ;;
9688esac
9689    NMEDIT=$ac_ct_NMEDIT
9690  fi
9691else
9692  NMEDIT="$ac_cv_prog_NMEDIT"
9693fi
9694
9695    if test -n "$ac_tool_prefix"; then
9696  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9697set dummy ${ac_tool_prefix}lipo; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_prog_LIPO+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  if test -n "$LIPO"; then
9704  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9705else
9706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709  IFS=$as_save_IFS
9710  test -z "$as_dir" && as_dir=.
9711    for ac_exec_ext in '' $ac_executable_extensions; do
9712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9713    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9715    break 2
9716  fi
9717done
9718  done
9719IFS=$as_save_IFS
9720
9721fi
9722fi
9723LIPO=$ac_cv_prog_LIPO
9724if test -n "$LIPO"; then
9725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9726$as_echo "$LIPO" >&6; }
9727else
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729$as_echo "no" >&6; }
9730fi
9731
9732
9733fi
9734if test -z "$ac_cv_prog_LIPO"; then
9735  ac_ct_LIPO=$LIPO
9736  # Extract the first word of "lipo", so it can be a program name with args.
9737set dummy lipo; ac_word=$2
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9739$as_echo_n "checking for $ac_word... " >&6; }
9740if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9741  $as_echo_n "(cached) " >&6
9742else
9743  if test -n "$ac_ct_LIPO"; then
9744  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9745else
9746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747for as_dir in $PATH
9748do
9749  IFS=$as_save_IFS
9750  test -z "$as_dir" && as_dir=.
9751    for ac_exec_ext in '' $ac_executable_extensions; do
9752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753    ac_cv_prog_ac_ct_LIPO="lipo"
9754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755    break 2
9756  fi
9757done
9758  done
9759IFS=$as_save_IFS
9760
9761fi
9762fi
9763ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9764if test -n "$ac_ct_LIPO"; then
9765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9766$as_echo "$ac_ct_LIPO" >&6; }
9767else
9768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9769$as_echo "no" >&6; }
9770fi
9771
9772  if test "x$ac_ct_LIPO" = x; then
9773    LIPO=":"
9774  else
9775    case $cross_compiling:$ac_tool_warned in
9776yes:)
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9779ac_tool_warned=yes ;;
9780esac
9781    LIPO=$ac_ct_LIPO
9782  fi
9783else
9784  LIPO="$ac_cv_prog_LIPO"
9785fi
9786
9787    if test -n "$ac_tool_prefix"; then
9788  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9789set dummy ${ac_tool_prefix}otool; ac_word=$2
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9791$as_echo_n "checking for $ac_word... " >&6; }
9792if ${ac_cv_prog_OTOOL+:} false; then :
9793  $as_echo_n "(cached) " >&6
9794else
9795  if test -n "$OTOOL"; then
9796  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9797else
9798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9799for as_dir in $PATH
9800do
9801  IFS=$as_save_IFS
9802  test -z "$as_dir" && as_dir=.
9803    for ac_exec_ext in '' $ac_executable_extensions; do
9804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9805    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9807    break 2
9808  fi
9809done
9810  done
9811IFS=$as_save_IFS
9812
9813fi
9814fi
9815OTOOL=$ac_cv_prog_OTOOL
9816if test -n "$OTOOL"; then
9817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9818$as_echo "$OTOOL" >&6; }
9819else
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822fi
9823
9824
9825fi
9826if test -z "$ac_cv_prog_OTOOL"; then
9827  ac_ct_OTOOL=$OTOOL
9828  # Extract the first word of "otool", so it can be a program name with args.
9829set dummy otool; ac_word=$2
9830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9831$as_echo_n "checking for $ac_word... " >&6; }
9832if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9833  $as_echo_n "(cached) " >&6
9834else
9835  if test -n "$ac_ct_OTOOL"; then
9836  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9837else
9838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9839for as_dir in $PATH
9840do
9841  IFS=$as_save_IFS
9842  test -z "$as_dir" && as_dir=.
9843    for ac_exec_ext in '' $ac_executable_extensions; do
9844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9845    ac_cv_prog_ac_ct_OTOOL="otool"
9846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9847    break 2
9848  fi
9849done
9850  done
9851IFS=$as_save_IFS
9852
9853fi
9854fi
9855ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9856if test -n "$ac_ct_OTOOL"; then
9857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9858$as_echo "$ac_ct_OTOOL" >&6; }
9859else
9860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861$as_echo "no" >&6; }
9862fi
9863
9864  if test "x$ac_ct_OTOOL" = x; then
9865    OTOOL=":"
9866  else
9867    case $cross_compiling:$ac_tool_warned in
9868yes:)
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9871ac_tool_warned=yes ;;
9872esac
9873    OTOOL=$ac_ct_OTOOL
9874  fi
9875else
9876  OTOOL="$ac_cv_prog_OTOOL"
9877fi
9878
9879    if test -n "$ac_tool_prefix"; then
9880  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9881set dummy ${ac_tool_prefix}otool64; ac_word=$2
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883$as_echo_n "checking for $ac_word... " >&6; }
9884if ${ac_cv_prog_OTOOL64+:} false; then :
9885  $as_echo_n "(cached) " >&6
9886else
9887  if test -n "$OTOOL64"; then
9888  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9889else
9890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9891for as_dir in $PATH
9892do
9893  IFS=$as_save_IFS
9894  test -z "$as_dir" && as_dir=.
9895    for ac_exec_ext in '' $ac_executable_extensions; do
9896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9897    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9899    break 2
9900  fi
9901done
9902  done
9903IFS=$as_save_IFS
9904
9905fi
9906fi
9907OTOOL64=$ac_cv_prog_OTOOL64
9908if test -n "$OTOOL64"; then
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9910$as_echo "$OTOOL64" >&6; }
9911else
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917fi
9918if test -z "$ac_cv_prog_OTOOL64"; then
9919  ac_ct_OTOOL64=$OTOOL64
9920  # Extract the first word of "otool64", so it can be a program name with args.
9921set dummy otool64; ac_word=$2
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9923$as_echo_n "checking for $ac_word... " >&6; }
9924if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9925  $as_echo_n "(cached) " >&6
9926else
9927  if test -n "$ac_ct_OTOOL64"; then
9928  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9929else
9930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937    ac_cv_prog_ac_ct_OTOOL64="otool64"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945fi
9946fi
9947ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9948if test -n "$ac_ct_OTOOL64"; then
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9950$as_echo "$ac_ct_OTOOL64" >&6; }
9951else
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954fi
9955
9956  if test "x$ac_ct_OTOOL64" = x; then
9957    OTOOL64=":"
9958  else
9959    case $cross_compiling:$ac_tool_warned in
9960yes:)
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9963ac_tool_warned=yes ;;
9964esac
9965    OTOOL64=$ac_ct_OTOOL64
9966  fi
9967else
9968  OTOOL64="$ac_cv_prog_OTOOL64"
9969fi
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
9996
9997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9998$as_echo_n "checking for -single_module linker flag... " >&6; }
9999if ${lt_cv_apple_cc_single_mod+:} false; then :
10000  $as_echo_n "(cached) " >&6
10001else
10002  lt_cv_apple_cc_single_mod=no
10003      if test -z "$LT_MULTI_MODULE"; then
10004	# By default we will add the -single_module flag. You can override
10005	# by either setting the environment variable LT_MULTI_MODULE
10006	# non-empty at configure time, or by adding -multi_module to the
10007	# link flags.
10008	rm -rf libconftest.dylib*
10009	echo "int foo(void){return 1;}" > conftest.c
10010	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10011-dynamiclib -Wl,-single_module conftest.c" >&5
10012	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10013	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10014        _lt_result=$?
10015	# If there is a non-empty error log, and "single_module"
10016	# appears in it, assume the flag caused a linker warning
10017        if test -s conftest.err && $GREP single_module conftest.err; then
10018	  cat conftest.err >&5
10019	# Otherwise, if the output was created with a 0 exit code from
10020	# the compiler, it worked.
10021	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10022	  lt_cv_apple_cc_single_mod=yes
10023	else
10024	  cat conftest.err >&5
10025	fi
10026	rm -rf libconftest.dylib*
10027	rm -f conftest.*
10028      fi
10029fi
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10031$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10032
10033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10034$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10035if ${lt_cv_ld_exported_symbols_list+:} false; then :
10036  $as_echo_n "(cached) " >&6
10037else
10038  lt_cv_ld_exported_symbols_list=no
10039      save_LDFLAGS=$LDFLAGS
10040      echo "_main" > conftest.sym
10041      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10042      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10043/* end confdefs.h.  */
10044
10045int
10046main ()
10047{
10048
10049  ;
10050  return 0;
10051}
10052_ACEOF
10053if ac_fn_c_try_link "$LINENO"; then :
10054  lt_cv_ld_exported_symbols_list=yes
10055else
10056  lt_cv_ld_exported_symbols_list=no
10057fi
10058rm -f core conftest.err conftest.$ac_objext \
10059    conftest$ac_exeext conftest.$ac_ext
10060	LDFLAGS=$save_LDFLAGS
10061
10062fi
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10064$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10065
10066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10067$as_echo_n "checking for -force_load linker flag... " >&6; }
10068if ${lt_cv_ld_force_load+:} false; then :
10069  $as_echo_n "(cached) " >&6
10070else
10071  lt_cv_ld_force_load=no
10072      cat > conftest.c << _LT_EOF
10073int forced_loaded() { return 2;}
10074_LT_EOF
10075      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10076      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10077      echo "$AR cru libconftest.a conftest.o" >&5
10078      $AR cru libconftest.a conftest.o 2>&5
10079      echo "$RANLIB libconftest.a" >&5
10080      $RANLIB libconftest.a 2>&5
10081      cat > conftest.c << _LT_EOF
10082int main() { return 0;}
10083_LT_EOF
10084      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10085      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10086      _lt_result=$?
10087      if test -s conftest.err && $GREP force_load conftest.err; then
10088	cat conftest.err >&5
10089      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10090	lt_cv_ld_force_load=yes
10091      else
10092	cat conftest.err >&5
10093      fi
10094        rm -f conftest.err libconftest.a conftest conftest.c
10095        rm -rf conftest.dSYM
10096
10097fi
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10099$as_echo "$lt_cv_ld_force_load" >&6; }
10100    case $host_os in
10101    rhapsody* | darwin1.[012])
10102      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10103    darwin1.*)
10104      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10105    darwin*) # darwin 5.x on
10106      # if running on 10.5 or later, the deployment target defaults
10107      # to the OS version, if on x86, and 10.4, the deployment
10108      # target defaults to 10.4. Don't you love it?
10109      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10110	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10111	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10112	10.[012][,.]*)
10113	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10114	10.*)
10115	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10116      esac
10117    ;;
10118  esac
10119    if test yes = "$lt_cv_apple_cc_single_mod"; then
10120      _lt_dar_single_mod='$single_module'
10121    fi
10122    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10123      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10124    else
10125      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10126    fi
10127    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10128      _lt_dsymutil='~$DSYMUTIL $lib || :'
10129    else
10130      _lt_dsymutil=
10131    fi
10132    ;;
10133  esac
10134
10135# func_munge_path_list VARIABLE PATH
10136# -----------------------------------
10137# VARIABLE is name of variable containing _space_ separated list of
10138# directories to be munged by the contents of PATH, which is string
10139# having a format:
10140# "DIR[:DIR]:"
10141#       string "DIR[ DIR]" will be prepended to VARIABLE
10142# ":DIR[:DIR]"
10143#       string "DIR[ DIR]" will be appended to VARIABLE
10144# "DIRP[:DIRP]::[DIRA:]DIRA"
10145#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10146#       "DIRA[ DIRA]" will be appended to VARIABLE
10147# "DIR[:DIR]"
10148#       VARIABLE will be replaced by "DIR[ DIR]"
10149func_munge_path_list ()
10150{
10151    case x$2 in
10152    x)
10153        ;;
10154    *:)
10155        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10156        ;;
10157    x:*)
10158        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10159        ;;
10160    *::*)
10161        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10162        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10163        ;;
10164    *)
10165        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10166        ;;
10167    esac
10168}
10169
10170for ac_header in dlfcn.h
10171do :
10172  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10173"
10174if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10175  cat >>confdefs.h <<_ACEOF
10176#define HAVE_DLFCN_H 1
10177_ACEOF
10178
10179fi
10180
10181done
10182
10183
10184
10185
10186
10187
10188
10189# Set options
10190
10191
10192
10193        enable_dlopen=no
10194
10195
10196  enable_win32_dll=no
10197
10198
10199            # Check whether --enable-shared was given.
10200if test "${enable_shared+set}" = set; then :
10201  enableval=$enable_shared; p=${PACKAGE-default}
10202    case $enableval in
10203    yes) enable_shared=yes ;;
10204    no) enable_shared=no ;;
10205    *)
10206      enable_shared=no
10207      # Look at the argument we got.  We use all the common list separators.
10208      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10209      for pkg in $enableval; do
10210	IFS=$lt_save_ifs
10211	if test "X$pkg" = "X$p"; then
10212	  enable_shared=yes
10213	fi
10214      done
10215      IFS=$lt_save_ifs
10216      ;;
10217    esac
10218else
10219  enable_shared=yes
10220fi
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230  # Check whether --enable-static was given.
10231if test "${enable_static+set}" = set; then :
10232  enableval=$enable_static; p=${PACKAGE-default}
10233    case $enableval in
10234    yes) enable_static=yes ;;
10235    no) enable_static=no ;;
10236    *)
10237     enable_static=no
10238      # Look at the argument we got.  We use all the common list separators.
10239      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10240      for pkg in $enableval; do
10241	IFS=$lt_save_ifs
10242	if test "X$pkg" = "X$p"; then
10243	  enable_static=yes
10244	fi
10245      done
10246      IFS=$lt_save_ifs
10247      ;;
10248    esac
10249else
10250  enable_static=yes
10251fi
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262# Check whether --with-pic was given.
10263if test "${with_pic+set}" = set; then :
10264  withval=$with_pic; lt_p=${PACKAGE-default}
10265    case $withval in
10266    yes|no) pic_mode=$withval ;;
10267    *)
10268      pic_mode=default
10269      # Look at the argument we got.  We use all the common list separators.
10270      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10271      for lt_pkg in $withval; do
10272	IFS=$lt_save_ifs
10273	if test "X$lt_pkg" = "X$lt_p"; then
10274	  pic_mode=yes
10275	fi
10276      done
10277      IFS=$lt_save_ifs
10278      ;;
10279    esac
10280else
10281  pic_mode=default
10282fi
10283
10284
10285
10286
10287
10288
10289
10290
10291  # Check whether --enable-fast-install was given.
10292if test "${enable_fast_install+set}" = set; then :
10293  enableval=$enable_fast_install; p=${PACKAGE-default}
10294    case $enableval in
10295    yes) enable_fast_install=yes ;;
10296    no) enable_fast_install=no ;;
10297    *)
10298      enable_fast_install=no
10299      # Look at the argument we got.  We use all the common list separators.
10300      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10301      for pkg in $enableval; do
10302	IFS=$lt_save_ifs
10303	if test "X$pkg" = "X$p"; then
10304	  enable_fast_install=yes
10305	fi
10306      done
10307      IFS=$lt_save_ifs
10308      ;;
10309    esac
10310else
10311  enable_fast_install=yes
10312fi
10313
10314
10315
10316
10317
10318
10319
10320
10321  shared_archive_member_spec=
10322case $host,$enable_shared in
10323power*-*-aix[5-9]*,yes)
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10325$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10326
10327# Check whether --with-aix-soname was given.
10328if test "${with_aix_soname+set}" = set; then :
10329  withval=$with_aix_soname; case $withval in
10330    aix|svr4|both)
10331      ;;
10332    *)
10333      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10334      ;;
10335    esac
10336    lt_cv_with_aix_soname=$with_aix_soname
10337else
10338  if ${lt_cv_with_aix_soname+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  lt_cv_with_aix_soname=aix
10342fi
10343
10344    with_aix_soname=$lt_cv_with_aix_soname
10345fi
10346
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10348$as_echo "$with_aix_soname" >&6; }
10349  if test aix != "$with_aix_soname"; then
10350    # For the AIX way of multilib, we name the shared archive member
10351    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10352    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10353    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10354    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10355    if test 64 = "${OBJECT_MODE-32}"; then
10356      shared_archive_member_spec=shr_64
10357    else
10358      shared_archive_member_spec=shr
10359    fi
10360  fi
10361  ;;
10362*)
10363  with_aix_soname=aix
10364  ;;
10365esac
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376# This can be used to rebuild libtool when needed
10377LIBTOOL_DEPS=$ltmain
10378
10379# Always use our own libtool.
10380LIBTOOL='$(SHELL) $(top_builddir)/libtool'
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
10409
10410
10411test -z "$LN_S" && LN_S="ln -s"
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426if test -n "${ZSH_VERSION+set}"; then
10427   setopt NO_GLOB_SUBST
10428fi
10429
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10431$as_echo_n "checking for objdir... " >&6; }
10432if ${lt_cv_objdir+:} false; then :
10433  $as_echo_n "(cached) " >&6
10434else
10435  rm -f .libs 2>/dev/null
10436mkdir .libs 2>/dev/null
10437if test -d .libs; then
10438  lt_cv_objdir=.libs
10439else
10440  # MS-DOS does not allow filenames that begin with a dot.
10441  lt_cv_objdir=_libs
10442fi
10443rmdir .libs 2>/dev/null
10444fi
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10446$as_echo "$lt_cv_objdir" >&6; }
10447objdir=$lt_cv_objdir
10448
10449
10450
10451
10452
10453cat >>confdefs.h <<_ACEOF
10454#define LT_OBJDIR "$lt_cv_objdir/"
10455_ACEOF
10456
10457
10458
10459
10460case $host_os in
10461aix3*)
10462  # AIX sometimes has problems with the GCC collect2 program.  For some
10463  # reason, if we set the COLLECT_NAMES environment variable, the problems
10464  # vanish in a puff of smoke.
10465  if test set != "${COLLECT_NAMES+set}"; then
10466    COLLECT_NAMES=
10467    export COLLECT_NAMES
10468  fi
10469  ;;
10470esac
10471
10472# Global variables:
10473ofile=libtool
10474can_build_shared=yes
10475
10476# All known linkers require a '.a' archive for static linking (except MSVC,
10477# which needs '.lib').
10478libext=a
10479
10480with_gnu_ld=$lt_cv_prog_gnu_ld
10481
10482old_CC=$CC
10483old_CFLAGS=$CFLAGS
10484
10485# Set sane defaults for various variables
10486test -z "$CC" && CC=cc
10487test -z "$LTCC" && LTCC=$CC
10488test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10489test -z "$LD" && LD=ld
10490test -z "$ac_objext" && ac_objext=o
10491
10492func_cc_basename $compiler
10493cc_basename=$func_cc_basename_result
10494
10495
10496# Only perform the check for file, if the check method requires it
10497test -z "$MAGIC_CMD" && MAGIC_CMD=file
10498case $deplibs_check_method in
10499file_magic*)
10500  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10502$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10503if ${lt_cv_path_MAGIC_CMD+:} false; then :
10504  $as_echo_n "(cached) " >&6
10505else
10506  case $MAGIC_CMD in
10507[\\/*] |  ?:[\\/]*)
10508  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10509  ;;
10510*)
10511  lt_save_MAGIC_CMD=$MAGIC_CMD
10512  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10513  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10514  for ac_dir in $ac_dummy; do
10515    IFS=$lt_save_ifs
10516    test -z "$ac_dir" && ac_dir=.
10517    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10518      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10519      if test -n "$file_magic_test_file"; then
10520	case $deplibs_check_method in
10521	"file_magic "*)
10522	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10523	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10524	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10525	    $EGREP "$file_magic_regex" > /dev/null; then
10526	    :
10527	  else
10528	    cat <<_LT_EOF 1>&2
10529
10530*** Warning: the command libtool uses to detect shared libraries,
10531*** $file_magic_cmd, produces output that libtool cannot recognize.
10532*** The result is that libtool may fail to recognize shared libraries
10533*** as such.  This will affect the creation of libtool libraries that
10534*** depend on shared libraries, but programs linked with such libtool
10535*** libraries will work regardless of this problem.  Nevertheless, you
10536*** may want to report the problem to your system manager and/or to
10537*** bug-libtool@gnu.org
10538
10539_LT_EOF
10540	  fi ;;
10541	esac
10542      fi
10543      break
10544    fi
10545  done
10546  IFS=$lt_save_ifs
10547  MAGIC_CMD=$lt_save_MAGIC_CMD
10548  ;;
10549esac
10550fi
10551
10552MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10553if test -n "$MAGIC_CMD"; then
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10555$as_echo "$MAGIC_CMD" >&6; }
10556else
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
10559fi
10560
10561
10562
10563
10564
10565if test -z "$lt_cv_path_MAGIC_CMD"; then
10566  if test -n "$ac_tool_prefix"; then
10567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10568$as_echo_n "checking for file... " >&6; }
10569if ${lt_cv_path_MAGIC_CMD+:} false; then :
10570  $as_echo_n "(cached) " >&6
10571else
10572  case $MAGIC_CMD in
10573[\\/*] |  ?:[\\/]*)
10574  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10575  ;;
10576*)
10577  lt_save_MAGIC_CMD=$MAGIC_CMD
10578  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10579  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10580  for ac_dir in $ac_dummy; do
10581    IFS=$lt_save_ifs
10582    test -z "$ac_dir" && ac_dir=.
10583    if test -f "$ac_dir/file"; then
10584      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10585      if test -n "$file_magic_test_file"; then
10586	case $deplibs_check_method in
10587	"file_magic "*)
10588	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10589	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10590	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10591	    $EGREP "$file_magic_regex" > /dev/null; then
10592	    :
10593	  else
10594	    cat <<_LT_EOF 1>&2
10595
10596*** Warning: the command libtool uses to detect shared libraries,
10597*** $file_magic_cmd, produces output that libtool cannot recognize.
10598*** The result is that libtool may fail to recognize shared libraries
10599*** as such.  This will affect the creation of libtool libraries that
10600*** depend on shared libraries, but programs linked with such libtool
10601*** libraries will work regardless of this problem.  Nevertheless, you
10602*** may want to report the problem to your system manager and/or to
10603*** bug-libtool@gnu.org
10604
10605_LT_EOF
10606	  fi ;;
10607	esac
10608      fi
10609      break
10610    fi
10611  done
10612  IFS=$lt_save_ifs
10613  MAGIC_CMD=$lt_save_MAGIC_CMD
10614  ;;
10615esac
10616fi
10617
10618MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10619if test -n "$MAGIC_CMD"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10621$as_echo "$MAGIC_CMD" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628  else
10629    MAGIC_CMD=:
10630  fi
10631fi
10632
10633  fi
10634  ;;
10635esac
10636
10637# Use C for the default configuration in the libtool script
10638
10639lt_save_CC=$CC
10640ac_ext=c
10641ac_cpp='$CPP $CPPFLAGS'
10642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10644ac_compiler_gnu=$ac_cv_c_compiler_gnu
10645
10646
10647# Source file extension for C test sources.
10648ac_ext=c
10649
10650# Object file extension for compiled C test sources.
10651objext=o
10652objext=$objext
10653
10654# Code to be used in simple compile tests
10655lt_simple_compile_test_code="int some_variable = 0;"
10656
10657# Code to be used in simple link tests
10658lt_simple_link_test_code='int main(){return(0);}'
10659
10660
10661
10662
10663
10664
10665
10666# If no C compiler was specified, use CC.
10667LTCC=${LTCC-"$CC"}
10668
10669# If no C compiler flags were specified, use CFLAGS.
10670LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10671
10672# Allow CC to be a program name with arguments.
10673compiler=$CC
10674
10675# Save the default compiler, since it gets overwritten when the other
10676# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10677compiler_DEFAULT=$CC
10678
10679# save warnings/boilerplate of simple test code
10680ac_outfile=conftest.$ac_objext
10681echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10682eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10683_lt_compiler_boilerplate=`cat conftest.err`
10684$RM conftest*
10685
10686ac_outfile=conftest.$ac_objext
10687echo "$lt_simple_link_test_code" >conftest.$ac_ext
10688eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10689_lt_linker_boilerplate=`cat conftest.err`
10690$RM -r conftest*
10691
10692
10693if test -n "$compiler"; then
10694
10695lt_prog_compiler_no_builtin_flag=
10696
10697if test yes = "$GCC"; then
10698  case $cc_basename in
10699  nvcc*)
10700    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10701  *)
10702    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10703  esac
10704
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10706$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10707if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10708  $as_echo_n "(cached) " >&6
10709else
10710  lt_cv_prog_compiler_rtti_exceptions=no
10711   ac_outfile=conftest.$ac_objext
10712   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10713   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10714   # Insert the option either (1) after the last *FLAGS variable, or
10715   # (2) before a word containing "conftest.", or (3) at the end.
10716   # Note that $ac_compile itself does not contain backslashes and begins
10717   # with a dollar sign (not a hyphen), so the echo should work correctly.
10718   # The option is referenced via a variable to avoid confusing sed.
10719   lt_compile=`echo "$ac_compile" | $SED \
10720   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10721   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10722   -e 's:$: $lt_compiler_flag:'`
10723   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10724   (eval "$lt_compile" 2>conftest.err)
10725   ac_status=$?
10726   cat conftest.err >&5
10727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728   if (exit $ac_status) && test -s "$ac_outfile"; then
10729     # The compiler can only warn and ignore the option if not recognized
10730     # So say no if there are warnings other than the usual output.
10731     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10732     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10733     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10734       lt_cv_prog_compiler_rtti_exceptions=yes
10735     fi
10736   fi
10737   $RM conftest*
10738
10739fi
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10741$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10742
10743if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10744    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10745else
10746    :
10747fi
10748
10749fi
10750
10751
10752
10753
10754
10755
10756  lt_prog_compiler_wl=
10757lt_prog_compiler_pic=
10758lt_prog_compiler_static=
10759
10760
10761  if test yes = "$GCC"; then
10762    lt_prog_compiler_wl='-Wl,'
10763    lt_prog_compiler_static='-static'
10764
10765    case $host_os in
10766      aix*)
10767      # All AIX code is PIC.
10768      if test ia64 = "$host_cpu"; then
10769	# AIX 5 now supports IA64 processor
10770	lt_prog_compiler_static='-Bstatic'
10771      fi
10772      lt_prog_compiler_pic='-fPIC'
10773      ;;
10774
10775    amigaos*)
10776      case $host_cpu in
10777      powerpc)
10778            # see comment about AmigaOS4 .so support
10779            lt_prog_compiler_pic='-fPIC'
10780        ;;
10781      m68k)
10782            # FIXME: we need at least 68020 code to build shared libraries, but
10783            # adding the '-m68020' flag to GCC prevents building anything better,
10784            # like '-m68040'.
10785            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10786        ;;
10787      esac
10788      ;;
10789
10790    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10791      # PIC is the default for these OSes.
10792      ;;
10793
10794    mingw* | cygwin* | pw32* | os2* | cegcc*)
10795      # This hack is so that the source file can tell whether it is being
10796      # built for inclusion in a dll (and should export symbols for example).
10797      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10798      # (--disable-auto-import) libraries
10799      lt_prog_compiler_pic='-DDLL_EXPORT'
10800      case $host_os in
10801      os2*)
10802	lt_prog_compiler_static='$wl-static'
10803	;;
10804      esac
10805      ;;
10806
10807    darwin* | rhapsody*)
10808      # PIC is the default on this platform
10809      # Common symbols not allowed in MH_DYLIB files
10810      lt_prog_compiler_pic='-fno-common'
10811      ;;
10812
10813    haiku*)
10814      # PIC is the default for Haiku.
10815      # The "-static" flag exists, but is broken.
10816      lt_prog_compiler_static=
10817      ;;
10818
10819    hpux*)
10820      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10821      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10822      # sets the default TLS model and affects inlining.
10823      case $host_cpu in
10824      hppa*64*)
10825	# +Z the default
10826	;;
10827      *)
10828	lt_prog_compiler_pic='-fPIC'
10829	;;
10830      esac
10831      ;;
10832
10833    interix[3-9]*)
10834      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10835      # Instead, we relocate shared libraries at runtime.
10836      ;;
10837
10838    msdosdjgpp*)
10839      # Just because we use GCC doesn't mean we suddenly get shared libraries
10840      # on systems that don't support them.
10841      lt_prog_compiler_can_build_shared=no
10842      enable_shared=no
10843      ;;
10844
10845    *nto* | *qnx*)
10846      # QNX uses GNU C++, but need to define -shared option too, otherwise
10847      # it will coredump.
10848      lt_prog_compiler_pic='-fPIC -shared'
10849      ;;
10850
10851    sysv4*MP*)
10852      if test -d /usr/nec; then
10853	lt_prog_compiler_pic=-Kconform_pic
10854      fi
10855      ;;
10856
10857    *)
10858      lt_prog_compiler_pic='-fPIC'
10859      ;;
10860    esac
10861
10862    case $cc_basename in
10863    nvcc*) # Cuda Compiler Driver 2.2
10864      lt_prog_compiler_wl='-Xlinker '
10865      if test -n "$lt_prog_compiler_pic"; then
10866        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10867      fi
10868      ;;
10869    esac
10870  else
10871    # PORTME Check for flag to pass linker flags through the system compiler.
10872    case $host_os in
10873    aix*)
10874      lt_prog_compiler_wl='-Wl,'
10875      if test ia64 = "$host_cpu"; then
10876	# AIX 5 now supports IA64 processor
10877	lt_prog_compiler_static='-Bstatic'
10878      else
10879	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10880      fi
10881      ;;
10882
10883    darwin* | rhapsody*)
10884      # PIC is the default on this platform
10885      # Common symbols not allowed in MH_DYLIB files
10886      lt_prog_compiler_pic='-fno-common'
10887      case $cc_basename in
10888      nagfor*)
10889        # NAG Fortran compiler
10890        lt_prog_compiler_wl='-Wl,-Wl,,'
10891        lt_prog_compiler_pic='-PIC'
10892        lt_prog_compiler_static='-Bstatic'
10893        ;;
10894      esac
10895      ;;
10896
10897    mingw* | cygwin* | pw32* | os2* | cegcc*)
10898      # This hack is so that the source file can tell whether it is being
10899      # built for inclusion in a dll (and should export symbols for example).
10900      lt_prog_compiler_pic='-DDLL_EXPORT'
10901      case $host_os in
10902      os2*)
10903	lt_prog_compiler_static='$wl-static'
10904	;;
10905      esac
10906      ;;
10907
10908    hpux9* | hpux10* | hpux11*)
10909      lt_prog_compiler_wl='-Wl,'
10910      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10911      # not for PA HP-UX.
10912      case $host_cpu in
10913      hppa*64*|ia64*)
10914	# +Z the default
10915	;;
10916      *)
10917	lt_prog_compiler_pic='+Z'
10918	;;
10919      esac
10920      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10921      lt_prog_compiler_static='$wl-a ${wl}archive'
10922      ;;
10923
10924    irix5* | irix6* | nonstopux*)
10925      lt_prog_compiler_wl='-Wl,'
10926      # PIC (with -KPIC) is the default.
10927      lt_prog_compiler_static='-non_shared'
10928      ;;
10929
10930    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10931      case $cc_basename in
10932      # old Intel for x86_64, which still supported -KPIC.
10933      ecc*)
10934	lt_prog_compiler_wl='-Wl,'
10935	lt_prog_compiler_pic='-KPIC'
10936	lt_prog_compiler_static='-static'
10937        ;;
10938      # icc used to be incompatible with GCC.
10939      # ICC 10 doesn't accept -KPIC any more.
10940      icc* | ifort*)
10941	lt_prog_compiler_wl='-Wl,'
10942	lt_prog_compiler_pic='-fPIC'
10943	lt_prog_compiler_static='-static'
10944        ;;
10945      # Lahey Fortran 8.1.
10946      lf95*)
10947	lt_prog_compiler_wl='-Wl,'
10948	lt_prog_compiler_pic='--shared'
10949	lt_prog_compiler_static='--static'
10950	;;
10951      nagfor*)
10952	# NAG Fortran compiler
10953	lt_prog_compiler_wl='-Wl,-Wl,,'
10954	lt_prog_compiler_pic='-PIC'
10955	lt_prog_compiler_static='-Bstatic'
10956	;;
10957      tcc*)
10958	# Fabrice Bellard et al's Tiny C Compiler
10959	lt_prog_compiler_wl='-Wl,'
10960	lt_prog_compiler_pic='-fPIC'
10961	lt_prog_compiler_static='-static'
10962	;;
10963      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10964        # Portland Group compilers (*not* the Pentium gcc compiler,
10965	# which looks to be a dead project)
10966	lt_prog_compiler_wl='-Wl,'
10967	lt_prog_compiler_pic='-fpic'
10968	lt_prog_compiler_static='-Bstatic'
10969        ;;
10970      ccc*)
10971        lt_prog_compiler_wl='-Wl,'
10972        # All Alpha code is PIC.
10973        lt_prog_compiler_static='-non_shared'
10974        ;;
10975      xl* | bgxl* | bgf* | mpixl*)
10976	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10977	lt_prog_compiler_wl='-Wl,'
10978	lt_prog_compiler_pic='-qpic'
10979	lt_prog_compiler_static='-qstaticlink'
10980	;;
10981      *)
10982	case `$CC -V 2>&1 | sed 5q` in
10983	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10984	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
10985	  lt_prog_compiler_pic='-KPIC'
10986	  lt_prog_compiler_static='-Bstatic'
10987	  lt_prog_compiler_wl=''
10988	  ;;
10989	*Sun\ F* | *Sun*Fortran*)
10990	  lt_prog_compiler_pic='-KPIC'
10991	  lt_prog_compiler_static='-Bstatic'
10992	  lt_prog_compiler_wl='-Qoption ld '
10993	  ;;
10994	*Sun\ C*)
10995	  # Sun C 5.9
10996	  lt_prog_compiler_pic='-KPIC'
10997	  lt_prog_compiler_static='-Bstatic'
10998	  lt_prog_compiler_wl='-Wl,'
10999	  ;;
11000        *Intel*\ [CF]*Compiler*)
11001	  lt_prog_compiler_wl='-Wl,'
11002	  lt_prog_compiler_pic='-fPIC'
11003	  lt_prog_compiler_static='-static'
11004	  ;;
11005	*Portland\ Group*)
11006	  lt_prog_compiler_wl='-Wl,'
11007	  lt_prog_compiler_pic='-fpic'
11008	  lt_prog_compiler_static='-Bstatic'
11009	  ;;
11010	esac
11011	;;
11012      esac
11013      ;;
11014
11015    newsos6)
11016      lt_prog_compiler_pic='-KPIC'
11017      lt_prog_compiler_static='-Bstatic'
11018      ;;
11019
11020    *nto* | *qnx*)
11021      # QNX uses GNU C++, but need to define -shared option too, otherwise
11022      # it will coredump.
11023      lt_prog_compiler_pic='-fPIC -shared'
11024      ;;
11025
11026    osf3* | osf4* | osf5*)
11027      lt_prog_compiler_wl='-Wl,'
11028      # All OSF/1 code is PIC.
11029      lt_prog_compiler_static='-non_shared'
11030      ;;
11031
11032    rdos*)
11033      lt_prog_compiler_static='-non_shared'
11034      ;;
11035
11036    solaris*)
11037      lt_prog_compiler_pic='-KPIC'
11038      lt_prog_compiler_static='-Bstatic'
11039      case $cc_basename in
11040      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11041	lt_prog_compiler_wl='-Qoption ld ';;
11042      *)
11043	lt_prog_compiler_wl='-Wl,';;
11044      esac
11045      ;;
11046
11047    sunos4*)
11048      lt_prog_compiler_wl='-Qoption ld '
11049      lt_prog_compiler_pic='-PIC'
11050      lt_prog_compiler_static='-Bstatic'
11051      ;;
11052
11053    sysv4 | sysv4.2uw2* | sysv4.3*)
11054      lt_prog_compiler_wl='-Wl,'
11055      lt_prog_compiler_pic='-KPIC'
11056      lt_prog_compiler_static='-Bstatic'
11057      ;;
11058
11059    sysv4*MP*)
11060      if test -d /usr/nec; then
11061	lt_prog_compiler_pic='-Kconform_pic'
11062	lt_prog_compiler_static='-Bstatic'
11063      fi
11064      ;;
11065
11066    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11067      lt_prog_compiler_wl='-Wl,'
11068      lt_prog_compiler_pic='-KPIC'
11069      lt_prog_compiler_static='-Bstatic'
11070      ;;
11071
11072    unicos*)
11073      lt_prog_compiler_wl='-Wl,'
11074      lt_prog_compiler_can_build_shared=no
11075      ;;
11076
11077    uts4*)
11078      lt_prog_compiler_pic='-pic'
11079      lt_prog_compiler_static='-Bstatic'
11080      ;;
11081
11082    *)
11083      lt_prog_compiler_can_build_shared=no
11084      ;;
11085    esac
11086  fi
11087
11088case $host_os in
11089  # For platforms that do not support PIC, -DPIC is meaningless:
11090  *djgpp*)
11091    lt_prog_compiler_pic=
11092    ;;
11093  *)
11094    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11095    ;;
11096esac
11097
11098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11099$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11100if ${lt_cv_prog_compiler_pic+:} false; then :
11101  $as_echo_n "(cached) " >&6
11102else
11103  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11104fi
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11106$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11107lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11108
11109#
11110# Check to make sure the PIC flag actually works.
11111#
11112if test -n "$lt_prog_compiler_pic"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11114$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11115if ${lt_cv_prog_compiler_pic_works+:} false; then :
11116  $as_echo_n "(cached) " >&6
11117else
11118  lt_cv_prog_compiler_pic_works=no
11119   ac_outfile=conftest.$ac_objext
11120   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11121   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11122   # Insert the option either (1) after the last *FLAGS variable, or
11123   # (2) before a word containing "conftest.", or (3) at the end.
11124   # Note that $ac_compile itself does not contain backslashes and begins
11125   # with a dollar sign (not a hyphen), so the echo should work correctly.
11126   # The option is referenced via a variable to avoid confusing sed.
11127   lt_compile=`echo "$ac_compile" | $SED \
11128   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11129   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11130   -e 's:$: $lt_compiler_flag:'`
11131   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11132   (eval "$lt_compile" 2>conftest.err)
11133   ac_status=$?
11134   cat conftest.err >&5
11135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136   if (exit $ac_status) && test -s "$ac_outfile"; then
11137     # The compiler can only warn and ignore the option if not recognized
11138     # So say no if there are warnings other than the usual output.
11139     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11140     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11141     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11142       lt_cv_prog_compiler_pic_works=yes
11143     fi
11144   fi
11145   $RM conftest*
11146
11147fi
11148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11149$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11150
11151if test yes = "$lt_cv_prog_compiler_pic_works"; then
11152    case $lt_prog_compiler_pic in
11153     "" | " "*) ;;
11154     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11155     esac
11156else
11157    lt_prog_compiler_pic=
11158     lt_prog_compiler_can_build_shared=no
11159fi
11160
11161fi
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173#
11174# Check to make sure the static flag actually works.
11175#
11176wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11178$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11179if ${lt_cv_prog_compiler_static_works+:} false; then :
11180  $as_echo_n "(cached) " >&6
11181else
11182  lt_cv_prog_compiler_static_works=no
11183   save_LDFLAGS=$LDFLAGS
11184   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11185   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11186   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11187     # The linker can only warn and ignore the option if not recognized
11188     # So say no if there are warnings
11189     if test -s conftest.err; then
11190       # Append any errors to the config.log.
11191       cat conftest.err 1>&5
11192       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11193       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11194       if diff conftest.exp conftest.er2 >/dev/null; then
11195         lt_cv_prog_compiler_static_works=yes
11196       fi
11197     else
11198       lt_cv_prog_compiler_static_works=yes
11199     fi
11200   fi
11201   $RM -r conftest*
11202   LDFLAGS=$save_LDFLAGS
11203
11204fi
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11206$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11207
11208if test yes = "$lt_cv_prog_compiler_static_works"; then
11209    :
11210else
11211    lt_prog_compiler_static=
11212fi
11213
11214
11215
11216
11217
11218
11219
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11221$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11222if ${lt_cv_prog_compiler_c_o+:} false; then :
11223  $as_echo_n "(cached) " >&6
11224else
11225  lt_cv_prog_compiler_c_o=no
11226   $RM -r conftest 2>/dev/null
11227   mkdir conftest
11228   cd conftest
11229   mkdir out
11230   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11231
11232   lt_compiler_flag="-o out/conftest2.$ac_objext"
11233   # Insert the option either (1) after the last *FLAGS variable, or
11234   # (2) before a word containing "conftest.", or (3) at the end.
11235   # Note that $ac_compile itself does not contain backslashes and begins
11236   # with a dollar sign (not a hyphen), so the echo should work correctly.
11237   lt_compile=`echo "$ac_compile" | $SED \
11238   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11239   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11240   -e 's:$: $lt_compiler_flag:'`
11241   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11242   (eval "$lt_compile" 2>out/conftest.err)
11243   ac_status=$?
11244   cat out/conftest.err >&5
11245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11247   then
11248     # The compiler can only warn and ignore the option if not recognized
11249     # So say no if there are warnings
11250     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11251     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11252     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11253       lt_cv_prog_compiler_c_o=yes
11254     fi
11255   fi
11256   chmod u+w . 2>&5
11257   $RM conftest*
11258   # SGI C++ compiler will create directory out/ii_files/ for
11259   # template instantiation
11260   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11261   $RM out/* && rmdir out
11262   cd ..
11263   $RM -r conftest
11264   $RM conftest*
11265
11266fi
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11268$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11269
11270
11271
11272
11273
11274
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11276$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11277if ${lt_cv_prog_compiler_c_o+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  lt_cv_prog_compiler_c_o=no
11281   $RM -r conftest 2>/dev/null
11282   mkdir conftest
11283   cd conftest
11284   mkdir out
11285   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11286
11287   lt_compiler_flag="-o out/conftest2.$ac_objext"
11288   # Insert the option either (1) after the last *FLAGS variable, or
11289   # (2) before a word containing "conftest.", or (3) at the end.
11290   # Note that $ac_compile itself does not contain backslashes and begins
11291   # with a dollar sign (not a hyphen), so the echo should work correctly.
11292   lt_compile=`echo "$ac_compile" | $SED \
11293   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11294   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11295   -e 's:$: $lt_compiler_flag:'`
11296   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11297   (eval "$lt_compile" 2>out/conftest.err)
11298   ac_status=$?
11299   cat out/conftest.err >&5
11300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11301   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11302   then
11303     # The compiler can only warn and ignore the option if not recognized
11304     # So say no if there are warnings
11305     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11306     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11307     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11308       lt_cv_prog_compiler_c_o=yes
11309     fi
11310   fi
11311   chmod u+w . 2>&5
11312   $RM conftest*
11313   # SGI C++ compiler will create directory out/ii_files/ for
11314   # template instantiation
11315   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11316   $RM out/* && rmdir out
11317   cd ..
11318   $RM -r conftest
11319   $RM conftest*
11320
11321fi
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11323$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11324
11325
11326
11327
11328hard_links=nottested
11329if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11330  # do not overwrite the value of need_locks provided by the user
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11332$as_echo_n "checking if we can lock with hard links... " >&6; }
11333  hard_links=yes
11334  $RM conftest*
11335  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11336  touch conftest.a
11337  ln conftest.a conftest.b 2>&5 || hard_links=no
11338  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11340$as_echo "$hard_links" >&6; }
11341  if test no = "$hard_links"; then
11342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11343$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11344    need_locks=warn
11345  fi
11346else
11347  need_locks=no
11348fi
11349
11350
11351
11352
11353
11354
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11356$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11357
11358  runpath_var=
11359  allow_undefined_flag=
11360  always_export_symbols=no
11361  archive_cmds=
11362  archive_expsym_cmds=
11363  compiler_needs_object=no
11364  enable_shared_with_static_runtimes=no
11365  export_dynamic_flag_spec=
11366  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11367  hardcode_automatic=no
11368  hardcode_direct=no
11369  hardcode_direct_absolute=no
11370  hardcode_libdir_flag_spec=
11371  hardcode_libdir_separator=
11372  hardcode_minus_L=no
11373  hardcode_shlibpath_var=unsupported
11374  inherit_rpath=no
11375  link_all_deplibs=unknown
11376  module_cmds=
11377  module_expsym_cmds=
11378  old_archive_from_new_cmds=
11379  old_archive_from_expsyms_cmds=
11380  thread_safe_flag_spec=
11381  whole_archive_flag_spec=
11382  # include_expsyms should be a list of space-separated symbols to be *always*
11383  # included in the symbol list
11384  include_expsyms=
11385  # exclude_expsyms can be an extended regexp of symbols to exclude
11386  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11387  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11388  # as well as any symbol that contains 'd'.
11389  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11390  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11391  # platforms (ab)use it in PIC code, but their linkers get confused if
11392  # the symbol is explicitly referenced.  Since portable code cannot
11393  # rely on this symbol name, it's probably fine to never include it in
11394  # preloaded symbol tables.
11395  # Exclude shared library initialization/finalization symbols.
11396  extract_expsyms_cmds=
11397
11398  case $host_os in
11399  cygwin* | mingw* | pw32* | cegcc*)
11400    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11401    # When not using gcc, we currently assume that we are using
11402    # Microsoft Visual C++.
11403    if test yes != "$GCC"; then
11404      with_gnu_ld=no
11405    fi
11406    ;;
11407  interix*)
11408    # we just hope/assume this is gcc and not c89 (= MSVC++)
11409    with_gnu_ld=yes
11410    ;;
11411  openbsd* | bitrig*)
11412    with_gnu_ld=no
11413    ;;
11414  esac
11415
11416  ld_shlibs=yes
11417
11418  # On some targets, GNU ld is compatible enough with the native linker
11419  # that we're better off using the native interface for both.
11420  lt_use_gnu_ld_interface=no
11421  if test yes = "$with_gnu_ld"; then
11422    case $host_os in
11423      aix*)
11424	# The AIX port of GNU ld has always aspired to compatibility
11425	# with the native linker.  However, as the warning in the GNU ld
11426	# block says, versions before 2.19.5* couldn't really create working
11427	# shared libraries, regardless of the interface used.
11428	case `$LD -v 2>&1` in
11429	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11430	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11431	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11432	  *)
11433	    lt_use_gnu_ld_interface=yes
11434	    ;;
11435	esac
11436	;;
11437      *)
11438	lt_use_gnu_ld_interface=yes
11439	;;
11440    esac
11441  fi
11442
11443  if test yes = "$lt_use_gnu_ld_interface"; then
11444    # If archive_cmds runs LD, not CC, wlarc should be empty
11445    wlarc='$wl'
11446
11447    # Set some defaults for GNU ld with shared library support. These
11448    # are reset later if shared libraries are not supported. Putting them
11449    # here allows them to be overridden if necessary.
11450    runpath_var=LD_RUN_PATH
11451    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11452    export_dynamic_flag_spec='$wl--export-dynamic'
11453    # ancient GNU ld didn't support --whole-archive et. al.
11454    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11455      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11456    else
11457      whole_archive_flag_spec=
11458    fi
11459    supports_anon_versioning=no
11460    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11461      *GNU\ gold*) supports_anon_versioning=yes ;;
11462      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11463      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11464      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11465      *\ 2.11.*) ;; # other 2.11 versions
11466      *) supports_anon_versioning=yes ;;
11467    esac
11468
11469    # See if GNU ld supports shared libraries.
11470    case $host_os in
11471    aix[3-9]*)
11472      # On AIX/PPC, the GNU linker is very broken
11473      if test ia64 != "$host_cpu"; then
11474	ld_shlibs=no
11475	cat <<_LT_EOF 1>&2
11476
11477*** Warning: the GNU linker, at least up to release 2.19, is reported
11478*** to be unable to reliably create shared libraries on AIX.
11479*** Therefore, libtool is disabling shared libraries support.  If you
11480*** really care for shared libraries, you may want to install binutils
11481*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11482*** You will then need to restart the configuration process.
11483
11484_LT_EOF
11485      fi
11486      ;;
11487
11488    amigaos*)
11489      case $host_cpu in
11490      powerpc)
11491            # see comment about AmigaOS4 .so support
11492            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11493            archive_expsym_cmds=''
11494        ;;
11495      m68k)
11496            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)'
11497            hardcode_libdir_flag_spec='-L$libdir'
11498            hardcode_minus_L=yes
11499        ;;
11500      esac
11501      ;;
11502
11503    beos*)
11504      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11505	allow_undefined_flag=unsupported
11506	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11507	# support --undefined.  This deserves some investigation.  FIXME
11508	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11509      else
11510	ld_shlibs=no
11511      fi
11512      ;;
11513
11514    cygwin* | mingw* | pw32* | cegcc*)
11515      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11516      # as there is no search path for DLLs.
11517      hardcode_libdir_flag_spec='-L$libdir'
11518      export_dynamic_flag_spec='$wl--export-all-symbols'
11519      allow_undefined_flag=unsupported
11520      always_export_symbols=no
11521      enable_shared_with_static_runtimes=yes
11522      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'
11523      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11524
11525      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11526        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11527	# If the export-symbols file already is a .def file, use it as
11528	# is; otherwise, prepend EXPORTS...
11529	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11530          cp $export_symbols $output_objdir/$soname.def;
11531        else
11532          echo EXPORTS > $output_objdir/$soname.def;
11533          cat $export_symbols >> $output_objdir/$soname.def;
11534        fi~
11535        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11536      else
11537	ld_shlibs=no
11538      fi
11539      ;;
11540
11541    haiku*)
11542      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11543      link_all_deplibs=yes
11544      ;;
11545
11546    os2*)
11547      hardcode_libdir_flag_spec='-L$libdir'
11548      hardcode_minus_L=yes
11549      allow_undefined_flag=unsupported
11550      shrext_cmds=.dll
11551      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11552	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11553	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11554	$ECHO EXPORTS >> $output_objdir/$libname.def~
11555	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11556	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11557	emximp -o $lib $output_objdir/$libname.def'
11558      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11559	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11560	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11561	$ECHO EXPORTS >> $output_objdir/$libname.def~
11562	prefix_cmds="$SED"~
11563	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11564	  prefix_cmds="$prefix_cmds -e 1d";
11565	fi~
11566	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11567	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11568	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11569	emximp -o $lib $output_objdir/$libname.def'
11570      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11571      enable_shared_with_static_runtimes=yes
11572      ;;
11573
11574    interix[3-9]*)
11575      hardcode_direct=no
11576      hardcode_shlibpath_var=no
11577      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11578      export_dynamic_flag_spec='$wl-E'
11579      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11580      # Instead, shared libraries are loaded at an image base (0x10000000 by
11581      # default) and relocated if they conflict, which is a slow very memory
11582      # consuming and fragmenting process.  To avoid this, we pick a random,
11583      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11584      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11585      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11586      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'
11587      ;;
11588
11589    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11590      tmp_diet=no
11591      if test linux-dietlibc = "$host_os"; then
11592	case $cc_basename in
11593	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11594	esac
11595      fi
11596      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11597	 && test no = "$tmp_diet"
11598      then
11599	tmp_addflag=' $pic_flag'
11600	tmp_sharedflag='-shared'
11601	case $cc_basename,$host_cpu in
11602        pgcc*)				# Portland Group C compiler
11603	  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'
11604	  tmp_addflag=' $pic_flag'
11605	  ;;
11606	pgf77* | pgf90* | pgf95* | pgfortran*)
11607					# Portland Group f77 and f90 compilers
11608	  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'
11609	  tmp_addflag=' $pic_flag -Mnomain' ;;
11610	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11611	  tmp_addflag=' -i_dynamic' ;;
11612	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11613	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11614	ifc* | ifort*)			# Intel Fortran compiler
11615	  tmp_addflag=' -nofor_main' ;;
11616	lf95*)				# Lahey Fortran 8.1
11617	  whole_archive_flag_spec=
11618	  tmp_sharedflag='--shared' ;;
11619        nagfor*)                        # NAGFOR 5.3
11620          tmp_sharedflag='-Wl,-shared' ;;
11621	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11622	  tmp_sharedflag='-qmkshrobj'
11623	  tmp_addflag= ;;
11624	nvcc*)	# Cuda Compiler Driver 2.2
11625	  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'
11626	  compiler_needs_object=yes
11627	  ;;
11628	esac
11629	case `$CC -V 2>&1 | sed 5q` in
11630	*Sun\ C*)			# Sun C 5.9
11631	  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'
11632	  compiler_needs_object=yes
11633	  tmp_sharedflag='-G' ;;
11634	*Sun\ F*)			# Sun Fortran 8.3
11635	  tmp_sharedflag='-G' ;;
11636	esac
11637	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11638
11639        if test yes = "$supports_anon_versioning"; then
11640          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11641            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11642            echo "local: *; };" >> $output_objdir/$libname.ver~
11643            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11644        fi
11645
11646	case $cc_basename in
11647	tcc*)
11648	  export_dynamic_flag_spec='-rdynamic'
11649	  ;;
11650	xlf* | bgf* | bgxlf* | mpixlf*)
11651	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11652	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11653	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11654	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11655	  if test yes = "$supports_anon_versioning"; then
11656	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11657              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11658              echo "local: *; };" >> $output_objdir/$libname.ver~
11659              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11660	  fi
11661	  ;;
11662	esac
11663      else
11664        ld_shlibs=no
11665      fi
11666      ;;
11667
11668    netbsd*)
11669      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11670	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11671	wlarc=
11672      else
11673	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11674	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11675      fi
11676      ;;
11677
11678    solaris*)
11679      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11680	ld_shlibs=no
11681	cat <<_LT_EOF 1>&2
11682
11683*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11684*** create shared libraries on Solaris systems.  Therefore, libtool
11685*** is disabling shared libraries support.  We urge you to upgrade GNU
11686*** binutils to release 2.9.1 or newer.  Another option is to modify
11687*** your PATH or compiler configuration so that the native linker is
11688*** used, and then restart.
11689
11690_LT_EOF
11691      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11692	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11693	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11694      else
11695	ld_shlibs=no
11696      fi
11697      ;;
11698
11699    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11700      case `$LD -v 2>&1` in
11701        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11702	ld_shlibs=no
11703	cat <<_LT_EOF 1>&2
11704
11705*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11706*** reliably create shared libraries on SCO systems.  Therefore, libtool
11707*** is disabling shared libraries support.  We urge you to upgrade GNU
11708*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11709*** your PATH or compiler configuration so that the native linker is
11710*** used, and then restart.
11711
11712_LT_EOF
11713	;;
11714	*)
11715	  # For security reasons, it is highly recommended that you always
11716	  # use absolute paths for naming shared libraries, and exclude the
11717	  # DT_RUNPATH tag from executables and libraries.  But doing so
11718	  # requires that you compile everything twice, which is a pain.
11719	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11720	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11721	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11722	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11723	  else
11724	    ld_shlibs=no
11725	  fi
11726	;;
11727      esac
11728      ;;
11729
11730    sunos4*)
11731      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11732      wlarc=
11733      hardcode_direct=yes
11734      hardcode_shlibpath_var=no
11735      ;;
11736
11737    *)
11738      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11739	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11740	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11741      else
11742	ld_shlibs=no
11743      fi
11744      ;;
11745    esac
11746
11747    if test no = "$ld_shlibs"; then
11748      runpath_var=
11749      hardcode_libdir_flag_spec=
11750      export_dynamic_flag_spec=
11751      whole_archive_flag_spec=
11752    fi
11753  else
11754    # PORTME fill in a description of your system's linker (not GNU ld)
11755    case $host_os in
11756    aix3*)
11757      allow_undefined_flag=unsupported
11758      always_export_symbols=yes
11759      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'
11760      # Note: this linker hardcodes the directories in LIBPATH if there
11761      # are no directories specified by -L.
11762      hardcode_minus_L=yes
11763      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11764	# Neither direct hardcoding nor static linking is supported with a
11765	# broken collect2.
11766	hardcode_direct=unsupported
11767      fi
11768      ;;
11769
11770    aix[4-9]*)
11771      if test ia64 = "$host_cpu"; then
11772	# On IA64, the linker does run time linking by default, so we don't
11773	# have to do anything special.
11774	aix_use_runtimelinking=no
11775	exp_sym_flag='-Bexport'
11776	no_entry_flag=
11777      else
11778	# If we're using GNU nm, then we don't want the "-C" option.
11779	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
11780	# Without the "-l" option, or with the "-B" option, AIX nm treats
11781	# weak defined symbols like other global defined symbols, whereas
11782	# GNU nm marks them as "W".
11783	# While the 'weak' keyword is ignored in the Export File, we need
11784	# it in the Import File for the 'aix-soname' feature, so we have
11785	# to replace the "-B" option with "-P" for AIX nm.
11786	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11787	  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'
11788	else
11789	  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'
11790	fi
11791	aix_use_runtimelinking=no
11792
11793	# Test if we are trying to use run time linking or normal
11794	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11795	# have runtime linking enabled, and use it for executables.
11796	# For shared libraries, we enable/disable runtime linking
11797	# depending on the kind of the shared library created -
11798	# when "with_aix_soname,aix_use_runtimelinking" is:
11799	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11800	# "aix,yes"  lib.so          shared, rtl:yes, for executables
11801	#            lib.a           static archive
11802	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
11803	#            lib.a(lib.so.V) shared, rtl:no,  for executables
11804	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11805	#            lib.a(lib.so.V) shared, rtl:no
11806	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11807	#            lib.a           static archive
11808	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11809	  for ld_flag in $LDFLAGS; do
11810	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11811	    aix_use_runtimelinking=yes
11812	    break
11813	  fi
11814	  done
11815	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11816	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
11817	    # so we don't have lib.a shared libs to link our executables.
11818	    # We have to force runtime linking in this case.
11819	    aix_use_runtimelinking=yes
11820	    LDFLAGS="$LDFLAGS -Wl,-brtl"
11821	  fi
11822	  ;;
11823	esac
11824
11825	exp_sym_flag='-bexport'
11826	no_entry_flag='-bnoentry'
11827      fi
11828
11829      # When large executables or shared objects are built, AIX ld can
11830      # have problems creating the table of contents.  If linking a library
11831      # or program results in "error TOC overflow" add -mminimal-toc to
11832      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11833      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11834
11835      archive_cmds=''
11836      hardcode_direct=yes
11837      hardcode_direct_absolute=yes
11838      hardcode_libdir_separator=':'
11839      link_all_deplibs=yes
11840      file_list_spec='$wl-f,'
11841      case $with_aix_soname,$aix_use_runtimelinking in
11842      aix,*) ;; # traditional, no import file
11843      svr4,* | *,yes) # use import file
11844	# The Import File defines what to hardcode.
11845	hardcode_direct=no
11846	hardcode_direct_absolute=no
11847	;;
11848      esac
11849
11850      if test yes = "$GCC"; then
11851	case $host_os in aix4.[012]|aix4.[012].*)
11852	# We only want to do this on AIX 4.2 and lower, the check
11853	# below for broken collect2 doesn't work under 4.3+
11854	  collect2name=`$CC -print-prog-name=collect2`
11855	  if test -f "$collect2name" &&
11856	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11857	  then
11858	  # We have reworked collect2
11859	  :
11860	  else
11861	  # We have old collect2
11862	  hardcode_direct=unsupported
11863	  # It fails to find uninstalled libraries when the uninstalled
11864	  # path is not listed in the libpath.  Setting hardcode_minus_L
11865	  # to unsupported forces relinking
11866	  hardcode_minus_L=yes
11867	  hardcode_libdir_flag_spec='-L$libdir'
11868	  hardcode_libdir_separator=
11869	  fi
11870	  ;;
11871	esac
11872	shared_flag='-shared'
11873	if test yes = "$aix_use_runtimelinking"; then
11874	  shared_flag="$shared_flag "'$wl-G'
11875	fi
11876	# Need to ensure runtime linking is disabled for the traditional
11877	# shared library, or the linker may eventually find shared libraries
11878	# /with/ Import File - we do not want to mix them.
11879	shared_flag_aix='-shared'
11880	shared_flag_svr4='-shared $wl-G'
11881      else
11882	# not using gcc
11883	if test ia64 = "$host_cpu"; then
11884	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11885	# chokes on -Wl,-G. The following line is correct:
11886	  shared_flag='-G'
11887	else
11888	  if test yes = "$aix_use_runtimelinking"; then
11889	    shared_flag='$wl-G'
11890	  else
11891	    shared_flag='$wl-bM:SRE'
11892	  fi
11893	  shared_flag_aix='$wl-bM:SRE'
11894	  shared_flag_svr4='$wl-G'
11895	fi
11896      fi
11897
11898      export_dynamic_flag_spec='$wl-bexpall'
11899      # It seems that -bexpall does not export symbols beginning with
11900      # underscore (_), so it is better to generate a list of symbols to export.
11901      always_export_symbols=yes
11902      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11903	# Warning - without using the other runtime loading flags (-brtl),
11904	# -berok will link without error, but may produce a broken library.
11905	allow_undefined_flag='-berok'
11906        # Determine the default libpath from the value encoded in an
11907        # empty executable.
11908        if test set = "${lt_cv_aix_libpath+set}"; then
11909  aix_libpath=$lt_cv_aix_libpath
11910else
11911  if ${lt_cv_aix_libpath_+:} false; then :
11912  $as_echo_n "(cached) " >&6
11913else
11914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11915/* end confdefs.h.  */
11916
11917int
11918main ()
11919{
11920
11921  ;
11922  return 0;
11923}
11924_ACEOF
11925if ac_fn_c_try_link "$LINENO"; then :
11926
11927  lt_aix_libpath_sed='
11928      /Import File Strings/,/^$/ {
11929	  /^0/ {
11930	      s/^0  *\([^ ]*\) *$/\1/
11931	      p
11932	  }
11933      }'
11934  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11935  # Check for a 64-bit object if we didn't find anything.
11936  if test -z "$lt_cv_aix_libpath_"; then
11937    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11938  fi
11939fi
11940rm -f core conftest.err conftest.$ac_objext \
11941    conftest$ac_exeext conftest.$ac_ext
11942  if test -z "$lt_cv_aix_libpath_"; then
11943    lt_cv_aix_libpath_=/usr/lib:/lib
11944  fi
11945
11946fi
11947
11948  aix_libpath=$lt_cv_aix_libpath_
11949fi
11950
11951        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11952        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
11953      else
11954	if test ia64 = "$host_cpu"; then
11955	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11956	  allow_undefined_flag="-z nodefs"
11957	  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"
11958	else
11959	 # Determine the default libpath from the value encoded in an
11960	 # empty executable.
11961	 if test set = "${lt_cv_aix_libpath+set}"; then
11962  aix_libpath=$lt_cv_aix_libpath
11963else
11964  if ${lt_cv_aix_libpath_+:} false; then :
11965  $as_echo_n "(cached) " >&6
11966else
11967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11968/* end confdefs.h.  */
11969
11970int
11971main ()
11972{
11973
11974  ;
11975  return 0;
11976}
11977_ACEOF
11978if ac_fn_c_try_link "$LINENO"; then :
11979
11980  lt_aix_libpath_sed='
11981      /Import File Strings/,/^$/ {
11982	  /^0/ {
11983	      s/^0  *\([^ ]*\) *$/\1/
11984	      p
11985	  }
11986      }'
11987  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11988  # Check for a 64-bit object if we didn't find anything.
11989  if test -z "$lt_cv_aix_libpath_"; then
11990    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11991  fi
11992fi
11993rm -f core conftest.err conftest.$ac_objext \
11994    conftest$ac_exeext conftest.$ac_ext
11995  if test -z "$lt_cv_aix_libpath_"; then
11996    lt_cv_aix_libpath_=/usr/lib:/lib
11997  fi
11998
11999fi
12000
12001  aix_libpath=$lt_cv_aix_libpath_
12002fi
12003
12004	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12005	  # Warning - without using the other run time loading flags,
12006	  # -berok will link without error, but may produce a broken library.
12007	  no_undefined_flag=' $wl-bernotok'
12008	  allow_undefined_flag=' $wl-berok'
12009	  if test yes = "$with_gnu_ld"; then
12010	    # We only use this code for GNU lds that support --whole-archive.
12011	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12012	  else
12013	    # Exported symbols can be pulled into shared objects from archives
12014	    whole_archive_flag_spec='$convenience'
12015	  fi
12016	  archive_cmds_need_lc=yes
12017	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12018	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12019	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12020	  if test svr4 != "$with_aix_soname"; then
12021	    # This is similar to how AIX traditionally builds its shared libraries.
12022	    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'
12023	  fi
12024	  if test aix != "$with_aix_soname"; then
12025	    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'
12026	  else
12027	    # used by -dlpreopen to get the symbols
12028	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12029	  fi
12030	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12031	fi
12032      fi
12033      ;;
12034
12035    amigaos*)
12036      case $host_cpu in
12037      powerpc)
12038            # see comment about AmigaOS4 .so support
12039            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12040            archive_expsym_cmds=''
12041        ;;
12042      m68k)
12043            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)'
12044            hardcode_libdir_flag_spec='-L$libdir'
12045            hardcode_minus_L=yes
12046        ;;
12047      esac
12048      ;;
12049
12050    bsdi[45]*)
12051      export_dynamic_flag_spec=-rdynamic
12052      ;;
12053
12054    cygwin* | mingw* | pw32* | cegcc*)
12055      # When not using gcc, we currently assume that we are using
12056      # Microsoft Visual C++.
12057      # hardcode_libdir_flag_spec is actually meaningless, as there is
12058      # no search path for DLLs.
12059      case $cc_basename in
12060      cl*)
12061	# Native MSVC
12062	hardcode_libdir_flag_spec=' '
12063	allow_undefined_flag=unsupported
12064	always_export_symbols=yes
12065	file_list_spec='@'
12066	# Tell ltmain to make .lib files, not .a files.
12067	libext=lib
12068	# Tell ltmain to make .dll files, not .so files.
12069	shrext_cmds=.dll
12070	# FIXME: Setting linknames here is a bad hack.
12071	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12072	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12073            cp "$export_symbols" "$output_objdir/$soname.def";
12074            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12075          else
12076            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12077          fi~
12078          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12079          linknames='
12080	# The linker will not automatically build a static lib if we build a DLL.
12081	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12082	enable_shared_with_static_runtimes=yes
12083	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12084	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12085	# Don't use ranlib
12086	old_postinstall_cmds='chmod 644 $oldlib'
12087	postlink_cmds='lt_outputfile="@OUTPUT@"~
12088          lt_tool_outputfile="@TOOL_OUTPUT@"~
12089          case $lt_outputfile in
12090            *.exe|*.EXE) ;;
12091            *)
12092              lt_outputfile=$lt_outputfile.exe
12093              lt_tool_outputfile=$lt_tool_outputfile.exe
12094              ;;
12095          esac~
12096          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12097            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12098            $RM "$lt_outputfile.manifest";
12099          fi'
12100	;;
12101      *)
12102	# Assume MSVC wrapper
12103	hardcode_libdir_flag_spec=' '
12104	allow_undefined_flag=unsupported
12105	# Tell ltmain to make .lib files, not .a files.
12106	libext=lib
12107	# Tell ltmain to make .dll files, not .so files.
12108	shrext_cmds=.dll
12109	# FIXME: Setting linknames here is a bad hack.
12110	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12111	# The linker will automatically build a .lib file if we build a DLL.
12112	old_archive_from_new_cmds='true'
12113	# FIXME: Should let the user specify the lib program.
12114	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12115	enable_shared_with_static_runtimes=yes
12116	;;
12117      esac
12118      ;;
12119
12120    darwin* | rhapsody*)
12121
12122
12123  archive_cmds_need_lc=no
12124  hardcode_direct=no
12125  hardcode_automatic=yes
12126  hardcode_shlibpath_var=unsupported
12127  if test yes = "$lt_cv_ld_force_load"; then
12128    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\"`'
12129
12130  else
12131    whole_archive_flag_spec=''
12132  fi
12133  link_all_deplibs=yes
12134  allow_undefined_flag=$_lt_dar_allow_undefined
12135  case $cc_basename in
12136     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12137     *) _lt_dar_can_shared=$GCC ;;
12138  esac
12139  if test yes = "$_lt_dar_can_shared"; then
12140    output_verbose_link_cmd=func_echo_all
12141    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12142    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12143    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"
12144    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"
12145
12146  else
12147  ld_shlibs=no
12148  fi
12149
12150      ;;
12151
12152    dgux*)
12153      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12154      hardcode_libdir_flag_spec='-L$libdir'
12155      hardcode_shlibpath_var=no
12156      ;;
12157
12158    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12159    # support.  Future versions do this automatically, but an explicit c++rt0.o
12160    # does not break anything, and helps significantly (at the cost of a little
12161    # extra space).
12162    freebsd2.2*)
12163      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12164      hardcode_libdir_flag_spec='-R$libdir'
12165      hardcode_direct=yes
12166      hardcode_shlibpath_var=no
12167      ;;
12168
12169    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12170    freebsd2.*)
12171      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12172      hardcode_direct=yes
12173      hardcode_minus_L=yes
12174      hardcode_shlibpath_var=no
12175      ;;
12176
12177    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12178    freebsd* | dragonfly*)
12179      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12180      hardcode_libdir_flag_spec='-R$libdir'
12181      hardcode_direct=yes
12182      hardcode_shlibpath_var=no
12183      ;;
12184
12185    hpux9*)
12186      if test yes = "$GCC"; then
12187	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'
12188      else
12189	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'
12190      fi
12191      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12192      hardcode_libdir_separator=:
12193      hardcode_direct=yes
12194
12195      # hardcode_minus_L: Not really in the search PATH,
12196      # but as the default location of the library.
12197      hardcode_minus_L=yes
12198      export_dynamic_flag_spec='$wl-E'
12199      ;;
12200
12201    hpux10*)
12202      if test yes,no = "$GCC,$with_gnu_ld"; then
12203	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12204      else
12205	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12206      fi
12207      if test no = "$with_gnu_ld"; then
12208	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12209	hardcode_libdir_separator=:
12210	hardcode_direct=yes
12211	hardcode_direct_absolute=yes
12212	export_dynamic_flag_spec='$wl-E'
12213	# hardcode_minus_L: Not really in the search PATH,
12214	# but as the default location of the library.
12215	hardcode_minus_L=yes
12216      fi
12217      ;;
12218
12219    hpux11*)
12220      if test yes,no = "$GCC,$with_gnu_ld"; then
12221	case $host_cpu in
12222	hppa*64*)
12223	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12224	  ;;
12225	ia64*)
12226	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12227	  ;;
12228	*)
12229	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12230	  ;;
12231	esac
12232      else
12233	case $host_cpu in
12234	hppa*64*)
12235	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12236	  ;;
12237	ia64*)
12238	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12239	  ;;
12240	*)
12241
12242	  # Older versions of the 11.00 compiler do not understand -b yet
12243	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12244	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12245$as_echo_n "checking if $CC understands -b... " >&6; }
12246if ${lt_cv_prog_compiler__b+:} false; then :
12247  $as_echo_n "(cached) " >&6
12248else
12249  lt_cv_prog_compiler__b=no
12250   save_LDFLAGS=$LDFLAGS
12251   LDFLAGS="$LDFLAGS -b"
12252   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12253   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12254     # The linker can only warn and ignore the option if not recognized
12255     # So say no if there are warnings
12256     if test -s conftest.err; then
12257       # Append any errors to the config.log.
12258       cat conftest.err 1>&5
12259       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12260       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12261       if diff conftest.exp conftest.er2 >/dev/null; then
12262         lt_cv_prog_compiler__b=yes
12263       fi
12264     else
12265       lt_cv_prog_compiler__b=yes
12266     fi
12267   fi
12268   $RM -r conftest*
12269   LDFLAGS=$save_LDFLAGS
12270
12271fi
12272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12273$as_echo "$lt_cv_prog_compiler__b" >&6; }
12274
12275if test yes = "$lt_cv_prog_compiler__b"; then
12276    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12277else
12278    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12279fi
12280
12281	  ;;
12282	esac
12283      fi
12284      if test no = "$with_gnu_ld"; then
12285	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12286	hardcode_libdir_separator=:
12287
12288	case $host_cpu in
12289	hppa*64*|ia64*)
12290	  hardcode_direct=no
12291	  hardcode_shlibpath_var=no
12292	  ;;
12293	*)
12294	  hardcode_direct=yes
12295	  hardcode_direct_absolute=yes
12296	  export_dynamic_flag_spec='$wl-E'
12297
12298	  # hardcode_minus_L: Not really in the search PATH,
12299	  # but as the default location of the library.
12300	  hardcode_minus_L=yes
12301	  ;;
12302	esac
12303      fi
12304      ;;
12305
12306    irix5* | irix6* | nonstopux*)
12307      if test yes = "$GCC"; then
12308	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'
12309	# Try to use the -exported_symbol ld option, if it does not
12310	# work, assume that -exports_file does not work either and
12311	# implicitly export all symbols.
12312	# This should be the same for all languages, so no per-tag cache variable.
12313	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12314$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12315if ${lt_cv_irix_exported_symbol+:} false; then :
12316  $as_echo_n "(cached) " >&6
12317else
12318  save_LDFLAGS=$LDFLAGS
12319	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12320	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321/* end confdefs.h.  */
12322int foo (void) { return 0; }
12323_ACEOF
12324if ac_fn_c_try_link "$LINENO"; then :
12325  lt_cv_irix_exported_symbol=yes
12326else
12327  lt_cv_irix_exported_symbol=no
12328fi
12329rm -f core conftest.err conftest.$ac_objext \
12330    conftest$ac_exeext conftest.$ac_ext
12331           LDFLAGS=$save_LDFLAGS
12332fi
12333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12334$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12335	if test yes = "$lt_cv_irix_exported_symbol"; then
12336          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'
12337	fi
12338      else
12339	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'
12340	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'
12341      fi
12342      archive_cmds_need_lc='no'
12343      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12344      hardcode_libdir_separator=:
12345      inherit_rpath=yes
12346      link_all_deplibs=yes
12347      ;;
12348
12349    linux*)
12350      case $cc_basename in
12351      tcc*)
12352	# Fabrice Bellard et al's Tiny C Compiler
12353	ld_shlibs=yes
12354	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12355	;;
12356      esac
12357      ;;
12358
12359    netbsd*)
12360      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12361	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12362      else
12363	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12364      fi
12365      hardcode_libdir_flag_spec='-R$libdir'
12366      hardcode_direct=yes
12367      hardcode_shlibpath_var=no
12368      ;;
12369
12370    newsos6)
12371      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12372      hardcode_direct=yes
12373      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12374      hardcode_libdir_separator=:
12375      hardcode_shlibpath_var=no
12376      ;;
12377
12378    *nto* | *qnx*)
12379      ;;
12380
12381    openbsd* | bitrig*)
12382      if test -f /usr/libexec/ld.so; then
12383	hardcode_direct=yes
12384	hardcode_shlibpath_var=no
12385	hardcode_direct_absolute=yes
12386	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12387	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12388	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12389	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12390	  export_dynamic_flag_spec='$wl-E'
12391	else
12392	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12393	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12394	fi
12395      else
12396	ld_shlibs=no
12397      fi
12398      ;;
12399
12400    os2*)
12401      hardcode_libdir_flag_spec='-L$libdir'
12402      hardcode_minus_L=yes
12403      allow_undefined_flag=unsupported
12404      shrext_cmds=.dll
12405      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12406	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12407	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12408	$ECHO EXPORTS >> $output_objdir/$libname.def~
12409	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12410	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12411	emximp -o $lib $output_objdir/$libname.def'
12412      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12413	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12414	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12415	$ECHO EXPORTS >> $output_objdir/$libname.def~
12416	prefix_cmds="$SED"~
12417	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12418	  prefix_cmds="$prefix_cmds -e 1d";
12419	fi~
12420	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12421	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12422	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12423	emximp -o $lib $output_objdir/$libname.def'
12424      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12425      enable_shared_with_static_runtimes=yes
12426      ;;
12427
12428    osf3*)
12429      if test yes = "$GCC"; then
12430	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12431	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'
12432      else
12433	allow_undefined_flag=' -expect_unresolved \*'
12434	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'
12435      fi
12436      archive_cmds_need_lc='no'
12437      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12438      hardcode_libdir_separator=:
12439      ;;
12440
12441    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12442      if test yes = "$GCC"; then
12443	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12444	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'
12445	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12446      else
12447	allow_undefined_flag=' -expect_unresolved \*'
12448	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'
12449	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~
12450          $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'
12451
12452	# Both c and cxx compiler support -rpath directly
12453	hardcode_libdir_flag_spec='-rpath $libdir'
12454      fi
12455      archive_cmds_need_lc='no'
12456      hardcode_libdir_separator=:
12457      ;;
12458
12459    solaris*)
12460      no_undefined_flag=' -z defs'
12461      if test yes = "$GCC"; then
12462	wlarc='$wl'
12463	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12464	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12465          $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'
12466      else
12467	case `$CC -V 2>&1` in
12468	*"Compilers 5.0"*)
12469	  wlarc=''
12470	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12471	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12472            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12473	  ;;
12474	*)
12475	  wlarc='$wl'
12476	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12477	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12478            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12479	  ;;
12480	esac
12481      fi
12482      hardcode_libdir_flag_spec='-R$libdir'
12483      hardcode_shlibpath_var=no
12484      case $host_os in
12485      solaris2.[0-5] | solaris2.[0-5].*) ;;
12486      *)
12487	# The compiler driver will combine and reorder linker options,
12488	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12489	# but is careful enough not to reorder.
12490	# Supported since Solaris 2.6 (maybe 2.5.1?)
12491	if test yes = "$GCC"; then
12492	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12493	else
12494	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12495	fi
12496	;;
12497      esac
12498      link_all_deplibs=yes
12499      ;;
12500
12501    sunos4*)
12502      if test sequent = "$host_vendor"; then
12503	# Use $CC to link under sequent, because it throws in some extra .o
12504	# files that make .init and .fini sections work.
12505	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12506      else
12507	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12508      fi
12509      hardcode_libdir_flag_spec='-L$libdir'
12510      hardcode_direct=yes
12511      hardcode_minus_L=yes
12512      hardcode_shlibpath_var=no
12513      ;;
12514
12515    sysv4)
12516      case $host_vendor in
12517	sni)
12518	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12519	  hardcode_direct=yes # is this really true???
12520	;;
12521	siemens)
12522	  ## LD is ld it makes a PLAMLIB
12523	  ## CC just makes a GrossModule.
12524	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12525	  reload_cmds='$CC -r -o $output$reload_objs'
12526	  hardcode_direct=no
12527        ;;
12528	motorola)
12529	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12530	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12531	;;
12532      esac
12533      runpath_var='LD_RUN_PATH'
12534      hardcode_shlibpath_var=no
12535      ;;
12536
12537    sysv4.3*)
12538      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12539      hardcode_shlibpath_var=no
12540      export_dynamic_flag_spec='-Bexport'
12541      ;;
12542
12543    sysv4*MP*)
12544      if test -d /usr/nec; then
12545	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12546	hardcode_shlibpath_var=no
12547	runpath_var=LD_RUN_PATH
12548	hardcode_runpath_var=yes
12549	ld_shlibs=yes
12550      fi
12551      ;;
12552
12553    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12554      no_undefined_flag='$wl-z,text'
12555      archive_cmds_need_lc=no
12556      hardcode_shlibpath_var=no
12557      runpath_var='LD_RUN_PATH'
12558
12559      if test yes = "$GCC"; then
12560	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12561	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12562      else
12563	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12564	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12565      fi
12566      ;;
12567
12568    sysv5* | sco3.2v5* | sco5v6*)
12569      # Note: We CANNOT use -z defs as we might desire, because we do not
12570      # link with -lc, and that would cause any symbols used from libc to
12571      # always be unresolved, which means just about no library would
12572      # ever link correctly.  If we're not using GNU ld we use -z text
12573      # though, which does catch some bad symbols but isn't as heavy-handed
12574      # as -z defs.
12575      no_undefined_flag='$wl-z,text'
12576      allow_undefined_flag='$wl-z,nodefs'
12577      archive_cmds_need_lc=no
12578      hardcode_shlibpath_var=no
12579      hardcode_libdir_flag_spec='$wl-R,$libdir'
12580      hardcode_libdir_separator=':'
12581      link_all_deplibs=yes
12582      export_dynamic_flag_spec='$wl-Bexport'
12583      runpath_var='LD_RUN_PATH'
12584
12585      if test yes = "$GCC"; then
12586	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12587	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12588      else
12589	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12590	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12591      fi
12592      ;;
12593
12594    uts4*)
12595      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12596      hardcode_libdir_flag_spec='-L$libdir'
12597      hardcode_shlibpath_var=no
12598      ;;
12599
12600    *)
12601      ld_shlibs=no
12602      ;;
12603    esac
12604
12605    if test sni = "$host_vendor"; then
12606      case $host in
12607      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12608	export_dynamic_flag_spec='$wl-Blargedynsym'
12609	;;
12610      esac
12611    fi
12612  fi
12613
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12615$as_echo "$ld_shlibs" >&6; }
12616test no = "$ld_shlibs" && can_build_shared=no
12617
12618with_gnu_ld=$with_gnu_ld
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634#
12635# Do we need to explicitly link libc?
12636#
12637case "x$archive_cmds_need_lc" in
12638x|xyes)
12639  # Assume -lc should be added
12640  archive_cmds_need_lc=yes
12641
12642  if test yes,yes = "$GCC,$enable_shared"; then
12643    case $archive_cmds in
12644    *'~'*)
12645      # FIXME: we may have to deal with multi-command sequences.
12646      ;;
12647    '$CC '*)
12648      # Test whether the compiler implicitly links with -lc since on some
12649      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12650      # to ld, don't add -lc before -lgcc.
12651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12652$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12653if ${lt_cv_archive_cmds_need_lc+:} false; then :
12654  $as_echo_n "(cached) " >&6
12655else
12656  $RM conftest*
12657	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12658
12659	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12660  (eval $ac_compile) 2>&5
12661  ac_status=$?
12662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12663  test $ac_status = 0; } 2>conftest.err; then
12664	  soname=conftest
12665	  lib=conftest
12666	  libobjs=conftest.$ac_objext
12667	  deplibs=
12668	  wl=$lt_prog_compiler_wl
12669	  pic_flag=$lt_prog_compiler_pic
12670	  compiler_flags=-v
12671	  linker_flags=-v
12672	  verstring=
12673	  output_objdir=.
12674	  libname=conftest
12675	  lt_save_allow_undefined_flag=$allow_undefined_flag
12676	  allow_undefined_flag=
12677	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12678  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12679  ac_status=$?
12680  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12681  test $ac_status = 0; }
12682	  then
12683	    lt_cv_archive_cmds_need_lc=no
12684	  else
12685	    lt_cv_archive_cmds_need_lc=yes
12686	  fi
12687	  allow_undefined_flag=$lt_save_allow_undefined_flag
12688	else
12689	  cat conftest.err 1>&5
12690	fi
12691	$RM conftest*
12692
12693fi
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12695$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12696      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12697      ;;
12698    esac
12699  fi
12700  ;;
12701esac
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
12853
12854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12855$as_echo_n "checking dynamic linker characteristics... " >&6; }
12856
12857if test yes = "$GCC"; then
12858  case $host_os in
12859    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12860    *) lt_awk_arg='/^libraries:/' ;;
12861  esac
12862  case $host_os in
12863    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12864    *) lt_sed_strip_eq='s|=/|/|g' ;;
12865  esac
12866  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12867  case $lt_search_path_spec in
12868  *\;*)
12869    # if the path contains ";" then we assume it to be the separator
12870    # otherwise default to the standard path separator (i.e. ":") - it is
12871    # assumed that no part of a normal pathname contains ";" but that should
12872    # okay in the real world where ";" in dirpaths is itself problematic.
12873    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12874    ;;
12875  *)
12876    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12877    ;;
12878  esac
12879  # Ok, now we have the path, separated by spaces, we can step through it
12880  # and add multilib dir if necessary...
12881  lt_tmp_lt_search_path_spec=
12882  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12883  # ...but if some path component already ends with the multilib dir we assume
12884  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12885  case "$lt_multi_os_dir; $lt_search_path_spec " in
12886  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12887    lt_multi_os_dir=
12888    ;;
12889  esac
12890  for lt_sys_path in $lt_search_path_spec; do
12891    if test -d "$lt_sys_path$lt_multi_os_dir"; then
12892      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12893    elif test -n "$lt_multi_os_dir"; then
12894      test -d "$lt_sys_path" && \
12895	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12896    fi
12897  done
12898  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12899BEGIN {RS = " "; FS = "/|\n";} {
12900  lt_foo = "";
12901  lt_count = 0;
12902  for (lt_i = NF; lt_i > 0; lt_i--) {
12903    if ($lt_i != "" && $lt_i != ".") {
12904      if ($lt_i == "..") {
12905        lt_count++;
12906      } else {
12907        if (lt_count == 0) {
12908          lt_foo = "/" $lt_i lt_foo;
12909        } else {
12910          lt_count--;
12911        }
12912      }
12913    }
12914  }
12915  if (lt_foo != "") { lt_freq[lt_foo]++; }
12916  if (lt_freq[lt_foo] == 1) { print lt_foo; }
12917}'`
12918  # AWK program above erroneously prepends '/' to C:/dos/paths
12919  # for these hosts.
12920  case $host_os in
12921    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12922      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12923  esac
12924  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12925else
12926  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12927fi
12928library_names_spec=
12929libname_spec='lib$name'
12930soname_spec=
12931shrext_cmds=.so
12932postinstall_cmds=
12933postuninstall_cmds=
12934finish_cmds=
12935finish_eval=
12936shlibpath_var=
12937shlibpath_overrides_runpath=unknown
12938version_type=none
12939dynamic_linker="$host_os ld.so"
12940sys_lib_dlsearch_path_spec="/lib /usr/lib"
12941need_lib_prefix=unknown
12942hardcode_into_libs=no
12943
12944# when you set need_version to no, make sure it does not cause -set_version
12945# flags to be left without arguments
12946need_version=unknown
12947
12948
12949
12950case $host_os in
12951aix3*)
12952  version_type=linux # correct to gnu/linux during the next big refactor
12953  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12954  shlibpath_var=LIBPATH
12955
12956  # AIX 3 has no versioning support, so we append a major version to the name.
12957  soname_spec='$libname$release$shared_ext$major'
12958  ;;
12959
12960aix[4-9]*)
12961  version_type=linux # correct to gnu/linux during the next big refactor
12962  need_lib_prefix=no
12963  need_version=no
12964  hardcode_into_libs=yes
12965  if test ia64 = "$host_cpu"; then
12966    # AIX 5 supports IA64
12967    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12968    shlibpath_var=LD_LIBRARY_PATH
12969  else
12970    # With GCC up to 2.95.x, collect2 would create an import file
12971    # for dependence libraries.  The import file would start with
12972    # the line '#! .'.  This would cause the generated library to
12973    # depend on '.', always an invalid library.  This was fixed in
12974    # development snapshots of GCC prior to 3.0.
12975    case $host_os in
12976      aix4 | aix4.[01] | aix4.[01].*)
12977      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12978	   echo ' yes '
12979	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12980	:
12981      else
12982	can_build_shared=no
12983      fi
12984      ;;
12985    esac
12986    # Using Import Files as archive members, it is possible to support
12987    # filename-based versioning of shared library archives on AIX. While
12988    # this would work for both with and without runtime linking, it will
12989    # prevent static linking of such archives. So we do filename-based
12990    # shared library versioning with .so extension only, which is used
12991    # when both runtime linking and shared linking is enabled.
12992    # Unfortunately, runtime linking may impact performance, so we do
12993    # not want this to be the default eventually. Also, we use the
12994    # versioned .so libs for executables only if there is the -brtl
12995    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12996    # To allow for filename-based versioning support, we need to create
12997    # libNAME.so.V as an archive file, containing:
12998    # *) an Import File, referring to the versioned filename of the
12999    #    archive as well as the shared archive member, telling the
13000    #    bitwidth (32 or 64) of that shared object, and providing the
13001    #    list of exported symbols of that shared object, eventually
13002    #    decorated with the 'weak' keyword
13003    # *) the shared object with the F_LOADONLY flag set, to really avoid
13004    #    it being seen by the linker.
13005    # At run time we better use the real file rather than another symlink,
13006    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13007
13008    case $with_aix_soname,$aix_use_runtimelinking in
13009    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13010    # soname into executable. Probably we can add versioning support to
13011    # collect2, so additional links can be useful in future.
13012    aix,yes) # traditional libtool
13013      dynamic_linker='AIX unversionable lib.so'
13014      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13015      # instead of lib<name>.a to let people know that these are not
13016      # typical AIX shared libraries.
13017      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13018      ;;
13019    aix,no) # traditional AIX only
13020      dynamic_linker='AIX lib.a(lib.so.V)'
13021      # We preserve .a as extension for shared libraries through AIX4.2
13022      # and later when we are not doing run time linking.
13023      library_names_spec='$libname$release.a $libname.a'
13024      soname_spec='$libname$release$shared_ext$major'
13025      ;;
13026    svr4,*) # full svr4 only
13027      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13028      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13029      # We do not specify a path in Import Files, so LIBPATH fires.
13030      shlibpath_overrides_runpath=yes
13031      ;;
13032    *,yes) # both, prefer svr4
13033      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13034      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13035      # unpreferred sharedlib libNAME.a needs extra handling
13036      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"'
13037      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"'
13038      # We do not specify a path in Import Files, so LIBPATH fires.
13039      shlibpath_overrides_runpath=yes
13040      ;;
13041    *,no) # both, prefer aix
13042      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13043      library_names_spec='$libname$release.a $libname.a'
13044      soname_spec='$libname$release$shared_ext$major'
13045      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13046      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)'
13047      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"'
13048      ;;
13049    esac
13050    shlibpath_var=LIBPATH
13051  fi
13052  ;;
13053
13054amigaos*)
13055  case $host_cpu in
13056  powerpc)
13057    # Since July 2007 AmigaOS4 officially supports .so libraries.
13058    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13059    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13060    ;;
13061  m68k)
13062    library_names_spec='$libname.ixlibrary $libname.a'
13063    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13064    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'
13065    ;;
13066  esac
13067  ;;
13068
13069beos*)
13070  library_names_spec='$libname$shared_ext'
13071  dynamic_linker="$host_os ld.so"
13072  shlibpath_var=LIBRARY_PATH
13073  ;;
13074
13075bsdi[45]*)
13076  version_type=linux # correct to gnu/linux during the next big refactor
13077  need_version=no
13078  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13079  soname_spec='$libname$release$shared_ext$major'
13080  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13081  shlibpath_var=LD_LIBRARY_PATH
13082  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13083  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13084  # the default ld.so.conf also contains /usr/contrib/lib and
13085  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13086  # libtool to hard-code these into programs
13087  ;;
13088
13089cygwin* | mingw* | pw32* | cegcc*)
13090  version_type=windows
13091  shrext_cmds=.dll
13092  need_version=no
13093  need_lib_prefix=no
13094
13095  case $GCC,$cc_basename in
13096  yes,*)
13097    # gcc
13098    library_names_spec='$libname.dll.a'
13099    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13100    postinstall_cmds='base_file=`basename \$file`~
13101      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13102      dldir=$destdir/`dirname \$dlpath`~
13103      test -d \$dldir || mkdir -p \$dldir~
13104      $install_prog $dir/$dlname \$dldir/$dlname~
13105      chmod a+x \$dldir/$dlname~
13106      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13107        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13108      fi'
13109    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13110      dlpath=$dir/\$dldll~
13111       $RM \$dlpath'
13112    shlibpath_overrides_runpath=yes
13113
13114    case $host_os in
13115    cygwin*)
13116      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13117      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13118
13119      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13120      ;;
13121    mingw* | cegcc*)
13122      # MinGW DLLs use traditional 'lib' prefix
13123      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13124      ;;
13125    pw32*)
13126      # pw32 DLLs use 'pw' prefix rather than 'lib'
13127      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13128      ;;
13129    esac
13130    dynamic_linker='Win32 ld.exe'
13131    ;;
13132
13133  *,cl*)
13134    # Native MSVC
13135    libname_spec='$name'
13136    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13137    library_names_spec='$libname.dll.lib'
13138
13139    case $build_os in
13140    mingw*)
13141      sys_lib_search_path_spec=
13142      lt_save_ifs=$IFS
13143      IFS=';'
13144      for lt_path in $LIB
13145      do
13146        IFS=$lt_save_ifs
13147        # Let DOS variable expansion print the short 8.3 style file name.
13148        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13149        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13150      done
13151      IFS=$lt_save_ifs
13152      # Convert to MSYS style.
13153      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13154      ;;
13155    cygwin*)
13156      # Convert to unix form, then to dos form, then back to unix form
13157      # but this time dos style (no spaces!) so that the unix form looks
13158      # like /cygdrive/c/PROGRA~1:/cygdr...
13159      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13160      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13161      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13162      ;;
13163    *)
13164      sys_lib_search_path_spec=$LIB
13165      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13166        # It is most probably a Windows format PATH.
13167        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13168      else
13169        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13170      fi
13171      # FIXME: find the short name or the path components, as spaces are
13172      # common. (e.g. "Program Files" -> "PROGRA~1")
13173      ;;
13174    esac
13175
13176    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13177    postinstall_cmds='base_file=`basename \$file`~
13178      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13179      dldir=$destdir/`dirname \$dlpath`~
13180      test -d \$dldir || mkdir -p \$dldir~
13181      $install_prog $dir/$dlname \$dldir/$dlname'
13182    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13183      dlpath=$dir/\$dldll~
13184       $RM \$dlpath'
13185    shlibpath_overrides_runpath=yes
13186    dynamic_linker='Win32 link.exe'
13187    ;;
13188
13189  *)
13190    # Assume MSVC wrapper
13191    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13192    dynamic_linker='Win32 ld.exe'
13193    ;;
13194  esac
13195  # FIXME: first we should search . and the directory the executable is in
13196  shlibpath_var=PATH
13197  ;;
13198
13199darwin* | rhapsody*)
13200  dynamic_linker="$host_os dyld"
13201  version_type=darwin
13202  need_lib_prefix=no
13203  need_version=no
13204  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13205  soname_spec='$libname$release$major$shared_ext'
13206  shlibpath_overrides_runpath=yes
13207  shlibpath_var=DYLD_LIBRARY_PATH
13208  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13209
13210  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13211  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13212  ;;
13213
13214dgux*)
13215  version_type=linux # correct to gnu/linux during the next big refactor
13216  need_lib_prefix=no
13217  need_version=no
13218  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13219  soname_spec='$libname$release$shared_ext$major'
13220  shlibpath_var=LD_LIBRARY_PATH
13221  ;;
13222
13223freebsd* | dragonfly*)
13224  # DragonFly does not have aout.  When/if they implement a new
13225  # versioning mechanism, adjust this.
13226  if test -x /usr/bin/objformat; then
13227    objformat=`/usr/bin/objformat`
13228  else
13229    case $host_os in
13230    freebsd[23].*) objformat=aout ;;
13231    *) objformat=elf ;;
13232    esac
13233  fi
13234  version_type=freebsd-$objformat
13235  case $version_type in
13236    freebsd-elf*)
13237      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13238      soname_spec='$libname$release$shared_ext$major'
13239      need_version=no
13240      need_lib_prefix=no
13241      ;;
13242    freebsd-*)
13243      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13244      need_version=yes
13245      ;;
13246  esac
13247  shlibpath_var=LD_LIBRARY_PATH
13248  case $host_os in
13249  freebsd2.*)
13250    shlibpath_overrides_runpath=yes
13251    ;;
13252  freebsd3.[01]* | freebsdelf3.[01]*)
13253    shlibpath_overrides_runpath=yes
13254    hardcode_into_libs=yes
13255    ;;
13256  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13257  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13258    shlibpath_overrides_runpath=no
13259    hardcode_into_libs=yes
13260    ;;
13261  *) # from 4.6 on, and DragonFly
13262    shlibpath_overrides_runpath=yes
13263    hardcode_into_libs=yes
13264    ;;
13265  esac
13266  ;;
13267
13268haiku*)
13269  version_type=linux # correct to gnu/linux during the next big refactor
13270  need_lib_prefix=no
13271  need_version=no
13272  dynamic_linker="$host_os runtime_loader"
13273  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13274  soname_spec='$libname$release$shared_ext$major'
13275  shlibpath_var=LIBRARY_PATH
13276  shlibpath_overrides_runpath=no
13277  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13278  hardcode_into_libs=yes
13279  ;;
13280
13281hpux9* | hpux10* | hpux11*)
13282  # Give a soname corresponding to the major version so that dld.sl refuses to
13283  # link against other versions.
13284  version_type=sunos
13285  need_lib_prefix=no
13286  need_version=no
13287  case $host_cpu in
13288  ia64*)
13289    shrext_cmds='.so'
13290    hardcode_into_libs=yes
13291    dynamic_linker="$host_os dld.so"
13292    shlibpath_var=LD_LIBRARY_PATH
13293    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13294    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13295    soname_spec='$libname$release$shared_ext$major'
13296    if test 32 = "$HPUX_IA64_MODE"; then
13297      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13298      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13299    else
13300      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13301      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13302    fi
13303    ;;
13304  hppa*64*)
13305    shrext_cmds='.sl'
13306    hardcode_into_libs=yes
13307    dynamic_linker="$host_os dld.sl"
13308    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13309    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13310    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13311    soname_spec='$libname$release$shared_ext$major'
13312    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13313    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13314    ;;
13315  *)
13316    shrext_cmds='.sl'
13317    dynamic_linker="$host_os dld.sl"
13318    shlibpath_var=SHLIB_PATH
13319    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13320    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13321    soname_spec='$libname$release$shared_ext$major'
13322    ;;
13323  esac
13324  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13325  postinstall_cmds='chmod 555 $lib'
13326  # or fails outright, so override atomically:
13327  install_override_mode=555
13328  ;;
13329
13330interix[3-9]*)
13331  version_type=linux # correct to gnu/linux during the next big refactor
13332  need_lib_prefix=no
13333  need_version=no
13334  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13335  soname_spec='$libname$release$shared_ext$major'
13336  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13337  shlibpath_var=LD_LIBRARY_PATH
13338  shlibpath_overrides_runpath=no
13339  hardcode_into_libs=yes
13340  ;;
13341
13342irix5* | irix6* | nonstopux*)
13343  case $host_os in
13344    nonstopux*) version_type=nonstopux ;;
13345    *)
13346	if test yes = "$lt_cv_prog_gnu_ld"; then
13347		version_type=linux # correct to gnu/linux during the next big refactor
13348	else
13349		version_type=irix
13350	fi ;;
13351  esac
13352  need_lib_prefix=no
13353  need_version=no
13354  soname_spec='$libname$release$shared_ext$major'
13355  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13356  case $host_os in
13357  irix5* | nonstopux*)
13358    libsuff= shlibsuff=
13359    ;;
13360  *)
13361    case $LD in # libtool.m4 will add one of these switches to LD
13362    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13363      libsuff= shlibsuff= libmagic=32-bit;;
13364    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13365      libsuff=32 shlibsuff=N32 libmagic=N32;;
13366    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13367      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13368    *) libsuff= shlibsuff= libmagic=never-match;;
13369    esac
13370    ;;
13371  esac
13372  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13373  shlibpath_overrides_runpath=no
13374  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13375  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13376  hardcode_into_libs=yes
13377  ;;
13378
13379# No shared lib support for Linux oldld, aout, or coff.
13380linux*oldld* | linux*aout* | linux*coff*)
13381  dynamic_linker=no
13382  ;;
13383
13384linux*android*)
13385  version_type=none # Android doesn't support versioned libraries.
13386  need_lib_prefix=no
13387  need_version=no
13388  library_names_spec='$libname$release$shared_ext'
13389  soname_spec='$libname$release$shared_ext'
13390  finish_cmds=
13391  shlibpath_var=LD_LIBRARY_PATH
13392  shlibpath_overrides_runpath=yes
13393
13394  # This implies no fast_install, which is unacceptable.
13395  # Some rework will be needed to allow for fast_install
13396  # before this can be enabled.
13397  hardcode_into_libs=yes
13398
13399  dynamic_linker='Android linker'
13400  # Don't embed -rpath directories since the linker doesn't support them.
13401  hardcode_libdir_flag_spec='-L$libdir'
13402  ;;
13403
13404# This must be glibc/ELF.
13405linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13406  version_type=linux # correct to gnu/linux during the next big refactor
13407  need_lib_prefix=no
13408  need_version=no
13409  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13410  soname_spec='$libname$release$shared_ext$major'
13411  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13412  shlibpath_var=LD_LIBRARY_PATH
13413  shlibpath_overrides_runpath=no
13414
13415  # Some binutils ld are patched to set DT_RUNPATH
13416  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13417  $as_echo_n "(cached) " >&6
13418else
13419  lt_cv_shlibpath_overrides_runpath=no
13420    save_LDFLAGS=$LDFLAGS
13421    save_libdir=$libdir
13422    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13423	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425/* end confdefs.h.  */
13426
13427int
13428main ()
13429{
13430
13431  ;
13432  return 0;
13433}
13434_ACEOF
13435if ac_fn_c_try_link "$LINENO"; then :
13436  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13437  lt_cv_shlibpath_overrides_runpath=yes
13438fi
13439fi
13440rm -f core conftest.err conftest.$ac_objext \
13441    conftest$ac_exeext conftest.$ac_ext
13442    LDFLAGS=$save_LDFLAGS
13443    libdir=$save_libdir
13444
13445fi
13446
13447  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13448
13449  # This implies no fast_install, which is unacceptable.
13450  # Some rework will be needed to allow for fast_install
13451  # before this can be enabled.
13452  hardcode_into_libs=yes
13453
13454  # Add ABI-specific directories to the system library path.
13455  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13456
13457  # Ideally, we could use ldconfig to report *all* directores which are
13458  # searched for libraries, however this is still not possible.  Aside from not
13459  # being certain /sbin/ldconfig is available, command
13460  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13461  # even though it is searched at run-time.  Try to do the best guess by
13462  # appending ld.so.conf contents (and includes) to the search path.
13463  if test -f /etc/ld.so.conf; then
13464    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' ' '`
13465    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13466  fi
13467
13468  # We used to test for /lib/ld.so.1 and disable shared libraries on
13469  # powerpc, because MkLinux only supported shared libraries with the
13470  # GNU dynamic linker.  Since this was broken with cross compilers,
13471  # most powerpc-linux boxes support dynamic linking these days and
13472  # people can always --disable-shared, the test was removed, and we
13473  # assume the GNU/Linux dynamic linker is in use.
13474  dynamic_linker='GNU/Linux ld.so'
13475  ;;
13476
13477netbsd*)
13478  version_type=sunos
13479  need_lib_prefix=no
13480  need_version=no
13481  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13482    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13483    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13484    dynamic_linker='NetBSD (a.out) ld.so'
13485  else
13486    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13487    soname_spec='$libname$release$shared_ext$major'
13488    dynamic_linker='NetBSD ld.elf_so'
13489  fi
13490  shlibpath_var=LD_LIBRARY_PATH
13491  shlibpath_overrides_runpath=yes
13492  hardcode_into_libs=yes
13493  ;;
13494
13495newsos6)
13496  version_type=linux # correct to gnu/linux during the next big refactor
13497  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13498  shlibpath_var=LD_LIBRARY_PATH
13499  shlibpath_overrides_runpath=yes
13500  ;;
13501
13502*nto* | *qnx*)
13503  version_type=qnx
13504  need_lib_prefix=no
13505  need_version=no
13506  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13507  soname_spec='$libname$release$shared_ext$major'
13508  shlibpath_var=LD_LIBRARY_PATH
13509  shlibpath_overrides_runpath=no
13510  hardcode_into_libs=yes
13511  dynamic_linker='ldqnx.so'
13512  ;;
13513
13514openbsd* | bitrig*)
13515  version_type=sunos
13516  sys_lib_dlsearch_path_spec=/usr/lib
13517  need_lib_prefix=no
13518  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13519    need_version=no
13520  else
13521    need_version=yes
13522  fi
13523  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13524  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13525  shlibpath_var=LD_LIBRARY_PATH
13526  shlibpath_overrides_runpath=yes
13527  ;;
13528
13529os2*)
13530  libname_spec='$name'
13531  version_type=windows
13532  shrext_cmds=.dll
13533  need_version=no
13534  need_lib_prefix=no
13535  # OS/2 can only load a DLL with a base name of 8 characters or less.
13536  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13537    v=$($ECHO $release$versuffix | tr -d .-);
13538    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13539    $ECHO $n$v`$shared_ext'
13540  library_names_spec='${libname}_dll.$libext'
13541  dynamic_linker='OS/2 ld.exe'
13542  shlibpath_var=BEGINLIBPATH
13543  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13544  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13545  postinstall_cmds='base_file=`basename \$file`~
13546    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13547    dldir=$destdir/`dirname \$dlpath`~
13548    test -d \$dldir || mkdir -p \$dldir~
13549    $install_prog $dir/$dlname \$dldir/$dlname~
13550    chmod a+x \$dldir/$dlname~
13551    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13552      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13553    fi'
13554  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13555    dlpath=$dir/\$dldll~
13556    $RM \$dlpath'
13557  ;;
13558
13559osf3* | osf4* | osf5*)
13560  version_type=osf
13561  need_lib_prefix=no
13562  need_version=no
13563  soname_spec='$libname$release$shared_ext$major'
13564  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13565  shlibpath_var=LD_LIBRARY_PATH
13566  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13567  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13568  ;;
13569
13570rdos*)
13571  dynamic_linker=no
13572  ;;
13573
13574solaris*)
13575  version_type=linux # correct to gnu/linux during the next big refactor
13576  need_lib_prefix=no
13577  need_version=no
13578  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13579  soname_spec='$libname$release$shared_ext$major'
13580  shlibpath_var=LD_LIBRARY_PATH
13581  shlibpath_overrides_runpath=yes
13582  hardcode_into_libs=yes
13583  # ldd complains unless libraries are executable
13584  postinstall_cmds='chmod +x $lib'
13585  ;;
13586
13587sunos4*)
13588  version_type=sunos
13589  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13590  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13591  shlibpath_var=LD_LIBRARY_PATH
13592  shlibpath_overrides_runpath=yes
13593  if test yes = "$with_gnu_ld"; then
13594    need_lib_prefix=no
13595  fi
13596  need_version=yes
13597  ;;
13598
13599sysv4 | sysv4.3*)
13600  version_type=linux # correct to gnu/linux during the next big refactor
13601  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13602  soname_spec='$libname$release$shared_ext$major'
13603  shlibpath_var=LD_LIBRARY_PATH
13604  case $host_vendor in
13605    sni)
13606      shlibpath_overrides_runpath=no
13607      need_lib_prefix=no
13608      runpath_var=LD_RUN_PATH
13609      ;;
13610    siemens)
13611      need_lib_prefix=no
13612      ;;
13613    motorola)
13614      need_lib_prefix=no
13615      need_version=no
13616      shlibpath_overrides_runpath=no
13617      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13618      ;;
13619  esac
13620  ;;
13621
13622sysv4*MP*)
13623  if test -d /usr/nec; then
13624    version_type=linux # correct to gnu/linux during the next big refactor
13625    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13626    soname_spec='$libname$shared_ext.$major'
13627    shlibpath_var=LD_LIBRARY_PATH
13628  fi
13629  ;;
13630
13631sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13632  version_type=sco
13633  need_lib_prefix=no
13634  need_version=no
13635  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13636  soname_spec='$libname$release$shared_ext$major'
13637  shlibpath_var=LD_LIBRARY_PATH
13638  shlibpath_overrides_runpath=yes
13639  hardcode_into_libs=yes
13640  if test yes = "$with_gnu_ld"; then
13641    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13642  else
13643    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13644    case $host_os in
13645      sco3.2v5*)
13646        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13647	;;
13648    esac
13649  fi
13650  sys_lib_dlsearch_path_spec='/usr/lib'
13651  ;;
13652
13653tpf*)
13654  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13655  version_type=linux # correct to gnu/linux during the next big refactor
13656  need_lib_prefix=no
13657  need_version=no
13658  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13659  shlibpath_var=LD_LIBRARY_PATH
13660  shlibpath_overrides_runpath=no
13661  hardcode_into_libs=yes
13662  ;;
13663
13664uts4*)
13665  version_type=linux # correct to gnu/linux during the next big refactor
13666  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13667  soname_spec='$libname$release$shared_ext$major'
13668  shlibpath_var=LD_LIBRARY_PATH
13669  ;;
13670
13671*)
13672  dynamic_linker=no
13673  ;;
13674esac
13675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13676$as_echo "$dynamic_linker" >&6; }
13677test no = "$dynamic_linker" && can_build_shared=no
13678
13679variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13680if test yes = "$GCC"; then
13681  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13682fi
13683
13684if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13685  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13686fi
13687
13688if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13689  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13690fi
13691
13692# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13693configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13694
13695# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13696func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13697
13698# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13699configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
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
13796
13797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13798$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13799hardcode_action=
13800if test -n "$hardcode_libdir_flag_spec" ||
13801   test -n "$runpath_var" ||
13802   test yes = "$hardcode_automatic"; then
13803
13804  # We can hardcode non-existent directories.
13805  if test no != "$hardcode_direct" &&
13806     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13807     # have to relink, otherwise we might link with an installed library
13808     # when we should be linking with a yet-to-be-installed one
13809     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13810     test no != "$hardcode_minus_L"; then
13811    # Linking always hardcodes the temporary library directory.
13812    hardcode_action=relink
13813  else
13814    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13815    hardcode_action=immediate
13816  fi
13817else
13818  # We cannot hardcode anything, or else we can only hardcode existing
13819  # directories.
13820  hardcode_action=unsupported
13821fi
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13823$as_echo "$hardcode_action" >&6; }
13824
13825if test relink = "$hardcode_action" ||
13826   test yes = "$inherit_rpath"; then
13827  # Fast installation is not supported
13828  enable_fast_install=no
13829elif test yes = "$shlibpath_overrides_runpath" ||
13830     test no = "$enable_shared"; then
13831  # Fast installation is not necessary
13832  enable_fast_install=needless
13833fi
13834
13835
13836
13837
13838
13839
13840  if test yes != "$enable_dlopen"; then
13841  enable_dlopen=unknown
13842  enable_dlopen_self=unknown
13843  enable_dlopen_self_static=unknown
13844else
13845  lt_cv_dlopen=no
13846  lt_cv_dlopen_libs=
13847
13848  case $host_os in
13849  beos*)
13850    lt_cv_dlopen=load_add_on
13851    lt_cv_dlopen_libs=
13852    lt_cv_dlopen_self=yes
13853    ;;
13854
13855  mingw* | pw32* | cegcc*)
13856    lt_cv_dlopen=LoadLibrary
13857    lt_cv_dlopen_libs=
13858    ;;
13859
13860  cygwin*)
13861    lt_cv_dlopen=dlopen
13862    lt_cv_dlopen_libs=
13863    ;;
13864
13865  darwin*)
13866    # if libdl is installed we need to link against it
13867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13868$as_echo_n "checking for dlopen in -ldl... " >&6; }
13869if ${ac_cv_lib_dl_dlopen+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  ac_check_lib_save_LIBS=$LIBS
13873LIBS="-ldl  $LIBS"
13874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h.  */
13876
13877/* Override any GCC internal prototype to avoid an error.
13878   Use char because int might match the return type of a GCC
13879   builtin and then its argument prototype would still apply.  */
13880#ifdef __cplusplus
13881extern "C"
13882#endif
13883char dlopen ();
13884int
13885main ()
13886{
13887return dlopen ();
13888  ;
13889  return 0;
13890}
13891_ACEOF
13892if ac_fn_c_try_link "$LINENO"; then :
13893  ac_cv_lib_dl_dlopen=yes
13894else
13895  ac_cv_lib_dl_dlopen=no
13896fi
13897rm -f core conftest.err conftest.$ac_objext \
13898    conftest$ac_exeext conftest.$ac_ext
13899LIBS=$ac_check_lib_save_LIBS
13900fi
13901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13902$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13903if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13904  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13905else
13906
13907    lt_cv_dlopen=dyld
13908    lt_cv_dlopen_libs=
13909    lt_cv_dlopen_self=yes
13910
13911fi
13912
13913    ;;
13914
13915  tpf*)
13916    # Don't try to run any link tests for TPF.  We know it's impossible
13917    # because TPF is a cross-compiler, and we know how we open DSOs.
13918    lt_cv_dlopen=dlopen
13919    lt_cv_dlopen_libs=
13920    lt_cv_dlopen_self=no
13921    ;;
13922
13923  *)
13924    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13925if test "x$ac_cv_func_shl_load" = xyes; then :
13926  lt_cv_dlopen=shl_load
13927else
13928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13929$as_echo_n "checking for shl_load in -ldld... " >&6; }
13930if ${ac_cv_lib_dld_shl_load+:} false; then :
13931  $as_echo_n "(cached) " >&6
13932else
13933  ac_check_lib_save_LIBS=$LIBS
13934LIBS="-ldld  $LIBS"
13935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936/* end confdefs.h.  */
13937
13938/* Override any GCC internal prototype to avoid an error.
13939   Use char because int might match the return type of a GCC
13940   builtin and then its argument prototype would still apply.  */
13941#ifdef __cplusplus
13942extern "C"
13943#endif
13944char shl_load ();
13945int
13946main ()
13947{
13948return shl_load ();
13949  ;
13950  return 0;
13951}
13952_ACEOF
13953if ac_fn_c_try_link "$LINENO"; then :
13954  ac_cv_lib_dld_shl_load=yes
13955else
13956  ac_cv_lib_dld_shl_load=no
13957fi
13958rm -f core conftest.err conftest.$ac_objext \
13959    conftest$ac_exeext conftest.$ac_ext
13960LIBS=$ac_check_lib_save_LIBS
13961fi
13962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13963$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13964if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13965  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13966else
13967  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13968if test "x$ac_cv_func_dlopen" = xyes; then :
13969  lt_cv_dlopen=dlopen
13970else
13971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13972$as_echo_n "checking for dlopen in -ldl... " >&6; }
13973if ${ac_cv_lib_dl_dlopen+:} false; then :
13974  $as_echo_n "(cached) " >&6
13975else
13976  ac_check_lib_save_LIBS=$LIBS
13977LIBS="-ldl  $LIBS"
13978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13979/* end confdefs.h.  */
13980
13981/* Override any GCC internal prototype to avoid an error.
13982   Use char because int might match the return type of a GCC
13983   builtin and then its argument prototype would still apply.  */
13984#ifdef __cplusplus
13985extern "C"
13986#endif
13987char dlopen ();
13988int
13989main ()
13990{
13991return dlopen ();
13992  ;
13993  return 0;
13994}
13995_ACEOF
13996if ac_fn_c_try_link "$LINENO"; then :
13997  ac_cv_lib_dl_dlopen=yes
13998else
13999  ac_cv_lib_dl_dlopen=no
14000fi
14001rm -f core conftest.err conftest.$ac_objext \
14002    conftest$ac_exeext conftest.$ac_ext
14003LIBS=$ac_check_lib_save_LIBS
14004fi
14005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14006$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14007if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14008  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14009else
14010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14011$as_echo_n "checking for dlopen in -lsvld... " >&6; }
14012if ${ac_cv_lib_svld_dlopen+:} false; then :
14013  $as_echo_n "(cached) " >&6
14014else
14015  ac_check_lib_save_LIBS=$LIBS
14016LIBS="-lsvld  $LIBS"
14017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14018/* end confdefs.h.  */
14019
14020/* Override any GCC internal prototype to avoid an error.
14021   Use char because int might match the return type of a GCC
14022   builtin and then its argument prototype would still apply.  */
14023#ifdef __cplusplus
14024extern "C"
14025#endif
14026char dlopen ();
14027int
14028main ()
14029{
14030return dlopen ();
14031  ;
14032  return 0;
14033}
14034_ACEOF
14035if ac_fn_c_try_link "$LINENO"; then :
14036  ac_cv_lib_svld_dlopen=yes
14037else
14038  ac_cv_lib_svld_dlopen=no
14039fi
14040rm -f core conftest.err conftest.$ac_objext \
14041    conftest$ac_exeext conftest.$ac_ext
14042LIBS=$ac_check_lib_save_LIBS
14043fi
14044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14045$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14046if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14047  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14048else
14049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14050$as_echo_n "checking for dld_link in -ldld... " >&6; }
14051if ${ac_cv_lib_dld_dld_link+:} false; then :
14052  $as_echo_n "(cached) " >&6
14053else
14054  ac_check_lib_save_LIBS=$LIBS
14055LIBS="-ldld  $LIBS"
14056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14057/* end confdefs.h.  */
14058
14059/* Override any GCC internal prototype to avoid an error.
14060   Use char because int might match the return type of a GCC
14061   builtin and then its argument prototype would still apply.  */
14062#ifdef __cplusplus
14063extern "C"
14064#endif
14065char dld_link ();
14066int
14067main ()
14068{
14069return dld_link ();
14070  ;
14071  return 0;
14072}
14073_ACEOF
14074if ac_fn_c_try_link "$LINENO"; then :
14075  ac_cv_lib_dld_dld_link=yes
14076else
14077  ac_cv_lib_dld_dld_link=no
14078fi
14079rm -f core conftest.err conftest.$ac_objext \
14080    conftest$ac_exeext conftest.$ac_ext
14081LIBS=$ac_check_lib_save_LIBS
14082fi
14083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14084$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14085if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14086  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14087fi
14088
14089
14090fi
14091
14092
14093fi
14094
14095
14096fi
14097
14098
14099fi
14100
14101
14102fi
14103
14104    ;;
14105  esac
14106
14107  if test no = "$lt_cv_dlopen"; then
14108    enable_dlopen=no
14109  else
14110    enable_dlopen=yes
14111  fi
14112
14113  case $lt_cv_dlopen in
14114  dlopen)
14115    save_CPPFLAGS=$CPPFLAGS
14116    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14117
14118    save_LDFLAGS=$LDFLAGS
14119    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14120
14121    save_LIBS=$LIBS
14122    LIBS="$lt_cv_dlopen_libs $LIBS"
14123
14124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14125$as_echo_n "checking whether a program can dlopen itself... " >&6; }
14126if ${lt_cv_dlopen_self+:} false; then :
14127  $as_echo_n "(cached) " >&6
14128else
14129  	  if test yes = "$cross_compiling"; then :
14130  lt_cv_dlopen_self=cross
14131else
14132  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14133  lt_status=$lt_dlunknown
14134  cat > conftest.$ac_ext <<_LT_EOF
14135#line $LINENO "configure"
14136#include "confdefs.h"
14137
14138#if HAVE_DLFCN_H
14139#include <dlfcn.h>
14140#endif
14141
14142#include <stdio.h>
14143
14144#ifdef RTLD_GLOBAL
14145#  define LT_DLGLOBAL		RTLD_GLOBAL
14146#else
14147#  ifdef DL_GLOBAL
14148#    define LT_DLGLOBAL		DL_GLOBAL
14149#  else
14150#    define LT_DLGLOBAL		0
14151#  endif
14152#endif
14153
14154/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14155   find out it does not work in some platform. */
14156#ifndef LT_DLLAZY_OR_NOW
14157#  ifdef RTLD_LAZY
14158#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14159#  else
14160#    ifdef DL_LAZY
14161#      define LT_DLLAZY_OR_NOW		DL_LAZY
14162#    else
14163#      ifdef RTLD_NOW
14164#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14165#      else
14166#        ifdef DL_NOW
14167#          define LT_DLLAZY_OR_NOW	DL_NOW
14168#        else
14169#          define LT_DLLAZY_OR_NOW	0
14170#        endif
14171#      endif
14172#    endif
14173#  endif
14174#endif
14175
14176/* When -fvisibility=hidden is used, assume the code has been annotated
14177   correspondingly for the symbols needed.  */
14178#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14179int fnord () __attribute__((visibility("default")));
14180#endif
14181
14182int fnord () { return 42; }
14183int main ()
14184{
14185  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14186  int status = $lt_dlunknown;
14187
14188  if (self)
14189    {
14190      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14191      else
14192        {
14193	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14194          else puts (dlerror ());
14195	}
14196      /* dlclose (self); */
14197    }
14198  else
14199    puts (dlerror ());
14200
14201  return status;
14202}
14203_LT_EOF
14204  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14205  (eval $ac_link) 2>&5
14206  ac_status=$?
14207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14208  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14209    (./conftest; exit; ) >&5 2>/dev/null
14210    lt_status=$?
14211    case x$lt_status in
14212      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14213      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14214      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14215    esac
14216  else :
14217    # compilation failed
14218    lt_cv_dlopen_self=no
14219  fi
14220fi
14221rm -fr conftest*
14222
14223
14224fi
14225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14226$as_echo "$lt_cv_dlopen_self" >&6; }
14227
14228    if test yes = "$lt_cv_dlopen_self"; then
14229      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14231$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14232if ${lt_cv_dlopen_self_static+:} false; then :
14233  $as_echo_n "(cached) " >&6
14234else
14235  	  if test yes = "$cross_compiling"; then :
14236  lt_cv_dlopen_self_static=cross
14237else
14238  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14239  lt_status=$lt_dlunknown
14240  cat > conftest.$ac_ext <<_LT_EOF
14241#line $LINENO "configure"
14242#include "confdefs.h"
14243
14244#if HAVE_DLFCN_H
14245#include <dlfcn.h>
14246#endif
14247
14248#include <stdio.h>
14249
14250#ifdef RTLD_GLOBAL
14251#  define LT_DLGLOBAL		RTLD_GLOBAL
14252#else
14253#  ifdef DL_GLOBAL
14254#    define LT_DLGLOBAL		DL_GLOBAL
14255#  else
14256#    define LT_DLGLOBAL		0
14257#  endif
14258#endif
14259
14260/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14261   find out it does not work in some platform. */
14262#ifndef LT_DLLAZY_OR_NOW
14263#  ifdef RTLD_LAZY
14264#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14265#  else
14266#    ifdef DL_LAZY
14267#      define LT_DLLAZY_OR_NOW		DL_LAZY
14268#    else
14269#      ifdef RTLD_NOW
14270#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14271#      else
14272#        ifdef DL_NOW
14273#          define LT_DLLAZY_OR_NOW	DL_NOW
14274#        else
14275#          define LT_DLLAZY_OR_NOW	0
14276#        endif
14277#      endif
14278#    endif
14279#  endif
14280#endif
14281
14282/* When -fvisibility=hidden is used, assume the code has been annotated
14283   correspondingly for the symbols needed.  */
14284#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14285int fnord () __attribute__((visibility("default")));
14286#endif
14287
14288int fnord () { return 42; }
14289int main ()
14290{
14291  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14292  int status = $lt_dlunknown;
14293
14294  if (self)
14295    {
14296      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14297      else
14298        {
14299	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14300          else puts (dlerror ());
14301	}
14302      /* dlclose (self); */
14303    }
14304  else
14305    puts (dlerror ());
14306
14307  return status;
14308}
14309_LT_EOF
14310  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14311  (eval $ac_link) 2>&5
14312  ac_status=$?
14313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14314  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14315    (./conftest; exit; ) >&5 2>/dev/null
14316    lt_status=$?
14317    case x$lt_status in
14318      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14319      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14320      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14321    esac
14322  else :
14323    # compilation failed
14324    lt_cv_dlopen_self_static=no
14325  fi
14326fi
14327rm -fr conftest*
14328
14329
14330fi
14331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14332$as_echo "$lt_cv_dlopen_self_static" >&6; }
14333    fi
14334
14335    CPPFLAGS=$save_CPPFLAGS
14336    LDFLAGS=$save_LDFLAGS
14337    LIBS=$save_LIBS
14338    ;;
14339  esac
14340
14341  case $lt_cv_dlopen_self in
14342  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14343  *) enable_dlopen_self=unknown ;;
14344  esac
14345
14346  case $lt_cv_dlopen_self_static in
14347  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14348  *) enable_dlopen_self_static=unknown ;;
14349  esac
14350fi
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368striplib=
14369old_striplib=
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14371$as_echo_n "checking whether stripping libraries is possible... " >&6; }
14372if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14373  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14374  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14376$as_echo "yes" >&6; }
14377else
14378# FIXME - insert some real tests, host_os isn't really good enough
14379  case $host_os in
14380  darwin*)
14381    if test -n "$STRIP"; then
14382      striplib="$STRIP -x"
14383      old_striplib="$STRIP -S"
14384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14385$as_echo "yes" >&6; }
14386    else
14387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14388$as_echo "no" >&6; }
14389    fi
14390    ;;
14391  *)
14392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393$as_echo "no" >&6; }
14394    ;;
14395  esac
14396fi
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409  # Report what library types will actually be built
14410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14411$as_echo_n "checking if libtool supports shared libraries... " >&6; }
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14413$as_echo "$can_build_shared" >&6; }
14414
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14416$as_echo_n "checking whether to build shared libraries... " >&6; }
14417  test no = "$can_build_shared" && enable_shared=no
14418
14419  # On AIX, shared libraries and static libraries use the same namespace, and
14420  # are all built from PIC.
14421  case $host_os in
14422  aix3*)
14423    test yes = "$enable_shared" && enable_static=no
14424    if test -n "$RANLIB"; then
14425      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14426      postinstall_cmds='$RANLIB $lib'
14427    fi
14428    ;;
14429
14430  aix[4-9]*)
14431    if test ia64 != "$host_cpu"; then
14432      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14433      yes,aix,yes) ;;			# shared object as lib.so file only
14434      yes,svr4,*) ;;			# shared object as lib.so archive member only
14435      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14436      esac
14437    fi
14438    ;;
14439  esac
14440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14441$as_echo "$enable_shared" >&6; }
14442
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14444$as_echo_n "checking whether to build static libraries... " >&6; }
14445  # Make sure either enable_shared or enable_static is yes.
14446  test yes = "$enable_shared" || enable_static=yes
14447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14448$as_echo "$enable_static" >&6; }
14449
14450
14451
14452
14453fi
14454ac_ext=c
14455ac_cpp='$CPP $CPPFLAGS'
14456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14458ac_compiler_gnu=$ac_cv_c_compiler_gnu
14459
14460CC=$lt_save_CC
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476        ac_config_commands="$ac_config_commands libtool"
14477
14478
14479
14480
14481# Only expand once:
14482
14483
14484
14485
14486# Checks for header files.
14487for 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
14488do :
14489  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14490ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14491"
14492if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14493  cat >>confdefs.h <<_ACEOF
14494#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14495_ACEOF
14496
14497fi
14498
14499done
14500
14501
14502# check for types.
14503# Using own tests for int64* because autoconf builtin only give 32bit.
14504ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14505if test "x$ac_cv_type_int8_t" = xyes; then :
14506
14507else
14508
14509cat >>confdefs.h <<_ACEOF
14510#define int8_t signed char
14511_ACEOF
14512
14513fi
14514
14515ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14516if test "x$ac_cv_type_int16_t" = xyes; then :
14517
14518else
14519
14520cat >>confdefs.h <<_ACEOF
14521#define int16_t short
14522_ACEOF
14523
14524fi
14525
14526ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14527if test "x$ac_cv_type_int32_t" = xyes; then :
14528
14529else
14530
14531cat >>confdefs.h <<_ACEOF
14532#define int32_t int
14533_ACEOF
14534
14535fi
14536
14537ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14538if test "x$ac_cv_type_int64_t" = xyes; then :
14539
14540else
14541
14542cat >>confdefs.h <<_ACEOF
14543#define int64_t long long
14544_ACEOF
14545
14546fi
14547
14548ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14549if test "x$ac_cv_type_uint8_t" = xyes; then :
14550
14551else
14552
14553cat >>confdefs.h <<_ACEOF
14554#define uint8_t unsigned char
14555_ACEOF
14556
14557fi
14558
14559ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14560if test "x$ac_cv_type_uint16_t" = xyes; then :
14561
14562else
14563
14564cat >>confdefs.h <<_ACEOF
14565#define uint16_t unsigned short
14566_ACEOF
14567
14568fi
14569
14570ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14571if test "x$ac_cv_type_uint32_t" = xyes; then :
14572
14573else
14574
14575cat >>confdefs.h <<_ACEOF
14576#define uint32_t unsigned int
14577_ACEOF
14578
14579fi
14580
14581ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14582if test "x$ac_cv_type_uint64_t" = xyes; then :
14583
14584else
14585
14586cat >>confdefs.h <<_ACEOF
14587#define uint64_t unsigned long long
14588_ACEOF
14589
14590fi
14591
14592ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14593if test "x$ac_cv_type_size_t" = xyes; then :
14594
14595else
14596
14597cat >>confdefs.h <<_ACEOF
14598#define size_t unsigned int
14599_ACEOF
14600
14601fi
14602
14603ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14604if test "x$ac_cv_type_ssize_t" = xyes; then :
14605
14606else
14607
14608cat >>confdefs.h <<_ACEOF
14609#define ssize_t int
14610_ACEOF
14611
14612fi
14613
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14615$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14616if ${ac_cv_type_uid_t+:} false; then :
14617  $as_echo_n "(cached) " >&6
14618else
14619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14620/* end confdefs.h.  */
14621#include <sys/types.h>
14622
14623_ACEOF
14624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14625  $EGREP "uid_t" >/dev/null 2>&1; then :
14626  ac_cv_type_uid_t=yes
14627else
14628  ac_cv_type_uid_t=no
14629fi
14630rm -f conftest*
14631
14632fi
14633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14634$as_echo "$ac_cv_type_uid_t" >&6; }
14635if test $ac_cv_type_uid_t = no; then
14636
14637$as_echo "#define uid_t int" >>confdefs.h
14638
14639
14640$as_echo "#define gid_t int" >>confdefs.h
14641
14642fi
14643
14644ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14645if test "x$ac_cv_type_pid_t" = xyes; then :
14646
14647else
14648
14649cat >>confdefs.h <<_ACEOF
14650#define pid_t int
14651_ACEOF
14652
14653fi
14654
14655ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14656if test "x$ac_cv_type_off_t" = xyes; then :
14657
14658else
14659
14660cat >>confdefs.h <<_ACEOF
14661#define off_t long int
14662_ACEOF
14663
14664fi
14665
14666ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14667$ac_includes_default
14668#ifdef HAVE_WINSOCK2_H
14669#  include <winsock2.h>
14670#endif
14671
14672"
14673if test "x$ac_cv_type_u_char" = xyes; then :
14674
14675else
14676
14677$as_echo "#define u_char unsigned char" >>confdefs.h
14678
14679fi
14680
14681ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14682$ac_includes_default
14683#ifdef HAVE_SYS_RESOURCE_H
14684#  include <sys/resource.h>
14685#endif
14686
14687"
14688if test "x$ac_cv_type_rlim_t" = xyes; then :
14689
14690else
14691
14692$as_echo "#define rlim_t unsigned long" >>confdefs.h
14693
14694fi
14695
14696
14697ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14698$ac_includes_default
14699#ifdef HAVE_SYS_SOCKET_H
14700#  include <sys/socket.h>
14701#endif
14702#ifdef HAVE_WS2TCPIP_H
14703#  include <ws2tcpip.h>
14704#endif
14705
14706"
14707if test "x$ac_cv_type_socklen_t" = xyes; then :
14708
14709else
14710
14711$as_echo "#define socklen_t int" >>confdefs.h
14712
14713fi
14714
14715 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14716$ac_includes_default
14717#ifdef HAVE_SYS_TYPES_H
14718# include <sys/types.h>
14719#endif
14720#ifdef HAVE_NETINET_IN_H
14721# include <netinet/in.h>
14722#endif
14723
14724"
14725if test "x$ac_cv_type_in_addr_t" = xyes; then :
14726
14727else
14728
14729$as_echo "#define in_addr_t uint32_t" >>confdefs.h
14730
14731fi
14732
14733 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14734$ac_includes_default
14735#ifdef HAVE_SYS_TYPES_H
14736# include <sys/types.h>
14737#endif
14738#ifdef HAVE_NETINET_IN_H
14739# include <netinet/in.h>
14740#endif
14741
14742"
14743if test "x$ac_cv_type_in_port_t" = xyes; then :
14744
14745else
14746
14747$as_echo "#define in_port_t uint16_t" >>confdefs.h
14748
14749fi
14750
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14752$as_echo_n "checking if memcmp compares unsigned... " >&6; }
14753if test "$cross_compiling" = yes; then :
14754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14755$as_echo "cross-compile no" >&6; }
14756
14757$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14758
14759  case " $LIBOBJS " in
14760  *" memcmp.$ac_objext "* ) ;;
14761  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14762 ;;
14763esac
14764
14765
14766else
14767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14768/* end confdefs.h.  */
14769
14770#include <stdio.h>
14771#include <stdlib.h>
14772#include <string.h>
14773int main(void)
14774{
14775	char a = 255, b = 0;
14776	if(memcmp(&a, &b, 1) < 0)
14777		return 1;
14778	return 0;
14779}
14780
14781_ACEOF
14782if ac_fn_c_try_run "$LINENO"; then :
14783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14784$as_echo "yes" >&6; }
14785else
14786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14787$as_echo "no" >&6; }
14788
14789$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14790
14791  case " $LIBOBJS " in
14792  *" memcmp.$ac_objext "* ) ;;
14793  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14794 ;;
14795esac
14796
14797
14798fi
14799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14800  conftest.$ac_objext conftest.beam conftest.$ac_ext
14801fi
14802
14803
14804# The cast to long int works around a bug in the HP C Compiler
14805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14807# This bug is HP SR number 8606223364.
14808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14809$as_echo_n "checking size of time_t... " >&6; }
14810if ${ac_cv_sizeof_time_t+:} false; then :
14811  $as_echo_n "(cached) " >&6
14812else
14813  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14814$ac_includes_default
14815#ifdef TIME_WITH_SYS_TIME
14816# include <sys/time.h>
14817# include <time.h>
14818#else
14819# ifdef HAVE_SYS_TIME_H
14820#  include <sys/time.h>
14821# else
14822#  include <time.h>
14823# endif
14824#endif
14825
14826"; then :
14827
14828else
14829  if test "$ac_cv_type_time_t" = yes; then
14830     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14832as_fn_error 77 "cannot compute sizeof (time_t)
14833See \`config.log' for more details" "$LINENO" 5; }
14834   else
14835     ac_cv_sizeof_time_t=0
14836   fi
14837fi
14838
14839fi
14840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14841$as_echo "$ac_cv_sizeof_time_t" >&6; }
14842
14843
14844
14845cat >>confdefs.h <<_ACEOF
14846#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14847_ACEOF
14848
14849
14850
14851# add option to disable the evil rpath
14852
14853# Check whether --enable-rpath was given.
14854if test "${enable_rpath+set}" = set; then :
14855  enableval=$enable_rpath; enable_rpath=$enableval
14856else
14857  enable_rpath=yes
14858fi
14859
14860if test "x$enable_rpath" = xno; then
14861		ac_config_commands="$ac_config_commands disable-rpath"
14862
14863fi
14864
14865
14866
14867# check to see if libraries are needed for these functions.
14868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14869$as_echo_n "checking for library containing inet_pton... " >&6; }
14870if ${ac_cv_search_inet_pton+:} false; then :
14871  $as_echo_n "(cached) " >&6
14872else
14873  ac_func_search_save_LIBS=$LIBS
14874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875/* end confdefs.h.  */
14876
14877/* Override any GCC internal prototype to avoid an error.
14878   Use char because int might match the return type of a GCC
14879   builtin and then its argument prototype would still apply.  */
14880#ifdef __cplusplus
14881extern "C"
14882#endif
14883char inet_pton ();
14884int
14885main ()
14886{
14887return inet_pton ();
14888  ;
14889  return 0;
14890}
14891_ACEOF
14892for ac_lib in '' nsl; do
14893  if test -z "$ac_lib"; then
14894    ac_res="none required"
14895  else
14896    ac_res=-l$ac_lib
14897    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14898  fi
14899  if ac_fn_c_try_link "$LINENO"; then :
14900  ac_cv_search_inet_pton=$ac_res
14901fi
14902rm -f core conftest.err conftest.$ac_objext \
14903    conftest$ac_exeext
14904  if ${ac_cv_search_inet_pton+:} false; then :
14905  break
14906fi
14907done
14908if ${ac_cv_search_inet_pton+:} false; then :
14909
14910else
14911  ac_cv_search_inet_pton=no
14912fi
14913rm conftest.$ac_ext
14914LIBS=$ac_func_search_save_LIBS
14915fi
14916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14917$as_echo "$ac_cv_search_inet_pton" >&6; }
14918ac_res=$ac_cv_search_inet_pton
14919if test "$ac_res" != no; then :
14920  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14921
14922fi
14923
14924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14925$as_echo_n "checking for library containing socket... " >&6; }
14926if ${ac_cv_search_socket+:} false; then :
14927  $as_echo_n "(cached) " >&6
14928else
14929  ac_func_search_save_LIBS=$LIBS
14930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931/* end confdefs.h.  */
14932
14933/* Override any GCC internal prototype to avoid an error.
14934   Use char because int might match the return type of a GCC
14935   builtin and then its argument prototype would still apply.  */
14936#ifdef __cplusplus
14937extern "C"
14938#endif
14939char socket ();
14940int
14941main ()
14942{
14943return socket ();
14944  ;
14945  return 0;
14946}
14947_ACEOF
14948for ac_lib in '' socket; do
14949  if test -z "$ac_lib"; then
14950    ac_res="none required"
14951  else
14952    ac_res=-l$ac_lib
14953    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14954  fi
14955  if ac_fn_c_try_link "$LINENO"; then :
14956  ac_cv_search_socket=$ac_res
14957fi
14958rm -f core conftest.err conftest.$ac_objext \
14959    conftest$ac_exeext
14960  if ${ac_cv_search_socket+:} false; then :
14961  break
14962fi
14963done
14964if ${ac_cv_search_socket+:} false; then :
14965
14966else
14967  ac_cv_search_socket=no
14968fi
14969rm conftest.$ac_ext
14970LIBS=$ac_func_search_save_LIBS
14971fi
14972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14973$as_echo "$ac_cv_search_socket" >&6; }
14974ac_res=$ac_cv_search_socket
14975if test "$ac_res" != no; then :
14976  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14977
14978fi
14979
14980
14981# check wether strptime also works
14982
14983# check some functions of the OS before linking libs (while still runnable).
14984for ac_header in unistd.h
14985do :
14986  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14987if test "x$ac_cv_header_unistd_h" = xyes; then :
14988  cat >>confdefs.h <<_ACEOF
14989#define HAVE_UNISTD_H 1
14990_ACEOF
14991
14992fi
14993
14994done
14995
14996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14997$as_echo_n "checking for working chown... " >&6; }
14998if ${ac_cv_func_chown_works+:} false; then :
14999  $as_echo_n "(cached) " >&6
15000else
15001  if test "$cross_compiling" = yes; then :
15002  ac_cv_func_chown_works=no
15003else
15004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h.  */
15006$ac_includes_default
15007#include <fcntl.h>
15008
15009int
15010main ()
15011{
15012  char *f = "conftest.chown";
15013  struct stat before, after;
15014
15015  if (creat (f, 0600) < 0)
15016    return 1;
15017  if (stat (f, &before) < 0)
15018    return 1;
15019  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
15020    return 1;
15021  if (stat (f, &after) < 0)
15022    return 1;
15023  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
15024
15025  ;
15026  return 0;
15027}
15028_ACEOF
15029if ac_fn_c_try_run "$LINENO"; then :
15030  ac_cv_func_chown_works=yes
15031else
15032  ac_cv_func_chown_works=no
15033fi
15034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15035  conftest.$ac_objext conftest.beam conftest.$ac_ext
15036fi
15037
15038rm -f conftest.chown
15039
15040fi
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
15042$as_echo "$ac_cv_func_chown_works" >&6; }
15043if test $ac_cv_func_chown_works = yes; then
15044
15045$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
15046
15047fi
15048
15049for ac_header in vfork.h
15050do :
15051  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15052if test "x$ac_cv_header_vfork_h" = xyes; then :
15053  cat >>confdefs.h <<_ACEOF
15054#define HAVE_VFORK_H 1
15055_ACEOF
15056
15057fi
15058
15059done
15060
15061for ac_func in fork vfork
15062do :
15063  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15064ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15065if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15066  cat >>confdefs.h <<_ACEOF
15067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15068_ACEOF
15069
15070fi
15071done
15072
15073if test "x$ac_cv_func_fork" = xyes; then
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15075$as_echo_n "checking for working fork... " >&6; }
15076if ${ac_cv_func_fork_works+:} false; then :
15077  $as_echo_n "(cached) " >&6
15078else
15079  if test "$cross_compiling" = yes; then :
15080  ac_cv_func_fork_works=cross
15081else
15082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083/* end confdefs.h.  */
15084$ac_includes_default
15085int
15086main ()
15087{
15088
15089	  /* By Ruediger Kuhlmann. */
15090	  return fork () < 0;
15091
15092  ;
15093  return 0;
15094}
15095_ACEOF
15096if ac_fn_c_try_run "$LINENO"; then :
15097  ac_cv_func_fork_works=yes
15098else
15099  ac_cv_func_fork_works=no
15100fi
15101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15102  conftest.$ac_objext conftest.beam conftest.$ac_ext
15103fi
15104
15105fi
15106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15107$as_echo "$ac_cv_func_fork_works" >&6; }
15108
15109else
15110  ac_cv_func_fork_works=$ac_cv_func_fork
15111fi
15112if test "x$ac_cv_func_fork_works" = xcross; then
15113  case $host in
15114    *-*-amigaos* | *-*-msdosdjgpp*)
15115      # Override, as these systems have only a dummy fork() stub
15116      ac_cv_func_fork_works=no
15117      ;;
15118    *)
15119      ac_cv_func_fork_works=yes
15120      ;;
15121  esac
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15123$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15124fi
15125ac_cv_func_vfork_works=$ac_cv_func_vfork
15126if test "x$ac_cv_func_vfork" = xyes; then
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15128$as_echo_n "checking for working vfork... " >&6; }
15129if ${ac_cv_func_vfork_works+:} false; then :
15130  $as_echo_n "(cached) " >&6
15131else
15132  if test "$cross_compiling" = yes; then :
15133  ac_cv_func_vfork_works=cross
15134else
15135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15136/* end confdefs.h.  */
15137/* Thanks to Paul Eggert for this test.  */
15138$ac_includes_default
15139#include <sys/wait.h>
15140#ifdef HAVE_VFORK_H
15141# include <vfork.h>
15142#endif
15143/* On some sparc systems, changes by the child to local and incoming
15144   argument registers are propagated back to the parent.  The compiler
15145   is told about this with #include <vfork.h>, but some compilers
15146   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15147   static variable whose address is put into a register that is
15148   clobbered by the vfork.  */
15149static void
15150#ifdef __cplusplus
15151sparc_address_test (int arg)
15152# else
15153sparc_address_test (arg) int arg;
15154#endif
15155{
15156  static pid_t child;
15157  if (!child) {
15158    child = vfork ();
15159    if (child < 0) {
15160      perror ("vfork");
15161      _exit(2);
15162    }
15163    if (!child) {
15164      arg = getpid();
15165      write(-1, "", 0);
15166      _exit (arg);
15167    }
15168  }
15169}
15170
15171int
15172main ()
15173{
15174  pid_t parent = getpid ();
15175  pid_t child;
15176
15177  sparc_address_test (0);
15178
15179  child = vfork ();
15180
15181  if (child == 0) {
15182    /* Here is another test for sparc vfork register problems.  This
15183       test uses lots of local variables, at least as many local
15184       variables as main has allocated so far including compiler
15185       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15186       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15187       reuse the register of parent for one of the local variables,
15188       since it will think that parent can't possibly be used any more
15189       in this routine.  Assigning to the local variable will thus
15190       munge parent in the parent process.  */
15191    pid_t
15192      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15193      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15194    /* Convince the compiler that p..p7 are live; otherwise, it might
15195       use the same hardware register for all 8 local variables.  */
15196    if (p != p1 || p != p2 || p != p3 || p != p4
15197	|| p != p5 || p != p6 || p != p7)
15198      _exit(1);
15199
15200    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15201       from child file descriptors.  If the child closes a descriptor
15202       before it execs or exits, this munges the parent's descriptor
15203       as well.  Test for this by closing stdout in the child.  */
15204    _exit(close(fileno(stdout)) != 0);
15205  } else {
15206    int status;
15207    struct stat st;
15208
15209    while (wait(&status) != child)
15210      ;
15211    return (
15212	 /* Was there some problem with vforking?  */
15213	 child < 0
15214
15215	 /* Did the child fail?  (This shouldn't happen.)  */
15216	 || status
15217
15218	 /* Did the vfork/compiler bug occur?  */
15219	 || parent != getpid()
15220
15221	 /* Did the file descriptor bug occur?  */
15222	 || fstat(fileno(stdout), &st) != 0
15223	 );
15224  }
15225}
15226_ACEOF
15227if ac_fn_c_try_run "$LINENO"; then :
15228  ac_cv_func_vfork_works=yes
15229else
15230  ac_cv_func_vfork_works=no
15231fi
15232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15233  conftest.$ac_objext conftest.beam conftest.$ac_ext
15234fi
15235
15236fi
15237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15238$as_echo "$ac_cv_func_vfork_works" >&6; }
15239
15240fi;
15241if test "x$ac_cv_func_fork_works" = xcross; then
15242  ac_cv_func_vfork_works=$ac_cv_func_vfork
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15244$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15245fi
15246
15247if test "x$ac_cv_func_vfork_works" = xyes; then
15248
15249$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15250
15251else
15252
15253$as_echo "#define vfork fork" >>confdefs.h
15254
15255fi
15256if test "x$ac_cv_func_fork_works" = xyes; then
15257
15258$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15259
15260fi
15261
15262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15263$as_echo_n "checking return type of signal handlers... " >&6; }
15264if ${ac_cv_type_signal+:} false; then :
15265  $as_echo_n "(cached) " >&6
15266else
15267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15268/* end confdefs.h.  */
15269#include <sys/types.h>
15270#include <signal.h>
15271
15272int
15273main ()
15274{
15275return *(signal (0, 0)) (0) == 1;
15276  ;
15277  return 0;
15278}
15279_ACEOF
15280if ac_fn_c_try_compile "$LINENO"; then :
15281  ac_cv_type_signal=int
15282else
15283  ac_cv_type_signal=void
15284fi
15285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15286fi
15287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15288$as_echo "$ac_cv_type_signal" >&6; }
15289
15290cat >>confdefs.h <<_ACEOF
15291#define RETSIGTYPE $ac_cv_type_signal
15292_ACEOF
15293
15294
15295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15296$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15297if ${ac_cv_sys_largefile_source+:} false; then :
15298  $as_echo_n "(cached) " >&6
15299else
15300  while :; do
15301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302/* end confdefs.h.  */
15303#include <sys/types.h> /* for off_t */
15304     #include <stdio.h>
15305int
15306main ()
15307{
15308int (*fp) (FILE *, off_t, int) = fseeko;
15309     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15310  ;
15311  return 0;
15312}
15313_ACEOF
15314if ac_fn_c_try_link "$LINENO"; then :
15315  ac_cv_sys_largefile_source=no; break
15316fi
15317rm -f core conftest.err conftest.$ac_objext \
15318    conftest$ac_exeext conftest.$ac_ext
15319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15320/* end confdefs.h.  */
15321#define _LARGEFILE_SOURCE 1
15322#include <sys/types.h> /* for off_t */
15323     #include <stdio.h>
15324int
15325main ()
15326{
15327int (*fp) (FILE *, off_t, int) = fseeko;
15328     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15329  ;
15330  return 0;
15331}
15332_ACEOF
15333if ac_fn_c_try_link "$LINENO"; then :
15334  ac_cv_sys_largefile_source=1; break
15335fi
15336rm -f core conftest.err conftest.$ac_objext \
15337    conftest$ac_exeext conftest.$ac_ext
15338  ac_cv_sys_largefile_source=unknown
15339  break
15340done
15341fi
15342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15343$as_echo "$ac_cv_sys_largefile_source" >&6; }
15344case $ac_cv_sys_largefile_source in #(
15345  no | unknown) ;;
15346  *)
15347cat >>confdefs.h <<_ACEOF
15348#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15349_ACEOF
15350;;
15351esac
15352rm -rf conftest*
15353
15354# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15355# in glibc 2.1.3, but that breaks too many other things.
15356# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15357if test $ac_cv_sys_largefile_source != unknown; then
15358
15359$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15360
15361fi
15362
15363
15364# Check whether --enable-largefile was given.
15365if test "${enable_largefile+set}" = set; then :
15366  enableval=$enable_largefile;
15367fi
15368
15369if test "$enable_largefile" != no; then
15370
15371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15372$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15373if ${ac_cv_sys_largefile_CC+:} false; then :
15374  $as_echo_n "(cached) " >&6
15375else
15376  ac_cv_sys_largefile_CC=no
15377     if test "$GCC" != yes; then
15378       ac_save_CC=$CC
15379       while :; do
15380	 # IRIX 6.2 and later do not support large files by default,
15381	 # so use the C compiler's -n32 option if that helps.
15382	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15383/* end confdefs.h.  */
15384#include <sys/types.h>
15385 /* Check that off_t can represent 2**63 - 1 correctly.
15386    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15387    since some C++ compilers masquerading as C compilers
15388    incorrectly reject 9223372036854775807.  */
15389#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15390  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15391		       && LARGE_OFF_T % 2147483647 == 1)
15392		      ? 1 : -1];
15393int
15394main ()
15395{
15396
15397  ;
15398  return 0;
15399}
15400_ACEOF
15401	 if ac_fn_c_try_compile "$LINENO"; then :
15402  break
15403fi
15404rm -f core conftest.err conftest.$ac_objext
15405	 CC="$CC -n32"
15406	 if ac_fn_c_try_compile "$LINENO"; then :
15407  ac_cv_sys_largefile_CC=' -n32'; break
15408fi
15409rm -f core conftest.err conftest.$ac_objext
15410	 break
15411       done
15412       CC=$ac_save_CC
15413       rm -f conftest.$ac_ext
15414    fi
15415fi
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15417$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15418  if test "$ac_cv_sys_largefile_CC" != no; then
15419    CC=$CC$ac_cv_sys_largefile_CC
15420  fi
15421
15422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15423$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15424if ${ac_cv_sys_file_offset_bits+:} false; then :
15425  $as_echo_n "(cached) " >&6
15426else
15427  while :; do
15428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15429/* end confdefs.h.  */
15430#include <sys/types.h>
15431 /* Check that off_t can represent 2**63 - 1 correctly.
15432    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15433    since some C++ compilers masquerading as C compilers
15434    incorrectly reject 9223372036854775807.  */
15435#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15436  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15437		       && LARGE_OFF_T % 2147483647 == 1)
15438		      ? 1 : -1];
15439int
15440main ()
15441{
15442
15443  ;
15444  return 0;
15445}
15446_ACEOF
15447if ac_fn_c_try_compile "$LINENO"; then :
15448  ac_cv_sys_file_offset_bits=no; break
15449fi
15450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15452/* end confdefs.h.  */
15453#define _FILE_OFFSET_BITS 64
15454#include <sys/types.h>
15455 /* Check that off_t can represent 2**63 - 1 correctly.
15456    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15457    since some C++ compilers masquerading as C compilers
15458    incorrectly reject 9223372036854775807.  */
15459#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15460  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15461		       && LARGE_OFF_T % 2147483647 == 1)
15462		      ? 1 : -1];
15463int
15464main ()
15465{
15466
15467  ;
15468  return 0;
15469}
15470_ACEOF
15471if ac_fn_c_try_compile "$LINENO"; then :
15472  ac_cv_sys_file_offset_bits=64; break
15473fi
15474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15475  ac_cv_sys_file_offset_bits=unknown
15476  break
15477done
15478fi
15479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15480$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15481case $ac_cv_sys_file_offset_bits in #(
15482  no | unknown) ;;
15483  *)
15484cat >>confdefs.h <<_ACEOF
15485#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15486_ACEOF
15487;;
15488esac
15489rm -rf conftest*
15490  if test $ac_cv_sys_file_offset_bits = unknown; then
15491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15492$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15493if ${ac_cv_sys_large_files+:} false; then :
15494  $as_echo_n "(cached) " >&6
15495else
15496  while :; do
15497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15498/* end confdefs.h.  */
15499#include <sys/types.h>
15500 /* Check that off_t can represent 2**63 - 1 correctly.
15501    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15502    since some C++ compilers masquerading as C compilers
15503    incorrectly reject 9223372036854775807.  */
15504#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15505  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15506		       && LARGE_OFF_T % 2147483647 == 1)
15507		      ? 1 : -1];
15508int
15509main ()
15510{
15511
15512  ;
15513  return 0;
15514}
15515_ACEOF
15516if ac_fn_c_try_compile "$LINENO"; then :
15517  ac_cv_sys_large_files=no; break
15518fi
15519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15521/* end confdefs.h.  */
15522#define _LARGE_FILES 1
15523#include <sys/types.h>
15524 /* Check that off_t can represent 2**63 - 1 correctly.
15525    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15526    since some C++ compilers masquerading as C compilers
15527    incorrectly reject 9223372036854775807.  */
15528#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15529  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15530		       && LARGE_OFF_T % 2147483647 == 1)
15531		      ? 1 : -1];
15532int
15533main ()
15534{
15535
15536  ;
15537  return 0;
15538}
15539_ACEOF
15540if ac_fn_c_try_compile "$LINENO"; then :
15541  ac_cv_sys_large_files=1; break
15542fi
15543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15544  ac_cv_sys_large_files=unknown
15545  break
15546done
15547fi
15548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15549$as_echo "$ac_cv_sys_large_files" >&6; }
15550case $ac_cv_sys_large_files in #(
15551  no | unknown) ;;
15552  *)
15553cat >>confdefs.h <<_ACEOF
15554#define _LARGE_FILES $ac_cv_sys_large_files
15555_ACEOF
15556;;
15557esac
15558rm -rf conftest*
15559  fi
15560
15561
15562fi
15563
15564
15565
15566
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15568$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15569cache=_D_LARGEFILE_SOURCE_1
15570if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15571  $as_echo_n "(cached) " >&6
15572else
15573
15574echo '
15575#include <stdio.h>
15576int test() {
15577        int a = fseeko(stdin, 0, 0);
15578        return a;
15579}
15580' > conftest.c
15581echo 'void f(){}' >>conftest.c
15582if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15583eval "cv_prog_cc_flag_needed_$cache=no"
15584else
15585
15586if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15587eval "cv_prog_cc_flag_needed_$cache=yes"
15588else
15589eval "cv_prog_cc_flag_needed_$cache=fail"
15590#echo 'Test with flag fails too!'
15591#cat conftest.c
15592#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15593#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15594#exit 1
15595fi
15596
15597fi
15598rm -f conftest conftest.c conftest.o
15599
15600fi
15601
15602if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15604$as_echo "yes" >&6; }
15605:
15606CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15607else
15608if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15610$as_echo "no" >&6; }
15611#echo 'Test with flag is no!'
15612#cat conftest.c
15613#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15614#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15615#exit 1
15616:
15617
15618else
15619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15620$as_echo "failed" >&6; }
15621:
15622
15623fi
15624fi
15625
15626
15627
15628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15629$as_echo_n "checking if nonblocking sockets work... " >&6; }
15630if echo $target | grep mingw32 >/dev/null; then
15631	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15632$as_echo "no (windows)" >&6; }
15633
15634$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15635
15636else
15637if test "$cross_compiling" = yes; then :
15638
15639	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15640$as_echo "crosscompile(yes)" >&6; }
15641
15642else
15643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15644/* end confdefs.h.  */
15645
15646
15647#include <stdio.h>
15648#include <string.h>
15649#include <stdlib.h>
15650#include <fcntl.h>
15651#include <errno.h>
15652#ifdef HAVE_SYS_TYPES_H
15653#include <sys/types.h>
15654#endif
15655#ifdef HAVE_SYS_SOCKET_H
15656#include <sys/socket.h>
15657#endif
15658#ifdef HAVE_NETINET_IN_H
15659#include <netinet/in.h>
15660#endif
15661#ifdef HAVE_ARPA_INET_H
15662#include <arpa/inet.h>
15663#endif
15664#ifdef HAVE_UNISTD_H
15665#include <unistd.h>
15666#endif
15667#ifdef HAVE_TIME_H
15668#include <time.h>
15669#endif
15670
15671int main(void)
15672{
15673	int port;
15674	int sfd, cfd;
15675	int num = 10;
15676	int i, p;
15677	struct sockaddr_in a;
15678	/* test if select and nonblocking reads work well together */
15679	/* open port.
15680	   fork child to send 10 messages.
15681	   select to read.
15682	   then try to nonblocking read the 10 messages
15683	   then, nonblocking read must give EAGAIN
15684	*/
15685
15686	port = 12345 + (time(0)%32);
15687	sfd = socket(PF_INET, SOCK_DGRAM, 0);
15688	if(sfd == -1) {
15689		perror("socket");
15690		return 1;
15691	}
15692	memset(&a, 0, sizeof(a));
15693	a.sin_family = AF_INET;
15694	a.sin_port = htons(port);
15695	a.sin_addr.s_addr = inet_addr("127.0.0.1");
15696	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15697		perror("bind");
15698		return 1;
15699	}
15700	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15701		perror("fcntl");
15702		return 1;
15703	}
15704
15705	cfd = socket(PF_INET, SOCK_DGRAM, 0);
15706	if(cfd == -1) {
15707		perror("client socket");
15708		return 1;
15709	}
15710	a.sin_port = 0;
15711	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15712		perror("client bind");
15713		return 1;
15714	}
15715	a.sin_port = htons(port);
15716
15717	/* no handler, causes exit in 10 seconds */
15718	alarm(10);
15719
15720	/* send and receive on the socket */
15721	if((p=fork()) == 0) {
15722		for(i=0; i<num; i++) {
15723			if(sendto(cfd, &i, sizeof(i), 0,
15724				(struct sockaddr*)&a, sizeof(a)) < 0) {
15725				perror("sendto");
15726				return 1;
15727			}
15728		}
15729	} else {
15730		/* parent */
15731		fd_set rset;
15732		int x;
15733		if(p == -1) {
15734			perror("fork");
15735			return 1;
15736		}
15737		FD_ZERO(&rset);
15738		FD_SET(sfd, &rset);
15739		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15740			perror("select");
15741			return 1;
15742		}
15743		i = 0;
15744		while(i < num) {
15745			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15746				if(errno == EAGAIN)
15747					continue;
15748				perror("recv");
15749				return 1;
15750			}
15751			i++;
15752		}
15753		/* now we want to get EAGAIN: nonblocking goodness */
15754		errno = 0;
15755		recv(sfd, &x, sizeof(x), 0);
15756		if(errno != EAGAIN) {
15757			perror("trying to recv again");
15758			return 1;
15759		}
15760		/* EAGAIN encountered */
15761	}
15762
15763	close(sfd);
15764	close(cfd);
15765	return 0;
15766}
15767
15768_ACEOF
15769if ac_fn_c_try_run "$LINENO"; then :
15770
15771	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15772$as_echo "yes" >&6; }
15773
15774else
15775
15776	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15777$as_echo "no" >&6; }
15778
15779$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15780
15781
15782fi
15783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15784  conftest.$ac_objext conftest.beam conftest.$ac_ext
15785fi
15786
15787fi
15788
15789
15790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15791$as_echo_n "checking whether mkdir has one arg... " >&6; }
15792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15793/* end confdefs.h.  */
15794
15795#include <stdio.h>
15796#include <unistd.h>
15797#ifdef HAVE_WINSOCK2_H
15798#include <winsock2.h>
15799#endif
15800#ifdef HAVE_SYS_STAT_H
15801#include <sys/stat.h>
15802#endif
15803
15804int
15805main ()
15806{
15807
15808	(void)mkdir("directory");
15809
15810  ;
15811  return 0;
15812}
15813_ACEOF
15814if ac_fn_c_try_compile "$LINENO"; then :
15815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15816$as_echo "yes" >&6; }
15817
15818$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15819
15820
15821else
15822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15823$as_echo "no" >&6; }
15824
15825fi
15826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827
15828for ac_func in strptime
15829do :
15830  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15831if test "x$ac_cv_func_strptime" = xyes; then :
15832  cat >>confdefs.h <<_ACEOF
15833#define HAVE_STRPTIME 1
15834_ACEOF
15835
15836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15837$as_echo_n "checking whether strptime works... " >&6; }
15838if test c${cross_compiling} = cno; then
15839if test "$cross_compiling" = yes; then :
15840  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15842as_fn_error $? "cannot run test program while cross compiling
15843See \`config.log' for more details" "$LINENO" 5; }
15844else
15845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15846/* end confdefs.h.  */
15847
15848#define _XOPEN_SOURCE 600
15849#include <time.h>
15850int main(void) { struct tm tm; char *res;
15851res = 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);
15852if (!res) return 2;
15853res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15854if (!res) return 1; return 0; }
15855
15856_ACEOF
15857if ac_fn_c_try_run "$LINENO"; then :
15858  eval "ac_cv_c_strptime_works=yes"
15859else
15860  eval "ac_cv_c_strptime_works=no"
15861fi
15862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15863  conftest.$ac_objext conftest.beam conftest.$ac_ext
15864fi
15865
15866else
15867eval "ac_cv_c_strptime_works=maybe"
15868fi
15869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15870$as_echo "$ac_cv_c_strptime_works" >&6; }
15871if test $ac_cv_c_strptime_works = no; then
15872case " $LIBOBJS " in
15873  *" strptime.$ac_objext "* ) ;;
15874  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15875 ;;
15876esac
15877
15878else
15879
15880cat >>confdefs.h <<_ACEOF
15881#define STRPTIME_WORKS 1
15882_ACEOF
15883
15884fi
15885
15886else
15887  case " $LIBOBJS " in
15888  *" strptime.$ac_objext "* ) ;;
15889  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15890 ;;
15891esac
15892
15893fi
15894done
15895
15896
15897# set memory allocation checking if requested
15898# Check whether --enable-alloc-checks was given.
15899if test "${enable_alloc_checks+set}" = set; then :
15900  enableval=$enable_alloc_checks;
15901fi
15902
15903# Check whether --enable-alloc-lite was given.
15904if test "${enable_alloc_lite+set}" = set; then :
15905  enableval=$enable_alloc_lite;
15906fi
15907
15908# Check whether --enable-alloc-nonregional was given.
15909if test "${enable_alloc_nonregional+set}" = set; then :
15910  enableval=$enable_alloc_nonregional;
15911fi
15912
15913if test x_$enable_alloc_nonregional = x_yes; then
15914
15915$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15916
15917fi
15918if test x_$enable_alloc_checks = x_yes; then
15919
15920$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15921
15922else
15923	if test x_$enable_alloc_lite = x_yes; then
15924
15925$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15926
15927	else
15928
15929	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15930$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15931	if test "$cross_compiling" = yes; then :
15932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15933$as_echo "no (crosscompile)" >&6; }
15934	case " $LIBOBJS " in
15935  *" malloc.$ac_objext "* ) ;;
15936  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15937 ;;
15938esac
15939
15940
15941cat >>confdefs.h <<_ACEOF
15942#define malloc rpl_malloc_unbound
15943_ACEOF
15944
15945else
15946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947/* end confdefs.h.  */
15948#if defined STDC_HEADERS || defined HAVE_STDLIB_H
15949#include <stdlib.h>
15950#else
15951char *malloc ();
15952#endif
15953
15954int
15955main ()
15956{
15957 if(malloc(0) != 0) return 1;
15958  ;
15959  return 0;
15960}
15961
15962_ACEOF
15963if ac_fn_c_try_run "$LINENO"; then :
15964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15965$as_echo "no" >&6; }
15966	case " $LIBOBJS " in
15967  *" malloc.$ac_objext "* ) ;;
15968  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15969 ;;
15970esac
15971
15972
15973cat >>confdefs.h <<_ACEOF
15974#define malloc rpl_malloc_unbound
15975_ACEOF
15976
15977else
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15979$as_echo "yes" >&6; }
15980
15981$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15982
15983fi
15984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15985  conftest.$ac_objext conftest.beam conftest.$ac_ext
15986fi
15987
15988
15989	fi
15990fi
15991
15992# check windows threads (we use them, not pthreads, on windows).
15993if test "$on_mingw" = "yes"; then
15994# check windows threads
15995	for ac_header in windows.h
15996do :
15997  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15998"
15999if test "x$ac_cv_header_windows_h" = xyes; then :
16000  cat >>confdefs.h <<_ACEOF
16001#define HAVE_WINDOWS_H 1
16002_ACEOF
16003
16004fi
16005
16006done
16007
16008	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
16009$as_echo_n "checking for CreateThread... " >&6; }
16010	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h.  */
16012
16013#ifdef HAVE_WINDOWS_H
16014#include <windows.h>
16015#endif
16016
16017int
16018main ()
16019{
16020
16021	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
16022
16023  ;
16024  return 0;
16025}
16026_ACEOF
16027if ac_fn_c_try_compile "$LINENO"; then :
16028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16029$as_echo "yes" >&6; }
16030
16031$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
16032
16033
16034else
16035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16036$as_echo "no" >&6; }
16037
16038fi
16039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16040
16041else
16042# not on mingw, check thread libraries.
16043
16044# check for thread library.
16045# check this first, so that the pthread lib does not get linked in via
16046# libssl or libpython, and thus distorts the tests, and we end up using
16047# the non-threadsafe C libraries.
16048
16049# Check whether --with-pthreads was given.
16050if test "${with_pthreads+set}" = set; then :
16051  withval=$with_pthreads;
16052else
16053   withval="yes"
16054fi
16055
16056ub_have_pthreads=no
16057if test x_$withval != x_no; then
16058
16059
16060ac_ext=c
16061ac_cpp='$CPP $CPPFLAGS'
16062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16064ac_compiler_gnu=$ac_cv_c_compiler_gnu
16065
16066ax_pthread_ok=no
16067
16068# We used to check for pthread.h first, but this fails if pthread.h
16069# requires special compiler flags (e.g. on True64 or Sequent).
16070# It gets checked for in the link test anyway.
16071
16072# First of all, check if the user has set any of the PTHREAD_LIBS,
16073# etcetera environment variables, and if threads linking works using
16074# them:
16075if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16076        save_CFLAGS="$CFLAGS"
16077        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16078        save_LIBS="$LIBS"
16079        LIBS="$PTHREAD_LIBS $LIBS"
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16081$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16082        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16083/* end confdefs.h.  */
16084
16085/* Override any GCC internal prototype to avoid an error.
16086   Use char because int might match the return type of a GCC
16087   builtin and then its argument prototype would still apply.  */
16088#ifdef __cplusplus
16089extern "C"
16090#endif
16091char pthread_join ();
16092int
16093main ()
16094{
16095return pthread_join ();
16096  ;
16097  return 0;
16098}
16099_ACEOF
16100if ac_fn_c_try_link "$LINENO"; then :
16101  ax_pthread_ok=yes
16102fi
16103rm -f core conftest.err conftest.$ac_objext \
16104    conftest$ac_exeext conftest.$ac_ext
16105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16106$as_echo "$ax_pthread_ok" >&6; }
16107        if test x"$ax_pthread_ok" = xno; then
16108                PTHREAD_LIBS=""
16109                PTHREAD_CFLAGS=""
16110        fi
16111        LIBS="$save_LIBS"
16112        CFLAGS="$save_CFLAGS"
16113fi
16114
16115# We must check for the threads library under a number of different
16116# names; the ordering is very important because some systems
16117# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16118# libraries is broken (non-POSIX).
16119
16120# Create a list of thread flags to try.  Items starting with a "-" are
16121# C compiler flags, and other items are library names, except for "none"
16122# which indicates that we try without any flags at all, and "pthread-config"
16123# which is a program returning the flags for the Pth emulation library.
16124
16125ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16126
16127# The ordering *is* (sometimes) important.  Some notes on the
16128# individual items follow:
16129
16130# pthreads: AIX (must check this before -lpthread)
16131# none: in case threads are in libc; should be tried before -Kthread and
16132#       other compiler flags to prevent continual compiler warnings
16133# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16134# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16135# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16136# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16137# -pthreads: Solaris/gcc
16138# -mthreads: Mingw32/gcc, Lynx/gcc
16139# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16140#      doesn't hurt to check since this sometimes defines pthreads too;
16141#      also defines -D_REENTRANT)
16142#      ... -mt is also the pthreads flag for HP/aCC
16143# pthread: Linux, etcetera
16144# --thread-safe: KAI C++
16145# pthread-config: use pthread-config program (for GNU Pth library)
16146
16147case ${host_os} in
16148        solaris*)
16149
16150        # On Solaris (at least, for some versions), libc contains stubbed
16151        # (non-functional) versions of the pthreads routines, so link-based
16152        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16153        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16154        # a function called by this macro, so we could check for that, but
16155        # who knows whether they'll stub that too in a future libc.)  So,
16156        # we'll just look for -pthreads and -lpthread first:
16157
16158        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16159        ;;
16160
16161        darwin*)
16162        ax_pthread_flags="-pthread $ax_pthread_flags"
16163        ;;
16164esac
16165
16166# Clang doesn't consider unrecognized options an error unless we specify
16167# -Werror. We throw in some extra Clang-specific options to ensure that
16168# this doesn't happen for GCC, which also accepts -Werror.
16169
16170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16171$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16172save_CFLAGS="$CFLAGS"
16173ax_pthread_extra_flags="-Werror"
16174CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176/* end confdefs.h.  */
16177int foo(void);
16178int
16179main ()
16180{
16181foo()
16182  ;
16183  return 0;
16184}
16185_ACEOF
16186if ac_fn_c_try_compile "$LINENO"; then :
16187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16188$as_echo "yes" >&6; }
16189else
16190  ax_pthread_extra_flags=
16191                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192$as_echo "no" >&6; }
16193fi
16194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16195CFLAGS="$save_CFLAGS"
16196
16197if test x"$ax_pthread_ok" = xno; then
16198for flag in $ax_pthread_flags; do
16199
16200        case $flag in
16201                none)
16202                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16203$as_echo_n "checking whether pthreads work without any flags... " >&6; }
16204                ;;
16205
16206                -*)
16207                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16208$as_echo_n "checking whether pthreads work with $flag... " >&6; }
16209                PTHREAD_CFLAGS="$flag"
16210                ;;
16211
16212                pthread-config)
16213                # Extract the first word of "pthread-config", so it can be a program name with args.
16214set dummy pthread-config; ac_word=$2
16215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16216$as_echo_n "checking for $ac_word... " >&6; }
16217if ${ac_cv_prog_ax_pthread_config+:} false; then :
16218  $as_echo_n "(cached) " >&6
16219else
16220  if test -n "$ax_pthread_config"; then
16221  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16222else
16223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16224for as_dir in $PATH
16225do
16226  IFS=$as_save_IFS
16227  test -z "$as_dir" && as_dir=.
16228    for ac_exec_ext in '' $ac_executable_extensions; do
16229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16230    ac_cv_prog_ax_pthread_config="yes"
16231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16232    break 2
16233  fi
16234done
16235  done
16236IFS=$as_save_IFS
16237
16238  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16239fi
16240fi
16241ax_pthread_config=$ac_cv_prog_ax_pthread_config
16242if test -n "$ax_pthread_config"; then
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16244$as_echo "$ax_pthread_config" >&6; }
16245else
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16247$as_echo "no" >&6; }
16248fi
16249
16250
16251                if test x"$ax_pthread_config" = xno; then continue; fi
16252                PTHREAD_CFLAGS="`pthread-config --cflags`"
16253                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16254                ;;
16255
16256                *)
16257                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16258$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16259                PTHREAD_LIBS="-l$flag"
16260                ;;
16261        esac
16262
16263        save_LIBS="$LIBS"
16264        save_CFLAGS="$CFLAGS"
16265        LIBS="$PTHREAD_LIBS $LIBS"
16266        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16267
16268        # Check for various functions.  We must include pthread.h,
16269        # since some functions may be macros.  (On the Sequent, we
16270        # need a special flag -Kthread to make this header compile.)
16271        # We check for pthread_join because it is in -lpthread on IRIX
16272        # while pthread_create is in libc.  We check for pthread_attr_init
16273        # due to DEC craziness with -lpthreads.  We check for
16274        # pthread_cleanup_push because it is one of the few pthread
16275        # functions on Solaris that doesn't have a non-functional libc stub.
16276        # We try pthread_create on general principles.
16277        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h.  */
16279#include <pthread.h>
16280                        static void routine(void *a) { *((int*)a) = 0; }
16281                        static void *start_routine(void *a) { return a; }
16282int
16283main ()
16284{
16285pthread_t th; pthread_attr_t attr;
16286                        pthread_create(&th, 0, start_routine, 0);
16287                        pthread_join(th, 0);
16288                        pthread_attr_init(&attr);
16289                        pthread_cleanup_push(routine, 0);
16290                        pthread_cleanup_pop(0) /* ; */
16291  ;
16292  return 0;
16293}
16294_ACEOF
16295if ac_fn_c_try_link "$LINENO"; then :
16296  ax_pthread_ok=yes
16297fi
16298rm -f core conftest.err conftest.$ac_objext \
16299    conftest$ac_exeext conftest.$ac_ext
16300
16301        LIBS="$save_LIBS"
16302        CFLAGS="$save_CFLAGS"
16303
16304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16305$as_echo "$ax_pthread_ok" >&6; }
16306        if test "x$ax_pthread_ok" = xyes; then
16307                break;
16308        fi
16309
16310        PTHREAD_LIBS=""
16311        PTHREAD_CFLAGS=""
16312done
16313fi
16314
16315# Various other checks:
16316if test "x$ax_pthread_ok" = xyes; then
16317        save_LIBS="$LIBS"
16318        LIBS="$PTHREAD_LIBS $LIBS"
16319        save_CFLAGS="$CFLAGS"
16320        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16321
16322        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16324$as_echo_n "checking for joinable pthread attribute... " >&6; }
16325        attr_name=unknown
16326        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16327            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16328/* end confdefs.h.  */
16329#include <pthread.h>
16330int
16331main ()
16332{
16333int attr = $attr; return attr /* ; */
16334  ;
16335  return 0;
16336}
16337_ACEOF
16338if ac_fn_c_try_link "$LINENO"; then :
16339  attr_name=$attr; break
16340fi
16341rm -f core conftest.err conftest.$ac_objext \
16342    conftest$ac_exeext conftest.$ac_ext
16343        done
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16345$as_echo "$attr_name" >&6; }
16346        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16347
16348cat >>confdefs.h <<_ACEOF
16349#define PTHREAD_CREATE_JOINABLE $attr_name
16350_ACEOF
16351
16352        fi
16353
16354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16355$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16356        flag=no
16357        case ${host_os} in
16358            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16359            osf* | hpux*) flag="-D_REENTRANT";;
16360            solaris*)
16361            if test "$GCC" = "yes"; then
16362                flag="-D_REENTRANT"
16363            else
16364                # TODO: What about Clang on Solaris?
16365                flag="-mt -D_REENTRANT"
16366            fi
16367            ;;
16368        esac
16369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16370$as_echo "$flag" >&6; }
16371        if test "x$flag" != xno; then
16372            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16373        fi
16374
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16376$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16377if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16378  $as_echo_n "(cached) " >&6
16379else
16380
16381                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16382/* end confdefs.h.  */
16383#include <pthread.h>
16384int
16385main ()
16386{
16387int i = PTHREAD_PRIO_INHERIT;
16388  ;
16389  return 0;
16390}
16391_ACEOF
16392if ac_fn_c_try_link "$LINENO"; then :
16393  ax_cv_PTHREAD_PRIO_INHERIT=yes
16394else
16395  ax_cv_PTHREAD_PRIO_INHERIT=no
16396fi
16397rm -f core conftest.err conftest.$ac_objext \
16398    conftest$ac_exeext conftest.$ac_ext
16399
16400fi
16401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16402$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16403        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16404
16405$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16406
16407fi
16408
16409        LIBS="$save_LIBS"
16410        CFLAGS="$save_CFLAGS"
16411
16412        # More AIX lossage: compile with *_r variant
16413        if test "x$GCC" != xyes; then
16414            case $host_os in
16415                aix*)
16416                case "x/$CC" in #(
16417  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16418    #handle absolute path differently from PATH based program lookup
16419                   case "x$CC" in #(
16420  x/*) :
16421    if as_fn_executable_p ${CC}_r; then :
16422  PTHREAD_CC="${CC}_r"
16423fi ;; #(
16424  *) :
16425    for ac_prog in ${CC}_r
16426do
16427  # Extract the first word of "$ac_prog", so it can be a program name with args.
16428set dummy $ac_prog; ac_word=$2
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16430$as_echo_n "checking for $ac_word... " >&6; }
16431if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16432  $as_echo_n "(cached) " >&6
16433else
16434  if test -n "$PTHREAD_CC"; then
16435  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16436else
16437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16438for as_dir in $PATH
16439do
16440  IFS=$as_save_IFS
16441  test -z "$as_dir" && as_dir=.
16442    for ac_exec_ext in '' $ac_executable_extensions; do
16443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16444    ac_cv_prog_PTHREAD_CC="$ac_prog"
16445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16446    break 2
16447  fi
16448done
16449  done
16450IFS=$as_save_IFS
16451
16452fi
16453fi
16454PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16455if test -n "$PTHREAD_CC"; then
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16457$as_echo "$PTHREAD_CC" >&6; }
16458else
16459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16460$as_echo "no" >&6; }
16461fi
16462
16463
16464  test -n "$PTHREAD_CC" && break
16465done
16466test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16467 ;;
16468esac ;; #(
16469  *) :
16470     ;;
16471esac
16472                ;;
16473            esac
16474        fi
16475fi
16476
16477test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16478
16479
16480
16481
16482
16483# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16484if test x"$ax_pthread_ok" = xyes; then
16485
16486
16487$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16488
16489		if test -n "$PTHREAD_LIBS"; then
16490		  LIBS="$PTHREAD_LIBS $LIBS"
16491		fi
16492		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16493		CC="$PTHREAD_CC"
16494		ub_have_pthreads=yes
16495		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16496"
16497if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16498
16499cat >>confdefs.h <<_ACEOF
16500#define HAVE_PTHREAD_SPINLOCK_T 1
16501_ACEOF
16502
16503
16504fi
16505ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16506"
16507if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16508
16509cat >>confdefs.h <<_ACEOF
16510#define HAVE_PTHREAD_RWLOCK_T 1
16511_ACEOF
16512
16513
16514fi
16515
16516
16517		if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16518		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16519$as_echo_n "checking if -pthread unused during linking... " >&6; }
16520		# catch clang warning 'argument unused during compilation'
16521		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522/* end confdefs.h.  */
16523$ac_includes_default
16524
16525int main(void) {return 0;}
16526
16527_ACEOF
16528		pthread_unused="yes"
16529		# first compile
16530		echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16531		$CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16532		if test $? = 0; then
16533			# then link
16534			echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16535			$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16536			if test $? -ne 0; then
16537				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16538$as_echo "yes" >&6; }
16539				CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16540				PTHREAD_CFLAGS_ONLY="-pthread"
16541
16542			else
16543				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16544$as_echo "no" >&6; }
16545			fi
16546		else
16547			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16548$as_echo "no" >&6; }
16549		fi # endif cc successful
16550		rm -f conftest conftest.c conftest.o
16551		fi # endif -pthread in CFLAGS
16552
16553
16554        :
16555else
16556        ax_pthread_ok=no
16557
16558fi
16559ac_ext=c
16560ac_cpp='$CPP $CPPFLAGS'
16561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16563ac_compiler_gnu=$ac_cv_c_compiler_gnu
16564
16565
16566fi
16567
16568# check solaris thread library
16569
16570# Check whether --with-solaris-threads was given.
16571if test "${with_solaris_threads+set}" = set; then :
16572  withval=$with_solaris_threads;
16573else
16574   withval="no"
16575fi
16576
16577ub_have_sol_threads=no
16578if test x_$withval != x_no; then
16579	if test x_$ub_have_pthreads != x_no; then
16580	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16581$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16582	else
16583	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16584$as_echo_n "checking for library containing thr_create... " >&6; }
16585if ${ac_cv_search_thr_create+:} false; then :
16586  $as_echo_n "(cached) " >&6
16587else
16588  ac_func_search_save_LIBS=$LIBS
16589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16590/* end confdefs.h.  */
16591
16592/* Override any GCC internal prototype to avoid an error.
16593   Use char because int might match the return type of a GCC
16594   builtin and then its argument prototype would still apply.  */
16595#ifdef __cplusplus
16596extern "C"
16597#endif
16598char thr_create ();
16599int
16600main ()
16601{
16602return thr_create ();
16603  ;
16604  return 0;
16605}
16606_ACEOF
16607for ac_lib in '' thread; do
16608  if test -z "$ac_lib"; then
16609    ac_res="none required"
16610  else
16611    ac_res=-l$ac_lib
16612    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16613  fi
16614  if ac_fn_c_try_link "$LINENO"; then :
16615  ac_cv_search_thr_create=$ac_res
16616fi
16617rm -f core conftest.err conftest.$ac_objext \
16618    conftest$ac_exeext
16619  if ${ac_cv_search_thr_create+:} false; then :
16620  break
16621fi
16622done
16623if ${ac_cv_search_thr_create+:} false; then :
16624
16625else
16626  ac_cv_search_thr_create=no
16627fi
16628rm conftest.$ac_ext
16629LIBS=$ac_func_search_save_LIBS
16630fi
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16632$as_echo "$ac_cv_search_thr_create" >&6; }
16633ac_res=$ac_cv_search_thr_create
16634if test "$ac_res" != no; then :
16635  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16636
16637
16638$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16639
16640
16641
16642
16643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16644$as_echo_n "checking whether $CC supports -mt... " >&6; }
16645cache=`echo mt | sed 'y%.=/+-%___p_%'`
16646if eval \${cv_prog_cc_flag_$cache+:} false; then :
16647  $as_echo_n "(cached) " >&6
16648else
16649
16650echo 'void f(void){}' >conftest.c
16651if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16652eval "cv_prog_cc_flag_$cache=yes"
16653else
16654eval "cv_prog_cc_flag_$cache=no"
16655fi
16656rm -f conftest conftest.o conftest.c
16657
16658fi
16659
16660if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16662$as_echo "yes" >&6; }
16663:
16664CFLAGS="$CFLAGS -mt"
16665else
16666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16667$as_echo "no" >&6; }
16668:
16669CFLAGS="$CFLAGS -D_REENTRANT"
16670fi
16671
16672		ub_have_sol_threads=yes
16673
16674else
16675
16676		as_fn_error $? "no solaris threads found." "$LINENO" 5
16677
16678fi
16679
16680	fi
16681fi
16682
16683fi # end of non-mingw check of thread libraries
16684
16685# Check for PyUnbound
16686
16687# Check whether --with-pyunbound was given.
16688if test "${with_pyunbound+set}" = set; then :
16689  withval=$with_pyunbound;
16690else
16691   withval="no"
16692fi
16693
16694
16695ub_test_python=no
16696ub_with_pyunbound=no
16697if test x_$withval != x_no; then
16698   ub_with_pyunbound=yes
16699   ub_test_python=yes
16700fi
16701
16702# Check for Python module
16703
16704# Check whether --with-pythonmodule was given.
16705if test "${with_pythonmodule+set}" = set; then :
16706  withval=$with_pythonmodule;
16707else
16708   withval="no"
16709fi
16710
16711
16712ub_with_pythonmod=no
16713if test x_$withval != x_no; then
16714   ub_with_pythonmod=yes
16715   ub_test_python=yes
16716fi
16717
16718# Check for Python & SWIG only on PyUnbound or PyModule
16719if test x_$ub_test_python != x_no; then
16720
16721   # Check for Python
16722   ub_have_python=no
16723   ac_save_LIBS="$LIBS"
16724        #
16725        # Allow the use of a (user set) custom python version
16726        #
16727
16728
16729        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16730set dummy python$PYTHON_VERSION; ac_word=$2
16731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16732$as_echo_n "checking for $ac_word... " >&6; }
16733if ${ac_cv_path_PYTHON+:} false; then :
16734  $as_echo_n "(cached) " >&6
16735else
16736  case $PYTHON in
16737  [\\/]* | ?:[\\/]*)
16738  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16739  ;;
16740  *)
16741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16742for as_dir in $PATH
16743do
16744  IFS=$as_save_IFS
16745  test -z "$as_dir" && as_dir=.
16746    for ac_exec_ext in '' $ac_executable_extensions; do
16747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16748    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16750    break 2
16751  fi
16752done
16753  done
16754IFS=$as_save_IFS
16755
16756  ;;
16757esac
16758fi
16759PYTHON=$ac_cv_path_PYTHON
16760if test -n "$PYTHON"; then
16761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16762$as_echo "$PYTHON" >&6; }
16763else
16764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16765$as_echo "no" >&6; }
16766fi
16767
16768
16769        if test -z "$PYTHON"; then
16770           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16771           PYTHON_VERSION=""
16772        fi
16773
16774        if test -z "$PYTHON_VERSION"; then
16775		PYTHON_VERSION=`$PYTHON -c "import sys; \
16776			print(sys.version.split()[0])"`
16777	fi
16778
16779        #
16780        # Check if you have distutils, else fail
16781        #
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16783$as_echo_n "checking for the distutils Python package... " >&6; }
16784        if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
16785                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16786$as_echo "yes" >&6; }
16787        else
16788                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16789$as_echo "no" >&6; }
16790                as_fn_error $? "cannot import Python module \"distutils\".
16791Please check your Python installation. The error was:
16792$ac_distutils_result" "$LINENO" 5
16793                PYTHON_VERSION=""
16794        fi
16795
16796        #
16797        # Check for Python include path
16798        #
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16800$as_echo_n "checking for Python include path... " >&6; }
16801        if test -z "$PYTHON_CPPFLAGS"; then
16802                python_path=`$PYTHON -c "import distutils.sysconfig; \
16803                        print(distutils.sysconfig.get_python_inc());"`
16804                if test -n "${python_path}"; then
16805                        python_path="-I$python_path"
16806                fi
16807                PYTHON_CPPFLAGS=$python_path
16808        fi
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16810$as_echo "$PYTHON_CPPFLAGS" >&6; }
16811
16812
16813        #
16814        # Check for Python library path
16815        #
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16817$as_echo_n "checking for Python library path... " >&6; }
16818        if test -z "$PYTHON_LDFLAGS"; then
16819                PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16820                        print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16821        fi
16822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16823$as_echo "$PYTHON_LDFLAGS" >&6; }
16824
16825
16826        #
16827        # Check for site packages
16828        #
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16830$as_echo_n "checking for Python site-packages path... " >&6; }
16831        if test -z "$PYTHON_SITE_PKG"; then
16832                PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16833                        print(distutils.sysconfig.get_python_lib(1,0));"`
16834        fi
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16836$as_echo "$PYTHON_SITE_PKG" >&6; }
16837
16838
16839        #
16840        # final check to see if everything compiles alright
16841        #
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16843$as_echo_n "checking consistency of all components of python development environment... " >&6; }
16844        ac_ext=c
16845ac_cpp='$CPP $CPPFLAGS'
16846ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16847ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16848ac_compiler_gnu=$ac_cv_c_compiler_gnu
16849
16850        # save current global flags
16851        ac_save_LIBS="$LIBS"
16852        ac_save_CPPFLAGS="$CPPFLAGS"
16853
16854        LIBS="$LIBS $PYTHON_LDFLAGS"
16855        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16856        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16857/* end confdefs.h.  */
16858
16859                #include <Python.h>
16860
16861int
16862main ()
16863{
16864
16865                Py_Initialize();
16866
16867  ;
16868  return 0;
16869}
16870_ACEOF
16871if ac_fn_c_try_link "$LINENO"; then :
16872  pythonexists=yes
16873else
16874  pythonexists=no
16875fi
16876rm -f core conftest.err conftest.$ac_objext \
16877    conftest$ac_exeext conftest.$ac_ext
16878
16879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16880$as_echo "$pythonexists" >&6; }
16881
16882        if test ! "$pythonexists" = "yes"; then
16883           as_fn_error $? "
16884  Could not link test program to Python. Maybe the main Python library has been
16885  installed in some non-standard library path. If so, pass it to configure,
16886  via the LDFLAGS environment variable.
16887  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16888  ============================================================================
16889   ERROR!
16890   You probably have to install the development version of the Python package
16891   for your distribution.  The exact name of this package varies among them.
16892  ============================================================================
16893           " "$LINENO" 5
16894          PYTHON_VERSION=""
16895        fi
16896        ac_ext=c
16897ac_cpp='$CPP $CPPFLAGS'
16898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16900ac_compiler_gnu=$ac_cv_c_compiler_gnu
16901
16902        # turn back to default flags
16903        CPPFLAGS="$ac_save_CPPFLAGS"
16904        LIBS="$ac_save_LIBS"
16905
16906        #
16907        # all done!
16908        #
16909
16910   if test ! -z "$PYTHON_VERSION"; then
16911	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16912		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16913	fi
16914
16915      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16916
16917      # Have Python
16918
16919$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16920
16921      if test -n "$LIBS"; then
16922        LIBS="$PYTHON_LDFLAGS $LIBS"
16923      else
16924        LIBS="$PYTHON_LDFLAGS"
16925      fi
16926      if test -n "$CPPFLAGS"; then
16927        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16928      else
16929        CPPFLAGS="$PYTHON_CPPFLAGS"
16930      fi
16931      ub_have_python=yes
16932      PC_PY_DEPENDENCY="python"
16933
16934
16935      # Check for SWIG
16936      ub_have_swig=no
16937      # Check whether --enable-swig-version-check was given.
16938if test "${enable_swig_version_check+set}" = set; then :
16939  enableval=$enable_swig_version_check;
16940fi
16941
16942      if test "$enable_swig_version_check" = "yes"; then
16943
16944        # Extract the first word of "swig", so it can be a program name with args.
16945set dummy swig; ac_word=$2
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16947$as_echo_n "checking for $ac_word... " >&6; }
16948if ${ac_cv_path_SWIG+:} false; then :
16949  $as_echo_n "(cached) " >&6
16950else
16951  case $SWIG in
16952  [\\/]* | ?:[\\/]*)
16953  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16954  ;;
16955  *)
16956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16957for as_dir in $PATH
16958do
16959  IFS=$as_save_IFS
16960  test -z "$as_dir" && as_dir=.
16961    for ac_exec_ext in '' $ac_executable_extensions; do
16962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16963    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16965    break 2
16966  fi
16967done
16968  done
16969IFS=$as_save_IFS
16970
16971  ;;
16972esac
16973fi
16974SWIG=$ac_cv_path_SWIG
16975if test -n "$SWIG"; then
16976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16977$as_echo "$SWIG" >&6; }
16978else
16979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16980$as_echo "no" >&6; }
16981fi
16982
16983
16984        if test -z "$SWIG" ; then
16985                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16986$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16987                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16988        elif test -n "2.0.1" ; then
16989                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16990$as_echo_n "checking for SWIG version... " >&6; }
16991                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'`
16992                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16993$as_echo "$swig_version" >&6; }
16994                if test -n "$swig_version" ; then
16995                        # Calculate the required version number components
16996                        required=2.0.1
16997                        required_major=`echo $required | sed 's/[^0-9].*//'`
16998                        if test -z "$required_major" ; then
16999                                required_major=0
17000                        fi
17001                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17002                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17003                        if test -z "$required_minor" ; then
17004                                required_minor=0
17005                        fi
17006                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17007                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17008                        if test -z "$required_patch" ; then
17009                                required_patch=0
17010                        fi
17011                        # Calculate the available version number components
17012                        available=$swig_version
17013                        available_major=`echo $available | sed 's/[^0-9].*//'`
17014                        if test -z "$available_major" ; then
17015                                available_major=0
17016                        fi
17017                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17018                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17019                        if test -z "$available_minor" ; then
17020                                available_minor=0
17021                        fi
17022                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17023                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17024                        if test -z "$available_patch" ; then
17025                                available_patch=0
17026                        fi
17027			badversion=0
17028			if test $available_major -lt $required_major ; then
17029				badversion=1
17030			fi
17031                        if test $available_major -eq $required_major \
17032                                -a $available_minor -lt $required_minor ; then
17033				badversion=1
17034			fi
17035                        if test $available_major -eq $required_major \
17036                                -a $available_minor -eq $required_minor \
17037                                -a $available_patch -lt $required_patch ; then
17038				badversion=1
17039			fi
17040			if test $badversion -eq 1 ; then
17041                                { $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
17042$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;}
17043                                SWIG='echo "Error: SWIG version >= 2.0.1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17044                        else
17045                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17046$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17047                                SWIG_LIB=`$SWIG -swiglib`
17048                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17049$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17050                        fi
17051                else
17052                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17053$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17054                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17055                fi
17056        fi
17057
17058
17059      else
17060
17061        # Extract the first word of "swig", so it can be a program name with args.
17062set dummy swig; ac_word=$2
17063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17064$as_echo_n "checking for $ac_word... " >&6; }
17065if ${ac_cv_path_SWIG+:} false; then :
17066  $as_echo_n "(cached) " >&6
17067else
17068  case $SWIG in
17069  [\\/]* | ?:[\\/]*)
17070  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
17071  ;;
17072  *)
17073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17074for as_dir in $PATH
17075do
17076  IFS=$as_save_IFS
17077  test -z "$as_dir" && as_dir=.
17078    for ac_exec_ext in '' $ac_executable_extensions; do
17079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17080    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
17081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17082    break 2
17083  fi
17084done
17085  done
17086IFS=$as_save_IFS
17087
17088  ;;
17089esac
17090fi
17091SWIG=$ac_cv_path_SWIG
17092if test -n "$SWIG"; then
17093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
17094$as_echo "$SWIG" >&6; }
17095else
17096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17097$as_echo "no" >&6; }
17098fi
17099
17100
17101        if test -z "$SWIG" ; then
17102                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
17103$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
17104                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
17105        elif test -n "" ; then
17106                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
17107$as_echo_n "checking for SWIG version... " >&6; }
17108                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'`
17109                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
17110$as_echo "$swig_version" >&6; }
17111                if test -n "$swig_version" ; then
17112                        # Calculate the required version number components
17113                        required=
17114                        required_major=`echo $required | sed 's/[^0-9].*//'`
17115                        if test -z "$required_major" ; then
17116                                required_major=0
17117                        fi
17118                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17119                        required_minor=`echo $required | sed 's/[^0-9].*//'`
17120                        if test -z "$required_minor" ; then
17121                                required_minor=0
17122                        fi
17123                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
17124                        required_patch=`echo $required | sed 's/[^0-9].*//'`
17125                        if test -z "$required_patch" ; then
17126                                required_patch=0
17127                        fi
17128                        # Calculate the available version number components
17129                        available=$swig_version
17130                        available_major=`echo $available | sed 's/[^0-9].*//'`
17131                        if test -z "$available_major" ; then
17132                                available_major=0
17133                        fi
17134                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17135                        available_minor=`echo $available | sed 's/[^0-9].*//'`
17136                        if test -z "$available_minor" ; then
17137                                available_minor=0
17138                        fi
17139                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
17140                        available_patch=`echo $available | sed 's/[^0-9].*//'`
17141                        if test -z "$available_patch" ; then
17142                                available_patch=0
17143                        fi
17144			badversion=0
17145			if test $available_major -lt $required_major ; then
17146				badversion=1
17147			fi
17148                        if test $available_major -eq $required_major \
17149                                -a $available_minor -lt $required_minor ; then
17150				badversion=1
17151			fi
17152                        if test $available_major -eq $required_major \
17153                                -a $available_minor -eq $required_minor \
17154                                -a $available_patch -lt $required_patch ; then
17155				badversion=1
17156			fi
17157			if test $badversion -eq 1 ; then
17158                                { $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
17159$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
17160                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
17161                        else
17162                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
17163$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
17164                                SWIG_LIB=`$SWIG -swiglib`
17165                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
17166$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
17167                        fi
17168                else
17169                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
17170$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
17171                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
17172                fi
17173        fi
17174
17175
17176      fi
17177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
17178$as_echo_n "checking SWIG... " >&6; }
17179      if test ! -x "$SWIG"; then
17180         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
17181      else
17182
17183$as_echo "#define HAVE_SWIG 1" >>confdefs.h
17184
17185         swig="$SWIG"
17186
17187         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
17188$as_echo "present" >&6; }
17189
17190         # If have Python & SWIG
17191         # Declare PythonMod
17192         if test x_$ub_with_pythonmod != x_no; then
17193
17194$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
17195
17196            WITH_PYTHONMODULE=yes
17197
17198	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
17199
17200	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
17201
17202	    PYTHONMOD_INSTALL=pythonmod-install
17203
17204	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
17205
17206         fi
17207
17208         # Declare PyUnbound
17209         if test x_$ub_with_pyunbound != x_no; then
17210
17211$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17212
17213            WITH_PYUNBOUND=yes
17214
17215	    PYUNBOUND_OBJ="libunbound_wrap.lo"
17216
17217	    PYUNBOUND_TARGET="_unbound.la"
17218
17219	    PYUNBOUND_INSTALL=pyunbound-install
17220
17221	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
17222
17223         fi
17224      fi
17225   else
17226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17227$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17228      ub_with_pyunbound=no
17229      ub_with_pythonmod=no
17230   fi
17231fi
17232
17233if test "`uname`" = "NetBSD"; then
17234	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17235
17236fi
17237CONFIG_DATE=`date +%Y%m%d`
17238
17239
17240# Checks for libraries.
17241
17242# libnss
17243USE_NSS="no"
17244
17245# Check whether --with-nss was given.
17246if test "${with_nss+set}" = set; then :
17247  withval=$with_nss;
17248	USE_NSS="yes"
17249
17250$as_echo "#define HAVE_NSS 1" >>confdefs.h
17251
17252	if test "$withval" != "" -a "$withval" != "yes"; then
17253		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17254		LDFLAGS="$LDFLAGS -L$withval/lib"
17255
17256	if test "x$enable_rpath" = xyes; then
17257		if echo "$withval/lib" | grep "^/" >/dev/null; then
17258			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17259		fi
17260	fi
17261
17262		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17263	else
17264		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17265		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17266	fi
17267        LIBS="$LIBS -lnss3 -lnspr4"
17268	SSLLIB=""
17269
17270
17271fi
17272
17273
17274# libnettle
17275USE_NETTLE="no"
17276
17277# Check whether --with-nettle was given.
17278if test "${with_nettle+set}" = set; then :
17279  withval=$with_nettle;
17280	USE_NETTLE="yes"
17281
17282$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17283
17284	for ac_header in nettle/dsa-compat.h
17285do :
17286  ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17287"
17288if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17289  cat >>confdefs.h <<_ACEOF
17290#define HAVE_NETTLE_DSA_COMPAT_H 1
17291_ACEOF
17292
17293fi
17294
17295done
17296
17297	if test "$withval" != "" -a "$withval" != "yes"; then
17298		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17299		LDFLAGS="$LDFLAGS -L$withval/lib"
17300
17301	if test "x$enable_rpath" = xyes; then
17302		if echo "$withval/lib" | grep "^/" >/dev/null; then
17303			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17304		fi
17305	fi
17306
17307	else
17308		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17309	fi
17310        LIBS="$LIBS -lhogweed -lnettle -lgmp"
17311	SSLLIB=""
17312
17313
17314fi
17315
17316
17317# openssl
17318if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17319
17320
17321# Check whether --with-ssl was given.
17322if test "${with_ssl+set}" = set; then :
17323  withval=$with_ssl;
17324
17325else
17326
17327            withval="yes"
17328
17329fi
17330
17331    if test x_$withval = x_no; then
17332	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17333    fi
17334
17335    withval=$withval
17336    if test x_$withval != x_no; then
17337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17338$as_echo_n "checking for SSL... " >&6; }
17339        if test x_$withval = x_ -o x_$withval = x_yes; then
17340            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17341        fi
17342        for dir in $withval; do
17343            ssldir="$dir"
17344            if test -f "$dir/include/openssl/ssl.h"; then
17345                found_ssl="yes"
17346
17347cat >>confdefs.h <<_ACEOF
17348#define HAVE_SSL /**/
17349_ACEOF
17350
17351                                if test "$ssldir" != "/usr"; then
17352                        CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17353                        LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17354                fi
17355                break;
17356            fi
17357        done
17358        if test x_$found_ssl != x_yes; then
17359            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17360        else
17361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17362$as_echo "found in $ssldir" >&6; }
17363            HAVE_SSL=yes
17364                        if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17365                LDFLAGS="$LDFLAGS -L$ssldir/lib"
17366                LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17367
17368	if test "x$enable_rpath" = xyes; then
17369		if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17370			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17371		fi
17372	fi
17373
17374            fi
17375
17376            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17377$as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17378            LIBS="$LIBS -lcrypto"
17379            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17380            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17381/* end confdefs.h.  */
17382
17383int
17384main ()
17385{
17386
17387                int HMAC_Update(void);
17388                (void)HMAC_Update();
17389
17390  ;
17391  return 0;
17392}
17393_ACEOF
17394if ac_fn_c_try_link "$LINENO"; then :
17395
17396                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17397$as_echo "yes" >&6; }
17398
17399$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17400
17401
17402else
17403
17404                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405$as_echo "no" >&6; }
17406                # check if -lwsock32 or -lgdi32 are needed.
17407                BAKLIBS="$LIBS"
17408                BAKSSLLIBS="$LIBSSL_LIBS"
17409		LIBS="$LIBS -lgdi32 -lws2_32"
17410		LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
17411                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17412$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17413                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17414/* end confdefs.h.  */
17415
17416int
17417main ()
17418{
17419
17420                    int HMAC_Update(void);
17421                    (void)HMAC_Update();
17422
17423  ;
17424  return 0;
17425}
17426_ACEOF
17427if ac_fn_c_try_link "$LINENO"; then :
17428
17429
17430$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17431
17432                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17433$as_echo "yes" >&6; }
17434
17435else
17436
17437                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17438$as_echo "no" >&6; }
17439                    LIBS="$BAKLIBS"
17440                    LIBSSL_LIBS="$BAKSSLLIBS"
17441                    LIBS="$LIBS -ldl"
17442                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17443                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17444$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17445                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17446/* end confdefs.h.  */
17447
17448int
17449main ()
17450{
17451
17452                        int HMAC_Update(void);
17453                        (void)HMAC_Update();
17454
17455  ;
17456  return 0;
17457}
17458_ACEOF
17459if ac_fn_c_try_link "$LINENO"; then :
17460
17461
17462$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17463
17464                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17465$as_echo "yes" >&6; }
17466
17467else
17468
17469                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17470$as_echo "no" >&6; }
17471                        LIBS="$BAKLIBS"
17472                        LIBSSL_LIBS="$BAKSSLLIBS"
17473                        LIBS="$LIBS -ldl -pthread"
17474                        LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17475                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17476$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17477                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17478/* end confdefs.h.  */
17479
17480int
17481main ()
17482{
17483
17484                            int HMAC_Update(void);
17485                            (void)HMAC_Update();
17486
17487  ;
17488  return 0;
17489}
17490_ACEOF
17491if ac_fn_c_try_link "$LINENO"; then :
17492
17493
17494$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17495
17496                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17497$as_echo "yes" >&6; }
17498
17499else
17500
17501                            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17502$as_echo "no" >&6; }
17503                            as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17504
17505fi
17506rm -f core conftest.err conftest.$ac_objext \
17507    conftest$ac_exeext conftest.$ac_ext
17508
17509fi
17510rm -f core conftest.err conftest.$ac_objext \
17511    conftest$ac_exeext conftest.$ac_ext
17512
17513fi
17514rm -f core conftest.err conftest.$ac_objext \
17515    conftest$ac_exeext conftest.$ac_ext
17516
17517fi
17518rm -f core conftest.err conftest.$ac_objext \
17519    conftest$ac_exeext conftest.$ac_ext
17520        fi
17521
17522
17523    fi
17524for ac_header in openssl/ssl.h
17525do :
17526  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17527"
17528if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17529  cat >>confdefs.h <<_ACEOF
17530#define HAVE_OPENSSL_SSL_H 1
17531_ACEOF
17532
17533fi
17534
17535done
17536
17537for ac_header in openssl/err.h
17538do :
17539  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17540"
17541if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17542  cat >>confdefs.h <<_ACEOF
17543#define HAVE_OPENSSL_ERR_H 1
17544_ACEOF
17545
17546fi
17547
17548done
17549
17550for ac_header in openssl/rand.h
17551do :
17552  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17553"
17554if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17555  cat >>confdefs.h <<_ACEOF
17556#define HAVE_OPENSSL_RAND_H 1
17557_ACEOF
17558
17559fi
17560
17561done
17562
17563
17564
17565
17566# check if libssl needs libdl
17567BAKLIBS="$LIBS"
17568LIBS="-lssl $LIBS"
17569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17570$as_echo_n "checking if libssl needs libdl... " >&6; }
17571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572/* end confdefs.h.  */
17573
17574/* Override any GCC internal prototype to avoid an error.
17575   Use char because int might match the return type of a GCC
17576   builtin and then its argument prototype would still apply.  */
17577#ifdef __cplusplus
17578extern "C"
17579#endif
17580char SSL_CTX_new ();
17581int
17582main ()
17583{
17584return SSL_CTX_new ();
17585  ;
17586  return 0;
17587}
17588_ACEOF
17589if ac_fn_c_try_link "$LINENO"; then :
17590
17591	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17592$as_echo "no" >&6; }
17593	LIBS="$BAKLIBS"
17594
17595else
17596
17597	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17598$as_echo "yes" >&6; }
17599	LIBS="$BAKLIBS"
17600	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17601$as_echo_n "checking for library containing dlopen... " >&6; }
17602if ${ac_cv_search_dlopen+:} false; then :
17603  $as_echo_n "(cached) " >&6
17604else
17605  ac_func_search_save_LIBS=$LIBS
17606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17607/* end confdefs.h.  */
17608
17609/* Override any GCC internal prototype to avoid an error.
17610   Use char because int might match the return type of a GCC
17611   builtin and then its argument prototype would still apply.  */
17612#ifdef __cplusplus
17613extern "C"
17614#endif
17615char dlopen ();
17616int
17617main ()
17618{
17619return dlopen ();
17620  ;
17621  return 0;
17622}
17623_ACEOF
17624for ac_lib in '' dl; do
17625  if test -z "$ac_lib"; then
17626    ac_res="none required"
17627  else
17628    ac_res=-l$ac_lib
17629    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17630  fi
17631  if ac_fn_c_try_link "$LINENO"; then :
17632  ac_cv_search_dlopen=$ac_res
17633fi
17634rm -f core conftest.err conftest.$ac_objext \
17635    conftest$ac_exeext
17636  if ${ac_cv_search_dlopen+:} false; then :
17637  break
17638fi
17639done
17640if ${ac_cv_search_dlopen+:} false; then :
17641
17642else
17643  ac_cv_search_dlopen=no
17644fi
17645rm conftest.$ac_ext
17646LIBS=$ac_func_search_save_LIBS
17647fi
17648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17649$as_echo "$ac_cv_search_dlopen" >&6; }
17650ac_res=$ac_cv_search_dlopen
17651if test "$ac_res" != no; then :
17652  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17653
17654fi
17655
17656
17657fi
17658rm -f core conftest.err conftest.$ac_objext \
17659    conftest$ac_exeext conftest.$ac_ext
17660SSLLIB="-lssl"
17661
17662# check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17663BAKLIBS="$LIBS"
17664LIBS="-lssl $LIBS"
17665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17666$as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17668/* end confdefs.h.  */
17669
17670/* Override any GCC internal prototype to avoid an error.
17671   Use char because int might match the return type of a GCC
17672   builtin and then its argument prototype would still apply.  */
17673#ifdef __cplusplus
17674extern "C"
17675#endif
17676char HMAC_Update ();
17677int
17678main ()
17679{
17680return HMAC_Update ();
17681  ;
17682  return 0;
17683}
17684_ACEOF
17685if ac_fn_c_try_link "$LINENO"; then :
17686
17687	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17688$as_echo "no" >&6; }
17689	LIBS="$BAKLIBS"
17690
17691else
17692
17693	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17694$as_echo "yes" >&6; }
17695	LIBS="$BAKLIBS"
17696	LIBS="$LIBS -lcrypt32"
17697
17698fi
17699rm -f core conftest.err conftest.$ac_objext \
17700    conftest$ac_exeext conftest.$ac_ext
17701
17702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17703$as_echo_n "checking for LibreSSL... " >&6; }
17704if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17705	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17706$as_echo "yes" >&6; }
17707
17708$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17709
17710	# libressl provides these compat functions, but they may also be
17711	# declared by the OS in libc.  See if they have been declared.
17712	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17713if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17714  ac_have_decl=1
17715else
17716  ac_have_decl=0
17717fi
17718
17719cat >>confdefs.h <<_ACEOF
17720#define HAVE_DECL_STRLCPY $ac_have_decl
17721_ACEOF
17722ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17723if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17724  ac_have_decl=1
17725else
17726  ac_have_decl=0
17727fi
17728
17729cat >>confdefs.h <<_ACEOF
17730#define HAVE_DECL_STRLCAT $ac_have_decl
17731_ACEOF
17732ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17733if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17734  ac_have_decl=1
17735else
17736  ac_have_decl=0
17737fi
17738
17739cat >>confdefs.h <<_ACEOF
17740#define HAVE_DECL_ARC4RANDOM $ac_have_decl
17741_ACEOF
17742ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17743if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17744  ac_have_decl=1
17745else
17746  ac_have_decl=0
17747fi
17748
17749cat >>confdefs.h <<_ACEOF
17750#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17751_ACEOF
17752ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17753if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17754  ac_have_decl=1
17755else
17756  ac_have_decl=0
17757fi
17758
17759cat >>confdefs.h <<_ACEOF
17760#define HAVE_DECL_REALLOCARRAY $ac_have_decl
17761_ACEOF
17762
17763else
17764	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17765$as_echo "no" >&6; }
17766fi
17767for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17768do :
17769  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17770ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17771"
17772if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17773  cat >>confdefs.h <<_ACEOF
17774#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17775_ACEOF
17776
17777fi
17778
17779done
17780
17781for 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
17782do :
17783  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17784ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17785if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17786  cat >>confdefs.h <<_ACEOF
17787#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17788_ACEOF
17789
17790fi
17791done
17792
17793
17794# these check_funcs need -lssl
17795BAKLIBS="$LIBS"
17796LIBS="-lssl $LIBS"
17797for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername
17798do :
17799  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17800ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17801if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17802  cat >>confdefs.h <<_ACEOF
17803#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17804_ACEOF
17805
17806fi
17807done
17808
17809LIBS="$BAKLIBS"
17810
17811ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17812$ac_includes_default
17813#ifdef HAVE_OPENSSL_ERR_H
17814#include <openssl/err.h>
17815#endif
17816
17817#ifdef HAVE_OPENSSL_RAND_H
17818#include <openssl/rand.h>
17819#endif
17820
17821#ifdef HAVE_OPENSSL_CONF_H
17822#include <openssl/conf.h>
17823#endif
17824
17825#ifdef HAVE_OPENSSL_ENGINE_H
17826#include <openssl/engine.h>
17827#endif
17828#include <openssl/ssl.h>
17829#include <openssl/evp.h>
17830
17831"
17832if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17833  ac_have_decl=1
17834else
17835  ac_have_decl=0
17836fi
17837
17838cat >>confdefs.h <<_ACEOF
17839#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17840_ACEOF
17841ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17842$ac_includes_default
17843#ifdef HAVE_OPENSSL_ERR_H
17844#include <openssl/err.h>
17845#endif
17846
17847#ifdef HAVE_OPENSSL_RAND_H
17848#include <openssl/rand.h>
17849#endif
17850
17851#ifdef HAVE_OPENSSL_CONF_H
17852#include <openssl/conf.h>
17853#endif
17854
17855#ifdef HAVE_OPENSSL_ENGINE_H
17856#include <openssl/engine.h>
17857#endif
17858#include <openssl/ssl.h>
17859#include <openssl/evp.h>
17860
17861"
17862if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17863  ac_have_decl=1
17864else
17865  ac_have_decl=0
17866fi
17867
17868cat >>confdefs.h <<_ACEOF
17869#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17870_ACEOF
17871ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17872$ac_includes_default
17873#ifdef HAVE_OPENSSL_ERR_H
17874#include <openssl/err.h>
17875#endif
17876
17877#ifdef HAVE_OPENSSL_RAND_H
17878#include <openssl/rand.h>
17879#endif
17880
17881#ifdef HAVE_OPENSSL_CONF_H
17882#include <openssl/conf.h>
17883#endif
17884
17885#ifdef HAVE_OPENSSL_ENGINE_H
17886#include <openssl/engine.h>
17887#endif
17888#include <openssl/ssl.h>
17889#include <openssl/evp.h>
17890
17891"
17892if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17893  ac_have_decl=1
17894else
17895  ac_have_decl=0
17896fi
17897
17898cat >>confdefs.h <<_ACEOF
17899#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17900_ACEOF
17901
17902fi
17903
17904
17905
17906# Check whether --enable-sha1 was given.
17907if test "${enable_sha1+set}" = set; then :
17908  enableval=$enable_sha1;
17909fi
17910
17911case "$enable_sha1" in
17912	no)
17913	;;
17914	yes|*)
17915
17916$as_echo "#define USE_SHA1 1" >>confdefs.h
17917
17918	;;
17919esac
17920
17921
17922# Check whether --enable-sha2 was given.
17923if test "${enable_sha2+set}" = set; then :
17924  enableval=$enable_sha2;
17925fi
17926
17927case "$enable_sha2" in
17928	no)
17929	;;
17930	yes|*)
17931
17932$as_echo "#define USE_SHA2 1" >>confdefs.h
17933
17934	;;
17935esac
17936
17937# Check whether --enable-subnet was given.
17938if test "${enable_subnet+set}" = set; then :
17939  enableval=$enable_subnet;
17940fi
17941
17942case "$enable_subnet" in
17943	yes)
17944
17945$as_echo "#define CLIENT_SUBNET 1" >>confdefs.h
17946
17947	SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo"
17948
17949	SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h'
17950
17951	;;
17952	no|*)
17953	;;
17954esac
17955
17956# check wether gost also works
17957
17958# Check whether --enable-gost was given.
17959if test "${enable_gost+set}" = set; then :
17960  enableval=$enable_gost;
17961fi
17962
17963use_gost="no"
17964if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17965case "$enable_gost" in
17966	no)
17967	;;
17968	*)
17969	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17970if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17971  :
17972else
17973  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17974fi
17975
17976	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17977if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17978
17979else
17980  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17981fi
17982
17983
17984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17985$as_echo_n "checking if GOST works... " >&6; }
17986if test c${cross_compiling} = cno; then
17987BAKCFLAGS="$CFLAGS"
17988if test -n "$ssldir"; then
17989	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17990fi
17991if test "$cross_compiling" = yes; then :
17992  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17994as_fn_error $? "cannot run test program while cross compiling
17995See \`config.log' for more details" "$LINENO" 5; }
17996else
17997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17998/* end confdefs.h.  */
17999
18000#include <string.h>
18001#include <openssl/ssl.h>
18002#include <openssl/evp.h>
18003#include <openssl/engine.h>
18004#include <openssl/conf.h>
18005/* routine to load gost (from sldns) */
18006int load_gost_id(void)
18007{
18008	static int gost_id = 0;
18009	const EVP_PKEY_ASN1_METHOD* meth;
18010	ENGINE* e;
18011
18012	if(gost_id) return gost_id;
18013
18014	/* see if configuration loaded gost implementation from other engine*/
18015	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
18016	if(meth) {
18017		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18018		return gost_id;
18019	}
18020
18021	/* see if engine can be loaded already */
18022	e = ENGINE_by_id("gost");
18023	if(!e) {
18024		/* load it ourself, in case statically linked */
18025		ENGINE_load_builtin_engines();
18026		ENGINE_load_dynamic();
18027		e = ENGINE_by_id("gost");
18028	}
18029	if(!e) {
18030		/* no gost engine in openssl */
18031		return 0;
18032	}
18033	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
18034		ENGINE_finish(e);
18035		ENGINE_free(e);
18036		return 0;
18037	}
18038
18039	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
18040	if(!meth) {
18041		/* algo not found */
18042		ENGINE_finish(e);
18043		ENGINE_free(e);
18044		return 0;
18045	}
18046	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
18047	return gost_id;
18048}
18049int main(void) {
18050	EVP_MD_CTX* ctx;
18051	const EVP_MD* md;
18052	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
18053	const char* str = "Hello world";
18054	const unsigned char check[] = {
18055		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
18056		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
18057		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
18058		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
18059	};
18060	OPENSSL_config(NULL);
18061	(void)load_gost_id();
18062	md = EVP_get_digestbyname("md_gost94");
18063	if(!md) return 1;
18064	memset(digest, 0, sizeof(digest));
18065	ctx = EVP_MD_CTX_create();
18066	if(!ctx) return 2;
18067	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
18068	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
18069	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
18070	/* uncomment to see the hash calculated.
18071		{int i;
18072		for(i=0; i<32; i++)
18073			printf(" %2.2x", (int)digest[i]);
18074		printf("\n");}
18075	*/
18076	if(memcmp(digest, check, sizeof(check)) != 0)
18077		return 6;
18078	return 0;
18079}
18080
18081_ACEOF
18082if ac_fn_c_try_run "$LINENO"; then :
18083  eval "ac_cv_c_gost_works=yes"
18084else
18085  eval "ac_cv_c_gost_works=no"
18086fi
18087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18088  conftest.$ac_objext conftest.beam conftest.$ac_ext
18089fi
18090
18091CFLAGS="$BAKCFLAGS"
18092else
18093eval "ac_cv_c_gost_works=maybe"
18094fi
18095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
18096$as_echo "$ac_cv_c_gost_works" >&6; }
18097
18098	if test "$ac_cv_c_gost_works" != no; then
18099		use_gost="yes"
18100
18101$as_echo "#define USE_GOST 1" >>confdefs.h
18102
18103	fi
18104	;;
18105esac
18106fi
18107# Check whether --enable-ecdsa was given.
18108if test "${enable_ecdsa+set}" = set; then :
18109  enableval=$enable_ecdsa;
18110fi
18111
18112use_ecdsa="no"
18113case "$enable_ecdsa" in
18114    no)
18115      ;;
18116    *)
18117      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18118	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
18119if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
18120
18121else
18122  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18123fi
18124
18125	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
18126if test "x$ac_cv_func_SHA384_Init" = xyes; then :
18127
18128else
18129  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18130fi
18131
18132	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
18133#include <openssl/evp.h>
18134
18135"
18136if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
18137  ac_have_decl=1
18138else
18139  ac_have_decl=0
18140fi
18141
18142cat >>confdefs.h <<_ACEOF
18143#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
18144_ACEOF
18145if test $ac_have_decl = 1; then :
18146
18147else
18148  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18149fi
18150ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
18151#include <openssl/evp.h>
18152
18153"
18154if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
18155  ac_have_decl=1
18156else
18157  ac_have_decl=0
18158fi
18159
18160cat >>confdefs.h <<_ACEOF
18161#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
18162_ACEOF
18163if test $ac_have_decl = 1; then :
18164
18165else
18166  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
18167fi
18168
18169	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
18170	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
18171$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
18172	      if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
18173		if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
18174		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176
18177cat >>confdefs.h <<_ACEOF
18178#define USE_ECDSA_EVP_WORKAROUND 1
18179_ACEOF
18180
18181		else
18182		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18183$as_echo "yes" >&6; }
18184		fi
18185	      else
18186		# not OpenSSL, thus likely LibreSSL, which supports it
18187		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18188$as_echo "yes" >&6; }
18189	      fi
18190      fi
18191      # we now know we have ECDSA and the required curves.
18192
18193cat >>confdefs.h <<_ACEOF
18194#define USE_ECDSA 1
18195_ACEOF
18196
18197      use_ecdsa="yes"
18198      ;;
18199esac
18200
18201# Check whether --enable-dsa was given.
18202if test "${enable_dsa+set}" = set; then :
18203  enableval=$enable_dsa;
18204fi
18205
18206use_dsa="no"
18207case "$enable_dsa" in
18208    no)
18209      ;;
18210    *)
18211      # detect if DSA is supported, and turn it off if not.
18212      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18213      ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
18214if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
18215
18216      as_ac_Type=`$as_echo "ac_cv_type_DSA_SIG*" | $as_tr_sh`
18217ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" "
18218$ac_includes_default
18219#ifdef HAVE_OPENSSL_ERR_H
18220#include <openssl/err.h>
18221#endif
18222
18223#ifdef HAVE_OPENSSL_RAND_H
18224#include <openssl/rand.h>
18225#endif
18226
18227#ifdef HAVE_OPENSSL_CONF_H
18228#include <openssl/conf.h>
18229#endif
18230
18231#ifdef HAVE_OPENSSL_ENGINE_H
18232#include <openssl/engine.h>
18233#endif
18234
18235"
18236if eval test \"x\$"$as_ac_Type"\" = x"yes"; then :
18237
18238
18239cat >>confdefs.h <<_ACEOF
18240#define USE_DSA 1
18241_ACEOF
18242
18243
18244else
18245  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18246               fi
18247fi
18248
18249
18250else
18251  if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
18252               fi
18253fi
18254
18255      else
18256
18257cat >>confdefs.h <<_ACEOF
18258#define USE_DSA 1
18259_ACEOF
18260
18261      fi
18262      ;;
18263esac
18264
18265# Check whether --enable-ed25519 was given.
18266if test "${enable_ed25519+set}" = set; then :
18267  enableval=$enable_ed25519;
18268fi
18269
18270use_ed25519="no"
18271case "$enable_ed25519" in
18272    no)
18273      ;;
18274    *)
18275      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18276	      ac_fn_c_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default
18277#include <openssl/evp.h>
18278
18279"
18280if test "x$ac_cv_have_decl_NID_ED25519" = xyes; then :
18281  ac_have_decl=1
18282else
18283  ac_have_decl=0
18284fi
18285
18286cat >>confdefs.h <<_ACEOF
18287#define HAVE_DECL_NID_ED25519 $ac_have_decl
18288_ACEOF
18289if test $ac_have_decl = 1; then :
18290
18291      		use_ed25519="yes"
18292
18293else
18294   if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5
18295	      	fi
18296fi
18297
18298      fi
18299      if test $USE_NETTLE = "yes"; then
18300		for ac_header in nettle/eddsa.h
18301do :
18302  ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default
18303"
18304if test "x$ac_cv_header_nettle_eddsa_h" = xyes; then :
18305  cat >>confdefs.h <<_ACEOF
18306#define HAVE_NETTLE_EDDSA_H 1
18307_ACEOF
18308 use_ed25519="yes"
18309fi
18310
18311done
18312
18313      fi
18314      if test $use_ed25519 = "yes"; then
18315
18316cat >>confdefs.h <<_ACEOF
18317#define USE_ED25519 1
18318_ACEOF
18319
18320      fi
18321      ;;
18322esac
18323
18324# Check whether --enable-ed448 was given.
18325if test "${enable_ed448+set}" = set; then :
18326  enableval=$enable_ed448;
18327fi
18328
18329use_ed448="no"
18330case "$enable_ed448" in
18331    no)
18332      ;;
18333    *)
18334      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
18335	      ac_fn_c_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default
18336#include <openssl/evp.h>
18337
18338"
18339if test "x$ac_cv_have_decl_NID_ED448" = xyes; then :
18340  ac_have_decl=1
18341else
18342  ac_have_decl=0
18343fi
18344
18345cat >>confdefs.h <<_ACEOF
18346#define HAVE_DECL_NID_ED448 $ac_have_decl
18347_ACEOF
18348if test $ac_have_decl = 1; then :
18349
18350      		use_ed448="yes"
18351
18352else
18353   if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5
18354	      	fi
18355fi
18356
18357      fi
18358      if test $use_ed448 = "yes"; then
18359
18360cat >>confdefs.h <<_ACEOF
18361#define USE_ED448 1
18362_ACEOF
18363
18364      fi
18365      ;;
18366esac
18367
18368# Check whether --enable-event-api was given.
18369if test "${enable_event_api+set}" = set; then :
18370  enableval=$enable_event_api;
18371fi
18372
18373case "$enable_event_api" in
18374    yes)
18375      UNBOUND_EVENT_INSTALL=unbound-event-install
18376
18377      UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
18378
18379      ;;
18380    *)
18381      ;;
18382esac
18383
18384# Check whether --enable-tfo-client was given.
18385if test "${enable_tfo_client+set}" = set; then :
18386  enableval=$enable_tfo_client;
18387fi
18388
18389case "$enable_tfo_client" in
18390	yes)
18391		case `uname` in
18392			Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18393#include <netinet/tcp.h>
18394
18395"
18396if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18397  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18398$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18399else
18400  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18401fi
18402
18403
18404cat >>confdefs.h <<_ACEOF
18405#define USE_MSG_FASTOPEN 1
18406_ACEOF
18407
18408			  ;;
18409			Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18410#include <sys/socket.h>
18411
18412"
18413if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18415$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18416else
18417  as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18418fi
18419
18420
18421cat >>confdefs.h <<_ACEOF
18422#define USE_OSX_MSG_FASTOPEN 1
18423_ACEOF
18424
18425			  ;;
18426		esac
18427	;;
18428	no|*)
18429		;;
18430esac
18431
18432# Check whether --enable-tfo-server was given.
18433if test "${enable_tfo_server+set}" = set; then :
18434  enableval=$enable_tfo_server;
18435fi
18436
18437case "$enable_tfo_server" in
18438	yes)
18439	      ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18440#include <netinet/tcp.h>
18441
18442"
18443if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18444  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18445$as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18446else
18447  as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18448fi
18449
18450
18451cat >>confdefs.h <<_ACEOF
18452#define USE_TCP_FASTOPEN 1
18453_ACEOF
18454
18455		;;
18456	no|*)
18457		;;
18458esac
18459
18460# check for libevent
18461
18462# Check whether --with-libevent was given.
18463if test "${with_libevent+set}" = set; then :
18464  withval=$with_libevent;
18465else
18466   withval="no"
18467fi
18468
18469if test x_$withval = x_yes -o x_$withval != x_no; then
18470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18471$as_echo_n "checking for libevent... " >&6; }
18472        if test x_$withval = x_ -o x_$withval = x_yes; then
18473            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18474        fi
18475        for dir in $withval; do
18476            thedir="$dir"
18477            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18478                found_libevent="yes"
18479				if test "$thedir" != "/usr"; then
18480                    CPPFLAGS="$CPPFLAGS -I$thedir/include"
18481		fi
18482                break;
18483            fi
18484        done
18485        if test x_$found_libevent != x_yes; then
18486		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18487			# libevent source directory
18488            		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18489$as_echo "found in $thedir" >&6; }
18490                	CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18491			BAK_LDFLAGS_SET="1"
18492			BAK_LDFLAGS="$LDFLAGS"
18493			# remove evdns from linking
18494			mkdir build >/dev/null 2>&1
18495			mkdir build/libevent >/dev/null 2>&1
18496			mkdir build/libevent/.libs >/dev/null 2>&1
18497			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18498			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18499			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18500			cp $ev_files_o build/libevent
18501			cp $ev_files_lo build/libevent
18502			cp $ev_files_libso build/libevent/.libs
18503            		LATE_LDFLAGS="build/libevent/*.lo -lm"
18504			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18505		else
18506            		as_fn_error $? "Cannot find the libevent library in $withval
18507You can restart ./configure --with-libevent=no to use a builtin alternative.
18508Please note that this alternative is not as capable as libevent when using
18509large outgoing port ranges.  " "$LINENO" 5
18510		fi
18511        else
18512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18513$as_echo "found in $thedir" >&6; }
18514	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18515		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18516
18517	if test "x$enable_rpath" = xyes; then
18518		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18519			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18520		fi
18521	fi
18522
18523	    else
18524		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
18525			LDFLAGS="$LDFLAGS -L$thedir/lib"
18526
18527	if test "x$enable_rpath" = xyes; then
18528		if echo "$thedir/lib" | grep "^/" >/dev/null; then
18529			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18530		fi
18531	fi
18532
18533		    fi
18534	    fi
18535        fi
18536	# check for library used by libevent after 1.3c
18537	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18538$as_echo_n "checking for library containing clock_gettime... " >&6; }
18539if ${ac_cv_search_clock_gettime+:} false; then :
18540  $as_echo_n "(cached) " >&6
18541else
18542  ac_func_search_save_LIBS=$LIBS
18543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18544/* end confdefs.h.  */
18545
18546/* Override any GCC internal prototype to avoid an error.
18547   Use char because int might match the return type of a GCC
18548   builtin and then its argument prototype would still apply.  */
18549#ifdef __cplusplus
18550extern "C"
18551#endif
18552char clock_gettime ();
18553int
18554main ()
18555{
18556return clock_gettime ();
18557  ;
18558  return 0;
18559}
18560_ACEOF
18561for ac_lib in '' rt; do
18562  if test -z "$ac_lib"; then
18563    ac_res="none required"
18564  else
18565    ac_res=-l$ac_lib
18566    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18567  fi
18568  if ac_fn_c_try_link "$LINENO"; then :
18569  ac_cv_search_clock_gettime=$ac_res
18570fi
18571rm -f core conftest.err conftest.$ac_objext \
18572    conftest$ac_exeext
18573  if ${ac_cv_search_clock_gettime+:} false; then :
18574  break
18575fi
18576done
18577if ${ac_cv_search_clock_gettime+:} false; then :
18578
18579else
18580  ac_cv_search_clock_gettime=no
18581fi
18582rm conftest.$ac_ext
18583LIBS=$ac_func_search_save_LIBS
18584fi
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18586$as_echo "$ac_cv_search_clock_gettime" >&6; }
18587ac_res=$ac_cv_search_clock_gettime
18588if test "$ac_res" != no; then :
18589  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18590
18591fi
18592
18593
18594	# is the event.h header libev or libevent?
18595	for ac_header in event.h
18596do :
18597  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18598"
18599if test "x$ac_cv_header_event_h" = xyes; then :
18600  cat >>confdefs.h <<_ACEOF
18601#define HAVE_EVENT_H 1
18602_ACEOF
18603
18604fi
18605
18606done
18607
18608	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18609#include <event.h>
18610
18611"
18612if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18613
18614		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18615$as_echo_n "checking for library containing event_set... " >&6; }
18616if ${ac_cv_search_event_set+:} false; then :
18617  $as_echo_n "(cached) " >&6
18618else
18619  ac_func_search_save_LIBS=$LIBS
18620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18621/* end confdefs.h.  */
18622
18623/* Override any GCC internal prototype to avoid an error.
18624   Use char because int might match the return type of a GCC
18625   builtin and then its argument prototype would still apply.  */
18626#ifdef __cplusplus
18627extern "C"
18628#endif
18629char event_set ();
18630int
18631main ()
18632{
18633return event_set ();
18634  ;
18635  return 0;
18636}
18637_ACEOF
18638for ac_lib in '' ev; do
18639  if test -z "$ac_lib"; then
18640    ac_res="none required"
18641  else
18642    ac_res=-l$ac_lib
18643    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18644  fi
18645  if ac_fn_c_try_link "$LINENO"; then :
18646  ac_cv_search_event_set=$ac_res
18647fi
18648rm -f core conftest.err conftest.$ac_objext \
18649    conftest$ac_exeext
18650  if ${ac_cv_search_event_set+:} false; then :
18651  break
18652fi
18653done
18654if ${ac_cv_search_event_set+:} false; then :
18655
18656else
18657  ac_cv_search_event_set=no
18658fi
18659rm conftest.$ac_ext
18660LIBS=$ac_func_search_save_LIBS
18661fi
18662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18663$as_echo "$ac_cv_search_event_set" >&6; }
18664ac_res=$ac_cv_search_event_set
18665if test "$ac_res" != no; then :
18666  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18667
18668fi
18669
18670
18671else
18672
18673		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18674$as_echo_n "checking for library containing event_set... " >&6; }
18675if ${ac_cv_search_event_set+:} false; then :
18676  $as_echo_n "(cached) " >&6
18677else
18678  ac_func_search_save_LIBS=$LIBS
18679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18680/* end confdefs.h.  */
18681
18682/* Override any GCC internal prototype to avoid an error.
18683   Use char because int might match the return type of a GCC
18684   builtin and then its argument prototype would still apply.  */
18685#ifdef __cplusplus
18686extern "C"
18687#endif
18688char event_set ();
18689int
18690main ()
18691{
18692return event_set ();
18693  ;
18694  return 0;
18695}
18696_ACEOF
18697for ac_lib in '' event; do
18698  if test -z "$ac_lib"; then
18699    ac_res="none required"
18700  else
18701    ac_res=-l$ac_lib
18702    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18703  fi
18704  if ac_fn_c_try_link "$LINENO"; then :
18705  ac_cv_search_event_set=$ac_res
18706fi
18707rm -f core conftest.err conftest.$ac_objext \
18708    conftest$ac_exeext
18709  if ${ac_cv_search_event_set+:} false; then :
18710  break
18711fi
18712done
18713if ${ac_cv_search_event_set+:} false; then :
18714
18715else
18716  ac_cv_search_event_set=no
18717fi
18718rm conftest.$ac_ext
18719LIBS=$ac_func_search_save_LIBS
18720fi
18721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18722$as_echo "$ac_cv_search_event_set" >&6; }
18723ac_res=$ac_cv_search_event_set
18724if test "$ac_res" != no; then :
18725  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18726
18727fi
18728
18729
18730fi
18731
18732	for ac_func in event_base_free
18733do :
18734  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18735if test "x$ac_cv_func_event_base_free" = xyes; then :
18736  cat >>confdefs.h <<_ACEOF
18737#define HAVE_EVENT_BASE_FREE 1
18738_ACEOF
18739
18740fi
18741done
18742 # only in libevent 1.2 and later
18743	for ac_func in event_base_once
18744do :
18745  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18746if test "x$ac_cv_func_event_base_once" = xyes; then :
18747  cat >>confdefs.h <<_ACEOF
18748#define HAVE_EVENT_BASE_ONCE 1
18749_ACEOF
18750
18751fi
18752done
18753 # only in libevent 1.4.1 and later
18754	for ac_func in event_base_new
18755do :
18756  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18757if test "x$ac_cv_func_event_base_new" = xyes; then :
18758  cat >>confdefs.h <<_ACEOF
18759#define HAVE_EVENT_BASE_NEW 1
18760_ACEOF
18761
18762fi
18763done
18764 # only in libevent 1.4.1 and later
18765	for ac_func in event_base_get_method
18766do :
18767  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18768if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18769  cat >>confdefs.h <<_ACEOF
18770#define HAVE_EVENT_BASE_GET_METHOD 1
18771_ACEOF
18772
18773fi
18774done
18775 # only in libevent 1.4.3 and later
18776	for ac_func in ev_loop
18777do :
18778  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18779if test "x$ac_cv_func_ev_loop" = xyes; then :
18780  cat >>confdefs.h <<_ACEOF
18781#define HAVE_EV_LOOP 1
18782_ACEOF
18783
18784fi
18785done
18786 # only in libev. (tested on 3.51)
18787	for ac_func in ev_default_loop
18788do :
18789  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18790if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18791  cat >>confdefs.h <<_ACEOF
18792#define HAVE_EV_DEFAULT_LOOP 1
18793_ACEOF
18794
18795fi
18796done
18797 # only in libev. (tested on 4.00)
18798        PC_LIBEVENT_DEPENDENCY="libevent"
18799
18800	if test -n "$BAK_LDFLAGS_SET"; then
18801		LDFLAGS="$BAK_LDFLAGS"
18802	fi
18803else
18804
18805$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18806
18807fi
18808
18809# check for libexpat
18810
18811# Check whether --with-libexpat was given.
18812if test "${with_libexpat+set}" = set; then :
18813  withval=$with_libexpat;
18814else
18815   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18816fi
18817
18818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18819$as_echo_n "checking for libexpat... " >&6; }
18820found_libexpat="no"
18821for dir in $withval ; do
18822            if test -f "$dir/include/expat.h"; then
18823		found_libexpat="yes"
18824				if test "$dir" != "/usr"; then
18825                    CPPFLAGS="$CPPFLAGS -I$dir/include"
18826		    LDFLAGS="$LDFLAGS -L$dir/lib"
18827		fi
18828            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18829$as_echo "found in $dir" >&6; }
18830                break;
18831            fi
18832done
18833if test x_$found_libexpat != x_yes; then
18834	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18835fi
18836for ac_header in expat.h
18837do :
18838  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18839"
18840if test "x$ac_cv_header_expat_h" = xyes; then :
18841  cat >>confdefs.h <<_ACEOF
18842#define HAVE_EXPAT_H 1
18843_ACEOF
18844
18845fi
18846
18847done
18848
18849ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18850#include <expat.h>
18851
18852"
18853if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18854  ac_have_decl=1
18855else
18856  ac_have_decl=0
18857fi
18858
18859cat >>confdefs.h <<_ACEOF
18860#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18861_ACEOF
18862
18863
18864# hiredis (redis C client for cachedb)
18865
18866# Check whether --with-libhiredis was given.
18867if test "${with_libhiredis+set}" = set; then :
18868  withval=$with_libhiredis;
18869else
18870   withval="no"
18871fi
18872
18873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5
18874$as_echo_n "checking for libhiredis... " >&6; }
18875found_libhiredis="no"
18876if test x_$withval = x_yes -o x_$withval != x_no; then
18877   if test x_$withval = x_ -o x_$withval = x_yes; then
18878            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18879   fi
18880   for dir in $withval ; do
18881            if test -f "$dir/include/hiredis/hiredis.h"; then
18882		found_libhiredis="yes"
18883				if test "$dir" != "/usr"; then
18884                    CPPFLAGS="$CPPFLAGS -I$dir/include"
18885		    LDFLAGS="$LDFLAGS -L$dir/lib"
18886		fi
18887		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18888$as_echo "found in $dir" >&6; }
18889
18890$as_echo "#define USE_REDIS 1" >>confdefs.h
18891
18892		LIBS="$LIBS -lhiredis"
18893                break;
18894            fi
18895    done
18896    if test x_$found_libhiredis != x_yes; then
18897	as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5
18898    fi
18899    for ac_header in hiredis/hiredis.h
18900do :
18901  ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default
18902"
18903if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then :
18904  cat >>confdefs.h <<_ACEOF
18905#define HAVE_HIREDIS_HIREDIS_H 1
18906_ACEOF
18907
18908fi
18909
18910done
18911
18912    ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default
18913    #include <hiredis/hiredis.h>
18914
18915"
18916if test "x$ac_cv_have_decl_redisConnect" = xyes; then :
18917  ac_have_decl=1
18918else
18919  ac_have_decl=0
18920fi
18921
18922cat >>confdefs.h <<_ACEOF
18923#define HAVE_DECL_REDISCONNECT $ac_have_decl
18924_ACEOF
18925
18926fi
18927
18928# set static linking if requested
18929
18930staticexe=""
18931# Check whether --enable-static-exe was given.
18932if test "${enable_static_exe+set}" = set; then :
18933  enableval=$enable_static_exe;
18934fi
18935
18936if test x_$enable_static_exe = x_yes; then
18937	staticexe="-static"
18938	if test "$on_mingw" = yes; then
18939		staticexe="-all-static"
18940		# for static compile, include gdi32 and zlib here.
18941		if echo $LIBS | grep 'lgdi32' >/dev/null; then
18942			:
18943		else
18944			LIBS="$LIBS -lgdi32"
18945		fi
18946		LIBS="$LIBS -lz"
18947	fi
18948fi
18949
18950# Include systemd.m4 - begin
18951#   macros for configuring systemd
18952#   Copyright 2015, Sami Kerola, CloudFlare.
18953#   BSD licensed.
18954# Check whether --enable-systemd was given.
18955if test "${enable_systemd+set}" = set; then :
18956  enableval=$enable_systemd;
18957else
18958  enable_systemd=no
18959fi
18960
18961have_systemd=no
18962
18963
18964
18965
18966
18967
18968
18969if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18970	if test -n "$ac_tool_prefix"; then
18971  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18972set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18974$as_echo_n "checking for $ac_word... " >&6; }
18975if ${ac_cv_path_PKG_CONFIG+:} false; then :
18976  $as_echo_n "(cached) " >&6
18977else
18978  case $PKG_CONFIG in
18979  [\\/]* | ?:[\\/]*)
18980  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18981  ;;
18982  *)
18983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18984for as_dir in $PATH
18985do
18986  IFS=$as_save_IFS
18987  test -z "$as_dir" && as_dir=.
18988    for ac_exec_ext in '' $ac_executable_extensions; do
18989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18990    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18992    break 2
18993  fi
18994done
18995  done
18996IFS=$as_save_IFS
18997
18998  ;;
18999esac
19000fi
19001PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19002if test -n "$PKG_CONFIG"; then
19003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19004$as_echo "$PKG_CONFIG" >&6; }
19005else
19006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19007$as_echo "no" >&6; }
19008fi
19009
19010
19011fi
19012if test -z "$ac_cv_path_PKG_CONFIG"; then
19013  ac_pt_PKG_CONFIG=$PKG_CONFIG
19014  # Extract the first word of "pkg-config", so it can be a program name with args.
19015set dummy pkg-config; ac_word=$2
19016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19017$as_echo_n "checking for $ac_word... " >&6; }
19018if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19019  $as_echo_n "(cached) " >&6
19020else
19021  case $ac_pt_PKG_CONFIG in
19022  [\\/]* | ?:[\\/]*)
19023  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19024  ;;
19025  *)
19026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19027for as_dir in $PATH
19028do
19029  IFS=$as_save_IFS
19030  test -z "$as_dir" && as_dir=.
19031    for ac_exec_ext in '' $ac_executable_extensions; do
19032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19033    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19035    break 2
19036  fi
19037done
19038  done
19039IFS=$as_save_IFS
19040
19041  ;;
19042esac
19043fi
19044ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19045if test -n "$ac_pt_PKG_CONFIG"; then
19046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19047$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19048else
19049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19050$as_echo "no" >&6; }
19051fi
19052
19053  if test "x$ac_pt_PKG_CONFIG" = x; then
19054    PKG_CONFIG=""
19055  else
19056    case $cross_compiling:$ac_tool_warned in
19057yes:)
19058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19060ac_tool_warned=yes ;;
19061esac
19062    PKG_CONFIG=$ac_pt_PKG_CONFIG
19063  fi
19064else
19065  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19066fi
19067
19068fi
19069if test -n "$PKG_CONFIG"; then
19070	_pkg_min_version=0.9.0
19071	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19072$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19073	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19074		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19075$as_echo "yes" >&6; }
19076	else
19077		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19078$as_echo "no" >&6; }
19079		PKG_CONFIG=""
19080	fi
19081fi
19082if test "x$enable_systemd" != xno; then :
19083
19084
19085
19086pkg_failed=no
19087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
19088$as_echo_n "checking for SYSTEMD... " >&6; }
19089
19090if test -n "$SYSTEMD_CFLAGS"; then
19091    pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
19092 elif test -n "$PKG_CONFIG"; then
19093    if test -n "$PKG_CONFIG" && \
19094    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19095  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19096  ac_status=$?
19097  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19098  test $ac_status = 0; }; then
19099  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
19100		      test "x$?" != "x0" && pkg_failed=yes
19101else
19102  pkg_failed=yes
19103fi
19104 else
19105    pkg_failed=untried
19106fi
19107if test -n "$SYSTEMD_LIBS"; then
19108    pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
19109 elif test -n "$PKG_CONFIG"; then
19110    if test -n "$PKG_CONFIG" && \
19111    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
19112  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
19113  ac_status=$?
19114  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19115  test $ac_status = 0; }; then
19116  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
19117		      test "x$?" != "x0" && pkg_failed=yes
19118else
19119  pkg_failed=yes
19120fi
19121 else
19122    pkg_failed=untried
19123fi
19124
19125
19126
19127if test $pkg_failed = yes; then
19128   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19129$as_echo "no" >&6; }
19130
19131if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19132        _pkg_short_errors_supported=yes
19133else
19134        _pkg_short_errors_supported=no
19135fi
19136        if test $_pkg_short_errors_supported = yes; then
19137	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
19138        else
19139	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
19140        fi
19141	# Put the nasty error message in config.log where it belongs
19142	echo "$SYSTEMD_PKG_ERRORS" >&5
19143
19144	have_systemd=no
19145elif test $pkg_failed = untried; then
19146     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19147$as_echo "no" >&6; }
19148	have_systemd=no
19149else
19150	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
19151	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
19152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19153$as_echo "yes" >&6; }
19154	have_systemd=yes
19155fi
19156		if test "x$have_systemd" != "xyes"; then :
19157
19158
19159pkg_failed=no
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
19161$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
19162
19163if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
19164    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
19165 elif test -n "$PKG_CONFIG"; then
19166    if test -n "$PKG_CONFIG" && \
19167    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19168  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19169  ac_status=$?
19170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19171  test $ac_status = 0; }; then
19172  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
19173		      test "x$?" != "x0" && pkg_failed=yes
19174else
19175  pkg_failed=yes
19176fi
19177 else
19178    pkg_failed=untried
19179fi
19180if test -n "$SYSTEMD_DAEMON_LIBS"; then
19181    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
19182 elif test -n "$PKG_CONFIG"; then
19183    if test -n "$PKG_CONFIG" && \
19184    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
19185  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
19186  ac_status=$?
19187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19188  test $ac_status = 0; }; then
19189  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
19190		      test "x$?" != "x0" && pkg_failed=yes
19191else
19192  pkg_failed=yes
19193fi
19194 else
19195    pkg_failed=untried
19196fi
19197
19198
19199
19200if test $pkg_failed = yes; then
19201   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19202$as_echo "no" >&6; }
19203
19204if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19205        _pkg_short_errors_supported=yes
19206else
19207        _pkg_short_errors_supported=no
19208fi
19209        if test $_pkg_short_errors_supported = yes; then
19210	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19211        else
19212	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
19213        fi
19214	# Put the nasty error message in config.log where it belongs
19215	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
19216
19217	have_systemd_daemon=no
19218elif test $pkg_failed = untried; then
19219     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19220$as_echo "no" >&6; }
19221	have_systemd_daemon=no
19222else
19223	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
19224	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
19225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19226$as_echo "yes" >&6; }
19227	have_systemd_daemon=yes
19228fi
19229		if test "x$have_systemd_daemon" = "xyes"; then :
19230  have_systemd=yes
19231fi
19232
19233fi
19234	case $enable_systemd:$have_systemd in #(
19235  yes:no) :
19236    as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
19237  *:yes) :
19238
19239$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
19240
19241		LIBS="$LIBS $SYSTEMD_LIBS"
19242
19243	 ;; #(
19244  *) :
19245     ;;
19246esac
19247
19248
19249fi
19250 if test "x$have_systemd" = xyes; then
19251  USE_SYSTEMD_TRUE=
19252  USE_SYSTEMD_FALSE='#'
19253else
19254  USE_SYSTEMD_TRUE='#'
19255  USE_SYSTEMD_FALSE=
19256fi
19257
19258
19259# Include systemd.m4 - end
19260
19261# set lock checking if requested
19262# Check whether --enable-lock_checks was given.
19263if test "${enable_lock_checks+set}" = set; then :
19264  enableval=$enable_lock_checks;
19265fi
19266
19267if test x_$enable_lock_checks = x_yes; then
19268
19269$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
19270
19271	CHECKLOCK_OBJ="checklocks.lo"
19272
19273fi
19274
19275
19276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
19277$as_echo_n "checking for getaddrinfo... " >&6; }
19278ac_cv_func_getaddrinfo=no
19279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19280/* end confdefs.h.  */
19281
19282#ifdef __cplusplus
19283extern "C"
19284{
19285#endif
19286char* getaddrinfo();
19287char* (*f) () = getaddrinfo;
19288#ifdef __cplusplus
19289}
19290#endif
19291int main() {
19292        ;
19293        return 0;
19294}
19295
19296_ACEOF
19297if ac_fn_c_try_link "$LINENO"; then :
19298  ac_cv_func_getaddrinfo="yes"
19299if test "$ac_cv_header_windows_h" = "yes"; then
19300
19301$as_echo "#define USE_WINSOCK 1" >>confdefs.h
19302
19303	USE_WINSOCK="1"
19304	if echo $LIBS | grep 'lws2_32' >/dev/null; then
19305		:
19306	else
19307		LIBS="$LIBS -lws2_32"
19308	fi
19309fi
19310
19311else
19312  ORIGLIBS="$LIBS"
19313LIBS="$LIBS -lws2_32"
19314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19315/* end confdefs.h.  */
19316
19317#ifdef HAVE_WS2TCPIP_H
19318#include <ws2tcpip.h>
19319#endif
19320
19321int
19322main ()
19323{
19324
19325        (void)getaddrinfo(NULL, NULL, NULL, NULL);
19326
19327
19328  ;
19329  return 0;
19330}
19331_ACEOF
19332if ac_fn_c_try_link "$LINENO"; then :
19333
19334ac_cv_func_getaddrinfo="yes"
19335
19336$as_echo "#define USE_WINSOCK 1" >>confdefs.h
19337
19338USE_WINSOCK="1"
19339
19340else
19341
19342ac_cv_func_getaddrinfo="no"
19343LIBS="$ORIGLIBS"
19344
19345fi
19346rm -f core conftest.err conftest.$ac_objext \
19347    conftest$ac_exeext conftest.$ac_ext
19348
19349fi
19350rm -f core conftest.err conftest.$ac_objext \
19351    conftest$ac_exeext conftest.$ac_ext
19352
19353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
19354$as_echo "$ac_cv_func_getaddrinfo" >&6; }
19355if test $ac_cv_func_getaddrinfo = yes; then
19356
19357$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
19358
19359fi
19360
19361if test "$USE_WINSOCK" = 1; then
19362
19363$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
19364
19365	for ac_header in iphlpapi.h
19366do :
19367  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
19368#include <windows.h>
19369
19370"
19371if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
19372  cat >>confdefs.h <<_ACEOF
19373#define HAVE_IPHLPAPI_H 1
19374_ACEOF
19375
19376fi
19377
19378done
19379
19380	if test -n "$ac_tool_prefix"; then
19381  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
19382set dummy ${ac_tool_prefix}windres; ac_word=$2
19383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19384$as_echo_n "checking for $ac_word... " >&6; }
19385if ${ac_cv_prog_WINDRES+:} false; then :
19386  $as_echo_n "(cached) " >&6
19387else
19388  if test -n "$WINDRES"; then
19389  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
19390else
19391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19392for as_dir in $PATH
19393do
19394  IFS=$as_save_IFS
19395  test -z "$as_dir" && as_dir=.
19396    for ac_exec_ext in '' $ac_executable_extensions; do
19397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19398    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
19399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19400    break 2
19401  fi
19402done
19403  done
19404IFS=$as_save_IFS
19405
19406fi
19407fi
19408WINDRES=$ac_cv_prog_WINDRES
19409if test -n "$WINDRES"; then
19410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
19411$as_echo "$WINDRES" >&6; }
19412else
19413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19414$as_echo "no" >&6; }
19415fi
19416
19417
19418fi
19419if test -z "$ac_cv_prog_WINDRES"; then
19420  ac_ct_WINDRES=$WINDRES
19421  # Extract the first word of "windres", so it can be a program name with args.
19422set dummy windres; ac_word=$2
19423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19424$as_echo_n "checking for $ac_word... " >&6; }
19425if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
19426  $as_echo_n "(cached) " >&6
19427else
19428  if test -n "$ac_ct_WINDRES"; then
19429  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
19430else
19431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19432for as_dir in $PATH
19433do
19434  IFS=$as_save_IFS
19435  test -z "$as_dir" && as_dir=.
19436    for ac_exec_ext in '' $ac_executable_extensions; do
19437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19438    ac_cv_prog_ac_ct_WINDRES="windres"
19439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19440    break 2
19441  fi
19442done
19443  done
19444IFS=$as_save_IFS
19445
19446fi
19447fi
19448ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
19449if test -n "$ac_ct_WINDRES"; then
19450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
19451$as_echo "$ac_ct_WINDRES" >&6; }
19452else
19453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19454$as_echo "no" >&6; }
19455fi
19456
19457  if test "x$ac_ct_WINDRES" = x; then
19458    WINDRES=""
19459  else
19460    case $cross_compiling:$ac_tool_warned in
19461yes:)
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19464ac_tool_warned=yes ;;
19465esac
19466    WINDRES=$ac_ct_WINDRES
19467  fi
19468else
19469  WINDRES="$ac_cv_prog_WINDRES"
19470fi
19471
19472	LIBS="$LIBS -liphlpapi -lcrypt32"
19473	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19474
19475	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19476
19477	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19478
19479	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19480
19481	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19482
19483	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19484
19485	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19486
19487	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19488
19489fi
19490if test $ac_cv_func_getaddrinfo = no; then
19491	case " $LIBOBJS " in
19492  *" fake-rfc2553.$ac_objext "* ) ;;
19493  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19494 ;;
19495esac
19496
19497fi
19498# check after getaddrinfo for its libraries
19499
19500# check ioctlsocket
19501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19502$as_echo_n "checking for ioctlsocket... " >&6; }
19503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19504/* end confdefs.h.  */
19505
19506#ifdef HAVE_WINSOCK2_H
19507#include <winsock2.h>
19508#endif
19509
19510int
19511main ()
19512{
19513
19514	(void)ioctlsocket(0, 0, NULL);
19515
19516  ;
19517  return 0;
19518}
19519_ACEOF
19520if ac_fn_c_try_link "$LINENO"; then :
19521
19522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19523$as_echo "yes" >&6; }
19524
19525$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19526
19527
19528else
19529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19530$as_echo "no" >&6; }
19531fi
19532rm -f core conftest.err conftest.$ac_objext \
19533    conftest$ac_exeext conftest.$ac_ext
19534
19535
19536# see if daemon(3) exists, and if it is deprecated.
19537for ac_func in daemon
19538do :
19539  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19540if test "x$ac_cv_func_daemon" = xyes; then :
19541  cat >>confdefs.h <<_ACEOF
19542#define HAVE_DAEMON 1
19543_ACEOF
19544
19545fi
19546done
19547
19548if test $ac_cv_func_daemon = yes; then
19549
19550
19551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19552$as_echo_n "checking if daemon is deprecated... " >&6; }
19553cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19554if eval \${cv_cc_deprecated_$cache+:} false; then :
19555  $as_echo_n "(cached) " >&6
19556else
19557
19558echo '
19559#include <stdlib.h>
19560' >conftest.c
19561echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19562if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19563eval "cv_cc_deprecated_$cache=no"
19564else
19565eval "cv_cc_deprecated_$cache=yes"
19566fi
19567rm -f conftest conftest.o conftest.c
19568
19569fi
19570
19571if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19573$as_echo "yes" >&6; }
19574
19575cat >>confdefs.h <<_ACEOF
19576#define DEPRECATED_DAEMON 1
19577_ACEOF
19578
19579:
19580
19581else
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19583$as_echo "no" >&6; }
19584:
19585
19586fi
19587
19588fi
19589
19590ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19591$ac_includes_default
19592#ifdef HAVE_SYS_UN_H
19593#include <sys/un.h>
19594#endif
19595
19596"
19597if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19598
19599cat >>confdefs.h <<_ACEOF
19600#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19601_ACEOF
19602
19603
19604fi
19605
19606ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19607$ac_includes_default
19608#if HAVE_SYS_PARAM_H
19609#include <sys/param.h>
19610#endif
19611
19612#ifdef HAVE_SYS_SOCKET_H
19613#include <sys/socket.h>
19614#endif
19615
19616#ifdef HAVE_SYS_UIO_H
19617#include <sys/uio.h>
19618#endif
19619
19620#ifdef HAVE_NETINET_IN_H
19621#include <netinet/in.h>
19622#endif
19623
19624#ifdef HAVE_NETINET_TCP_H
19625#include <netinet/tcp.h>
19626#endif
19627
19628#ifdef HAVE_ARPA_INET_H
19629#include <arpa/inet.h>
19630#endif
19631
19632#ifdef HAVE_WINSOCK2_H
19633#include <winsock2.h>
19634#endif
19635
19636#ifdef HAVE_WS2TCPIP_H
19637#include <ws2tcpip.h>
19638#endif
19639
19640"
19641if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19642
19643cat >>confdefs.h <<_ACEOF
19644#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19645_ACEOF
19646
19647
19648fi
19649
19650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19651$as_echo_n "checking for library containing setusercontext... " >&6; }
19652if ${ac_cv_search_setusercontext+:} false; then :
19653  $as_echo_n "(cached) " >&6
19654else
19655  ac_func_search_save_LIBS=$LIBS
19656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19657/* end confdefs.h.  */
19658
19659/* Override any GCC internal prototype to avoid an error.
19660   Use char because int might match the return type of a GCC
19661   builtin and then its argument prototype would still apply.  */
19662#ifdef __cplusplus
19663extern "C"
19664#endif
19665char setusercontext ();
19666int
19667main ()
19668{
19669return setusercontext ();
19670  ;
19671  return 0;
19672}
19673_ACEOF
19674for ac_lib in '' util; do
19675  if test -z "$ac_lib"; then
19676    ac_res="none required"
19677  else
19678    ac_res=-l$ac_lib
19679    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19680  fi
19681  if ac_fn_c_try_link "$LINENO"; then :
19682  ac_cv_search_setusercontext=$ac_res
19683fi
19684rm -f core conftest.err conftest.$ac_objext \
19685    conftest$ac_exeext
19686  if ${ac_cv_search_setusercontext+:} false; then :
19687  break
19688fi
19689done
19690if ${ac_cv_search_setusercontext+:} false; then :
19691
19692else
19693  ac_cv_search_setusercontext=no
19694fi
19695rm conftest.$ac_ext
19696LIBS=$ac_func_search_save_LIBS
19697fi
19698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19699$as_echo "$ac_cv_search_setusercontext" >&6; }
19700ac_res=$ac_cv_search_setusercontext
19701if test "$ac_res" != no; then :
19702  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19703
19704fi
19705
19706for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4
19707do :
19708  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19709ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19710if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19711  cat >>confdefs.h <<_ACEOF
19712#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19713_ACEOF
19714
19715fi
19716done
19717
19718for ac_func in setresuid
19719do :
19720  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19721if test "x$ac_cv_func_setresuid" = xyes; then :
19722  cat >>confdefs.h <<_ACEOF
19723#define HAVE_SETRESUID 1
19724_ACEOF
19725
19726else
19727  for ac_func in setreuid
19728do :
19729  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19730if test "x$ac_cv_func_setreuid" = xyes; then :
19731  cat >>confdefs.h <<_ACEOF
19732#define HAVE_SETREUID 1
19733_ACEOF
19734
19735fi
19736done
19737
19738fi
19739done
19740
19741for ac_func in setresgid
19742do :
19743  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19744if test "x$ac_cv_func_setresgid" = xyes; then :
19745  cat >>confdefs.h <<_ACEOF
19746#define HAVE_SETRESGID 1
19747_ACEOF
19748
19749else
19750  for ac_func in setregid
19751do :
19752  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19753if test "x$ac_cv_func_setregid" = xyes; then :
19754  cat >>confdefs.h <<_ACEOF
19755#define HAVE_SETREGID 1
19756_ACEOF
19757
19758fi
19759done
19760
19761fi
19762done
19763
19764
19765# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19766if echo $target_os | grep darwin8 > /dev/null; then
19767
19768$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19769
19770fi
19771ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19772$ac_includes_default
19773#ifdef HAVE_NETINET_IN_H
19774#include <netinet/in.h>
19775#endif
19776
19777#ifdef HAVE_NETINET_TCP_H
19778#include <netinet/tcp.h>
19779#endif
19780
19781#ifdef HAVE_ARPA_INET_H
19782#include <arpa/inet.h>
19783#endif
19784
19785#ifdef HAVE_WINSOCK2_H
19786#include <winsock2.h>
19787#endif
19788
19789#ifdef HAVE_WS2TCPIP_H
19790#include <ws2tcpip.h>
19791#endif
19792
19793"
19794if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19795  ac_have_decl=1
19796else
19797  ac_have_decl=0
19798fi
19799
19800cat >>confdefs.h <<_ACEOF
19801#define HAVE_DECL_INET_PTON $ac_have_decl
19802_ACEOF
19803ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19804$ac_includes_default
19805#ifdef HAVE_NETINET_IN_H
19806#include <netinet/in.h>
19807#endif
19808
19809#ifdef HAVE_NETINET_TCP_H
19810#include <netinet/tcp.h>
19811#endif
19812
19813#ifdef HAVE_ARPA_INET_H
19814#include <arpa/inet.h>
19815#endif
19816
19817#ifdef HAVE_WINSOCK2_H
19818#include <winsock2.h>
19819#endif
19820
19821#ifdef HAVE_WS2TCPIP_H
19822#include <ws2tcpip.h>
19823#endif
19824
19825"
19826if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19827  ac_have_decl=1
19828else
19829  ac_have_decl=0
19830fi
19831
19832cat >>confdefs.h <<_ACEOF
19833#define HAVE_DECL_INET_NTOP $ac_have_decl
19834_ACEOF
19835
19836ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19837if test "x$ac_cv_func_inet_aton" = xyes; then :
19838  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19839
19840else
19841  case " $LIBOBJS " in
19842  *" inet_aton.$ac_objext "* ) ;;
19843  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19844 ;;
19845esac
19846
19847fi
19848
19849
19850ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19851if test "x$ac_cv_func_inet_pton" = xyes; then :
19852  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19853
19854else
19855  case " $LIBOBJS " in
19856  *" inet_pton.$ac_objext "* ) ;;
19857  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19858 ;;
19859esac
19860
19861fi
19862
19863
19864ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19865if test "x$ac_cv_func_inet_ntop" = xyes; then :
19866  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19867
19868else
19869  case " $LIBOBJS " in
19870  *" inet_ntop.$ac_objext "* ) ;;
19871  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19872 ;;
19873esac
19874
19875fi
19876
19877
19878ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19879if test "x$ac_cv_func_snprintf" = xyes; then :
19880  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19881
19882else
19883  case " $LIBOBJS " in
19884  *" snprintf.$ac_objext "* ) ;;
19885  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19886 ;;
19887esac
19888
19889fi
19890
19891
19892# test if snprintf return the proper length
19893if test "x$ac_cv_func_snprintf" = xyes; then
19894    if test c${cross_compiling} = cno; then
19895	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19896$as_echo_n "checking for correct snprintf return value... " >&6; }
19897	if test "$cross_compiling" = yes; then :
19898  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19900as_fn_error $? "cannot run test program while cross compiling
19901See \`config.log' for more details" "$LINENO" 5; }
19902else
19903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19904/* end confdefs.h.  */
19905$ac_includes_default
19906
19907int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19908
19909_ACEOF
19910if ac_fn_c_try_run "$LINENO"; then :
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19912$as_echo "yes" >&6; }
19913else
19914
19915		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19916$as_echo "no" >&6; }
19917
19918$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19919
19920		case " $LIBOBJS " in
19921  *" snprintf.$ac_objext "* ) ;;
19922  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19923 ;;
19924esac
19925
19926
19927fi
19928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19929  conftest.$ac_objext conftest.beam conftest.$ac_ext
19930fi
19931
19932    fi
19933fi
19934ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19935if test "x$ac_cv_func_strlcat" = xyes; then :
19936  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19937
19938else
19939  case " $LIBOBJS " in
19940  *" strlcat.$ac_objext "* ) ;;
19941  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19942 ;;
19943esac
19944
19945fi
19946
19947
19948ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19949if test "x$ac_cv_func_strlcpy" = xyes; then :
19950  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19951
19952else
19953  case " $LIBOBJS " in
19954  *" strlcpy.$ac_objext "* ) ;;
19955  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19956 ;;
19957esac
19958
19959fi
19960
19961
19962ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19963if test "x$ac_cv_func_memmove" = xyes; then :
19964  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19965
19966else
19967  case " $LIBOBJS " in
19968  *" memmove.$ac_objext "* ) ;;
19969  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19970 ;;
19971esac
19972
19973fi
19974
19975
19976ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19977if test "x$ac_cv_func_gmtime_r" = xyes; then :
19978  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19979
19980else
19981  case " $LIBOBJS " in
19982  *" gmtime_r.$ac_objext "* ) ;;
19983  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19984 ;;
19985esac
19986
19987fi
19988
19989
19990ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19991if test "x$ac_cv_func_isblank" = xyes; then :
19992  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19993
19994else
19995  case " $LIBOBJS " in
19996  *" isblank.$ac_objext "* ) ;;
19997  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19998 ;;
19999esac
20000
20001fi
20002
20003
20004LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
20005
20006ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
20007if test "x$ac_cv_func_reallocarray" = xyes; then :
20008  $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
20009
20010else
20011  case " $LIBOBJS " in
20012  *" reallocarray.$ac_objext "* ) ;;
20013  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
20014 ;;
20015esac
20016
20017fi
20018
20019
20020if test "$USE_NSS" = "no"; then
20021	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
20022if test "x$ac_cv_func_arc4random" = xyes; then :
20023  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
20024
20025else
20026  case " $LIBOBJS " in
20027  *" arc4random.$ac_objext "* ) ;;
20028  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
20029 ;;
20030esac
20031
20032fi
20033
20034
20035	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
20036if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
20037  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
20038
20039else
20040  case " $LIBOBJS " in
20041  *" arc4random_uniform.$ac_objext "* ) ;;
20042  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
20043 ;;
20044esac
20045
20046fi
20047
20048
20049	if test "$ac_cv_func_arc4random" = "no"; then
20050		case " $LIBOBJS " in
20051  *" explicit_bzero.$ac_objext "* ) ;;
20052  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
20053 ;;
20054esac
20055
20056		case " $LIBOBJS " in
20057  *" arc4_lock.$ac_objext "* ) ;;
20058  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
20059 ;;
20060esac
20061
20062		for ac_func in getentropy
20063do :
20064  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
20065if test "x$ac_cv_func_getentropy" = xyes; then :
20066  cat >>confdefs.h <<_ACEOF
20067#define HAVE_GETENTROPY 1
20068_ACEOF
20069
20070else
20071
20072		    if test "$USE_WINSOCK" = 1; then
20073			case " $LIBOBJS " in
20074  *" getentropy_win.$ac_objext "* ) ;;
20075  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
20076 ;;
20077esac
20078
20079		    else
20080			case "$host" in
20081			Darwin|*darwin*)
20082				case " $LIBOBJS " in
20083  *" getentropy_osx.$ac_objext "* ) ;;
20084  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
20085 ;;
20086esac
20087
20088			;;
20089			*solaris*|*sunos*|SunOS)
20090				case " $LIBOBJS " in
20091  *" getentropy_solaris.$ac_objext "* ) ;;
20092  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
20093 ;;
20094esac
20095
20096				for ac_header in sys/sha2.h
20097do :
20098  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
20099"
20100if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
20101  cat >>confdefs.h <<_ACEOF
20102#define HAVE_SYS_SHA2_H 1
20103_ACEOF
20104
20105else
20106
20107					for ac_func in SHA512_Update
20108do :
20109  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20110if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20111  cat >>confdefs.h <<_ACEOF
20112#define HAVE_SHA512_UPDATE 1
20113_ACEOF
20114
20115else
20116
20117						case " $LIBOBJS " in
20118  *" sha512.$ac_objext "* ) ;;
20119  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20120 ;;
20121esac
20122
20123
20124fi
20125done
20126
20127
20128fi
20129
20130done
20131
20132				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
20133					# this lib needed for sha2 on solaris
20134					LIBS="$LIBS -lmd"
20135				fi
20136				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20137$as_echo_n "checking for library containing clock_gettime... " >&6; }
20138if ${ac_cv_search_clock_gettime+:} false; then :
20139  $as_echo_n "(cached) " >&6
20140else
20141  ac_func_search_save_LIBS=$LIBS
20142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20143/* end confdefs.h.  */
20144
20145/* Override any GCC internal prototype to avoid an error.
20146   Use char because int might match the return type of a GCC
20147   builtin and then its argument prototype would still apply.  */
20148#ifdef __cplusplus
20149extern "C"
20150#endif
20151char clock_gettime ();
20152int
20153main ()
20154{
20155return clock_gettime ();
20156  ;
20157  return 0;
20158}
20159_ACEOF
20160for ac_lib in '' rt; do
20161  if test -z "$ac_lib"; then
20162    ac_res="none required"
20163  else
20164    ac_res=-l$ac_lib
20165    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20166  fi
20167  if ac_fn_c_try_link "$LINENO"; then :
20168  ac_cv_search_clock_gettime=$ac_res
20169fi
20170rm -f core conftest.err conftest.$ac_objext \
20171    conftest$ac_exeext
20172  if ${ac_cv_search_clock_gettime+:} false; then :
20173  break
20174fi
20175done
20176if ${ac_cv_search_clock_gettime+:} false; then :
20177
20178else
20179  ac_cv_search_clock_gettime=no
20180fi
20181rm conftest.$ac_ext
20182LIBS=$ac_func_search_save_LIBS
20183fi
20184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20185$as_echo "$ac_cv_search_clock_gettime" >&6; }
20186ac_res=$ac_cv_search_clock_gettime
20187if test "$ac_res" != no; then :
20188  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20189
20190fi
20191
20192			;;
20193			*linux*|Linux|*)
20194				case " $LIBOBJS " in
20195  *" getentropy_linux.$ac_objext "* ) ;;
20196  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
20197 ;;
20198esac
20199
20200				for ac_func in SHA512_Update
20201do :
20202  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
20203if test "x$ac_cv_func_SHA512_Update" = xyes; then :
20204  cat >>confdefs.h <<_ACEOF
20205#define HAVE_SHA512_UPDATE 1
20206_ACEOF
20207
20208else
20209
20210
20211$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
20212
20213					case " $LIBOBJS " in
20214  *" sha512.$ac_objext "* ) ;;
20215  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
20216 ;;
20217esac
20218
20219
20220fi
20221done
20222
20223				for ac_header in sys/sysctl.h
20224do :
20225  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
20226"
20227if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
20228  cat >>confdefs.h <<_ACEOF
20229#define HAVE_SYS_SYSCTL_H 1
20230_ACEOF
20231
20232fi
20233
20234done
20235
20236				for ac_func in getauxval
20237do :
20238  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
20239if test "x$ac_cv_func_getauxval" = xyes; then :
20240  cat >>confdefs.h <<_ACEOF
20241#define HAVE_GETAUXVAL 1
20242_ACEOF
20243
20244fi
20245done
20246
20247				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20248$as_echo_n "checking for library containing clock_gettime... " >&6; }
20249if ${ac_cv_search_clock_gettime+:} false; then :
20250  $as_echo_n "(cached) " >&6
20251else
20252  ac_func_search_save_LIBS=$LIBS
20253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20254/* end confdefs.h.  */
20255
20256/* Override any GCC internal prototype to avoid an error.
20257   Use char because int might match the return type of a GCC
20258   builtin and then its argument prototype would still apply.  */
20259#ifdef __cplusplus
20260extern "C"
20261#endif
20262char clock_gettime ();
20263int
20264main ()
20265{
20266return clock_gettime ();
20267  ;
20268  return 0;
20269}
20270_ACEOF
20271for ac_lib in '' rt; do
20272  if test -z "$ac_lib"; then
20273    ac_res="none required"
20274  else
20275    ac_res=-l$ac_lib
20276    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20277  fi
20278  if ac_fn_c_try_link "$LINENO"; then :
20279  ac_cv_search_clock_gettime=$ac_res
20280fi
20281rm -f core conftest.err conftest.$ac_objext \
20282    conftest$ac_exeext
20283  if ${ac_cv_search_clock_gettime+:} false; then :
20284  break
20285fi
20286done
20287if ${ac_cv_search_clock_gettime+:} false; then :
20288
20289else
20290  ac_cv_search_clock_gettime=no
20291fi
20292rm conftest.$ac_ext
20293LIBS=$ac_func_search_save_LIBS
20294fi
20295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20296$as_echo "$ac_cv_search_clock_gettime" >&6; }
20297ac_res=$ac_cv_search_clock_gettime
20298if test "$ac_res" != no; then :
20299  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20300
20301fi
20302
20303			;;
20304			esac
20305		    fi
20306
20307fi
20308done
20309
20310	fi
20311fi
20312LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
20313
20314ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
20315if test "x$ac_cv_func_ctime_r" = xyes; then :
20316  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
20317
20318else
20319  case " $LIBOBJS " in
20320  *" ctime_r.$ac_objext "* ) ;;
20321  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
20322 ;;
20323esac
20324
20325fi
20326
20327
20328ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
20329if test "x$ac_cv_func_strsep" = xyes; then :
20330  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
20331
20332else
20333  case " $LIBOBJS " in
20334  *" strsep.$ac_objext "* ) ;;
20335  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
20336 ;;
20337esac
20338
20339fi
20340
20341
20342
20343# Check whether --enable-allsymbols was given.
20344if test "${enable_allsymbols+set}" = set; then :
20345  enableval=$enable_allsymbols;
20346fi
20347
20348case "$enable_allsymbols" in
20349	yes)
20350	COMMON_OBJ_ALL_SYMBOLS=""
20351	UBSYMS=""
20352	EXTRALINK="-L. -L.libs -lunbound"
20353
20354$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
20355
20356	;;
20357	no|*)
20358	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
20359	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
20360	EXTRALINK=""
20361	;;
20362esac
20363
20364
20365
20366if test x_$enable_lock_checks = x_yes; then
20367	UBSYMS="-export-symbols clubsyms.def"
20368	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
20369	echo lock_protect >> clubsyms.def
20370	echo lock_unprotect >> clubsyms.def
20371	echo lock_get_mem >> clubsyms.def
20372	echo checklock_start >> clubsyms.def
20373	echo checklock_stop >> clubsyms.def
20374	echo checklock_lock >> clubsyms.def
20375	echo checklock_unlock >> clubsyms.def
20376	echo checklock_init >> clubsyms.def
20377	echo checklock_thrcreate >> clubsyms.def
20378	echo checklock_thrjoin >> clubsyms.def
20379fi
20380
20381# check for dnstap if requested
20382
20383  # Check whether --enable-dnstap was given.
20384if test "${enable_dnstap+set}" = set; then :
20385  enableval=$enable_dnstap; opt_dnstap=$enableval
20386else
20387  opt_dnstap=no
20388fi
20389
20390
20391
20392# Check whether --with-dnstap-socket-path was given.
20393if test "${with_dnstap_socket_path+set}" = set; then :
20394  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
20395else
20396  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
20397fi
20398
20399
20400  if test "x$opt_dnstap" != "xno"; then
20401    # Extract the first word of "protoc-c", so it can be a program name with args.
20402set dummy protoc-c; ac_word=$2
20403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20404$as_echo_n "checking for $ac_word... " >&6; }
20405if ${ac_cv_path_PROTOC_C+:} false; then :
20406  $as_echo_n "(cached) " >&6
20407else
20408  case $PROTOC_C in
20409  [\\/]* | ?:[\\/]*)
20410  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
20411  ;;
20412  *)
20413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20414for as_dir in $PATH
20415do
20416  IFS=$as_save_IFS
20417  test -z "$as_dir" && as_dir=.
20418    for ac_exec_ext in '' $ac_executable_extensions; do
20419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20420    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
20421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20422    break 2
20423  fi
20424done
20425  done
20426IFS=$as_save_IFS
20427
20428  ;;
20429esac
20430fi
20431PROTOC_C=$ac_cv_path_PROTOC_C
20432if test -n "$PROTOC_C"; then
20433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
20434$as_echo "$PROTOC_C" >&6; }
20435else
20436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20437$as_echo "no" >&6; }
20438fi
20439
20440
20441    if test -z "$PROTOC_C"; then
20442      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
20443    fi
20444
20445# Check whether --with-protobuf-c was given.
20446if test "${with_protobuf_c+set}" = set; then :
20447  withval=$with_protobuf_c;
20448	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20449	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
20450	    CFLAGS="$CFLAGS -I$withval/include/google"
20451	  else
20452	    CFLAGS="$CFLAGS -I$withval/include"
20453	  fi
20454	  LDFLAGS="$LDFLAGS -L$withval/lib"
20455
20456else
20457
20458	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20459	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20460	    CFLAGS="$CFLAGS -I/usr/include/google"
20461	  else
20462	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20463	      CFLAGS="$CFLAGS -I/usr/local/include/google"
20464	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
20465	    fi
20466	  fi
20467
20468fi
20469
20470
20471# Check whether --with-libfstrm was given.
20472if test "${with_libfstrm+set}" = set; then :
20473  withval=$with_libfstrm;
20474	CFLAGS="$CFLAGS -I$withval/include"
20475	LDFLAGS="$LDFLAGS -L$withval/lib"
20476
20477fi
20478
20479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20480$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20481if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20482  $as_echo_n "(cached) " >&6
20483else
20484  ac_func_search_save_LIBS=$LIBS
20485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20486/* end confdefs.h.  */
20487
20488/* Override any GCC internal prototype to avoid an error.
20489   Use char because int might match the return type of a GCC
20490   builtin and then its argument prototype would still apply.  */
20491#ifdef __cplusplus
20492extern "C"
20493#endif
20494char fstrm_iothr_init ();
20495int
20496main ()
20497{
20498return fstrm_iothr_init ();
20499  ;
20500  return 0;
20501}
20502_ACEOF
20503for ac_lib in '' fstrm; do
20504  if test -z "$ac_lib"; then
20505    ac_res="none required"
20506  else
20507    ac_res=-l$ac_lib
20508    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20509  fi
20510  if ac_fn_c_try_link "$LINENO"; then :
20511  ac_cv_search_fstrm_iothr_init=$ac_res
20512fi
20513rm -f core conftest.err conftest.$ac_objext \
20514    conftest$ac_exeext
20515  if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20516  break
20517fi
20518done
20519if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20520
20521else
20522  ac_cv_search_fstrm_iothr_init=no
20523fi
20524rm conftest.$ac_ext
20525LIBS=$ac_func_search_save_LIBS
20526fi
20527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20528$as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20529ac_res=$ac_cv_search_fstrm_iothr_init
20530if test "$ac_res" != no; then :
20531  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20532
20533else
20534  as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20535fi
20536
20537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20538$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20539if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20540  $as_echo_n "(cached) " >&6
20541else
20542  ac_func_search_save_LIBS=$LIBS
20543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20544/* end confdefs.h.  */
20545
20546/* Override any GCC internal prototype to avoid an error.
20547   Use char because int might match the return type of a GCC
20548   builtin and then its argument prototype would still apply.  */
20549#ifdef __cplusplus
20550extern "C"
20551#endif
20552char protobuf_c_message_pack ();
20553int
20554main ()
20555{
20556return protobuf_c_message_pack ();
20557  ;
20558  return 0;
20559}
20560_ACEOF
20561for ac_lib in '' protobuf-c; do
20562  if test -z "$ac_lib"; then
20563    ac_res="none required"
20564  else
20565    ac_res=-l$ac_lib
20566    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20567  fi
20568  if ac_fn_c_try_link "$LINENO"; then :
20569  ac_cv_search_protobuf_c_message_pack=$ac_res
20570fi
20571rm -f core conftest.err conftest.$ac_objext \
20572    conftest$ac_exeext
20573  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20574  break
20575fi
20576done
20577if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20578
20579else
20580  ac_cv_search_protobuf_c_message_pack=no
20581fi
20582rm conftest.$ac_ext
20583LIBS=$ac_func_search_save_LIBS
20584fi
20585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20586$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20587ac_res=$ac_cv_search_protobuf_c_message_pack
20588if test "$ac_res" != no; then :
20589  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20590
20591else
20592  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20593fi
20594
20595
20596
20597$as_echo "#define USE_DNSTAP 1" >>confdefs.h
20598
20599        ENABLE_DNSTAP=1
20600
20601
20602
20603        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20604
20605
20606cat >>confdefs.h <<_ACEOF
20607#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20608_ACEOF
20609
20610
20611        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20612
20613        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20614
20615
20616  else
20617
20618        ENABLE_DNSTAP=0
20619
20620
20621
20622  fi
20623
20624
20625# check for dnscrypt if requested
20626
20627  # Check whether --enable-dnscrypt was given.
20628if test "${enable_dnscrypt+set}" = set; then :
20629  enableval=$enable_dnscrypt; opt_dnscrypt=$enableval
20630else
20631  opt_dnscrypt=no
20632fi
20633
20634
20635  if test "x$opt_dnscrypt" != "xno"; then
20636
20637# Check whether --with-libsodium was given.
20638if test "${with_libsodium+set}" = set; then :
20639  withval=$with_libsodium;
20640	CFLAGS="$CFLAGS -I$withval/include"
20641	LDFLAGS="$LDFLAGS -L$withval/lib"
20642
20643fi
20644
20645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5
20646$as_echo_n "checking for library containing sodium_init... " >&6; }
20647if ${ac_cv_search_sodium_init+:} false; then :
20648  $as_echo_n "(cached) " >&6
20649else
20650  ac_func_search_save_LIBS=$LIBS
20651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20652/* end confdefs.h.  */
20653
20654/* Override any GCC internal prototype to avoid an error.
20655   Use char because int might match the return type of a GCC
20656   builtin and then its argument prototype would still apply.  */
20657#ifdef __cplusplus
20658extern "C"
20659#endif
20660char sodium_init ();
20661int
20662main ()
20663{
20664return sodium_init ();
20665  ;
20666  return 0;
20667}
20668_ACEOF
20669for ac_lib in '' sodium; do
20670  if test -z "$ac_lib"; then
20671    ac_res="none required"
20672  else
20673    ac_res=-l$ac_lib
20674    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20675  fi
20676  if ac_fn_c_try_link "$LINENO"; then :
20677  ac_cv_search_sodium_init=$ac_res
20678fi
20679rm -f core conftest.err conftest.$ac_objext \
20680    conftest$ac_exeext
20681  if ${ac_cv_search_sodium_init+:} false; then :
20682  break
20683fi
20684done
20685if ${ac_cv_search_sodium_init+:} false; then :
20686
20687else
20688  ac_cv_search_sodium_init=no
20689fi
20690rm conftest.$ac_ext
20691LIBS=$ac_func_search_save_LIBS
20692fi
20693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5
20694$as_echo "$ac_cv_search_sodium_init" >&6; }
20695ac_res=$ac_cv_search_sodium_init
20696if test "$ac_res" != no; then :
20697  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20698
20699else
20700  as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5
20701fi
20702
20703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20704$as_echo_n "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; }
20705if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20706  $as_echo_n "(cached) " >&6
20707else
20708  ac_func_search_save_LIBS=$LIBS
20709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20710/* end confdefs.h.  */
20711
20712/* Override any GCC internal prototype to avoid an error.
20713   Use char because int might match the return type of a GCC
20714   builtin and then its argument prototype would still apply.  */
20715#ifdef __cplusplus
20716extern "C"
20717#endif
20718char crypto_box_curve25519xchacha20poly1305_beforenm ();
20719int
20720main ()
20721{
20722return crypto_box_curve25519xchacha20poly1305_beforenm ();
20723  ;
20724  return 0;
20725}
20726_ACEOF
20727for ac_lib in '' sodium; do
20728  if test -z "$ac_lib"; then
20729    ac_res="none required"
20730  else
20731    ac_res=-l$ac_lib
20732    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20733  fi
20734  if ac_fn_c_try_link "$LINENO"; then :
20735  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res
20736fi
20737rm -f core conftest.err conftest.$ac_objext \
20738    conftest$ac_exeext
20739  if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20740  break
20741fi
20742done
20743if ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+:} false; then :
20744
20745else
20746  ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no
20747fi
20748rm conftest.$ac_ext
20749LIBS=$ac_func_search_save_LIBS
20750fi
20751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5
20752$as_echo "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; }
20753ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm
20754if test "$ac_res" != no; then :
20755  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20756
20757            ENABLE_DNSCRYPT_XCHACHA20=1
20758
20759
20760$as_echo "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h
20761
20762
20763else
20764
20765            ENABLE_DNSCRYPT_XCHACHA20=0
20766
20767
20768fi
20769
20770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5
20771$as_echo_n "checking for library containing sodium_set_misuse_handler... " >&6; }
20772if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20773  $as_echo_n "(cached) " >&6
20774else
20775  ac_func_search_save_LIBS=$LIBS
20776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20777/* end confdefs.h.  */
20778
20779/* Override any GCC internal prototype to avoid an error.
20780   Use char because int might match the return type of a GCC
20781   builtin and then its argument prototype would still apply.  */
20782#ifdef __cplusplus
20783extern "C"
20784#endif
20785char sodium_set_misuse_handler ();
20786int
20787main ()
20788{
20789return sodium_set_misuse_handler ();
20790  ;
20791  return 0;
20792}
20793_ACEOF
20794for ac_lib in '' sodium; do
20795  if test -z "$ac_lib"; then
20796    ac_res="none required"
20797  else
20798    ac_res=-l$ac_lib
20799    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20800  fi
20801  if ac_fn_c_try_link "$LINENO"; then :
20802  ac_cv_search_sodium_set_misuse_handler=$ac_res
20803fi
20804rm -f core conftest.err conftest.$ac_objext \
20805    conftest$ac_exeext
20806  if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20807  break
20808fi
20809done
20810if ${ac_cv_search_sodium_set_misuse_handler+:} false; then :
20811
20812else
20813  ac_cv_search_sodium_set_misuse_handler=no
20814fi
20815rm conftest.$ac_ext
20816LIBS=$ac_func_search_save_LIBS
20817fi
20818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5
20819$as_echo "$ac_cv_search_sodium_set_misuse_handler" >&6; }
20820ac_res=$ac_cv_search_sodium_set_misuse_handler
20821if test "$ac_res" != no; then :
20822  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20823
20824
20825$as_echo "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h
20826
20827
20828fi
20829
20830
20831
20832$as_echo "#define USE_DNSCRYPT 1" >>confdefs.h
20833
20834        ENABLE_DNSCRYPT=1
20835
20836
20837        DNSCRYPT_SRC="dnscrypt/dnscrypt.c"
20838
20839        DNSCRYPT_OBJ="dnscrypt.lo"
20840
20841
20842  else
20843    ENABLE_DNSCRYPT_XCHACHA20=0
20844
20845
20846        ENABLE_DNSCRYPT=0
20847
20848
20849
20850  fi
20851
20852
20853# check for cachedb if requested
20854# Check whether --enable-cachedb was given.
20855if test "${enable_cachedb+set}" = set; then :
20856  enableval=$enable_cachedb;
20857fi
20858
20859# turn on cachedb when hiredis support is enabled.
20860if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi
20861case "$enable_cachedb" in
20862    yes)
20863
20864$as_echo "#define USE_CACHEDB 1" >>confdefs.h
20865
20866    	;;
20867    no|*)
20868    	# nothing
20869    	;;
20870esac
20871
20872# check for ipsecmod if requested
20873# Check whether --enable-ipsecmod was given.
20874if test "${enable_ipsecmod+set}" = set; then :
20875  enableval=$enable_ipsecmod;
20876fi
20877
20878case "$enable_ipsecmod" in
20879	yes)
20880
20881$as_echo "#define USE_IPSECMOD 1" >>confdefs.h
20882
20883		IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo"
20884
20885		IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h'
20886
20887		;;
20888	no|*)
20889		# nothing
20890		;;
20891esac
20892
20893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20894$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20895# on openBSD, the implicit rule make $< work.
20896# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20897# gmake works.
20898cat >conftest.make <<EOF
20899all:	conftest.lo
20900
20901conftest.lo foo.lo bla.lo:
20902	if test -f "\$<"; then touch \$@; fi
20903
20904.SUFFIXES: .lo
20905.c.lo:
20906	if test -f "\$<"; then touch \$@; fi
20907
20908conftest.lo:        conftest.dir/conftest.c
20909EOF
20910mkdir conftest.dir
20911touch conftest.dir/conftest.c
20912rm -f conftest.lo conftest.c
20913${MAKE:-make} -f conftest.make >/dev/null
20914rm -f conftest.make conftest.c conftest.dir/conftest.c
20915rm -rf conftest.dir
20916if test ! -f conftest.lo; then
20917	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20918$as_echo "no" >&6; }
20919	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20920	SOURCEFILE='`cat .source`'
20921else
20922	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20923$as_echo "yes" >&6; }
20924	SOURCEDETERMINE=':'
20925	SOURCEFILE='$<'
20926fi
20927rm -f conftest.lo
20928
20929
20930
20931# see if we want to build the library or everything
20932ALLTARGET="alltargets"
20933INSTALLTARGET="install-all"
20934
20935# Check whether --with-libunbound-only was given.
20936if test "${with_libunbound_only+set}" = set; then :
20937  withval=$with_libunbound_only;
20938	if test "$withval" = "yes"; then
20939		ALLTARGET="lib"
20940		INSTALLTARGET="install-lib"
20941	fi
20942
20943fi
20944
20945if test $ALLTARGET = "alltargets"; then
20946	if test $USE_NSS = "yes"; then
20947		as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5
20948	fi
20949	if test $USE_NETTLE = "yes"; then
20950		as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5
20951	fi
20952fi
20953
20954
20955
20956
20957
20958  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20959$as_echo "$as_me: Stripping extension flags..." >&6;}
20960
20961  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20962    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20963
20964$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20965
20966  fi
20967
20968
20969  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20970    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20971
20972$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20973
20974  fi
20975
20976
20977  if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20978    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20979
20980$as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20981
20982  fi
20983
20984
20985  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20986    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20987
20988$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20989
20990  fi
20991
20992
20993  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20994    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20995
20996$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20997
20998  fi
20999
21000
21001  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
21002    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
21003
21004$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
21005
21006  fi
21007
21008
21009  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
21010    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
21011
21012$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
21013
21014  fi
21015
21016
21017  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
21018    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
21019
21020$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
21021
21022  fi
21023
21024
21025  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
21026    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
21027
21028$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
21029
21030  fi
21031
21032
21033if test -n "$LATE_LDFLAGS"; then
21034  LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
21035fi
21036# remove start spaces
21037LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
21038LIBS=`echo "$LIBS"|sed -e 's/^ *//'`
21039
21040
21041cat >>confdefs.h <<_ACEOF
21042#define MAXSYSLOGMSGLEN 10240
21043_ACEOF
21044
21045
21046
21047
21048version=1.7.3
21049
21050date=`date +'%b %e, %Y'`
21051
21052
21053ac_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"
21054
21055ac_config_headers="$ac_config_headers config.h"
21056
21057cat >confcache <<\_ACEOF
21058# This file is a shell script that caches the results of configure
21059# tests run on this system so they can be shared between configure
21060# scripts and configure runs, see configure's option --config-cache.
21061# It is not useful on other systems.  If it contains results you don't
21062# want to keep, you may remove or edit it.
21063#
21064# config.status only pays attention to the cache file if you give it
21065# the --recheck option to rerun configure.
21066#
21067# `ac_cv_env_foo' variables (set or unset) will be overridden when
21068# loading this file, other *unset* `ac_cv_foo' will be assigned the
21069# following values.
21070
21071_ACEOF
21072
21073# The following way of writing the cache mishandles newlines in values,
21074# but we know of no workaround that is simple, portable, and efficient.
21075# So, we kill variables containing newlines.
21076# Ultrix sh set writes to stderr and can't be redirected directly,
21077# and sets the high bit in the cache file unless we assign to the vars.
21078(
21079  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21080    eval ac_val=\$$ac_var
21081    case $ac_val in #(
21082    *${as_nl}*)
21083      case $ac_var in #(
21084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21086      esac
21087      case $ac_var in #(
21088      _ | IFS | as_nl) ;; #(
21089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21090      *) { eval $ac_var=; unset $ac_var;} ;;
21091      esac ;;
21092    esac
21093  done
21094
21095  (set) 2>&1 |
21096    case $as_nl`(ac_space=' '; set) 2>&1` in #(
21097    *${as_nl}ac_space=\ *)
21098      # `set' does not quote correctly, so add quotes: double-quote
21099      # substitution turns \\\\ into \\, and sed turns \\ into \.
21100      sed -n \
21101	"s/'/'\\\\''/g;
21102	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21103      ;; #(
21104    *)
21105      # `set' quotes correctly as required by POSIX, so do not add quotes.
21106      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21107      ;;
21108    esac |
21109    sort
21110) |
21111  sed '
21112     /^ac_cv_env_/b end
21113     t clear
21114     :clear
21115     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21116     t end
21117     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21118     :end' >>confcache
21119if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21120  if test -w "$cache_file"; then
21121    if test "x$cache_file" != "x/dev/null"; then
21122      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21123$as_echo "$as_me: updating cache $cache_file" >&6;}
21124      if test ! -f "$cache_file" || test -h "$cache_file"; then
21125	cat confcache >"$cache_file"
21126      else
21127        case $cache_file in #(
21128        */* | ?:*)
21129	  mv -f confcache "$cache_file"$$ &&
21130	  mv -f "$cache_file"$$ "$cache_file" ;; #(
21131        *)
21132	  mv -f confcache "$cache_file" ;;
21133	esac
21134      fi
21135    fi
21136  else
21137    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21138$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21139  fi
21140fi
21141rm -f confcache
21142
21143test "x$prefix" = xNONE && prefix=$ac_default_prefix
21144# Let make expand exec_prefix.
21145test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21146
21147DEFS=-DHAVE_CONFIG_H
21148
21149ac_libobjs=
21150ac_ltlibobjs=
21151U=
21152for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21153  # 1. Remove the extension, and $U if already installed.
21154  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21155  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21156  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21157  #    will be set to the directory where LIBOBJS objects are built.
21158  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21159  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21160done
21161LIBOBJS=$ac_libobjs
21162
21163LTLIBOBJS=$ac_ltlibobjs
21164
21165
21166if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
21167  as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
21168Usually this means the macro was only invoked conditionally." "$LINENO" 5
21169fi
21170
21171: "${CONFIG_STATUS=./config.status}"
21172ac_write_fail=0
21173ac_clean_files_save=$ac_clean_files
21174ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21175{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21176$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21177as_write_fail=0
21178cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21179#! $SHELL
21180# Generated by $as_me.
21181# Run this file to recreate the current configuration.
21182# Compiler output produced by configure, useful for debugging
21183# configure, is in config.log if it exists.
21184
21185debug=false
21186ac_cs_recheck=false
21187ac_cs_silent=false
21188
21189SHELL=\${CONFIG_SHELL-$SHELL}
21190export SHELL
21191_ASEOF
21192cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21193## -------------------- ##
21194## M4sh Initialization. ##
21195## -------------------- ##
21196
21197# Be more Bourne compatible
21198DUALCASE=1; export DUALCASE # for MKS sh
21199if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21200  emulate sh
21201  NULLCMD=:
21202  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21203  # is contrary to our usage.  Disable this feature.
21204  alias -g '${1+"$@"}'='"$@"'
21205  setopt NO_GLOB_SUBST
21206else
21207  case `(set -o) 2>/dev/null` in #(
21208  *posix*) :
21209    set -o posix ;; #(
21210  *) :
21211     ;;
21212esac
21213fi
21214
21215
21216as_nl='
21217'
21218export as_nl
21219# Printing a long string crashes Solaris 7 /usr/bin/printf.
21220as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21221as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21222as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21223# Prefer a ksh shell builtin over an external printf program on Solaris,
21224# but without wasting forks for bash or zsh.
21225if test -z "$BASH_VERSION$ZSH_VERSION" \
21226    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21227  as_echo='print -r --'
21228  as_echo_n='print -rn --'
21229elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21230  as_echo='printf %s\n'
21231  as_echo_n='printf %s'
21232else
21233  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21234    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21235    as_echo_n='/usr/ucb/echo -n'
21236  else
21237    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21238    as_echo_n_body='eval
21239      arg=$1;
21240      case $arg in #(
21241      *"$as_nl"*)
21242	expr "X$arg" : "X\\(.*\\)$as_nl";
21243	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21244      esac;
21245      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21246    '
21247    export as_echo_n_body
21248    as_echo_n='sh -c $as_echo_n_body as_echo'
21249  fi
21250  export as_echo_body
21251  as_echo='sh -c $as_echo_body as_echo'
21252fi
21253
21254# The user is always right.
21255if test "${PATH_SEPARATOR+set}" != set; then
21256  PATH_SEPARATOR=:
21257  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21258    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21259      PATH_SEPARATOR=';'
21260  }
21261fi
21262
21263
21264# IFS
21265# We need space, tab and new line, in precisely that order.  Quoting is
21266# there to prevent editors from complaining about space-tab.
21267# (If _AS_PATH_WALK were called with IFS unset, it would disable word
21268# splitting by setting IFS to empty value.)
21269IFS=" ""	$as_nl"
21270
21271# Find who we are.  Look in the path if we contain no directory separator.
21272as_myself=
21273case $0 in #((
21274  *[\\/]* ) as_myself=$0 ;;
21275  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21276for as_dir in $PATH
21277do
21278  IFS=$as_save_IFS
21279  test -z "$as_dir" && as_dir=.
21280    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21281  done
21282IFS=$as_save_IFS
21283
21284     ;;
21285esac
21286# We did not find ourselves, most probably we were run as `sh COMMAND'
21287# in which case we are not to be found in the path.
21288if test "x$as_myself" = x; then
21289  as_myself=$0
21290fi
21291if test ! -f "$as_myself"; then
21292  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21293  exit 1
21294fi
21295
21296# Unset variables that we do not need and which cause bugs (e.g. in
21297# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21298# suppresses any "Segmentation fault" message there.  '((' could
21299# trigger a bug in pdksh 5.2.14.
21300for as_var in BASH_ENV ENV MAIL MAILPATH
21301do eval test x\${$as_var+set} = xset \
21302  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21303done
21304PS1='$ '
21305PS2='> '
21306PS4='+ '
21307
21308# NLS nuisances.
21309LC_ALL=C
21310export LC_ALL
21311LANGUAGE=C
21312export LANGUAGE
21313
21314# CDPATH.
21315(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21316
21317
21318# as_fn_error STATUS ERROR [LINENO LOG_FD]
21319# ----------------------------------------
21320# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21321# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21322# script with STATUS, using 1 if that was 0.
21323as_fn_error ()
21324{
21325  as_status=$1; test $as_status -eq 0 && as_status=1
21326  if test "$4"; then
21327    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21328    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21329  fi
21330  $as_echo "$as_me: error: $2" >&2
21331  as_fn_exit $as_status
21332} # as_fn_error
21333
21334
21335# as_fn_set_status STATUS
21336# -----------------------
21337# Set $? to STATUS, without forking.
21338as_fn_set_status ()
21339{
21340  return $1
21341} # as_fn_set_status
21342
21343# as_fn_exit STATUS
21344# -----------------
21345# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21346as_fn_exit ()
21347{
21348  set +e
21349  as_fn_set_status $1
21350  exit $1
21351} # as_fn_exit
21352
21353# as_fn_unset VAR
21354# ---------------
21355# Portably unset VAR.
21356as_fn_unset ()
21357{
21358  { eval $1=; unset $1;}
21359}
21360as_unset=as_fn_unset
21361# as_fn_append VAR VALUE
21362# ----------------------
21363# Append the text in VALUE to the end of the definition contained in VAR. Take
21364# advantage of any shell optimizations that allow amortized linear growth over
21365# repeated appends, instead of the typical quadratic growth present in naive
21366# implementations.
21367if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21368  eval 'as_fn_append ()
21369  {
21370    eval $1+=\$2
21371  }'
21372else
21373  as_fn_append ()
21374  {
21375    eval $1=\$$1\$2
21376  }
21377fi # as_fn_append
21378
21379# as_fn_arith ARG...
21380# ------------------
21381# Perform arithmetic evaluation on the ARGs, and store the result in the
21382# global $as_val. Take advantage of shells that can avoid forks. The arguments
21383# must be portable across $(()) and expr.
21384if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21385  eval 'as_fn_arith ()
21386  {
21387    as_val=$(( $* ))
21388  }'
21389else
21390  as_fn_arith ()
21391  {
21392    as_val=`expr "$@" || test $? -eq 1`
21393  }
21394fi # as_fn_arith
21395
21396
21397if expr a : '\(a\)' >/dev/null 2>&1 &&
21398   test "X`expr 00001 : '.*\(...\)'`" = X001; then
21399  as_expr=expr
21400else
21401  as_expr=false
21402fi
21403
21404if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21405  as_basename=basename
21406else
21407  as_basename=false
21408fi
21409
21410if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21411  as_dirname=dirname
21412else
21413  as_dirname=false
21414fi
21415
21416as_me=`$as_basename -- "$0" ||
21417$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21418	 X"$0" : 'X\(//\)$' \| \
21419	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21420$as_echo X/"$0" |
21421    sed '/^.*\/\([^/][^/]*\)\/*$/{
21422	    s//\1/
21423	    q
21424	  }
21425	  /^X\/\(\/\/\)$/{
21426	    s//\1/
21427	    q
21428	  }
21429	  /^X\/\(\/\).*/{
21430	    s//\1/
21431	    q
21432	  }
21433	  s/.*/./; q'`
21434
21435# Avoid depending upon Character Ranges.
21436as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21437as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21438as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21439as_cr_digits='0123456789'
21440as_cr_alnum=$as_cr_Letters$as_cr_digits
21441
21442ECHO_C= ECHO_N= ECHO_T=
21443case `echo -n x` in #(((((
21444-n*)
21445  case `echo 'xy\c'` in
21446  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
21447  xy)  ECHO_C='\c';;
21448  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21449       ECHO_T='	';;
21450  esac;;
21451*)
21452  ECHO_N='-n';;
21453esac
21454
21455rm -f conf$$ conf$$.exe conf$$.file
21456if test -d conf$$.dir; then
21457  rm -f conf$$.dir/conf$$.file
21458else
21459  rm -f conf$$.dir
21460  mkdir conf$$.dir 2>/dev/null
21461fi
21462if (echo >conf$$.file) 2>/dev/null; then
21463  if ln -s conf$$.file conf$$ 2>/dev/null; then
21464    as_ln_s='ln -s'
21465    # ... but there are two gotchas:
21466    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21467    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21468    # In both cases, we have to default to `cp -pR'.
21469    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21470      as_ln_s='cp -pR'
21471  elif ln conf$$.file conf$$ 2>/dev/null; then
21472    as_ln_s=ln
21473  else
21474    as_ln_s='cp -pR'
21475  fi
21476else
21477  as_ln_s='cp -pR'
21478fi
21479rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21480rmdir conf$$.dir 2>/dev/null
21481
21482
21483# as_fn_mkdir_p
21484# -------------
21485# Create "$as_dir" as a directory, including parents if necessary.
21486as_fn_mkdir_p ()
21487{
21488
21489  case $as_dir in #(
21490  -*) as_dir=./$as_dir;;
21491  esac
21492  test -d "$as_dir" || eval $as_mkdir_p || {
21493    as_dirs=
21494    while :; do
21495      case $as_dir in #(
21496      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21497      *) as_qdir=$as_dir;;
21498      esac
21499      as_dirs="'$as_qdir' $as_dirs"
21500      as_dir=`$as_dirname -- "$as_dir" ||
21501$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21502	 X"$as_dir" : 'X\(//\)[^/]' \| \
21503	 X"$as_dir" : 'X\(//\)$' \| \
21504	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21505$as_echo X"$as_dir" |
21506    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21507	    s//\1/
21508	    q
21509	  }
21510	  /^X\(\/\/\)[^/].*/{
21511	    s//\1/
21512	    q
21513	  }
21514	  /^X\(\/\/\)$/{
21515	    s//\1/
21516	    q
21517	  }
21518	  /^X\(\/\).*/{
21519	    s//\1/
21520	    q
21521	  }
21522	  s/.*/./; q'`
21523      test -d "$as_dir" && break
21524    done
21525    test -z "$as_dirs" || eval "mkdir $as_dirs"
21526  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21527
21528
21529} # as_fn_mkdir_p
21530if mkdir -p . 2>/dev/null; then
21531  as_mkdir_p='mkdir -p "$as_dir"'
21532else
21533  test -d ./-p && rmdir ./-p
21534  as_mkdir_p=false
21535fi
21536
21537
21538# as_fn_executable_p FILE
21539# -----------------------
21540# Test if FILE is an executable regular file.
21541as_fn_executable_p ()
21542{
21543  test -f "$1" && test -x "$1"
21544} # as_fn_executable_p
21545as_test_x='test -x'
21546as_executable_p=as_fn_executable_p
21547
21548# Sed expression to map a string onto a valid CPP name.
21549as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21550
21551# Sed expression to map a string onto a valid variable name.
21552as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21553
21554
21555exec 6>&1
21556## ----------------------------------- ##
21557## Main body of $CONFIG_STATUS script. ##
21558## ----------------------------------- ##
21559_ASEOF
21560test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21561
21562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21563# Save the log message, to keep $0 and so on meaningful, and to
21564# report actual input values of CONFIG_FILES etc. instead of their
21565# values after options handling.
21566ac_log="
21567This file was extended by unbound $as_me 1.7.3, which was
21568generated by GNU Autoconf 2.69.  Invocation command line was
21569
21570  CONFIG_FILES    = $CONFIG_FILES
21571  CONFIG_HEADERS  = $CONFIG_HEADERS
21572  CONFIG_LINKS    = $CONFIG_LINKS
21573  CONFIG_COMMANDS = $CONFIG_COMMANDS
21574  $ $0 $@
21575
21576on `(hostname || uname -n) 2>/dev/null | sed 1q`
21577"
21578
21579_ACEOF
21580
21581case $ac_config_files in *"
21582"*) set x $ac_config_files; shift; ac_config_files=$*;;
21583esac
21584
21585case $ac_config_headers in *"
21586"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21587esac
21588
21589
21590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21591# Files that config.status was made for.
21592config_files="$ac_config_files"
21593config_headers="$ac_config_headers"
21594config_commands="$ac_config_commands"
21595
21596_ACEOF
21597
21598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21599ac_cs_usage="\
21600\`$as_me' instantiates files and other configuration actions
21601from templates according to the current configuration.  Unless the files
21602and actions are specified as TAGs, all are instantiated by default.
21603
21604Usage: $0 [OPTION]... [TAG]...
21605
21606  -h, --help       print this help, then exit
21607  -V, --version    print version number and configuration settings, then exit
21608      --config     print configuration, then exit
21609  -q, --quiet, --silent
21610                   do not print progress messages
21611  -d, --debug      don't remove temporary files
21612      --recheck    update $as_me by reconfiguring in the same conditions
21613      --file=FILE[:TEMPLATE]
21614                   instantiate the configuration file FILE
21615      --header=FILE[:TEMPLATE]
21616                   instantiate the configuration header FILE
21617
21618Configuration files:
21619$config_files
21620
21621Configuration headers:
21622$config_headers
21623
21624Configuration commands:
21625$config_commands
21626
21627Report bugs to <unbound-bugs@nlnetlabs.nl>."
21628
21629_ACEOF
21630cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21631ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21632ac_cs_version="\\
21633unbound config.status 1.7.3
21634configured by $0, generated by GNU Autoconf 2.69,
21635  with options \\"\$ac_cs_config\\"
21636
21637Copyright (C) 2012 Free Software Foundation, Inc.
21638This config.status script is free software; the Free Software Foundation
21639gives unlimited permission to copy, distribute and modify it."
21640
21641ac_pwd='$ac_pwd'
21642srcdir='$srcdir'
21643AWK='$AWK'
21644test -n "\$AWK" || AWK=awk
21645_ACEOF
21646
21647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21648# The default lists apply if the user does not specify any file.
21649ac_need_defaults=:
21650while test $# != 0
21651do
21652  case $1 in
21653  --*=?*)
21654    ac_option=`expr "X$1" : 'X\([^=]*\)='`
21655    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21656    ac_shift=:
21657    ;;
21658  --*=)
21659    ac_option=`expr "X$1" : 'X\([^=]*\)='`
21660    ac_optarg=
21661    ac_shift=:
21662    ;;
21663  *)
21664    ac_option=$1
21665    ac_optarg=$2
21666    ac_shift=shift
21667    ;;
21668  esac
21669
21670  case $ac_option in
21671  # Handling of the options.
21672  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21673    ac_cs_recheck=: ;;
21674  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21675    $as_echo "$ac_cs_version"; exit ;;
21676  --config | --confi | --conf | --con | --co | --c )
21677    $as_echo "$ac_cs_config"; exit ;;
21678  --debug | --debu | --deb | --de | --d | -d )
21679    debug=: ;;
21680  --file | --fil | --fi | --f )
21681    $ac_shift
21682    case $ac_optarg in
21683    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21684    '') as_fn_error $? "missing file argument" ;;
21685    esac
21686    as_fn_append CONFIG_FILES " '$ac_optarg'"
21687    ac_need_defaults=false;;
21688  --header | --heade | --head | --hea )
21689    $ac_shift
21690    case $ac_optarg in
21691    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21692    esac
21693    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21694    ac_need_defaults=false;;
21695  --he | --h)
21696    # Conflict between --help and --header
21697    as_fn_error $? "ambiguous option: \`$1'
21698Try \`$0 --help' for more information.";;
21699  --help | --hel | -h )
21700    $as_echo "$ac_cs_usage"; exit ;;
21701  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21702  | -silent | --silent | --silen | --sile | --sil | --si | --s)
21703    ac_cs_silent=: ;;
21704
21705  # This is an error.
21706  -*) as_fn_error $? "unrecognized option: \`$1'
21707Try \`$0 --help' for more information." ;;
21708
21709  *) as_fn_append ac_config_targets " $1"
21710     ac_need_defaults=false ;;
21711
21712  esac
21713  shift
21714done
21715
21716ac_configure_extra_args=
21717
21718if $ac_cs_silent; then
21719  exec 6>/dev/null
21720  ac_configure_extra_args="$ac_configure_extra_args --silent"
21721fi
21722
21723_ACEOF
21724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21725if \$ac_cs_recheck; then
21726  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21727  shift
21728  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21729  CONFIG_SHELL='$SHELL'
21730  export CONFIG_SHELL
21731  exec "\$@"
21732fi
21733
21734_ACEOF
21735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21736exec 5>>config.log
21737{
21738  echo
21739  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21740## Running $as_me. ##
21741_ASBOX
21742  $as_echo "$ac_log"
21743} >&5
21744
21745_ACEOF
21746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21747#
21748# INIT-COMMANDS
21749#
21750
21751
21752# The HP-UX ksh and POSIX shell print the target directory to stdout
21753# if CDPATH is set.
21754(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21755
21756sed_quote_subst='$sed_quote_subst'
21757double_quote_subst='$double_quote_subst'
21758delay_variable_subst='$delay_variable_subst'
21759macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21760macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21761enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21762enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21763pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21764enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21765shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21766SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21767ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21768PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21769host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21770host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21771host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21772build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21773build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21774build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21775SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21776Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21777GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21778EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21779FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21780LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21781NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21782LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21783max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21784ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21785exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21786lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21787lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21788lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21789lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21790lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21791reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21792reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21793OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21794deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21795file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21796file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21797want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21798DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21799sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21800AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21801AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21802archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21803STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21804RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21805old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21806old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21807old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21808lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21809CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21810CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21811compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21812GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21813lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21814lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21815lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21816lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21817lt_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"`'
21818lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21819nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21820lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21821lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21822objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21823MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21824lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21825lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21826lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21827lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21828lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21829need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21830MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21831DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21832NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21833LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21834OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21835OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21836libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21837shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21838extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21839archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21840enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21841export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21842whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21843compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21844old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21845old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21846archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21847archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21848module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21849module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21850with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21851allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21852no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21853hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21854hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21855hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21856hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21857hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21858hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21859hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21860inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21861link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21862always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21863export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21864exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21865include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21866prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21867postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21868file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21869variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21870need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21871need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21872version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21873runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21874shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21875shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21876libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21877library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21878soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21879install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21880postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21881postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21882finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21883finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21884hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21885sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21886configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21887configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21888hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21889enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21890enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21891enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21892old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21893striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21894
21895LTCC='$LTCC'
21896LTCFLAGS='$LTCFLAGS'
21897compiler='$compiler_DEFAULT'
21898
21899# A function that is used when there is no print builtin or printf.
21900func_fallback_echo ()
21901{
21902  eval 'cat <<_LTECHO_EOF
21903\$1
21904_LTECHO_EOF'
21905}
21906
21907# Quote evaled strings.
21908for var in SHELL \
21909ECHO \
21910PATH_SEPARATOR \
21911SED \
21912GREP \
21913EGREP \
21914FGREP \
21915LD \
21916NM \
21917LN_S \
21918lt_SP2NL \
21919lt_NL2SP \
21920reload_flag \
21921OBJDUMP \
21922deplibs_check_method \
21923file_magic_cmd \
21924file_magic_glob \
21925want_nocaseglob \
21926DLLTOOL \
21927sharedlib_from_linklib_cmd \
21928AR \
21929AR_FLAGS \
21930archiver_list_spec \
21931STRIP \
21932RANLIB \
21933CC \
21934CFLAGS \
21935compiler \
21936lt_cv_sys_global_symbol_pipe \
21937lt_cv_sys_global_symbol_to_cdecl \
21938lt_cv_sys_global_symbol_to_import \
21939lt_cv_sys_global_symbol_to_c_name_address \
21940lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21941lt_cv_nm_interface \
21942nm_file_list_spec \
21943lt_cv_truncate_bin \
21944lt_prog_compiler_no_builtin_flag \
21945lt_prog_compiler_pic \
21946lt_prog_compiler_wl \
21947lt_prog_compiler_static \
21948lt_cv_prog_compiler_c_o \
21949need_locks \
21950MANIFEST_TOOL \
21951DSYMUTIL \
21952NMEDIT \
21953LIPO \
21954OTOOL \
21955OTOOL64 \
21956shrext_cmds \
21957export_dynamic_flag_spec \
21958whole_archive_flag_spec \
21959compiler_needs_object \
21960with_gnu_ld \
21961allow_undefined_flag \
21962no_undefined_flag \
21963hardcode_libdir_flag_spec \
21964hardcode_libdir_separator \
21965exclude_expsyms \
21966include_expsyms \
21967file_list_spec \
21968variables_saved_for_relink \
21969libname_spec \
21970library_names_spec \
21971soname_spec \
21972install_override_mode \
21973finish_eval \
21974old_striplib \
21975striplib; do
21976    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21977    *[\\\\\\\`\\"\\\$]*)
21978      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21979      ;;
21980    *)
21981      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21982      ;;
21983    esac
21984done
21985
21986# Double-quote double-evaled strings.
21987for var in reload_cmds \
21988old_postinstall_cmds \
21989old_postuninstall_cmds \
21990old_archive_cmds \
21991extract_expsyms_cmds \
21992old_archive_from_new_cmds \
21993old_archive_from_expsyms_cmds \
21994archive_cmds \
21995archive_expsym_cmds \
21996module_cmds \
21997module_expsym_cmds \
21998export_symbols_cmds \
21999prelink_cmds \
22000postlink_cmds \
22001postinstall_cmds \
22002postuninstall_cmds \
22003finish_cmds \
22004sys_lib_search_path_spec \
22005configure_time_dlsearch_path \
22006configure_time_lt_sys_library_path; do
22007    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
22008    *[\\\\\\\`\\"\\\$]*)
22009      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
22010      ;;
22011    *)
22012      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
22013      ;;
22014    esac
22015done
22016
22017ac_aux_dir='$ac_aux_dir'
22018
22019# See if we are running on zsh, and set the options that allow our
22020# commands through without removal of \ escapes INIT.
22021if test -n "\${ZSH_VERSION+set}"; then
22022   setopt NO_GLOB_SUBST
22023fi
22024
22025
22026    PACKAGE='$PACKAGE'
22027    VERSION='$VERSION'
22028    RM='$RM'
22029    ofile='$ofile'
22030
22031
22032
22033
22034_ACEOF
22035
22036cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22037
22038# Handling of arguments.
22039for ac_config_target in $ac_config_targets
22040do
22041  case $ac_config_target in
22042    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22043    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
22044    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22045    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
22046    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
22047    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
22048    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
22049    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
22050    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
22051    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
22052    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
22053    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
22054    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
22055    "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;;
22056    "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
22057    "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
22058    "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
22059    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22060
22061  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
22062  esac
22063done
22064
22065
22066# If the user did not use the arguments to specify the items to instantiate,
22067# then the envvar interface is used.  Set only those that are not.
22068# We use the long form for the default assignment because of an extremely
22069# bizarre bug on SunOS 4.1.3.
22070if $ac_need_defaults; then
22071  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22072  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22073  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22074fi
22075
22076# Have a temporary directory for convenience.  Make it in the build tree
22077# simply because there is no reason against having it here, and in addition,
22078# creating and moving files from /tmp can sometimes cause problems.
22079# Hook for its removal unless debugging.
22080# Note that there is a small window in which the directory will not be cleaned:
22081# after its creation but before its name has been assigned to `$tmp'.
22082$debug ||
22083{
22084  tmp= ac_tmp=
22085  trap 'exit_status=$?
22086  : "${ac_tmp:=$tmp}"
22087  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
22088' 0
22089  trap 'as_fn_exit 1' 1 2 13 15
22090}
22091# Create a (secure) tmp directory for tmp files.
22092
22093{
22094  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22095  test -d "$tmp"
22096}  ||
22097{
22098  tmp=./conf$$-$RANDOM
22099  (umask 077 && mkdir "$tmp")
22100} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22101ac_tmp=$tmp
22102
22103# Set up the scripts for CONFIG_FILES section.
22104# No need to generate them if there are no CONFIG_FILES.
22105# This happens for instance with `./config.status config.h'.
22106if test -n "$CONFIG_FILES"; then
22107
22108
22109ac_cr=`echo X | tr X '\015'`
22110# On cygwin, bash can eat \r inside `` if the user requested igncr.
22111# But we know of no other shell where ac_cr would be empty at this
22112# point, so we can use a bashism as a fallback.
22113if test "x$ac_cr" = x; then
22114  eval ac_cr=\$\'\\r\'
22115fi
22116ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22117if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22118  ac_cs_awk_cr='\\r'
22119else
22120  ac_cs_awk_cr=$ac_cr
22121fi
22122
22123echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
22124_ACEOF
22125
22126
22127{
22128  echo "cat >conf$$subs.awk <<_ACEOF" &&
22129  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22130  echo "_ACEOF"
22131} >conf$$subs.sh ||
22132  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22133ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22134ac_delim='%!_!# '
22135for ac_last_try in false false false false false :; do
22136  . ./conf$$subs.sh ||
22137    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22138
22139  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22140  if test $ac_delim_n = $ac_delim_num; then
22141    break
22142  elif $ac_last_try; then
22143    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22144  else
22145    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22146  fi
22147done
22148rm -f conf$$subs.sh
22149
22150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22151cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22152_ACEOF
22153sed -n '
22154h
22155s/^/S["/; s/!.*/"]=/
22156p
22157g
22158s/^[^!]*!//
22159:repl
22160t repl
22161s/'"$ac_delim"'$//
22162t delim
22163:nl
22164h
22165s/\(.\{148\}\)..*/\1/
22166t more1
22167s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22168p
22169n
22170b repl
22171:more1
22172s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22173p
22174g
22175s/.\{148\}//
22176t nl
22177:delim
22178h
22179s/\(.\{148\}\)..*/\1/
22180t more2
22181s/["\\]/\\&/g; s/^/"/; s/$/"/
22182p
22183b
22184:more2
22185s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22186p
22187g
22188s/.\{148\}//
22189t delim
22190' <conf$$subs.awk | sed '
22191/^[^""]/{
22192  N
22193  s/\n//
22194}
22195' >>$CONFIG_STATUS || ac_write_fail=1
22196rm -f conf$$subs.awk
22197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22198_ACAWK
22199cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22200  for (key in S) S_is_set[key] = 1
22201  FS = ""
22202
22203}
22204{
22205  line = $ 0
22206  nfields = split(line, field, "@")
22207  substed = 0
22208  len = length(field[1])
22209  for (i = 2; i < nfields; i++) {
22210    key = field[i]
22211    keylen = length(key)
22212    if (S_is_set[key]) {
22213      value = S[key]
22214      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22215      len += length(value) + length(field[++i])
22216      substed = 1
22217    } else
22218      len += 1 + keylen
22219  }
22220
22221  print line
22222}
22223
22224_ACAWK
22225_ACEOF
22226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22227if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22228  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22229else
22230  cat
22231fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22232  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22233_ACEOF
22234
22235# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22236# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22237# trailing colons and then remove the whole line if VPATH becomes empty
22238# (actually we leave an empty line to preserve line numbers).
22239if test "x$srcdir" = x.; then
22240  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
22241h
22242s///
22243s/^/:/
22244s/[	 ]*$/:/
22245s/:\$(srcdir):/:/g
22246s/:\${srcdir}:/:/g
22247s/:@srcdir@:/:/g
22248s/^:*//
22249s/:*$//
22250x
22251s/\(=[	 ]*\).*/\1/
22252G
22253s/\n//
22254s/^[^=]*=[	 ]*$//
22255}'
22256fi
22257
22258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22259fi # test -n "$CONFIG_FILES"
22260
22261# Set up the scripts for CONFIG_HEADERS section.
22262# No need to generate them if there are no CONFIG_HEADERS.
22263# This happens for instance with `./config.status Makefile'.
22264if test -n "$CONFIG_HEADERS"; then
22265cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22266BEGIN {
22267_ACEOF
22268
22269# Transform confdefs.h into an awk script `defines.awk', embedded as
22270# here-document in config.status, that substitutes the proper values into
22271# config.h.in to produce config.h.
22272
22273# Create a delimiter string that does not exist in confdefs.h, to ease
22274# handling of long lines.
22275ac_delim='%!_!# '
22276for ac_last_try in false false :; do
22277  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22278  if test -z "$ac_tt"; then
22279    break
22280  elif $ac_last_try; then
22281    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22282  else
22283    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22284  fi
22285done
22286
22287# For the awk script, D is an array of macro values keyed by name,
22288# likewise P contains macro parameters if any.  Preserve backslash
22289# newline sequences.
22290
22291ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22292sed -n '
22293s/.\{148\}/&'"$ac_delim"'/g
22294t rset
22295:rset
22296s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
22297t def
22298d
22299:def
22300s/\\$//
22301t bsnl
22302s/["\\]/\\&/g
22303s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
22304D["\1"]=" \3"/p
22305s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
22306d
22307:bsnl
22308s/["\\]/\\&/g
22309s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
22310D["\1"]=" \3\\\\\\n"\\/p
22311t cont
22312s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22313t cont
22314d
22315:cont
22316n
22317s/.\{148\}/&'"$ac_delim"'/g
22318t clear
22319:clear
22320s/\\$//
22321t bsnlc
22322s/["\\]/\\&/g; s/^/"/; s/$/"/p
22323d
22324:bsnlc
22325s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22326b cont
22327' <confdefs.h | sed '
22328s/'"$ac_delim"'/"\\\
22329"/g' >>$CONFIG_STATUS || ac_write_fail=1
22330
22331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22332  for (key in D) D_is_set[key] = 1
22333  FS = ""
22334}
22335/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22336  line = \$ 0
22337  split(line, arg, " ")
22338  if (arg[1] == "#") {
22339    defundef = arg[2]
22340    mac1 = arg[3]
22341  } else {
22342    defundef = substr(arg[1], 2)
22343    mac1 = arg[2]
22344  }
22345  split(mac1, mac2, "(") #)
22346  macro = mac2[1]
22347  prefix = substr(line, 1, index(line, defundef) - 1)
22348  if (D_is_set[macro]) {
22349    # Preserve the white space surrounding the "#".
22350    print prefix "define", macro P[macro] D[macro]
22351    next
22352  } else {
22353    # Replace #undef with comments.  This is necessary, for example,
22354    # in the case of _POSIX_SOURCE, which is predefined and required
22355    # on some systems where configure will not decide to define it.
22356    if (defundef == "undef") {
22357      print "/*", prefix defundef, macro, "*/"
22358      next
22359    }
22360  }
22361}
22362{ print }
22363_ACAWK
22364_ACEOF
22365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22366  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22367fi # test -n "$CONFIG_HEADERS"
22368
22369
22370eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
22371shift
22372for ac_tag
22373do
22374  case $ac_tag in
22375  :[FHLC]) ac_mode=$ac_tag; continue;;
22376  esac
22377  case $ac_mode$ac_tag in
22378  :[FHL]*:*);;
22379  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22380  :[FH]-) ac_tag=-:-;;
22381  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22382  esac
22383  ac_save_IFS=$IFS
22384  IFS=:
22385  set x $ac_tag
22386  IFS=$ac_save_IFS
22387  shift
22388  ac_file=$1
22389  shift
22390
22391  case $ac_mode in
22392  :L) ac_source=$1;;
22393  :[FH])
22394    ac_file_inputs=
22395    for ac_f
22396    do
22397      case $ac_f in
22398      -) ac_f="$ac_tmp/stdin";;
22399      *) # Look for the file first in the build tree, then in the source tree
22400	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
22401	 # because $ac_f cannot contain `:'.
22402	 test -f "$ac_f" ||
22403	   case $ac_f in
22404	   [\\/$]*) false;;
22405	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22406	   esac ||
22407	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22408      esac
22409      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22410      as_fn_append ac_file_inputs " '$ac_f'"
22411    done
22412
22413    # Let's still pretend it is `configure' which instantiates (i.e., don't
22414    # use $as_me), people would be surprised to read:
22415    #    /* config.h.  Generated by config.status.  */
22416    configure_input='Generated from '`
22417	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22418	`' by configure.'
22419    if test x"$ac_file" != x-; then
22420      configure_input="$ac_file.  $configure_input"
22421      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22422$as_echo "$as_me: creating $ac_file" >&6;}
22423    fi
22424    # Neutralize special characters interpreted by sed in replacement strings.
22425    case $configure_input in #(
22426    *\&* | *\|* | *\\* )
22427       ac_sed_conf_input=`$as_echo "$configure_input" |
22428       sed 's/[\\\\&|]/\\\\&/g'`;; #(
22429    *) ac_sed_conf_input=$configure_input;;
22430    esac
22431
22432    case $ac_tag in
22433    *:-:* | *:-) cat >"$ac_tmp/stdin" \
22434      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22435    esac
22436    ;;
22437  esac
22438
22439  ac_dir=`$as_dirname -- "$ac_file" ||
22440$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22441	 X"$ac_file" : 'X\(//\)[^/]' \| \
22442	 X"$ac_file" : 'X\(//\)$' \| \
22443	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22444$as_echo X"$ac_file" |
22445    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22446	    s//\1/
22447	    q
22448	  }
22449	  /^X\(\/\/\)[^/].*/{
22450	    s//\1/
22451	    q
22452	  }
22453	  /^X\(\/\/\)$/{
22454	    s//\1/
22455	    q
22456	  }
22457	  /^X\(\/\).*/{
22458	    s//\1/
22459	    q
22460	  }
22461	  s/.*/./; q'`
22462  as_dir="$ac_dir"; as_fn_mkdir_p
22463  ac_builddir=.
22464
22465case "$ac_dir" in
22466.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22467*)
22468  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22469  # A ".." for each directory in $ac_dir_suffix.
22470  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22471  case $ac_top_builddir_sub in
22472  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22473  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22474  esac ;;
22475esac
22476ac_abs_top_builddir=$ac_pwd
22477ac_abs_builddir=$ac_pwd$ac_dir_suffix
22478# for backward compatibility:
22479ac_top_builddir=$ac_top_build_prefix
22480
22481case $srcdir in
22482  .)  # We are building in place.
22483    ac_srcdir=.
22484    ac_top_srcdir=$ac_top_builddir_sub
22485    ac_abs_top_srcdir=$ac_pwd ;;
22486  [\\/]* | ?:[\\/]* )  # Absolute name.
22487    ac_srcdir=$srcdir$ac_dir_suffix;
22488    ac_top_srcdir=$srcdir
22489    ac_abs_top_srcdir=$srcdir ;;
22490  *) # Relative name.
22491    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22492    ac_top_srcdir=$ac_top_build_prefix$srcdir
22493    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22494esac
22495ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22496
22497
22498  case $ac_mode in
22499  :F)
22500  #
22501  # CONFIG_FILE
22502  #
22503
22504_ACEOF
22505
22506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22507# If the template does not know about datarootdir, expand it.
22508# FIXME: This hack should be removed a few years after 2.60.
22509ac_datarootdir_hack=; ac_datarootdir_seen=
22510ac_sed_dataroot='
22511/datarootdir/ {
22512  p
22513  q
22514}
22515/@datadir@/p
22516/@docdir@/p
22517/@infodir@/p
22518/@localedir@/p
22519/@mandir@/p'
22520case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22521*datarootdir*) ac_datarootdir_seen=yes;;
22522*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22523  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22524$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22525_ACEOF
22526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22527  ac_datarootdir_hack='
22528  s&@datadir@&$datadir&g
22529  s&@docdir@&$docdir&g
22530  s&@infodir@&$infodir&g
22531  s&@localedir@&$localedir&g
22532  s&@mandir@&$mandir&g
22533  s&\\\${datarootdir}&$datarootdir&g' ;;
22534esac
22535_ACEOF
22536
22537# Neutralize VPATH when `$srcdir' = `.'.
22538# Shell code in configure.ac might set extrasub.
22539# FIXME: do we really want to maintain this feature?
22540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22541ac_sed_extra="$ac_vpsub
22542$extrasub
22543_ACEOF
22544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22545:t
22546/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22547s|@configure_input@|$ac_sed_conf_input|;t t
22548s&@top_builddir@&$ac_top_builddir_sub&;t t
22549s&@top_build_prefix@&$ac_top_build_prefix&;t t
22550s&@srcdir@&$ac_srcdir&;t t
22551s&@abs_srcdir@&$ac_abs_srcdir&;t t
22552s&@top_srcdir@&$ac_top_srcdir&;t t
22553s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22554s&@builddir@&$ac_builddir&;t t
22555s&@abs_builddir@&$ac_abs_builddir&;t t
22556s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22557$ac_datarootdir_hack
22558"
22559eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22560  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22561
22562test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22563  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22564  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
22565      "$ac_tmp/out"`; test -z "$ac_out"; } &&
22566  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22567which seems to be undefined.  Please make sure it is defined" >&5
22568$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22569which seems to be undefined.  Please make sure it is defined" >&2;}
22570
22571  rm -f "$ac_tmp/stdin"
22572  case $ac_file in
22573  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22574  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22575  esac \
22576  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22577 ;;
22578  :H)
22579  #
22580  # CONFIG_HEADER
22581  #
22582  if test x"$ac_file" != x-; then
22583    {
22584      $as_echo "/* $configure_input  */" \
22585      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22586    } >"$ac_tmp/config.h" \
22587      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22588    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22589      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22590$as_echo "$as_me: $ac_file is unchanged" >&6;}
22591    else
22592      rm -f "$ac_file"
22593      mv "$ac_tmp/config.h" "$ac_file" \
22594	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
22595    fi
22596  else
22597    $as_echo "/* $configure_input  */" \
22598      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22599      || as_fn_error $? "could not create -" "$LINENO" 5
22600  fi
22601 ;;
22602
22603  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22604$as_echo "$as_me: executing $ac_file commands" >&6;}
22605 ;;
22606  esac
22607
22608
22609  case $ac_file$ac_mode in
22610    "libtool":C)
22611
22612    # See if we are running on zsh, and set the options that allow our
22613    # commands through without removal of \ escapes.
22614    if test -n "${ZSH_VERSION+set}"; then
22615      setopt NO_GLOB_SUBST
22616    fi
22617
22618    cfgfile=${ofile}T
22619    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
22620    $RM "$cfgfile"
22621
22622    cat <<_LT_EOF >> "$cfgfile"
22623#! $SHELL
22624# Generated automatically by $as_me ($PACKAGE) $VERSION
22625# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22626# NOTE: Changes made to this file will be lost: look at ltmain.sh.
22627
22628# Provide generalized library-building support services.
22629# Written by Gordon Matzigkeit, 1996
22630
22631# Copyright (C) 2014 Free Software Foundation, Inc.
22632# This is free software; see the source for copying conditions.  There is NO
22633# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22634
22635# GNU Libtool is free software; you can redistribute it and/or modify
22636# it under the terms of the GNU General Public License as published by
22637# the Free Software Foundation; either version 2 of of the License, or
22638# (at your option) any later version.
22639#
22640# As a special exception to the GNU General Public License, if you
22641# distribute this file as part of a program or library that is built
22642# using GNU Libtool, you may include this file under the  same
22643# distribution terms that you use for the rest of that program.
22644#
22645# GNU Libtool is distributed in the hope that it will be useful, but
22646# WITHOUT ANY WARRANTY; without even the implied warranty of
22647# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22648# GNU General Public License for more details.
22649#
22650# You should have received a copy of the GNU General Public License
22651# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22652
22653
22654# The names of the tagged configurations supported by this script.
22655available_tags=''
22656
22657# Configured defaults for sys_lib_dlsearch_path munging.
22658: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22659
22660# ### BEGIN LIBTOOL CONFIG
22661
22662# Which release of libtool.m4 was used?
22663macro_version=$macro_version
22664macro_revision=$macro_revision
22665
22666# Whether or not to build shared libraries.
22667build_libtool_libs=$enable_shared
22668
22669# Whether or not to build static libraries.
22670build_old_libs=$enable_static
22671
22672# What type of objects to build.
22673pic_mode=$pic_mode
22674
22675# Whether or not to optimize for fast installation.
22676fast_install=$enable_fast_install
22677
22678# Shared archive member basename,for filename based shared library versioning on AIX.
22679shared_archive_member_spec=$shared_archive_member_spec
22680
22681# Shell to use when invoking shell scripts.
22682SHELL=$lt_SHELL
22683
22684# An echo program that protects backslashes.
22685ECHO=$lt_ECHO
22686
22687# The PATH separator for the build system.
22688PATH_SEPARATOR=$lt_PATH_SEPARATOR
22689
22690# The host system.
22691host_alias=$host_alias
22692host=$host
22693host_os=$host_os
22694
22695# The build system.
22696build_alias=$build_alias
22697build=$build
22698build_os=$build_os
22699
22700# A sed program that does not truncate output.
22701SED=$lt_SED
22702
22703# Sed that helps us avoid accidentally triggering echo(1) options like -n.
22704Xsed="\$SED -e 1s/^X//"
22705
22706# A grep program that handles long lines.
22707GREP=$lt_GREP
22708
22709# An ERE matcher.
22710EGREP=$lt_EGREP
22711
22712# A literal string matcher.
22713FGREP=$lt_FGREP
22714
22715# A BSD- or MS-compatible name lister.
22716NM=$lt_NM
22717
22718# Whether we need soft or hard links.
22719LN_S=$lt_LN_S
22720
22721# What is the maximum length of a command?
22722max_cmd_len=$max_cmd_len
22723
22724# Object file suffix (normally "o").
22725objext=$ac_objext
22726
22727# Executable file suffix (normally "").
22728exeext=$exeext
22729
22730# whether the shell understands "unset".
22731lt_unset=$lt_unset
22732
22733# turn spaces into newlines.
22734SP2NL=$lt_lt_SP2NL
22735
22736# turn newlines into spaces.
22737NL2SP=$lt_lt_NL2SP
22738
22739# convert \$build file names to \$host format.
22740to_host_file_cmd=$lt_cv_to_host_file_cmd
22741
22742# convert \$build files to toolchain format.
22743to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22744
22745# An object symbol dumper.
22746OBJDUMP=$lt_OBJDUMP
22747
22748# Method to check whether dependent libraries are shared objects.
22749deplibs_check_method=$lt_deplibs_check_method
22750
22751# Command to use when deplibs_check_method = "file_magic".
22752file_magic_cmd=$lt_file_magic_cmd
22753
22754# How to find potential files when deplibs_check_method = "file_magic".
22755file_magic_glob=$lt_file_magic_glob
22756
22757# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22758want_nocaseglob=$lt_want_nocaseglob
22759
22760# DLL creation program.
22761DLLTOOL=$lt_DLLTOOL
22762
22763# Command to associate shared and link libraries.
22764sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22765
22766# The archiver.
22767AR=$lt_AR
22768
22769# Flags to create an archive.
22770AR_FLAGS=$lt_AR_FLAGS
22771
22772# How to feed a file listing to the archiver.
22773archiver_list_spec=$lt_archiver_list_spec
22774
22775# A symbol stripping program.
22776STRIP=$lt_STRIP
22777
22778# Commands used to install an old-style archive.
22779RANLIB=$lt_RANLIB
22780old_postinstall_cmds=$lt_old_postinstall_cmds
22781old_postuninstall_cmds=$lt_old_postuninstall_cmds
22782
22783# Whether to use a lock for old archive extraction.
22784lock_old_archive_extraction=$lock_old_archive_extraction
22785
22786# A C compiler.
22787LTCC=$lt_CC
22788
22789# LTCC compiler flags.
22790LTCFLAGS=$lt_CFLAGS
22791
22792# Take the output of nm and produce a listing of raw symbols and C names.
22793global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22794
22795# Transform the output of nm in a proper C declaration.
22796global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22797
22798# Transform the output of nm into a list of symbols to manually relocate.
22799global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22800
22801# Transform the output of nm in a C name address pair.
22802global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22803
22804# Transform the output of nm in a C name address pair when lib prefix is needed.
22805global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22806
22807# The name lister interface.
22808nm_interface=$lt_lt_cv_nm_interface
22809
22810# Specify filename containing input files for \$NM.
22811nm_file_list_spec=$lt_nm_file_list_spec
22812
22813# The root where to search for dependent libraries,and where our libraries should be installed.
22814lt_sysroot=$lt_sysroot
22815
22816# Command to truncate a binary pipe.
22817lt_truncate_bin=$lt_lt_cv_truncate_bin
22818
22819# The name of the directory that contains temporary libtool files.
22820objdir=$objdir
22821
22822# Used to examine libraries when file_magic_cmd begins with "file".
22823MAGIC_CMD=$MAGIC_CMD
22824
22825# Must we lock files when doing compilation?
22826need_locks=$lt_need_locks
22827
22828# Manifest tool.
22829MANIFEST_TOOL=$lt_MANIFEST_TOOL
22830
22831# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22832DSYMUTIL=$lt_DSYMUTIL
22833
22834# Tool to change global to local symbols on Mac OS X.
22835NMEDIT=$lt_NMEDIT
22836
22837# Tool to manipulate fat objects and archives on Mac OS X.
22838LIPO=$lt_LIPO
22839
22840# ldd/readelf like tool for Mach-O binaries on Mac OS X.
22841OTOOL=$lt_OTOOL
22842
22843# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22844OTOOL64=$lt_OTOOL64
22845
22846# Old archive suffix (normally "a").
22847libext=$libext
22848
22849# Shared library suffix (normally ".so").
22850shrext_cmds=$lt_shrext_cmds
22851
22852# The commands to extract the exported symbol list from a shared archive.
22853extract_expsyms_cmds=$lt_extract_expsyms_cmds
22854
22855# Variables whose values should be saved in libtool wrapper scripts and
22856# restored at link time.
22857variables_saved_for_relink=$lt_variables_saved_for_relink
22858
22859# Do we need the "lib" prefix for modules?
22860need_lib_prefix=$need_lib_prefix
22861
22862# Do we need a version for libraries?
22863need_version=$need_version
22864
22865# Library versioning type.
22866version_type=$version_type
22867
22868# Shared library runtime path variable.
22869runpath_var=$runpath_var
22870
22871# Shared library path variable.
22872shlibpath_var=$shlibpath_var
22873
22874# Is shlibpath searched before the hard-coded library search path?
22875shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22876
22877# Format of library name prefix.
22878libname_spec=$lt_libname_spec
22879
22880# List of archive names.  First name is the real one, the rest are links.
22881# The last name is the one that the linker finds with -lNAME
22882library_names_spec=$lt_library_names_spec
22883
22884# The coded name of the library, if different from the real name.
22885soname_spec=$lt_soname_spec
22886
22887# Permission mode override for installation of shared libraries.
22888install_override_mode=$lt_install_override_mode
22889
22890# Command to use after installation of a shared archive.
22891postinstall_cmds=$lt_postinstall_cmds
22892
22893# Command to use after uninstallation of a shared archive.
22894postuninstall_cmds=$lt_postuninstall_cmds
22895
22896# Commands used to finish a libtool library installation in a directory.
22897finish_cmds=$lt_finish_cmds
22898
22899# As "finish_cmds", except a single script fragment to be evaled but
22900# not shown.
22901finish_eval=$lt_finish_eval
22902
22903# Whether we should hardcode library paths into libraries.
22904hardcode_into_libs=$hardcode_into_libs
22905
22906# Compile-time system search path for libraries.
22907sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22908
22909# Detected run-time system search path for libraries.
22910sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22911
22912# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22913configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22914
22915# Whether dlopen is supported.
22916dlopen_support=$enable_dlopen
22917
22918# Whether dlopen of programs is supported.
22919dlopen_self=$enable_dlopen_self
22920
22921# Whether dlopen of statically linked programs is supported.
22922dlopen_self_static=$enable_dlopen_self_static
22923
22924# Commands to strip libraries.
22925old_striplib=$lt_old_striplib
22926striplib=$lt_striplib
22927
22928
22929# The linker used to build libraries.
22930LD=$lt_LD
22931
22932# How to create reloadable object files.
22933reload_flag=$lt_reload_flag
22934reload_cmds=$lt_reload_cmds
22935
22936# Commands used to build an old-style archive.
22937old_archive_cmds=$lt_old_archive_cmds
22938
22939# A language specific compiler.
22940CC=$lt_compiler
22941
22942# Is the compiler the GNU compiler?
22943with_gcc=$GCC
22944
22945# Compiler flag to turn off builtin functions.
22946no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22947
22948# Additional compiler flags for building library objects.
22949pic_flag=$lt_lt_prog_compiler_pic
22950
22951# How to pass a linker flag through the compiler.
22952wl=$lt_lt_prog_compiler_wl
22953
22954# Compiler flag to prevent dynamic linking.
22955link_static_flag=$lt_lt_prog_compiler_static
22956
22957# Does compiler simultaneously support -c and -o options?
22958compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22959
22960# Whether or not to add -lc for building shared libraries.
22961build_libtool_need_lc=$archive_cmds_need_lc
22962
22963# Whether or not to disallow shared libs when runtime libs are static.
22964allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22965
22966# Compiler flag to allow reflexive dlopens.
22967export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22968
22969# Compiler flag to generate shared objects directly from archives.
22970whole_archive_flag_spec=$lt_whole_archive_flag_spec
22971
22972# Whether the compiler copes with passing no objects directly.
22973compiler_needs_object=$lt_compiler_needs_object
22974
22975# Create an old-style archive from a shared archive.
22976old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22977
22978# Create a temporary old-style archive to link instead of a shared archive.
22979old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22980
22981# Commands used to build a shared archive.
22982archive_cmds=$lt_archive_cmds
22983archive_expsym_cmds=$lt_archive_expsym_cmds
22984
22985# Commands used to build a loadable module if different from building
22986# a shared archive.
22987module_cmds=$lt_module_cmds
22988module_expsym_cmds=$lt_module_expsym_cmds
22989
22990# Whether we are building with GNU ld or not.
22991with_gnu_ld=$lt_with_gnu_ld
22992
22993# Flag that allows shared libraries with undefined symbols to be built.
22994allow_undefined_flag=$lt_allow_undefined_flag
22995
22996# Flag that enforces no undefined symbols.
22997no_undefined_flag=$lt_no_undefined_flag
22998
22999# Flag to hardcode \$libdir into a binary during linking.
23000# This must work even if \$libdir does not exist
23001hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
23002
23003# Whether we need a single "-rpath" flag with a separated argument.
23004hardcode_libdir_separator=$lt_hardcode_libdir_separator
23005
23006# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23007# DIR into the resulting binary.
23008hardcode_direct=$hardcode_direct
23009
23010# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
23011# DIR into the resulting binary and the resulting library dependency is
23012# "absolute",i.e impossible to change by setting \$shlibpath_var if the
23013# library is relocated.
23014hardcode_direct_absolute=$hardcode_direct_absolute
23015
23016# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
23017# into the resulting binary.
23018hardcode_minus_L=$hardcode_minus_L
23019
23020# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
23021# into the resulting binary.
23022hardcode_shlibpath_var=$hardcode_shlibpath_var
23023
23024# Set to "yes" if building a shared library automatically hardcodes DIR
23025# into the library and all subsequent libraries and executables linked
23026# against it.
23027hardcode_automatic=$hardcode_automatic
23028
23029# Set to yes if linker adds runtime paths of dependent libraries
23030# to runtime path list.
23031inherit_rpath=$inherit_rpath
23032
23033# Whether libtool must link a program against all its dependency libraries.
23034link_all_deplibs=$link_all_deplibs
23035
23036# Set to "yes" if exported symbols are required.
23037always_export_symbols=$always_export_symbols
23038
23039# The commands to list exported symbols.
23040export_symbols_cmds=$lt_export_symbols_cmds
23041
23042# Symbols that should not be listed in the preloaded symbols.
23043exclude_expsyms=$lt_exclude_expsyms
23044
23045# Symbols that must always be exported.
23046include_expsyms=$lt_include_expsyms
23047
23048# Commands necessary for linking programs (against libraries) with templates.
23049prelink_cmds=$lt_prelink_cmds
23050
23051# Commands necessary for finishing linking programs.
23052postlink_cmds=$lt_postlink_cmds
23053
23054# Specify filename containing input files.
23055file_list_spec=$lt_file_list_spec
23056
23057# How to hardcode a shared library path into an executable.
23058hardcode_action=$hardcode_action
23059
23060# ### END LIBTOOL CONFIG
23061
23062_LT_EOF
23063
23064    cat <<'_LT_EOF' >> "$cfgfile"
23065
23066# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
23067
23068# func_munge_path_list VARIABLE PATH
23069# -----------------------------------
23070# VARIABLE is name of variable containing _space_ separated list of
23071# directories to be munged by the contents of PATH, which is string
23072# having a format:
23073# "DIR[:DIR]:"
23074#       string "DIR[ DIR]" will be prepended to VARIABLE
23075# ":DIR[:DIR]"
23076#       string "DIR[ DIR]" will be appended to VARIABLE
23077# "DIRP[:DIRP]::[DIRA:]DIRA"
23078#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
23079#       "DIRA[ DIRA]" will be appended to VARIABLE
23080# "DIR[:DIR]"
23081#       VARIABLE will be replaced by "DIR[ DIR]"
23082func_munge_path_list ()
23083{
23084    case x$2 in
23085    x)
23086        ;;
23087    *:)
23088        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
23089        ;;
23090    x:*)
23091        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
23092        ;;
23093    *::*)
23094        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
23095        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
23096        ;;
23097    *)
23098        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
23099        ;;
23100    esac
23101}
23102
23103
23104# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
23105func_cc_basename ()
23106{
23107    for cc_temp in $*""; do
23108      case $cc_temp in
23109        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
23110        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
23111        \-*) ;;
23112        *) break;;
23113      esac
23114    done
23115    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
23116}
23117
23118
23119# ### END FUNCTIONS SHARED WITH CONFIGURE
23120
23121_LT_EOF
23122
23123  case $host_os in
23124  aix3*)
23125    cat <<\_LT_EOF >> "$cfgfile"
23126# AIX sometimes has problems with the GCC collect2 program.  For some
23127# reason, if we set the COLLECT_NAMES environment variable, the problems
23128# vanish in a puff of smoke.
23129if test set != "${COLLECT_NAMES+set}"; then
23130  COLLECT_NAMES=
23131  export COLLECT_NAMES
23132fi
23133_LT_EOF
23134    ;;
23135  esac
23136
23137
23138ltmain=$ac_aux_dir/ltmain.sh
23139
23140
23141  # We use sed instead of cat because bash on DJGPP gets confused if
23142  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
23143  # text mode, it properly converts lines to CR/LF.  This bash problem
23144  # is reportedly fixed, but why not run on old versions too?
23145  sed '$q' "$ltmain" >> "$cfgfile" \
23146     || (rm -f "$cfgfile"; exit 1)
23147
23148   mv -f "$cfgfile" "$ofile" ||
23149    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
23150  chmod +x "$ofile"
23151
23152 ;;
23153    "disable-rpath":C)
23154	sed < libtool > libtool-2 \
23155	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
23156	mv libtool-2 libtool
23157	chmod 755 libtool
23158	libtool="./libtool"
23159	 ;;
23160
23161  esac
23162done # for ac_tag
23163
23164
23165as_fn_exit 0
23166_ACEOF
23167ac_clean_files=$ac_clean_files_save
23168
23169test $ac_write_fail = 0 ||
23170  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
23171
23172
23173# configure is writing to config.log, and then calls config.status.
23174# config.status does its own redirection, appending to config.log.
23175# Unfortunately, on DOS this fails, as config.log is still kept open
23176# by configure, so config.status won't be able to write to it; its
23177# output is simply discarded.  So we exec the FD to /dev/null,
23178# effectively closing config.log, so it can be properly (re)opened and
23179# appended to by config.status.  When coming back to configure, we
23180# need to make the FD available again.
23181if test "$no_create" != yes; then
23182  ac_cs_success=:
23183  ac_config_status_args=
23184  test "$silent" = yes &&
23185    ac_config_status_args="$ac_config_status_args --quiet"
23186  exec 5>/dev/null
23187  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23188  exec 5>>config.log
23189  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23190  # would make configure fail if this is the last instruction.
23191  $ac_cs_success || as_fn_exit 1
23192fi
23193if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23194  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23195$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23196fi
23197
23198