1238106Sdes#! /bin/sh
2238106Sdes# Guess values for system-dependent variables and create Makefiles.
3294190Sdes# Generated by GNU Autoconf 2.69 for unbound 1.5.7.
4238106Sdes#
5238106Sdes# Report bugs to <unbound-bugs@nlnetlabs.nl>.
6238106Sdes#
7238106Sdes#
8249141Sdes# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9238106Sdes#
10238106Sdes#
11238106Sdes# This configure script is free software; the Free Software Foundation
12238106Sdes# gives unlimited permission to copy, distribute and modify it.
13238106Sdes## -------------------- ##
14238106Sdes## M4sh Initialization. ##
15238106Sdes## -------------------- ##
16238106Sdes
17238106Sdes# Be more Bourne compatible
18238106SdesDUALCASE=1; export DUALCASE # for MKS sh
19238106Sdesif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20238106Sdes  emulate sh
21238106Sdes  NULLCMD=:
22238106Sdes  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23238106Sdes  # is contrary to our usage.  Disable this feature.
24238106Sdes  alias -g '${1+"$@"}'='"$@"'
25238106Sdes  setopt NO_GLOB_SUBST
26238106Sdeselse
27238106Sdes  case `(set -o) 2>/dev/null` in #(
28238106Sdes  *posix*) :
29238106Sdes    set -o posix ;; #(
30238106Sdes  *) :
31238106Sdes     ;;
32238106Sdesesac
33238106Sdesfi
34238106Sdes
35238106Sdes
36238106Sdesas_nl='
37238106Sdes'
38238106Sdesexport as_nl
39238106Sdes# Printing a long string crashes Solaris 7 /usr/bin/printf.
40238106Sdesas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41238106Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42238106Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43238106Sdes# Prefer a ksh shell builtin over an external printf program on Solaris,
44238106Sdes# but without wasting forks for bash or zsh.
45238106Sdesif test -z "$BASH_VERSION$ZSH_VERSION" \
46238106Sdes    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47238106Sdes  as_echo='print -r --'
48238106Sdes  as_echo_n='print -rn --'
49238106Sdeselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50238106Sdes  as_echo='printf %s\n'
51238106Sdes  as_echo_n='printf %s'
52238106Sdeselse
53238106Sdes  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54238106Sdes    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55238106Sdes    as_echo_n='/usr/ucb/echo -n'
56238106Sdes  else
57238106Sdes    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58238106Sdes    as_echo_n_body='eval
59238106Sdes      arg=$1;
60238106Sdes      case $arg in #(
61238106Sdes      *"$as_nl"*)
62238106Sdes	expr "X$arg" : "X\\(.*\\)$as_nl";
63238106Sdes	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64238106Sdes      esac;
65238106Sdes      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66238106Sdes    '
67238106Sdes    export as_echo_n_body
68238106Sdes    as_echo_n='sh -c $as_echo_n_body as_echo'
69238106Sdes  fi
70238106Sdes  export as_echo_body
71238106Sdes  as_echo='sh -c $as_echo_body as_echo'
72238106Sdesfi
73238106Sdes
74238106Sdes# The user is always right.
75238106Sdesif test "${PATH_SEPARATOR+set}" != set; then
76238106Sdes  PATH_SEPARATOR=:
77238106Sdes  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78238106Sdes    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79238106Sdes      PATH_SEPARATOR=';'
80238106Sdes  }
81238106Sdesfi
82238106Sdes
83238106Sdes
84238106Sdes# IFS
85238106Sdes# We need space, tab and new line, in precisely that order.  Quoting is
86238106Sdes# there to prevent editors from complaining about space-tab.
87238106Sdes# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88238106Sdes# splitting by setting IFS to empty value.)
89238106SdesIFS=" ""	$as_nl"
90238106Sdes
91238106Sdes# Find who we are.  Look in the path if we contain no directory separator.
92238106Sdesas_myself=
93238106Sdescase $0 in #((
94238106Sdes  *[\\/]* ) as_myself=$0 ;;
95238106Sdes  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96238106Sdesfor as_dir in $PATH
97238106Sdesdo
98238106Sdes  IFS=$as_save_IFS
99238106Sdes  test -z "$as_dir" && as_dir=.
100238106Sdes    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101238106Sdes  done
102238106SdesIFS=$as_save_IFS
103238106Sdes
104238106Sdes     ;;
105238106Sdesesac
106238106Sdes# We did not find ourselves, most probably we were run as `sh COMMAND'
107238106Sdes# in which case we are not to be found in the path.
108238106Sdesif test "x$as_myself" = x; then
109238106Sdes  as_myself=$0
110238106Sdesfi
111238106Sdesif test ! -f "$as_myself"; then
112238106Sdes  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113238106Sdes  exit 1
114238106Sdesfi
115238106Sdes
116238106Sdes# Unset variables that we do not need and which cause bugs (e.g. in
117238106Sdes# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118238106Sdes# suppresses any "Segmentation fault" message there.  '((' could
119238106Sdes# trigger a bug in pdksh 5.2.14.
120238106Sdesfor as_var in BASH_ENV ENV MAIL MAILPATH
121238106Sdesdo eval test x\${$as_var+set} = xset \
122238106Sdes  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123238106Sdesdone
124238106SdesPS1='$ '
125238106SdesPS2='> '
126238106SdesPS4='+ '
127238106Sdes
128238106Sdes# NLS nuisances.
129238106SdesLC_ALL=C
130238106Sdesexport LC_ALL
131238106SdesLANGUAGE=C
132238106Sdesexport LANGUAGE
133238106Sdes
134238106Sdes# CDPATH.
135238106Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136238106Sdes
137249141Sdes# Use a proper internal environment variable to ensure we don't fall
138249141Sdes  # into an infinite loop, continuously re-executing ourselves.
139249141Sdes  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140249141Sdes    _as_can_reexec=no; export _as_can_reexec;
141249141Sdes    # We cannot yet assume a decent shell, so we have to provide a
142249141Sdes# neutralization value for shells without unset; and this also
143249141Sdes# works around shells that cannot unset nonexistent variables.
144249141Sdes# Preserve -v and -x to the replacement shell.
145249141SdesBASH_ENV=/dev/null
146249141SdesENV=/dev/null
147249141Sdes(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148249141Sdescase $- in # ((((
149249141Sdes  *v*x* | *x*v* ) as_opts=-vx ;;
150249141Sdes  *v* ) as_opts=-v ;;
151249141Sdes  *x* ) as_opts=-x ;;
152249141Sdes  * ) as_opts= ;;
153249141Sdesesac
154249141Sdesexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155249141Sdes# Admittedly, this is quite paranoid, since all the known shells bail
156249141Sdes# out after a failed `exec'.
157249141Sdes$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158249141Sdesas_fn_exit 255
159249141Sdes  fi
160249141Sdes  # We don't want this to propagate to other subprocesses.
161249141Sdes          { _as_can_reexec=; unset _as_can_reexec;}
162238106Sdesif test "x$CONFIG_SHELL" = x; then
163238106Sdes  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164238106Sdes  emulate sh
165238106Sdes  NULLCMD=:
166238106Sdes  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167238106Sdes  # is contrary to our usage.  Disable this feature.
168238106Sdes  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169238106Sdes  setopt NO_GLOB_SUBST
170238106Sdeselse
171238106Sdes  case \`(set -o) 2>/dev/null\` in #(
172238106Sdes  *posix*) :
173238106Sdes    set -o posix ;; #(
174238106Sdes  *) :
175238106Sdes     ;;
176238106Sdesesac
177238106Sdesfi
178238106Sdes"
179238106Sdes  as_required="as_fn_return () { (exit \$1); }
180238106Sdesas_fn_success () { as_fn_return 0; }
181238106Sdesas_fn_failure () { as_fn_return 1; }
182238106Sdesas_fn_ret_success () { return 0; }
183238106Sdesas_fn_ret_failure () { return 1; }
184238106Sdes
185238106Sdesexitcode=0
186238106Sdesas_fn_success || { exitcode=1; echo as_fn_success failed.; }
187238106Sdesas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188238106Sdesas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189238106Sdesas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190238106Sdesif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191238106Sdes
192238106Sdeselse
193238106Sdes  exitcode=1; echo positional parameters were not saved.
194238106Sdesfi
195249141Sdestest x\$exitcode = x0 || exit 1
196249141Sdestest -x / || exit 1"
197238106Sdes  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198238106Sdes  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199238106Sdes  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200238106Sdes  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201238106Sdestest \$(( 1 + 1 )) = 2 || exit 1
202238106Sdes
203238106Sdes  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204238106Sdes    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205238106Sdes    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206238106Sdes    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207238106Sdes    PATH=/empty FPATH=/empty; export PATH FPATH
208238106Sdes    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209238106Sdes      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210238106Sdes  if (eval "$as_required") 2>/dev/null; then :
211238106Sdes  as_have_required=yes
212238106Sdeselse
213238106Sdes  as_have_required=no
214238106Sdesfi
215238106Sdes  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216238106Sdes
217238106Sdeselse
218238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219238106Sdesas_found=false
220238106Sdesfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221238106Sdesdo
222238106Sdes  IFS=$as_save_IFS
223238106Sdes  test -z "$as_dir" && as_dir=.
224238106Sdes  as_found=:
225238106Sdes  case $as_dir in #(
226238106Sdes	 /*)
227238106Sdes	   for as_base in sh bash ksh sh5; do
228238106Sdes	     # Try only shells that exist, to save several forks.
229238106Sdes	     as_shell=$as_dir/$as_base
230238106Sdes	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231238106Sdes		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232238106Sdes  CONFIG_SHELL=$as_shell as_have_required=yes
233238106Sdes		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234238106Sdes  break 2
235238106Sdesfi
236238106Sdesfi
237238106Sdes	   done;;
238238106Sdes       esac
239238106Sdes  as_found=false
240238106Sdesdone
241238106Sdes$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242238106Sdes	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243238106Sdes  CONFIG_SHELL=$SHELL as_have_required=yes
244238106Sdesfi; }
245238106SdesIFS=$as_save_IFS
246238106Sdes
247238106Sdes
248238106Sdes      if test "x$CONFIG_SHELL" != x; then :
249249141Sdes  export CONFIG_SHELL
250249141Sdes             # We cannot yet assume a decent shell, so we have to provide a
251249141Sdes# neutralization value for shells without unset; and this also
252249141Sdes# works around shells that cannot unset nonexistent variables.
253249141Sdes# Preserve -v and -x to the replacement shell.
254249141SdesBASH_ENV=/dev/null
255249141SdesENV=/dev/null
256249141Sdes(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257249141Sdescase $- in # ((((
258249141Sdes  *v*x* | *x*v* ) as_opts=-vx ;;
259249141Sdes  *v* ) as_opts=-v ;;
260249141Sdes  *x* ) as_opts=-x ;;
261249141Sdes  * ) as_opts= ;;
262249141Sdesesac
263249141Sdesexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264249141Sdes# Admittedly, this is quite paranoid, since all the known shells bail
265249141Sdes# out after a failed `exec'.
266249141Sdes$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267249141Sdesexit 255
268238106Sdesfi
269238106Sdes
270238106Sdes    if test x$as_have_required = xno; then :
271238106Sdes  $as_echo "$0: This script requires a shell more modern than all"
272238106Sdes  $as_echo "$0: the shells that I found on your system."
273238106Sdes  if test x${ZSH_VERSION+set} = xset ; then
274238106Sdes    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275238106Sdes    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276238106Sdes  else
277238106Sdes    $as_echo "$0: Please tell bug-autoconf@gnu.org and
278238106Sdes$0: unbound-bugs@nlnetlabs.nl about your system, including
279238106Sdes$0: any error possibly output before this message. Then
280238106Sdes$0: install a modern shell, or manually run the script
281238106Sdes$0: under such a shell if you do have one."
282238106Sdes  fi
283238106Sdes  exit 1
284238106Sdesfi
285238106Sdesfi
286238106Sdesfi
287238106SdesSHELL=${CONFIG_SHELL-/bin/sh}
288238106Sdesexport SHELL
289238106Sdes# Unset more variables known to interfere with behavior of common tools.
290238106SdesCLICOLOR_FORCE= GREP_OPTIONS=
291238106Sdesunset CLICOLOR_FORCE GREP_OPTIONS
292238106Sdes
293238106Sdes## --------------------- ##
294238106Sdes## M4sh Shell Functions. ##
295238106Sdes## --------------------- ##
296238106Sdes# as_fn_unset VAR
297238106Sdes# ---------------
298238106Sdes# Portably unset VAR.
299238106Sdesas_fn_unset ()
300238106Sdes{
301238106Sdes  { eval $1=; unset $1;}
302238106Sdes}
303238106Sdesas_unset=as_fn_unset
304238106Sdes
305238106Sdes# as_fn_set_status STATUS
306238106Sdes# -----------------------
307238106Sdes# Set $? to STATUS, without forking.
308238106Sdesas_fn_set_status ()
309238106Sdes{
310238106Sdes  return $1
311238106Sdes} # as_fn_set_status
312238106Sdes
313238106Sdes# as_fn_exit STATUS
314238106Sdes# -----------------
315238106Sdes# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316238106Sdesas_fn_exit ()
317238106Sdes{
318238106Sdes  set +e
319238106Sdes  as_fn_set_status $1
320238106Sdes  exit $1
321238106Sdes} # as_fn_exit
322238106Sdes
323238106Sdes# as_fn_mkdir_p
324238106Sdes# -------------
325238106Sdes# Create "$as_dir" as a directory, including parents if necessary.
326238106Sdesas_fn_mkdir_p ()
327238106Sdes{
328238106Sdes
329238106Sdes  case $as_dir in #(
330238106Sdes  -*) as_dir=./$as_dir;;
331238106Sdes  esac
332238106Sdes  test -d "$as_dir" || eval $as_mkdir_p || {
333238106Sdes    as_dirs=
334238106Sdes    while :; do
335238106Sdes      case $as_dir in #(
336238106Sdes      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337238106Sdes      *) as_qdir=$as_dir;;
338238106Sdes      esac
339238106Sdes      as_dirs="'$as_qdir' $as_dirs"
340238106Sdes      as_dir=`$as_dirname -- "$as_dir" ||
341238106Sdes$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342238106Sdes	 X"$as_dir" : 'X\(//\)[^/]' \| \
343238106Sdes	 X"$as_dir" : 'X\(//\)$' \| \
344238106Sdes	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345238106Sdes$as_echo X"$as_dir" |
346238106Sdes    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347238106Sdes	    s//\1/
348238106Sdes	    q
349238106Sdes	  }
350238106Sdes	  /^X\(\/\/\)[^/].*/{
351238106Sdes	    s//\1/
352238106Sdes	    q
353238106Sdes	  }
354238106Sdes	  /^X\(\/\/\)$/{
355238106Sdes	    s//\1/
356238106Sdes	    q
357238106Sdes	  }
358238106Sdes	  /^X\(\/\).*/{
359238106Sdes	    s//\1/
360238106Sdes	    q
361238106Sdes	  }
362238106Sdes	  s/.*/./; q'`
363238106Sdes      test -d "$as_dir" && break
364238106Sdes    done
365238106Sdes    test -z "$as_dirs" || eval "mkdir $as_dirs"
366238106Sdes  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367238106Sdes
368238106Sdes
369238106Sdes} # as_fn_mkdir_p
370249141Sdes
371249141Sdes# as_fn_executable_p FILE
372249141Sdes# -----------------------
373249141Sdes# Test if FILE is an executable regular file.
374249141Sdesas_fn_executable_p ()
375249141Sdes{
376249141Sdes  test -f "$1" && test -x "$1"
377249141Sdes} # as_fn_executable_p
378238106Sdes# as_fn_append VAR VALUE
379238106Sdes# ----------------------
380238106Sdes# Append the text in VALUE to the end of the definition contained in VAR. Take
381238106Sdes# advantage of any shell optimizations that allow amortized linear growth over
382238106Sdes# repeated appends, instead of the typical quadratic growth present in naive
383238106Sdes# implementations.
384238106Sdesif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385238106Sdes  eval 'as_fn_append ()
386238106Sdes  {
387238106Sdes    eval $1+=\$2
388238106Sdes  }'
389238106Sdeselse
390238106Sdes  as_fn_append ()
391238106Sdes  {
392238106Sdes    eval $1=\$$1\$2
393238106Sdes  }
394238106Sdesfi # as_fn_append
395238106Sdes
396238106Sdes# as_fn_arith ARG...
397238106Sdes# ------------------
398238106Sdes# Perform arithmetic evaluation on the ARGs, and store the result in the
399238106Sdes# global $as_val. Take advantage of shells that can avoid forks. The arguments
400238106Sdes# must be portable across $(()) and expr.
401238106Sdesif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402238106Sdes  eval 'as_fn_arith ()
403238106Sdes  {
404238106Sdes    as_val=$(( $* ))
405238106Sdes  }'
406238106Sdeselse
407238106Sdes  as_fn_arith ()
408238106Sdes  {
409238106Sdes    as_val=`expr "$@" || test $? -eq 1`
410238106Sdes  }
411238106Sdesfi # as_fn_arith
412238106Sdes
413238106Sdes
414238106Sdes# as_fn_error STATUS ERROR [LINENO LOG_FD]
415238106Sdes# ----------------------------------------
416238106Sdes# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417238106Sdes# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418238106Sdes# script with STATUS, using 1 if that was 0.
419238106Sdesas_fn_error ()
420238106Sdes{
421238106Sdes  as_status=$1; test $as_status -eq 0 && as_status=1
422238106Sdes  if test "$4"; then
423238106Sdes    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425238106Sdes  fi
426238106Sdes  $as_echo "$as_me: error: $2" >&2
427238106Sdes  as_fn_exit $as_status
428238106Sdes} # as_fn_error
429238106Sdes
430238106Sdesif expr a : '\(a\)' >/dev/null 2>&1 &&
431238106Sdes   test "X`expr 00001 : '.*\(...\)'`" = X001; then
432238106Sdes  as_expr=expr
433238106Sdeselse
434238106Sdes  as_expr=false
435238106Sdesfi
436238106Sdes
437238106Sdesif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438238106Sdes  as_basename=basename
439238106Sdeselse
440238106Sdes  as_basename=false
441238106Sdesfi
442238106Sdes
443238106Sdesif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444238106Sdes  as_dirname=dirname
445238106Sdeselse
446238106Sdes  as_dirname=false
447238106Sdesfi
448238106Sdes
449238106Sdesas_me=`$as_basename -- "$0" ||
450238106Sdes$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451238106Sdes	 X"$0" : 'X\(//\)$' \| \
452238106Sdes	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453238106Sdes$as_echo X/"$0" |
454238106Sdes    sed '/^.*\/\([^/][^/]*\)\/*$/{
455238106Sdes	    s//\1/
456238106Sdes	    q
457238106Sdes	  }
458238106Sdes	  /^X\/\(\/\/\)$/{
459238106Sdes	    s//\1/
460238106Sdes	    q
461238106Sdes	  }
462238106Sdes	  /^X\/\(\/\).*/{
463238106Sdes	    s//\1/
464238106Sdes	    q
465238106Sdes	  }
466238106Sdes	  s/.*/./; q'`
467238106Sdes
468238106Sdes# Avoid depending upon Character Ranges.
469238106Sdesas_cr_letters='abcdefghijklmnopqrstuvwxyz'
470238106Sdesas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471238106Sdesas_cr_Letters=$as_cr_letters$as_cr_LETTERS
472238106Sdesas_cr_digits='0123456789'
473238106Sdesas_cr_alnum=$as_cr_Letters$as_cr_digits
474238106Sdes
475238106Sdes
476238106Sdes  as_lineno_1=$LINENO as_lineno_1a=$LINENO
477238106Sdes  as_lineno_2=$LINENO as_lineno_2a=$LINENO
478238106Sdes  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479238106Sdes  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480238106Sdes  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481238106Sdes  sed -n '
482238106Sdes    p
483238106Sdes    /[$]LINENO/=
484238106Sdes  ' <$as_myself |
485238106Sdes    sed '
486238106Sdes      s/[$]LINENO.*/&-/
487238106Sdes      t lineno
488238106Sdes      b
489238106Sdes      :lineno
490238106Sdes      N
491238106Sdes      :loop
492238106Sdes      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493238106Sdes      t loop
494238106Sdes      s/-\n.*//
495238106Sdes    ' >$as_me.lineno &&
496238106Sdes  chmod +x "$as_me.lineno" ||
497238106Sdes    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498238106Sdes
499249141Sdes  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500249141Sdes  # already done that, so ensure we don't try to do so again and fall
501249141Sdes  # in an infinite loop.  This has already happened in practice.
502249141Sdes  _as_can_reexec=no; export _as_can_reexec
503238106Sdes  # Don't try to exec as it changes $[0], causing all sort of problems
504238106Sdes  # (the dirname of $[0] is not the place where we might find the
505238106Sdes  # original and so on.  Autoconf is especially sensitive to this).
506238106Sdes  . "./$as_me.lineno"
507238106Sdes  # Exit status is that of the last command.
508238106Sdes  exit
509238106Sdes}
510238106Sdes
511238106SdesECHO_C= ECHO_N= ECHO_T=
512238106Sdescase `echo -n x` in #(((((
513238106Sdes-n*)
514238106Sdes  case `echo 'xy\c'` in
515238106Sdes  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
516238106Sdes  xy)  ECHO_C='\c';;
517238106Sdes  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518238106Sdes       ECHO_T='	';;
519238106Sdes  esac;;
520238106Sdes*)
521238106Sdes  ECHO_N='-n';;
522238106Sdesesac
523238106Sdes
524238106Sdesrm -f conf$$ conf$$.exe conf$$.file
525238106Sdesif test -d conf$$.dir; then
526238106Sdes  rm -f conf$$.dir/conf$$.file
527238106Sdeselse
528238106Sdes  rm -f conf$$.dir
529238106Sdes  mkdir conf$$.dir 2>/dev/null
530238106Sdesfi
531238106Sdesif (echo >conf$$.file) 2>/dev/null; then
532238106Sdes  if ln -s conf$$.file conf$$ 2>/dev/null; then
533238106Sdes    as_ln_s='ln -s'
534238106Sdes    # ... but there are two gotchas:
535238106Sdes    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536238106Sdes    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537249141Sdes    # In both cases, we have to default to `cp -pR'.
538238106Sdes    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539249141Sdes      as_ln_s='cp -pR'
540238106Sdes  elif ln conf$$.file conf$$ 2>/dev/null; then
541238106Sdes    as_ln_s=ln
542238106Sdes  else
543249141Sdes    as_ln_s='cp -pR'
544238106Sdes  fi
545238106Sdeselse
546249141Sdes  as_ln_s='cp -pR'
547238106Sdesfi
548238106Sdesrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549238106Sdesrmdir conf$$.dir 2>/dev/null
550238106Sdes
551238106Sdesif mkdir -p . 2>/dev/null; then
552238106Sdes  as_mkdir_p='mkdir -p "$as_dir"'
553238106Sdeselse
554238106Sdes  test -d ./-p && rmdir ./-p
555238106Sdes  as_mkdir_p=false
556238106Sdesfi
557238106Sdes
558249141Sdesas_test_x='test -x'
559249141Sdesas_executable_p=as_fn_executable_p
560238106Sdes
561238106Sdes# Sed expression to map a string onto a valid CPP name.
562238106Sdesas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563238106Sdes
564238106Sdes# Sed expression to map a string onto a valid variable name.
565238106Sdesas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566238106Sdes
567238106SdesSHELL=${CONFIG_SHELL-/bin/sh}
568238106Sdes
569238106Sdes
570238106Sdestest -n "$DJDIR" || exec 7<&0 </dev/null
571238106Sdesexec 6>&1
572238106Sdes
573238106Sdes# Name of the host.
574238106Sdes# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575238106Sdes# so uname gets run too.
576238106Sdesac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577238106Sdes
578238106Sdes#
579238106Sdes# Initializations.
580238106Sdes#
581238106Sdesac_default_prefix=/usr/local
582238106Sdesac_clean_files=
583238106Sdesac_config_libobj_dir=.
584238106SdesLIBOBJS=
585238106Sdescross_compiling=no
586238106Sdessubdirs=
587238106SdesMFLAGS=
588238106SdesMAKEFLAGS=
589238106Sdes
590238106Sdes# Identity of this package.
591238106SdesPACKAGE_NAME='unbound'
592238106SdesPACKAGE_TARNAME='unbound'
593294190SdesPACKAGE_VERSION='1.5.7'
594294190SdesPACKAGE_STRING='unbound 1.5.7'
595238106SdesPACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
596238106SdesPACKAGE_URL=''
597238106Sdes
598238106Sdes# Factoring default headers for most tests.
599238106Sdesac_includes_default="\
600238106Sdes#include <stdio.h>
601238106Sdes#ifdef HAVE_SYS_TYPES_H
602238106Sdes# include <sys/types.h>
603238106Sdes#endif
604238106Sdes#ifdef HAVE_SYS_STAT_H
605238106Sdes# include <sys/stat.h>
606238106Sdes#endif
607238106Sdes#ifdef STDC_HEADERS
608238106Sdes# include <stdlib.h>
609238106Sdes# include <stddef.h>
610238106Sdes#else
611238106Sdes# ifdef HAVE_STDLIB_H
612238106Sdes#  include <stdlib.h>
613238106Sdes# endif
614238106Sdes#endif
615238106Sdes#ifdef HAVE_STRING_H
616238106Sdes# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617238106Sdes#  include <memory.h>
618238106Sdes# endif
619238106Sdes# include <string.h>
620238106Sdes#endif
621238106Sdes#ifdef HAVE_STRINGS_H
622238106Sdes# include <strings.h>
623238106Sdes#endif
624238106Sdes#ifdef HAVE_INTTYPES_H
625238106Sdes# include <inttypes.h>
626238106Sdes#endif
627238106Sdes#ifdef HAVE_STDINT_H
628238106Sdes# include <stdint.h>
629238106Sdes#endif
630238106Sdes#ifdef HAVE_UNISTD_H
631238106Sdes# include <unistd.h>
632238106Sdes#endif"
633238106Sdes
634238106Sdesac_subst_vars='LTLIBOBJS
635285206Sdesdate
636285206Sdesversion
637269257SdesINSTALLTARGET
638249141SdesALLTARGET
639238106SdesSOURCEFILE
640238106SdesSOURCEDETERMINE
641285206SdesDNSTAP_OBJ
642285206SdesDNSTAP_SRC
643285206Sdesopt_dnstap_socket_path
644285206SdesENABLE_DNSTAP
645285206SdesPROTOC_C
646238106SdesUBSYMS
647238106SdesEXTRALINK
648238106SdesCOMMON_OBJ_ALL_SYMBOLS
649238106SdesLIBOBJ_WITHOUT_CTIME
650285206SdesLIBOBJ_WITHOUT_CTIMEARC4
651238106SdesWIN_CHECKCONF_OBJ_LINK
652238106SdesWIN_CONTROL_OBJ_LINK
653238106SdesWIN_UBANCHOR_OBJ_LINK
654238106SdesWIN_HOST_OBJ_LINK
655238106SdesWIN_DAEMON_OBJ_LINK
656238106SdesWIN_DAEMON_OBJ
657238106SdesWIN_DAEMON_SRC
658238106SdesWINAPPS
659238106SdesWINDRES
660238106SdesCHECKLOCK_OBJ
661238106Sdesstaticexe
662269257SdesUNBOUND_EVENT_UNINSTALL
663269257SdesUNBOUND_EVENT_INSTALL
664294190SdesSSLLIB
665238106SdesHAVE_SSL
666238106SdesCONFIG_DATE
667238106SdesNETBSD_LINTFLAGS
668238106SdesPYUNBOUND_UNINSTALL
669238106SdesPYUNBOUND_INSTALL
670238106SdesPYUNBOUND_TARGET
671238106SdesPYUNBOUND_OBJ
672238106SdesWITH_PYUNBOUND
673238106SdesPYTHONMOD_UNINSTALL
674238106SdesPYTHONMOD_INSTALL
675238106SdesPYTHONMOD_HEADER
676238106SdesPYTHONMOD_OBJ
677238106SdesWITH_PYTHONMODULE
678238106Sdesswig
679238106SdesSWIG_LIB
680238106SdesSWIG
681291767SdesPY_MAJOR_VERSION
682238106SdesPYTHON_SITE_PKG
683238106SdesPYTHON_LDFLAGS
684238106SdesPYTHON_CPPFLAGS
685238106SdesPYTHON
686238106SdesPYTHON_VERSION
687238106SdesPTHREAD_CFLAGS
688238106SdesPTHREAD_LIBS
689238106SdesPTHREAD_CC
690269257Sdesax_pthread_config
691238106SdesRUNTIME_PATH
692238106SdesLIBOBJS
693238106SdesOTOOL64
694238106SdesOTOOL
695238106SdesLIPO
696238106SdesNMEDIT
697238106SdesDSYMUTIL
698238106SdesMANIFEST_TOOL
699238106SdesAWK
700238106SdesRANLIB
701238106Sdesac_ct_AR
702238106SdesDLLTOOL
703238106SdesOBJDUMP
704238106SdesLN_S
705238106SdesNM
706238106Sdesac_ct_DUMPBIN
707238106SdesDUMPBIN
708238106SdesLD
709238106SdesFGREP
710238106SdesSED
711238106SdesLIBTOOL
712238106SdesAR
713255840Sdeshost_os
714255840Sdeshost_vendor
715255840Sdeshost_cpu
716255840Sdeshost
717255840Sdesbuild_os
718255840Sdesbuild_vendor
719255840Sdesbuild_cpu
720255840Sdesbuild
721238106Sdeslibtool
722238106SdesSTRIP
723238106Sdesdoxygen
724238106SdesYFLAGS
725238106SdesYACC
726238106SdesLEXLIB
727238106SdesLEX_OUTPUT_ROOT
728238106SdesLEX
729238106Sdesdebug_enabled
730238106SdesDEPFLAG
731238106SdesUNBOUND_USERNAME
732238106SdesUNBOUND_ROOTCERT_FILE
733238106SdesUNBOUND_ROOTKEY_FILE
734238106SdesUNBOUND_PIDFILE
735238106SdesUNBOUND_SHARE_DIR
736238106SdesUNBOUND_CHROOT_DIR
737238106SdesUNBOUND_RUN_DIR
738285206Sdesub_conf_dir
739238106Sdesub_conf_file
740238106SdesEGREP
741238106SdesGREP
742238106SdesCPP
743238106SdesOBJEXT
744238106SdesEXEEXT
745238106Sdesac_ct_CC
746238106SdesCPPFLAGS
747238106SdesLDFLAGS
748238106SdesCFLAGS
749238106SdesCC
750238106SdesLIBUNBOUND_AGE
751238106SdesLIBUNBOUND_REVISION
752238106SdesLIBUNBOUND_CURRENT
753269257SdesUNBOUND_VERSION_MICRO
754269257SdesUNBOUND_VERSION_MINOR
755269257SdesUNBOUND_VERSION_MAJOR
756238106Sdestarget_alias
757238106Sdeshost_alias
758238106Sdesbuild_alias
759238106SdesLIBS
760238106SdesECHO_T
761238106SdesECHO_N
762238106SdesECHO_C
763238106SdesDEFS
764238106Sdesmandir
765238106Sdeslocaledir
766238106Sdeslibdir
767238106Sdespsdir
768238106Sdespdfdir
769238106Sdesdvidir
770238106Sdeshtmldir
771238106Sdesinfodir
772238106Sdesdocdir
773238106Sdesoldincludedir
774238106Sdesincludedir
775238106Sdeslocalstatedir
776238106Sdessharedstatedir
777238106Sdessysconfdir
778238106Sdesdatadir
779238106Sdesdatarootdir
780238106Sdeslibexecdir
781238106Sdessbindir
782238106Sdesbindir
783238106Sdesprogram_transform_name
784238106Sdesprefix
785238106Sdesexec_prefix
786238106SdesPACKAGE_URL
787238106SdesPACKAGE_BUGREPORT
788238106SdesPACKAGE_STRING
789238106SdesPACKAGE_VERSION
790238106SdesPACKAGE_TARNAME
791238106SdesPACKAGE_NAME
792238106SdesPATH_SEPARATOR
793238106SdesSHELL'
794238106Sdesac_subst_files=''
795238106Sdesac_user_opts='
796238106Sdesenable_option_checking
797238106Sdeswith_conf_file
798238106Sdeswith_run_dir
799238106Sdeswith_chroot_dir
800238106Sdeswith_share_dir
801238106Sdeswith_pidfile
802238106Sdeswith_rootkey_file
803238106Sdeswith_rootcert_file
804238106Sdeswith_username
805238106Sdesenable_checking
806238106Sdesenable_debug
807269257Sdesenable_flto
808291767Sdesenable_pie
809291767Sdesenable_relro_now
810238106Sdesenable_shared
811238106Sdesenable_static
812238106Sdeswith_pic
813238106Sdesenable_fast_install
814238106Sdeswith_gnu_ld
815238106Sdeswith_sysroot
816238106Sdesenable_libtool_lock
817238106Sdesenable_rpath
818238106Sdesenable_largefile
819238106Sdesenable_alloc_checks
820238106Sdesenable_alloc_lite
821238106Sdesenable_alloc_nonregional
822238106Sdeswith_pthreads
823238106Sdeswith_solaris_threads
824238106Sdeswith_pyunbound
825238106Sdeswith_pythonmodule
826249141Sdeswith_nss
827294190Sdeswith_nettle
828238106Sdeswith_ssl
829238106Sdesenable_sha2
830238106Sdesenable_gost
831238106Sdesenable_ecdsa
832269257Sdesenable_event_api
833238106Sdeswith_libevent
834238106Sdeswith_libexpat
835238106Sdesenable_static_exe
836238106Sdesenable_lock_checks
837238106Sdesenable_allsymbols
838285206Sdesenable_dnstap
839285206Sdeswith_dnstap_socket_path
840285206Sdeswith_protobuf_c
841285206Sdeswith_libfstrm
842249141Sdeswith_libunbound_only
843238106Sdes'
844238106Sdes      ac_precious_vars='build_alias
845238106Sdeshost_alias
846238106Sdestarget_alias
847238106SdesCC
848238106SdesCFLAGS
849238106SdesLDFLAGS
850238106SdesLIBS
851238106SdesCPPFLAGS
852238106SdesCPP
853238106SdesYACC
854238106SdesYFLAGS
855238106SdesPYTHON_VERSION'
856238106Sdes
857238106Sdes
858238106Sdes# Initialize some variables set by options.
859238106Sdesac_init_help=
860238106Sdesac_init_version=false
861238106Sdesac_unrecognized_opts=
862238106Sdesac_unrecognized_sep=
863238106Sdes# The variables have the same names as the options, with
864238106Sdes# dashes changed to underlines.
865238106Sdescache_file=/dev/null
866238106Sdesexec_prefix=NONE
867238106Sdesno_create=
868238106Sdesno_recursion=
869238106Sdesprefix=NONE
870238106Sdesprogram_prefix=NONE
871238106Sdesprogram_suffix=NONE
872238106Sdesprogram_transform_name=s,x,x,
873238106Sdessilent=
874238106Sdessite=
875238106Sdessrcdir=
876238106Sdesverbose=
877238106Sdesx_includes=NONE
878238106Sdesx_libraries=NONE
879238106Sdes
880238106Sdes# Installation directory options.
881238106Sdes# These are left unexpanded so users can "make install exec_prefix=/foo"
882238106Sdes# and all the variables that are supposed to be based on exec_prefix
883238106Sdes# by default will actually change.
884238106Sdes# Use braces instead of parens because sh, perl, etc. also accept them.
885238106Sdes# (The list follows the same order as the GNU Coding Standards.)
886238106Sdesbindir='${exec_prefix}/bin'
887238106Sdessbindir='${exec_prefix}/sbin'
888238106Sdeslibexecdir='${exec_prefix}/libexec'
889238106Sdesdatarootdir='${prefix}/share'
890238106Sdesdatadir='${datarootdir}'
891238106Sdessysconfdir='${prefix}/etc'
892238106Sdessharedstatedir='${prefix}/com'
893238106Sdeslocalstatedir='${prefix}/var'
894238106Sdesincludedir='${prefix}/include'
895238106Sdesoldincludedir='/usr/include'
896238106Sdesdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897238106Sdesinfodir='${datarootdir}/info'
898238106Sdeshtmldir='${docdir}'
899238106Sdesdvidir='${docdir}'
900238106Sdespdfdir='${docdir}'
901238106Sdespsdir='${docdir}'
902238106Sdeslibdir='${exec_prefix}/lib'
903238106Sdeslocaledir='${datarootdir}/locale'
904238106Sdesmandir='${datarootdir}/man'
905238106Sdes
906238106Sdesac_prev=
907238106Sdesac_dashdash=
908238106Sdesfor ac_option
909238106Sdesdo
910238106Sdes  # If the previous option needs an argument, assign it.
911238106Sdes  if test -n "$ac_prev"; then
912238106Sdes    eval $ac_prev=\$ac_option
913238106Sdes    ac_prev=
914238106Sdes    continue
915238106Sdes  fi
916238106Sdes
917238106Sdes  case $ac_option in
918238106Sdes  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919238106Sdes  *=)   ac_optarg= ;;
920238106Sdes  *)    ac_optarg=yes ;;
921238106Sdes  esac
922238106Sdes
923238106Sdes  # Accept the important Cygnus configure options, so we can diagnose typos.
924238106Sdes
925238106Sdes  case $ac_dashdash$ac_option in
926238106Sdes  --)
927238106Sdes    ac_dashdash=yes ;;
928238106Sdes
929238106Sdes  -bindir | --bindir | --bindi | --bind | --bin | --bi)
930238106Sdes    ac_prev=bindir ;;
931238106Sdes  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
932238106Sdes    bindir=$ac_optarg ;;
933238106Sdes
934238106Sdes  -build | --build | --buil | --bui | --bu)
935238106Sdes    ac_prev=build_alias ;;
936238106Sdes  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
937238106Sdes    build_alias=$ac_optarg ;;
938238106Sdes
939238106Sdes  -cache-file | --cache-file | --cache-fil | --cache-fi \
940238106Sdes  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941238106Sdes    ac_prev=cache_file ;;
942238106Sdes  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943238106Sdes  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
944238106Sdes    cache_file=$ac_optarg ;;
945238106Sdes
946238106Sdes  --config-cache | -C)
947238106Sdes    cache_file=config.cache ;;
948238106Sdes
949238106Sdes  -datadir | --datadir | --datadi | --datad)
950238106Sdes    ac_prev=datadir ;;
951238106Sdes  -datadir=* | --datadir=* | --datadi=* | --datad=*)
952238106Sdes    datadir=$ac_optarg ;;
953238106Sdes
954238106Sdes  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955238106Sdes  | --dataroo | --dataro | --datar)
956238106Sdes    ac_prev=datarootdir ;;
957238106Sdes  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958238106Sdes  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959238106Sdes    datarootdir=$ac_optarg ;;
960238106Sdes
961238106Sdes  -disable-* | --disable-*)
962238106Sdes    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
963238106Sdes    # Reject names that are not valid shell variable names.
964238106Sdes    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
965238106Sdes      as_fn_error $? "invalid feature name: $ac_useropt"
966238106Sdes    ac_useropt_orig=$ac_useropt
967238106Sdes    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968238106Sdes    case $ac_user_opts in
969238106Sdes      *"
970238106Sdes"enable_$ac_useropt"
971238106Sdes"*) ;;
972238106Sdes      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973238106Sdes	 ac_unrecognized_sep=', ';;
974238106Sdes    esac
975238106Sdes    eval enable_$ac_useropt=no ;;
976238106Sdes
977238106Sdes  -docdir | --docdir | --docdi | --doc | --do)
978238106Sdes    ac_prev=docdir ;;
979238106Sdes  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980238106Sdes    docdir=$ac_optarg ;;
981238106Sdes
982238106Sdes  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983238106Sdes    ac_prev=dvidir ;;
984238106Sdes  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985238106Sdes    dvidir=$ac_optarg ;;
986238106Sdes
987238106Sdes  -enable-* | --enable-*)
988238106Sdes    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
989238106Sdes    # Reject names that are not valid shell variable names.
990238106Sdes    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991238106Sdes      as_fn_error $? "invalid feature name: $ac_useropt"
992238106Sdes    ac_useropt_orig=$ac_useropt
993238106Sdes    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994238106Sdes    case $ac_user_opts in
995238106Sdes      *"
996238106Sdes"enable_$ac_useropt"
997238106Sdes"*) ;;
998238106Sdes      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999238106Sdes	 ac_unrecognized_sep=', ';;
1000238106Sdes    esac
1001238106Sdes    eval enable_$ac_useropt=\$ac_optarg ;;
1002238106Sdes
1003238106Sdes  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004238106Sdes  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005238106Sdes  | --exec | --exe | --ex)
1006238106Sdes    ac_prev=exec_prefix ;;
1007238106Sdes  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008238106Sdes  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009238106Sdes  | --exec=* | --exe=* | --ex=*)
1010238106Sdes    exec_prefix=$ac_optarg ;;
1011238106Sdes
1012238106Sdes  -gas | --gas | --ga | --g)
1013238106Sdes    # Obsolete; use --with-gas.
1014238106Sdes    with_gas=yes ;;
1015238106Sdes
1016238106Sdes  -help | --help | --hel | --he | -h)
1017238106Sdes    ac_init_help=long ;;
1018238106Sdes  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019238106Sdes    ac_init_help=recursive ;;
1020238106Sdes  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021238106Sdes    ac_init_help=short ;;
1022238106Sdes
1023238106Sdes  -host | --host | --hos | --ho)
1024238106Sdes    ac_prev=host_alias ;;
1025238106Sdes  -host=* | --host=* | --hos=* | --ho=*)
1026238106Sdes    host_alias=$ac_optarg ;;
1027238106Sdes
1028238106Sdes  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029238106Sdes    ac_prev=htmldir ;;
1030238106Sdes  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031238106Sdes  | --ht=*)
1032238106Sdes    htmldir=$ac_optarg ;;
1033238106Sdes
1034238106Sdes  -includedir | --includedir | --includedi | --included | --include \
1035238106Sdes  | --includ | --inclu | --incl | --inc)
1036238106Sdes    ac_prev=includedir ;;
1037238106Sdes  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038238106Sdes  | --includ=* | --inclu=* | --incl=* | --inc=*)
1039238106Sdes    includedir=$ac_optarg ;;
1040238106Sdes
1041238106Sdes  -infodir | --infodir | --infodi | --infod | --info | --inf)
1042238106Sdes    ac_prev=infodir ;;
1043238106Sdes  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1044238106Sdes    infodir=$ac_optarg ;;
1045238106Sdes
1046238106Sdes  -libdir | --libdir | --libdi | --libd)
1047238106Sdes    ac_prev=libdir ;;
1048238106Sdes  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1049238106Sdes    libdir=$ac_optarg ;;
1050238106Sdes
1051238106Sdes  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052238106Sdes  | --libexe | --libex | --libe)
1053238106Sdes    ac_prev=libexecdir ;;
1054238106Sdes  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055238106Sdes  | --libexe=* | --libex=* | --libe=*)
1056238106Sdes    libexecdir=$ac_optarg ;;
1057238106Sdes
1058238106Sdes  -localedir | --localedir | --localedi | --localed | --locale)
1059238106Sdes    ac_prev=localedir ;;
1060238106Sdes  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061238106Sdes    localedir=$ac_optarg ;;
1062238106Sdes
1063238106Sdes  -localstatedir | --localstatedir | --localstatedi | --localstated \
1064238106Sdes  | --localstate | --localstat | --localsta | --localst | --locals)
1065238106Sdes    ac_prev=localstatedir ;;
1066238106Sdes  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1067238106Sdes  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1068238106Sdes    localstatedir=$ac_optarg ;;
1069238106Sdes
1070238106Sdes  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071238106Sdes    ac_prev=mandir ;;
1072238106Sdes  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1073238106Sdes    mandir=$ac_optarg ;;
1074238106Sdes
1075238106Sdes  -nfp | --nfp | --nf)
1076238106Sdes    # Obsolete; use --without-fp.
1077238106Sdes    with_fp=no ;;
1078238106Sdes
1079238106Sdes  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1080238106Sdes  | --no-cr | --no-c | -n)
1081238106Sdes    no_create=yes ;;
1082238106Sdes
1083238106Sdes  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084238106Sdes  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085238106Sdes    no_recursion=yes ;;
1086238106Sdes
1087238106Sdes  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088238106Sdes  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089238106Sdes  | --oldin | --oldi | --old | --ol | --o)
1090238106Sdes    ac_prev=oldincludedir ;;
1091238106Sdes  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092238106Sdes  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093238106Sdes  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1094238106Sdes    oldincludedir=$ac_optarg ;;
1095238106Sdes
1096238106Sdes  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097238106Sdes    ac_prev=prefix ;;
1098238106Sdes  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1099238106Sdes    prefix=$ac_optarg ;;
1100238106Sdes
1101238106Sdes  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102238106Sdes  | --program-pre | --program-pr | --program-p)
1103238106Sdes    ac_prev=program_prefix ;;
1104238106Sdes  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105238106Sdes  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1106238106Sdes    program_prefix=$ac_optarg ;;
1107238106Sdes
1108238106Sdes  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109238106Sdes  | --program-suf | --program-su | --program-s)
1110238106Sdes    ac_prev=program_suffix ;;
1111238106Sdes  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112238106Sdes  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1113238106Sdes    program_suffix=$ac_optarg ;;
1114238106Sdes
1115238106Sdes  -program-transform-name | --program-transform-name \
1116238106Sdes  | --program-transform-nam | --program-transform-na \
1117238106Sdes  | --program-transform-n | --program-transform- \
1118238106Sdes  | --program-transform | --program-transfor \
1119238106Sdes  | --program-transfo | --program-transf \
1120238106Sdes  | --program-trans | --program-tran \
1121238106Sdes  | --progr-tra | --program-tr | --program-t)
1122238106Sdes    ac_prev=program_transform_name ;;
1123238106Sdes  -program-transform-name=* | --program-transform-name=* \
1124238106Sdes  | --program-transform-nam=* | --program-transform-na=* \
1125238106Sdes  | --program-transform-n=* | --program-transform-=* \
1126238106Sdes  | --program-transform=* | --program-transfor=* \
1127238106Sdes  | --program-transfo=* | --program-transf=* \
1128238106Sdes  | --program-trans=* | --program-tran=* \
1129238106Sdes  | --progr-tra=* | --program-tr=* | --program-t=*)
1130238106Sdes    program_transform_name=$ac_optarg ;;
1131238106Sdes
1132238106Sdes  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133238106Sdes    ac_prev=pdfdir ;;
1134238106Sdes  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135238106Sdes    pdfdir=$ac_optarg ;;
1136238106Sdes
1137238106Sdes  -psdir | --psdir | --psdi | --psd | --ps)
1138238106Sdes    ac_prev=psdir ;;
1139238106Sdes  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140238106Sdes    psdir=$ac_optarg ;;
1141238106Sdes
1142238106Sdes  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143238106Sdes  | -silent | --silent | --silen | --sile | --sil)
1144238106Sdes    silent=yes ;;
1145238106Sdes
1146238106Sdes  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147238106Sdes    ac_prev=sbindir ;;
1148238106Sdes  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149238106Sdes  | --sbi=* | --sb=*)
1150238106Sdes    sbindir=$ac_optarg ;;
1151238106Sdes
1152238106Sdes  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153238106Sdes  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154238106Sdes  | --sharedst | --shareds | --shared | --share | --shar \
1155238106Sdes  | --sha | --sh)
1156238106Sdes    ac_prev=sharedstatedir ;;
1157238106Sdes  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158238106Sdes  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159238106Sdes  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160238106Sdes  | --sha=* | --sh=*)
1161238106Sdes    sharedstatedir=$ac_optarg ;;
1162238106Sdes
1163238106Sdes  -site | --site | --sit)
1164238106Sdes    ac_prev=site ;;
1165238106Sdes  -site=* | --site=* | --sit=*)
1166238106Sdes    site=$ac_optarg ;;
1167238106Sdes
1168238106Sdes  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169238106Sdes    ac_prev=srcdir ;;
1170238106Sdes  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1171238106Sdes    srcdir=$ac_optarg ;;
1172238106Sdes
1173238106Sdes  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174238106Sdes  | --syscon | --sysco | --sysc | --sys | --sy)
1175238106Sdes    ac_prev=sysconfdir ;;
1176238106Sdes  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177238106Sdes  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1178238106Sdes    sysconfdir=$ac_optarg ;;
1179238106Sdes
1180238106Sdes  -target | --target | --targe | --targ | --tar | --ta | --t)
1181238106Sdes    ac_prev=target_alias ;;
1182238106Sdes  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1183238106Sdes    target_alias=$ac_optarg ;;
1184238106Sdes
1185238106Sdes  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186238106Sdes    verbose=yes ;;
1187238106Sdes
1188238106Sdes  -version | --version | --versio | --versi | --vers | -V)
1189238106Sdes    ac_init_version=: ;;
1190238106Sdes
1191238106Sdes  -with-* | --with-*)
1192238106Sdes    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1193238106Sdes    # Reject names that are not valid shell variable names.
1194238106Sdes    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1195238106Sdes      as_fn_error $? "invalid package name: $ac_useropt"
1196238106Sdes    ac_useropt_orig=$ac_useropt
1197238106Sdes    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198238106Sdes    case $ac_user_opts in
1199238106Sdes      *"
1200238106Sdes"with_$ac_useropt"
1201238106Sdes"*) ;;
1202238106Sdes      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1203238106Sdes	 ac_unrecognized_sep=', ';;
1204238106Sdes    esac
1205238106Sdes    eval with_$ac_useropt=\$ac_optarg ;;
1206238106Sdes
1207238106Sdes  -without-* | --without-*)
1208238106Sdes    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1209238106Sdes    # Reject names that are not valid shell variable names.
1210238106Sdes    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211238106Sdes      as_fn_error $? "invalid package name: $ac_useropt"
1212238106Sdes    ac_useropt_orig=$ac_useropt
1213238106Sdes    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214238106Sdes    case $ac_user_opts in
1215238106Sdes      *"
1216238106Sdes"with_$ac_useropt"
1217238106Sdes"*) ;;
1218238106Sdes      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1219238106Sdes	 ac_unrecognized_sep=', ';;
1220238106Sdes    esac
1221238106Sdes    eval with_$ac_useropt=no ;;
1222238106Sdes
1223238106Sdes  --x)
1224238106Sdes    # Obsolete; use --with-x.
1225238106Sdes    with_x=yes ;;
1226238106Sdes
1227238106Sdes  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1228238106Sdes  | --x-incl | --x-inc | --x-in | --x-i)
1229238106Sdes    ac_prev=x_includes ;;
1230238106Sdes  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1231238106Sdes  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1232238106Sdes    x_includes=$ac_optarg ;;
1233238106Sdes
1234238106Sdes  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1235238106Sdes  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1236238106Sdes    ac_prev=x_libraries ;;
1237238106Sdes  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1238238106Sdes  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1239238106Sdes    x_libraries=$ac_optarg ;;
1240238106Sdes
1241238106Sdes  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1242238106SdesTry \`$0 --help' for more information"
1243238106Sdes    ;;
1244238106Sdes
1245238106Sdes  *=*)
1246238106Sdes    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1247238106Sdes    # Reject names that are not valid shell variable names.
1248238106Sdes    case $ac_envvar in #(
1249238106Sdes      '' | [0-9]* | *[!_$as_cr_alnum]* )
1250238106Sdes      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1251238106Sdes    esac
1252238106Sdes    eval $ac_envvar=\$ac_optarg
1253238106Sdes    export $ac_envvar ;;
1254238106Sdes
1255238106Sdes  *)
1256238106Sdes    # FIXME: should be removed in autoconf 3.0.
1257238106Sdes    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1258238106Sdes    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1259238106Sdes      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1260238106Sdes    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1261238106Sdes    ;;
1262238106Sdes
1263238106Sdes  esac
1264238106Sdesdone
1265238106Sdes
1266238106Sdesif test -n "$ac_prev"; then
1267238106Sdes  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1268238106Sdes  as_fn_error $? "missing argument to $ac_option"
1269238106Sdesfi
1270238106Sdes
1271238106Sdesif test -n "$ac_unrecognized_opts"; then
1272238106Sdes  case $enable_option_checking in
1273238106Sdes    no) ;;
1274238106Sdes    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1275238106Sdes    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1276238106Sdes  esac
1277238106Sdesfi
1278238106Sdes
1279238106Sdes# Check all directory arguments for consistency.
1280238106Sdesfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1281238106Sdes		datadir sysconfdir sharedstatedir localstatedir includedir \
1282238106Sdes		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1283238106Sdes		libdir localedir mandir
1284238106Sdesdo
1285238106Sdes  eval ac_val=\$$ac_var
1286238106Sdes  # Remove trailing slashes.
1287238106Sdes  case $ac_val in
1288238106Sdes    */ )
1289238106Sdes      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1290238106Sdes      eval $ac_var=\$ac_val;;
1291238106Sdes  esac
1292238106Sdes  # Be sure to have absolute directory names.
1293238106Sdes  case $ac_val in
1294238106Sdes    [\\/$]* | ?:[\\/]* )  continue;;
1295238106Sdes    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1296238106Sdes  esac
1297238106Sdes  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1298238106Sdesdone
1299238106Sdes
1300238106Sdes# There might be people who depend on the old broken behavior: `$host'
1301238106Sdes# used to hold the argument of --host etc.
1302238106Sdes# FIXME: To remove some day.
1303238106Sdesbuild=$build_alias
1304238106Sdeshost=$host_alias
1305238106Sdestarget=$target_alias
1306238106Sdes
1307238106Sdes# FIXME: To remove some day.
1308238106Sdesif test "x$host_alias" != x; then
1309238106Sdes  if test "x$build_alias" = x; then
1310238106Sdes    cross_compiling=maybe
1311238106Sdes  elif test "x$build_alias" != "x$host_alias"; then
1312238106Sdes    cross_compiling=yes
1313238106Sdes  fi
1314238106Sdesfi
1315238106Sdes
1316238106Sdesac_tool_prefix=
1317238106Sdestest -n "$host_alias" && ac_tool_prefix=$host_alias-
1318238106Sdes
1319238106Sdestest "$silent" = yes && exec 6>/dev/null
1320238106Sdes
1321238106Sdes
1322238106Sdesac_pwd=`pwd` && test -n "$ac_pwd" &&
1323238106Sdesac_ls_di=`ls -di .` &&
1324238106Sdesac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1325238106Sdes  as_fn_error $? "working directory cannot be determined"
1326238106Sdestest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1327238106Sdes  as_fn_error $? "pwd does not report name of working directory"
1328238106Sdes
1329238106Sdes
1330238106Sdes# Find the source files, if location was not specified.
1331238106Sdesif test -z "$srcdir"; then
1332238106Sdes  ac_srcdir_defaulted=yes
1333238106Sdes  # Try the directory containing this script, then the parent directory.
1334238106Sdes  ac_confdir=`$as_dirname -- "$as_myself" ||
1335238106Sdes$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336238106Sdes	 X"$as_myself" : 'X\(//\)[^/]' \| \
1337238106Sdes	 X"$as_myself" : 'X\(//\)$' \| \
1338238106Sdes	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339238106Sdes$as_echo X"$as_myself" |
1340238106Sdes    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341238106Sdes	    s//\1/
1342238106Sdes	    q
1343238106Sdes	  }
1344238106Sdes	  /^X\(\/\/\)[^/].*/{
1345238106Sdes	    s//\1/
1346238106Sdes	    q
1347238106Sdes	  }
1348238106Sdes	  /^X\(\/\/\)$/{
1349238106Sdes	    s//\1/
1350238106Sdes	    q
1351238106Sdes	  }
1352238106Sdes	  /^X\(\/\).*/{
1353238106Sdes	    s//\1/
1354238106Sdes	    q
1355238106Sdes	  }
1356238106Sdes	  s/.*/./; q'`
1357238106Sdes  srcdir=$ac_confdir
1358238106Sdes  if test ! -r "$srcdir/$ac_unique_file"; then
1359238106Sdes    srcdir=..
1360238106Sdes  fi
1361238106Sdeselse
1362238106Sdes  ac_srcdir_defaulted=no
1363238106Sdesfi
1364238106Sdesif test ! -r "$srcdir/$ac_unique_file"; then
1365238106Sdes  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1366238106Sdes  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1367238106Sdesfi
1368238106Sdesac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369238106Sdesac_abs_confdir=`(
1370238106Sdes	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1371238106Sdes	pwd)`
1372238106Sdes# When building in place, set srcdir=.
1373238106Sdesif test "$ac_abs_confdir" = "$ac_pwd"; then
1374238106Sdes  srcdir=.
1375238106Sdesfi
1376238106Sdes# Remove unnecessary trailing slashes from srcdir.
1377238106Sdes# Double slashes in file names in object file debugging info
1378238106Sdes# mess up M-x gdb in Emacs.
1379238106Sdescase $srcdir in
1380238106Sdes*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381238106Sdesesac
1382238106Sdesfor ac_var in $ac_precious_vars; do
1383238106Sdes  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384238106Sdes  eval ac_env_${ac_var}_value=\$${ac_var}
1385238106Sdes  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386238106Sdes  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387238106Sdesdone
1388238106Sdes
1389238106Sdes#
1390238106Sdes# Report the --help message.
1391238106Sdes#
1392238106Sdesif test "$ac_init_help" = "long"; then
1393238106Sdes  # Omit some internal or obsolete options to make the list less imposing.
1394238106Sdes  # This message is too long to be a string in the A/UX 3.1 sh.
1395238106Sdes  cat <<_ACEOF
1396294190Sdes\`configure' configures unbound 1.5.7 to adapt to many kinds of systems.
1397238106Sdes
1398238106SdesUsage: $0 [OPTION]... [VAR=VALUE]...
1399238106Sdes
1400238106SdesTo assign environment variables (e.g., CC, CFLAGS...), specify them as
1401238106SdesVAR=VALUE.  See below for descriptions of some of the useful variables.
1402238106Sdes
1403238106SdesDefaults for the options are specified in brackets.
1404238106Sdes
1405238106SdesConfiguration:
1406238106Sdes  -h, --help              display this help and exit
1407238106Sdes      --help=short        display options specific to this package
1408238106Sdes      --help=recursive    display the short help of all the included packages
1409238106Sdes  -V, --version           display version information and exit
1410238106Sdes  -q, --quiet, --silent   do not print \`checking ...' messages
1411238106Sdes      --cache-file=FILE   cache test results in FILE [disabled]
1412238106Sdes  -C, --config-cache      alias for \`--cache-file=config.cache'
1413238106Sdes  -n, --no-create         do not create output files
1414238106Sdes      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1415238106Sdes
1416238106SdesInstallation directories:
1417238106Sdes  --prefix=PREFIX         install architecture-independent files in PREFIX
1418238106Sdes                          [$ac_default_prefix]
1419238106Sdes  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1420238106Sdes                          [PREFIX]
1421238106Sdes
1422238106SdesBy default, \`make install' will install all the files in
1423238106Sdes\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1424238106Sdesan installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425238106Sdesfor instance \`--prefix=\$HOME'.
1426238106Sdes
1427238106SdesFor better control, use the options below.
1428238106Sdes
1429238106SdesFine tuning of the installation directories:
1430238106Sdes  --bindir=DIR            user executables [EPREFIX/bin]
1431238106Sdes  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1432238106Sdes  --libexecdir=DIR        program executables [EPREFIX/libexec]
1433238106Sdes  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1434238106Sdes  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1435238106Sdes  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1436238106Sdes  --libdir=DIR            object code libraries [EPREFIX/lib]
1437238106Sdes  --includedir=DIR        C header files [PREFIX/include]
1438238106Sdes  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1439238106Sdes  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1440238106Sdes  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1441238106Sdes  --infodir=DIR           info documentation [DATAROOTDIR/info]
1442238106Sdes  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1443238106Sdes  --mandir=DIR            man documentation [DATAROOTDIR/man]
1444238106Sdes  --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1445238106Sdes  --htmldir=DIR           html documentation [DOCDIR]
1446238106Sdes  --dvidir=DIR            dvi documentation [DOCDIR]
1447238106Sdes  --pdfdir=DIR            pdf documentation [DOCDIR]
1448238106Sdes  --psdir=DIR             ps documentation [DOCDIR]
1449238106Sdes_ACEOF
1450238106Sdes
1451238106Sdes  cat <<\_ACEOF
1452238106Sdes
1453238106SdesSystem types:
1454238106Sdes  --build=BUILD     configure for building on BUILD [guessed]
1455238106Sdes  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1456238106Sdes_ACEOF
1457238106Sdesfi
1458238106Sdes
1459238106Sdesif test -n "$ac_init_help"; then
1460238106Sdes  case $ac_init_help in
1461294190Sdes     short | recursive ) echo "Configuration of unbound 1.5.7:";;
1462238106Sdes   esac
1463238106Sdes  cat <<\_ACEOF
1464238106Sdes
1465238106SdesOptional Features:
1466238106Sdes  --disable-option-checking  ignore unrecognized --enable/--with options
1467238106Sdes  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1468238106Sdes  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1469238106Sdes  --enable-checking       Enable warnings, asserts, makefile-dependencies
1470238106Sdes  --enable-debug          same as enable-checking
1471269257Sdes  --disable-flto          Disable link-time optimization (gcc specific option)
1472291767Sdes  --enable-pie            Enable Position-Independent Executable (eg. to fully
1473291767Sdes                          benefit from ASLR, small performance penalty)
1474291767Sdes  --enable-relro-now      Enable full relocation binding at load-time (RELRO
1475291767Sdes                          NOW, to protect GOT and .dtor areas)
1476238106Sdes  --enable-shared[=PKGS]  build shared libraries [default=yes]
1477238106Sdes  --enable-static[=PKGS]  build static libraries [default=yes]
1478238106Sdes  --enable-fast-install[=PKGS]
1479238106Sdes                          optimize for fast installation [default=yes]
1480238106Sdes  --disable-libtool-lock  avoid locking (might break parallel builds)
1481238106Sdes  --disable-rpath         disable hardcoded rpath (default=enabled)
1482238106Sdes  --disable-largefile     omit support for large files
1483238106Sdes  --enable-alloc-checks   enable to memory allocation statistics, for debug
1484238106Sdes                          purposes
1485238106Sdes  --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1486238106Sdes                          purposes
1487238106Sdes  --enable-alloc-nonregional
1488238106Sdes                          enable nonregional allocs, slow but exposes regional
1489238106Sdes                          allocations to other memory purifiers, for debug
1490238106Sdes                          purposes
1491238106Sdes  --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1492238106Sdes  --disable-gost          Disable GOST support
1493238106Sdes  --disable-ecdsa         Disable ECDSA support
1494269257Sdes  --enable-event-api      Enable (experimental) libevent-based libunbound API
1495269257Sdes                          installed to unbound-event.h
1496238106Sdes  --enable-static-exe     enable to compile executables statically against
1497269257Sdes                          (event) libs, for debug purposes
1498238106Sdes  --enable-lock-checks    enable to check lock and unlock calls, for debug
1499238106Sdes                          purposes
1500238106Sdes  --enable-allsymbols     export all symbols from libunbound and link binaries
1501238106Sdes                          to it, smaller install size but libunbound export
1502238106Sdes                          table is polluted by internal symbols
1503285206Sdes  --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1504238106Sdes
1505238106SdesOptional Packages:
1506238106Sdes  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1507238106Sdes  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1508238106Sdes  --with-conf-file=path   Pathname to the Unbound configuration file
1509238106Sdes  --with-run-dir=path     set default directory to chdir to (by default dir
1510238106Sdes                          part of cfg file)
1511238106Sdes  --with-chroot-dir=path  set default directory to chroot to (by default same
1512238106Sdes                          as run-dir)
1513238106Sdes  --with-share-dir=path   set default directory with shared data (by default
1514238106Sdes                          same as share/unbound)
1515238106Sdes  --with-pidfile=filename set default pathname to unbound pidfile (default
1516238106Sdes                          run-dir/unbound.pid)
1517238106Sdes  --with-rootkey-file=filename
1518238106Sdes                          set default pathname to root key file (default
1519238106Sdes                          run-dir/root.key). This file is read and written.
1520238106Sdes  --with-rootcert-file=filename
1521238106Sdes                          set default pathname to root update certificate file
1522238106Sdes                          (default run-dir/icannbundle.pem). This file need
1523238106Sdes                          not exist if you are content with the builtin.
1524238106Sdes  --with-username=user    set default user that unbound changes to (default
1525238106Sdes                          user is unbound)
1526249141Sdes  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1527238106Sdes                          both]
1528238106Sdes  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1529238106Sdes  --with-sysroot=DIR Search for dependent libraries within DIR
1530238106Sdes                        (or the compiler's sysroot if not specified).
1531238106Sdes  --with-pthreads         use pthreads library, or --without-pthreads to
1532238106Sdes                          disable threading support.
1533238106Sdes  --with-solaris-threads  use solaris native thread library.
1534238106Sdes  --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1535238106Sdes                          (default=no)
1536238106Sdes  --with-pythonmodule     build Python module, or --without-pythonmodule to
1537238106Sdes                          disable script engine. (default=no)
1538249141Sdes  --with-nss=path         use libnss instead of openssl, installed at path.
1539294190Sdes  --with-nettle=path      use libnettle as crypto library, installed at path.
1540238106Sdes  --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1541238106Sdes                          /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1542238106Sdes                          /usr)
1543238106Sdes  --with-libevent=pathname
1544238106Sdes                          use libevent (will check /usr/local /opt/local
1545238106Sdes                          /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1546238106Sdes                          an explicit path). Slower, but allows use of large
1547238106Sdes                          outgoing port ranges.
1548238106Sdes  --with-libexpat=path    specify explicit path for libexpat.
1549285206Sdes  --with-dnstap-socket-path=pathname
1550285206Sdes                          set default dnstap socket path
1551285206Sdes  --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1552285206Sdes  --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1553249141Sdes  --with-libunbound-only  do not build daemon and tool programs
1554238106Sdes
1555238106SdesSome influential environment variables:
1556238106Sdes  CC          C compiler command
1557238106Sdes  CFLAGS      C compiler flags
1558238106Sdes  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1559238106Sdes              nonstandard directory <lib dir>
1560238106Sdes  LIBS        libraries to pass to the linker, e.g. -l<library>
1561238106Sdes  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1562238106Sdes              you have headers in a nonstandard directory <include dir>
1563238106Sdes  CPP         C preprocessor
1564238106Sdes  YACC        The `Yet Another Compiler Compiler' implementation to use.
1565238106Sdes              Defaults to the first program found out of: `bison -y', `byacc',
1566238106Sdes              `yacc'.
1567238106Sdes  YFLAGS      The list of arguments that will be passed by default to $YACC.
1568238106Sdes              This script will default YFLAGS to the empty string to avoid a
1569238106Sdes              default value of `-d' given by some make applications.
1570238106Sdes  PYTHON_VERSION
1571238106Sdes              The installed Python version to use, for example '2.3'. This
1572238106Sdes              string will be appended to the Python interpreter canonical
1573238106Sdes              name.
1574238106Sdes
1575238106SdesUse these variables to override the choices made by `configure' or to help
1576238106Sdesit to find libraries and programs with nonstandard names/locations.
1577238106Sdes
1578238106SdesReport bugs to <unbound-bugs@nlnetlabs.nl>.
1579238106Sdes_ACEOF
1580238106Sdesac_status=$?
1581238106Sdesfi
1582238106Sdes
1583238106Sdesif test "$ac_init_help" = "recursive"; then
1584238106Sdes  # If there are subdirs, report their specific --help.
1585238106Sdes  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1586238106Sdes    test -d "$ac_dir" ||
1587238106Sdes      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1588238106Sdes      continue
1589238106Sdes    ac_builddir=.
1590238106Sdes
1591238106Sdescase "$ac_dir" in
1592238106Sdes.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593238106Sdes*)
1594238106Sdes  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1595238106Sdes  # A ".." for each directory in $ac_dir_suffix.
1596238106Sdes  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1597238106Sdes  case $ac_top_builddir_sub in
1598238106Sdes  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599238106Sdes  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1600238106Sdes  esac ;;
1601238106Sdesesac
1602238106Sdesac_abs_top_builddir=$ac_pwd
1603238106Sdesac_abs_builddir=$ac_pwd$ac_dir_suffix
1604238106Sdes# for backward compatibility:
1605238106Sdesac_top_builddir=$ac_top_build_prefix
1606238106Sdes
1607238106Sdescase $srcdir in
1608238106Sdes  .)  # We are building in place.
1609238106Sdes    ac_srcdir=.
1610238106Sdes    ac_top_srcdir=$ac_top_builddir_sub
1611238106Sdes    ac_abs_top_srcdir=$ac_pwd ;;
1612238106Sdes  [\\/]* | ?:[\\/]* )  # Absolute name.
1613238106Sdes    ac_srcdir=$srcdir$ac_dir_suffix;
1614238106Sdes    ac_top_srcdir=$srcdir
1615238106Sdes    ac_abs_top_srcdir=$srcdir ;;
1616238106Sdes  *) # Relative name.
1617238106Sdes    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1618238106Sdes    ac_top_srcdir=$ac_top_build_prefix$srcdir
1619238106Sdes    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1620238106Sdesesac
1621238106Sdesac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1622238106Sdes
1623238106Sdes    cd "$ac_dir" || { ac_status=$?; continue; }
1624238106Sdes    # Check for guested configure.
1625238106Sdes    if test -f "$ac_srcdir/configure.gnu"; then
1626238106Sdes      echo &&
1627238106Sdes      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1628238106Sdes    elif test -f "$ac_srcdir/configure"; then
1629238106Sdes      echo &&
1630238106Sdes      $SHELL "$ac_srcdir/configure" --help=recursive
1631238106Sdes    else
1632238106Sdes      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1633238106Sdes    fi || ac_status=$?
1634238106Sdes    cd "$ac_pwd" || { ac_status=$?; break; }
1635238106Sdes  done
1636238106Sdesfi
1637238106Sdes
1638238106Sdestest -n "$ac_init_help" && exit $ac_status
1639238106Sdesif $ac_init_version; then
1640238106Sdes  cat <<\_ACEOF
1641294190Sdesunbound configure 1.5.7
1642249141Sdesgenerated by GNU Autoconf 2.69
1643238106Sdes
1644249141SdesCopyright (C) 2012 Free Software Foundation, Inc.
1645238106SdesThis configure script is free software; the Free Software Foundation
1646238106Sdesgives unlimited permission to copy, distribute and modify it.
1647238106Sdes_ACEOF
1648238106Sdes  exit
1649238106Sdesfi
1650238106Sdes
1651238106Sdes## ------------------------ ##
1652238106Sdes## Autoconf initialization. ##
1653238106Sdes## ------------------------ ##
1654238106Sdes
1655238106Sdes# ac_fn_c_try_compile LINENO
1656238106Sdes# --------------------------
1657238106Sdes# Try to compile conftest.$ac_ext, and return whether this succeeded.
1658238106Sdesac_fn_c_try_compile ()
1659238106Sdes{
1660238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1661238106Sdes  rm -f conftest.$ac_objext
1662238106Sdes  if { { ac_try="$ac_compile"
1663238106Sdescase "(($ac_try" in
1664238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1665238106Sdes  *) ac_try_echo=$ac_try;;
1666238106Sdesesac
1667238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1668238106Sdes$as_echo "$ac_try_echo"; } >&5
1669238106Sdes  (eval "$ac_compile") 2>conftest.err
1670238106Sdes  ac_status=$?
1671238106Sdes  if test -s conftest.err; then
1672238106Sdes    grep -v '^ *+' conftest.err >conftest.er1
1673238106Sdes    cat conftest.er1 >&5
1674238106Sdes    mv -f conftest.er1 conftest.err
1675238106Sdes  fi
1676238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1677238106Sdes  test $ac_status = 0; } && {
1678238106Sdes	 test -z "$ac_c_werror_flag" ||
1679238106Sdes	 test ! -s conftest.err
1680238106Sdes       } && test -s conftest.$ac_objext; then :
1681238106Sdes  ac_retval=0
1682238106Sdeselse
1683238106Sdes  $as_echo "$as_me: failed program was:" >&5
1684238106Sdessed 's/^/| /' conftest.$ac_ext >&5
1685238106Sdes
1686238106Sdes	ac_retval=1
1687238106Sdesfi
1688238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1689238106Sdes  as_fn_set_status $ac_retval
1690238106Sdes
1691238106Sdes} # ac_fn_c_try_compile
1692238106Sdes
1693238106Sdes# ac_fn_c_try_cpp LINENO
1694238106Sdes# ----------------------
1695238106Sdes# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1696238106Sdesac_fn_c_try_cpp ()
1697238106Sdes{
1698238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699238106Sdes  if { { ac_try="$ac_cpp conftest.$ac_ext"
1700238106Sdescase "(($ac_try" in
1701238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702238106Sdes  *) ac_try_echo=$ac_try;;
1703238106Sdesesac
1704238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705238106Sdes$as_echo "$ac_try_echo"; } >&5
1706238106Sdes  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1707238106Sdes  ac_status=$?
1708238106Sdes  if test -s conftest.err; then
1709238106Sdes    grep -v '^ *+' conftest.err >conftest.er1
1710238106Sdes    cat conftest.er1 >&5
1711238106Sdes    mv -f conftest.er1 conftest.err
1712238106Sdes  fi
1713238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714238106Sdes  test $ac_status = 0; } > conftest.i && {
1715238106Sdes	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1716238106Sdes	 test ! -s conftest.err
1717238106Sdes       }; then :
1718238106Sdes  ac_retval=0
1719238106Sdeselse
1720238106Sdes  $as_echo "$as_me: failed program was:" >&5
1721238106Sdessed 's/^/| /' conftest.$ac_ext >&5
1722238106Sdes
1723238106Sdes    ac_retval=1
1724238106Sdesfi
1725238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1726238106Sdes  as_fn_set_status $ac_retval
1727238106Sdes
1728238106Sdes} # ac_fn_c_try_cpp
1729238106Sdes
1730238106Sdes# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1731238106Sdes# -------------------------------------------------------
1732238106Sdes# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1733238106Sdes# the include files in INCLUDES and setting the cache variable VAR
1734238106Sdes# accordingly.
1735238106Sdesac_fn_c_check_header_mongrel ()
1736238106Sdes{
1737238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738238106Sdes  if eval \${$3+:} false; then :
1739238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740238106Sdes$as_echo_n "checking for $2... " >&6; }
1741238106Sdesif eval \${$3+:} false; then :
1742238106Sdes  $as_echo_n "(cached) " >&6
1743238106Sdesfi
1744238106Sdeseval ac_res=\$$3
1745238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746238106Sdes$as_echo "$ac_res" >&6; }
1747238106Sdeselse
1748238106Sdes  # Is the header compilable?
1749238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1750238106Sdes$as_echo_n "checking $2 usability... " >&6; }
1751238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752238106Sdes/* end confdefs.h.  */
1753238106Sdes$4
1754238106Sdes#include <$2>
1755238106Sdes_ACEOF
1756238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
1757238106Sdes  ac_header_compiler=yes
1758238106Sdeselse
1759238106Sdes  ac_header_compiler=no
1760238106Sdesfi
1761238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1762238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1763238106Sdes$as_echo "$ac_header_compiler" >&6; }
1764238106Sdes
1765238106Sdes# Is the header present?
1766238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1767238106Sdes$as_echo_n "checking $2 presence... " >&6; }
1768238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769238106Sdes/* end confdefs.h.  */
1770238106Sdes#include <$2>
1771238106Sdes_ACEOF
1772238106Sdesif ac_fn_c_try_cpp "$LINENO"; then :
1773238106Sdes  ac_header_preproc=yes
1774238106Sdeselse
1775238106Sdes  ac_header_preproc=no
1776238106Sdesfi
1777238106Sdesrm -f conftest.err conftest.i conftest.$ac_ext
1778238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1779238106Sdes$as_echo "$ac_header_preproc" >&6; }
1780238106Sdes
1781238106Sdes# So?  What about this header?
1782238106Sdescase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1783238106Sdes  yes:no: )
1784238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1785238106Sdes$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1786238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1787238106Sdes$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1788238106Sdes    ;;
1789238106Sdes  no:yes:* )
1790238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1791238106Sdes$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1792238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1793238106Sdes$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1794238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1795238106Sdes$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1796238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1797238106Sdes$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1798238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1799238106Sdes$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1800238106Sdes( $as_echo "## ---------------------------------------- ##
1801238106Sdes## Report this to unbound-bugs@nlnetlabs.nl ##
1802238106Sdes## ---------------------------------------- ##"
1803238106Sdes     ) | sed "s/^/$as_me: WARNING:     /" >&2
1804238106Sdes    ;;
1805238106Sdesesac
1806238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807238106Sdes$as_echo_n "checking for $2... " >&6; }
1808238106Sdesif eval \${$3+:} false; then :
1809238106Sdes  $as_echo_n "(cached) " >&6
1810238106Sdeselse
1811238106Sdes  eval "$3=\$ac_header_compiler"
1812238106Sdesfi
1813238106Sdeseval ac_res=\$$3
1814238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815238106Sdes$as_echo "$ac_res" >&6; }
1816238106Sdesfi
1817238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1818238106Sdes
1819238106Sdes} # ac_fn_c_check_header_mongrel
1820238106Sdes
1821238106Sdes# ac_fn_c_try_run LINENO
1822238106Sdes# ----------------------
1823238106Sdes# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1824238106Sdes# that executables *can* be run.
1825238106Sdesac_fn_c_try_run ()
1826238106Sdes{
1827238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828238106Sdes  if { { ac_try="$ac_link"
1829238106Sdescase "(($ac_try" in
1830238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1831238106Sdes  *) ac_try_echo=$ac_try;;
1832238106Sdesesac
1833238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1834238106Sdes$as_echo "$ac_try_echo"; } >&5
1835238106Sdes  (eval "$ac_link") 2>&5
1836238106Sdes  ac_status=$?
1837238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1838238106Sdes  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1839238106Sdes  { { case "(($ac_try" in
1840238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841238106Sdes  *) ac_try_echo=$ac_try;;
1842238106Sdesesac
1843238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844238106Sdes$as_echo "$ac_try_echo"; } >&5
1845238106Sdes  (eval "$ac_try") 2>&5
1846238106Sdes  ac_status=$?
1847238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1848238106Sdes  test $ac_status = 0; }; }; then :
1849238106Sdes  ac_retval=0
1850238106Sdeselse
1851238106Sdes  $as_echo "$as_me: program exited with status $ac_status" >&5
1852238106Sdes       $as_echo "$as_me: failed program was:" >&5
1853238106Sdessed 's/^/| /' conftest.$ac_ext >&5
1854238106Sdes
1855238106Sdes       ac_retval=$ac_status
1856238106Sdesfi
1857238106Sdes  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1858238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1859238106Sdes  as_fn_set_status $ac_retval
1860238106Sdes
1861238106Sdes} # ac_fn_c_try_run
1862238106Sdes
1863238106Sdes# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1864238106Sdes# -------------------------------------------------------
1865238106Sdes# Tests whether HEADER exists and can be compiled using the include files in
1866238106Sdes# INCLUDES, setting the cache variable VAR accordingly.
1867238106Sdesac_fn_c_check_header_compile ()
1868238106Sdes{
1869238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871238106Sdes$as_echo_n "checking for $2... " >&6; }
1872238106Sdesif eval \${$3+:} false; then :
1873238106Sdes  $as_echo_n "(cached) " >&6
1874238106Sdeselse
1875238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876238106Sdes/* end confdefs.h.  */
1877238106Sdes$4
1878238106Sdes#include <$2>
1879238106Sdes_ACEOF
1880238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
1881238106Sdes  eval "$3=yes"
1882238106Sdeselse
1883238106Sdes  eval "$3=no"
1884238106Sdesfi
1885238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886238106Sdesfi
1887238106Sdeseval ac_res=\$$3
1888238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889238106Sdes$as_echo "$ac_res" >&6; }
1890238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1891238106Sdes
1892238106Sdes} # ac_fn_c_check_header_compile
1893238106Sdes
1894238106Sdes# ac_fn_c_try_link LINENO
1895238106Sdes# -----------------------
1896238106Sdes# Try to link conftest.$ac_ext, and return whether this succeeded.
1897238106Sdesac_fn_c_try_link ()
1898238106Sdes{
1899238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900238106Sdes  rm -f conftest.$ac_objext conftest$ac_exeext
1901238106Sdes  if { { ac_try="$ac_link"
1902238106Sdescase "(($ac_try" in
1903238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904238106Sdes  *) ac_try_echo=$ac_try;;
1905238106Sdesesac
1906238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907238106Sdes$as_echo "$ac_try_echo"; } >&5
1908238106Sdes  (eval "$ac_link") 2>conftest.err
1909238106Sdes  ac_status=$?
1910238106Sdes  if test -s conftest.err; then
1911238106Sdes    grep -v '^ *+' conftest.err >conftest.er1
1912238106Sdes    cat conftest.er1 >&5
1913238106Sdes    mv -f conftest.er1 conftest.err
1914238106Sdes  fi
1915238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916238106Sdes  test $ac_status = 0; } && {
1917238106Sdes	 test -z "$ac_c_werror_flag" ||
1918238106Sdes	 test ! -s conftest.err
1919238106Sdes       } && test -s conftest$ac_exeext && {
1920238106Sdes	 test "$cross_compiling" = yes ||
1921249141Sdes	 test -x conftest$ac_exeext
1922238106Sdes       }; then :
1923238106Sdes  ac_retval=0
1924238106Sdeselse
1925238106Sdes  $as_echo "$as_me: failed program was:" >&5
1926238106Sdessed 's/^/| /' conftest.$ac_ext >&5
1927238106Sdes
1928238106Sdes	ac_retval=1
1929238106Sdesfi
1930238106Sdes  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1931238106Sdes  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1932238106Sdes  # interfere with the next link command; also delete a directory that is
1933238106Sdes  # left behind by Apple's compiler.  We do this before executing the actions.
1934238106Sdes  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1935238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1936238106Sdes  as_fn_set_status $ac_retval
1937238106Sdes
1938238106Sdes} # ac_fn_c_try_link
1939238106Sdes
1940238106Sdes# ac_fn_c_check_func LINENO FUNC VAR
1941238106Sdes# ----------------------------------
1942238106Sdes# Tests whether FUNC exists, setting the cache variable VAR accordingly
1943238106Sdesac_fn_c_check_func ()
1944238106Sdes{
1945238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1947238106Sdes$as_echo_n "checking for $2... " >&6; }
1948238106Sdesif eval \${$3+:} false; then :
1949238106Sdes  $as_echo_n "(cached) " >&6
1950238106Sdeselse
1951238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952238106Sdes/* end confdefs.h.  */
1953238106Sdes/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1954238106Sdes   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1955238106Sdes#define $2 innocuous_$2
1956238106Sdes
1957238106Sdes/* System header to define __stub macros and hopefully few prototypes,
1958238106Sdes    which can conflict with char $2 (); below.
1959238106Sdes    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1960238106Sdes    <limits.h> exists even on freestanding compilers.  */
1961238106Sdes
1962238106Sdes#ifdef __STDC__
1963238106Sdes# include <limits.h>
1964238106Sdes#else
1965238106Sdes# include <assert.h>
1966238106Sdes#endif
1967238106Sdes
1968238106Sdes#undef $2
1969238106Sdes
1970238106Sdes/* Override any GCC internal prototype to avoid an error.
1971238106Sdes   Use char because int might match the return type of a GCC
1972238106Sdes   builtin and then its argument prototype would still apply.  */
1973238106Sdes#ifdef __cplusplus
1974238106Sdesextern "C"
1975238106Sdes#endif
1976238106Sdeschar $2 ();
1977238106Sdes/* The GNU C library defines this for functions which it implements
1978238106Sdes    to always fail with ENOSYS.  Some functions are actually named
1979238106Sdes    something starting with __ and the normal name is an alias.  */
1980238106Sdes#if defined __stub_$2 || defined __stub___$2
1981238106Sdeschoke me
1982238106Sdes#endif
1983238106Sdes
1984238106Sdesint
1985238106Sdesmain ()
1986238106Sdes{
1987238106Sdesreturn $2 ();
1988238106Sdes  ;
1989238106Sdes  return 0;
1990238106Sdes}
1991238106Sdes_ACEOF
1992238106Sdesif ac_fn_c_try_link "$LINENO"; then :
1993238106Sdes  eval "$3=yes"
1994238106Sdeselse
1995238106Sdes  eval "$3=no"
1996238106Sdesfi
1997238106Sdesrm -f core conftest.err conftest.$ac_objext \
1998238106Sdes    conftest$ac_exeext conftest.$ac_ext
1999238106Sdesfi
2000238106Sdeseval ac_res=\$$3
2001238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002238106Sdes$as_echo "$ac_res" >&6; }
2003238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004238106Sdes
2005238106Sdes} # ac_fn_c_check_func
2006238106Sdes
2007238106Sdes# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2008238106Sdes# -------------------------------------------
2009238106Sdes# Tests whether TYPE exists after having included INCLUDES, setting cache
2010238106Sdes# variable VAR accordingly.
2011238106Sdesac_fn_c_check_type ()
2012238106Sdes{
2013238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2015238106Sdes$as_echo_n "checking for $2... " >&6; }
2016238106Sdesif eval \${$3+:} false; then :
2017238106Sdes  $as_echo_n "(cached) " >&6
2018238106Sdeselse
2019238106Sdes  eval "$3=no"
2020238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021238106Sdes/* end confdefs.h.  */
2022238106Sdes$4
2023238106Sdesint
2024238106Sdesmain ()
2025238106Sdes{
2026238106Sdesif (sizeof ($2))
2027238106Sdes	 return 0;
2028238106Sdes  ;
2029238106Sdes  return 0;
2030238106Sdes}
2031238106Sdes_ACEOF
2032238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
2033238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034238106Sdes/* end confdefs.h.  */
2035238106Sdes$4
2036238106Sdesint
2037238106Sdesmain ()
2038238106Sdes{
2039238106Sdesif (sizeof (($2)))
2040238106Sdes	    return 0;
2041238106Sdes  ;
2042238106Sdes  return 0;
2043238106Sdes}
2044238106Sdes_ACEOF
2045238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
2046238106Sdes
2047238106Sdeselse
2048238106Sdes  eval "$3=yes"
2049238106Sdesfi
2050238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051238106Sdesfi
2052238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053238106Sdesfi
2054238106Sdeseval ac_res=\$$3
2055238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2056238106Sdes$as_echo "$ac_res" >&6; }
2057238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2058238106Sdes
2059238106Sdes} # ac_fn_c_check_type
2060238106Sdes
2061269257Sdes# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2062269257Sdes# --------------------------------------------
2063269257Sdes# Tries to find the compile-time value of EXPR in a program that includes
2064269257Sdes# INCLUDES, setting VAR accordingly. Returns whether the value could be
2065269257Sdes# computed
2066269257Sdesac_fn_c_compute_int ()
2067269257Sdes{
2068269257Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069269257Sdes  if test "$cross_compiling" = yes; then
2070269257Sdes    # Depending upon the size, compute the lo and hi bounds.
2071269257Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072269257Sdes/* end confdefs.h.  */
2073269257Sdes$4
2074269257Sdesint
2075269257Sdesmain ()
2076269257Sdes{
2077269257Sdesstatic int test_array [1 - 2 * !(($2) >= 0)];
2078269257Sdestest_array [0] = 0;
2079269257Sdesreturn test_array [0];
2080269257Sdes
2081269257Sdes  ;
2082269257Sdes  return 0;
2083269257Sdes}
2084269257Sdes_ACEOF
2085269257Sdesif ac_fn_c_try_compile "$LINENO"; then :
2086269257Sdes  ac_lo=0 ac_mid=0
2087269257Sdes  while :; do
2088269257Sdes    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089269257Sdes/* end confdefs.h.  */
2090269257Sdes$4
2091269257Sdesint
2092269257Sdesmain ()
2093269257Sdes{
2094269257Sdesstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
2095269257Sdestest_array [0] = 0;
2096269257Sdesreturn test_array [0];
2097269257Sdes
2098269257Sdes  ;
2099269257Sdes  return 0;
2100269257Sdes}
2101269257Sdes_ACEOF
2102269257Sdesif ac_fn_c_try_compile "$LINENO"; then :
2103269257Sdes  ac_hi=$ac_mid; break
2104269257Sdeselse
2105269257Sdes  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2106269257Sdes			if test $ac_lo -le $ac_mid; then
2107269257Sdes			  ac_lo= ac_hi=
2108269257Sdes			  break
2109269257Sdes			fi
2110269257Sdes			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2111269257Sdesfi
2112269257Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113269257Sdes  done
2114269257Sdeselse
2115269257Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116269257Sdes/* end confdefs.h.  */
2117269257Sdes$4
2118269257Sdesint
2119269257Sdesmain ()
2120269257Sdes{
2121269257Sdesstatic int test_array [1 - 2 * !(($2) < 0)];
2122269257Sdestest_array [0] = 0;
2123269257Sdesreturn test_array [0];
2124269257Sdes
2125269257Sdes  ;
2126269257Sdes  return 0;
2127269257Sdes}
2128269257Sdes_ACEOF
2129269257Sdesif ac_fn_c_try_compile "$LINENO"; then :
2130269257Sdes  ac_hi=-1 ac_mid=-1
2131269257Sdes  while :; do
2132269257Sdes    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133269257Sdes/* end confdefs.h.  */
2134269257Sdes$4
2135269257Sdesint
2136269257Sdesmain ()
2137269257Sdes{
2138269257Sdesstatic int test_array [1 - 2 * !(($2) >= $ac_mid)];
2139269257Sdestest_array [0] = 0;
2140269257Sdesreturn test_array [0];
2141269257Sdes
2142269257Sdes  ;
2143269257Sdes  return 0;
2144269257Sdes}
2145269257Sdes_ACEOF
2146269257Sdesif ac_fn_c_try_compile "$LINENO"; then :
2147269257Sdes  ac_lo=$ac_mid; break
2148269257Sdeselse
2149269257Sdes  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2150269257Sdes			if test $ac_mid -le $ac_hi; then
2151269257Sdes			  ac_lo= ac_hi=
2152269257Sdes			  break
2153269257Sdes			fi
2154269257Sdes			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2155269257Sdesfi
2156269257Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157269257Sdes  done
2158269257Sdeselse
2159269257Sdes  ac_lo= ac_hi=
2160269257Sdesfi
2161269257Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162269257Sdesfi
2163269257Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164269257Sdes# Binary search between lo and hi bounds.
2165269257Sdeswhile test "x$ac_lo" != "x$ac_hi"; do
2166269257Sdes  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2167269257Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168269257Sdes/* end confdefs.h.  */
2169269257Sdes$4
2170269257Sdesint
2171269257Sdesmain ()
2172269257Sdes{
2173269257Sdesstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
2174269257Sdestest_array [0] = 0;
2175269257Sdesreturn test_array [0];
2176269257Sdes
2177269257Sdes  ;
2178269257Sdes  return 0;
2179269257Sdes}
2180269257Sdes_ACEOF
2181269257Sdesif ac_fn_c_try_compile "$LINENO"; then :
2182269257Sdes  ac_hi=$ac_mid
2183269257Sdeselse
2184269257Sdes  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2185269257Sdesfi
2186269257Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187269257Sdesdone
2188269257Sdescase $ac_lo in #((
2189269257Sdes?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2190269257Sdes'') ac_retval=1 ;;
2191269257Sdesesac
2192269257Sdes  else
2193269257Sdes    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194269257Sdes/* end confdefs.h.  */
2195269257Sdes$4
2196269257Sdesstatic long int longval () { return $2; }
2197269257Sdesstatic unsigned long int ulongval () { return $2; }
2198269257Sdes#include <stdio.h>
2199269257Sdes#include <stdlib.h>
2200269257Sdesint
2201269257Sdesmain ()
2202269257Sdes{
2203269257Sdes
2204269257Sdes  FILE *f = fopen ("conftest.val", "w");
2205269257Sdes  if (! f)
2206269257Sdes    return 1;
2207269257Sdes  if (($2) < 0)
2208269257Sdes    {
2209269257Sdes      long int i = longval ();
2210269257Sdes      if (i != ($2))
2211269257Sdes	return 1;
2212269257Sdes      fprintf (f, "%ld", i);
2213269257Sdes    }
2214269257Sdes  else
2215269257Sdes    {
2216269257Sdes      unsigned long int i = ulongval ();
2217269257Sdes      if (i != ($2))
2218269257Sdes	return 1;
2219269257Sdes      fprintf (f, "%lu", i);
2220269257Sdes    }
2221269257Sdes  /* Do not output a trailing newline, as this causes \r\n confusion
2222269257Sdes     on some platforms.  */
2223269257Sdes  return ferror (f) || fclose (f) != 0;
2224269257Sdes
2225269257Sdes  ;
2226269257Sdes  return 0;
2227269257Sdes}
2228269257Sdes_ACEOF
2229269257Sdesif ac_fn_c_try_run "$LINENO"; then :
2230269257Sdes  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2231269257Sdeselse
2232269257Sdes  ac_retval=1
2233269257Sdesfi
2234269257Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2235269257Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
2236269257Sdesrm -f conftest.val
2237269257Sdes
2238269257Sdes  fi
2239269257Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240269257Sdes  as_fn_set_status $ac_retval
2241269257Sdes
2242269257Sdes} # ac_fn_c_compute_int
2243269257Sdes
2244238106Sdes# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2245238106Sdes# ---------------------------------------------
2246238106Sdes# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2247238106Sdes# accordingly.
2248238106Sdesac_fn_c_check_decl ()
2249238106Sdes{
2250238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251238106Sdes  as_decl_name=`echo $2|sed 's/ *(.*//'`
2252238106Sdes  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2253238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2254238106Sdes$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2255238106Sdesif eval \${$3+:} false; then :
2256238106Sdes  $as_echo_n "(cached) " >&6
2257238106Sdeselse
2258238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259238106Sdes/* end confdefs.h.  */
2260238106Sdes$4
2261238106Sdesint
2262238106Sdesmain ()
2263238106Sdes{
2264238106Sdes#ifndef $as_decl_name
2265238106Sdes#ifdef __cplusplus
2266238106Sdes  (void) $as_decl_use;
2267238106Sdes#else
2268238106Sdes  (void) $as_decl_name;
2269238106Sdes#endif
2270238106Sdes#endif
2271238106Sdes
2272238106Sdes  ;
2273238106Sdes  return 0;
2274238106Sdes}
2275238106Sdes_ACEOF
2276238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
2277238106Sdes  eval "$3=yes"
2278238106Sdeselse
2279238106Sdes  eval "$3=no"
2280238106Sdesfi
2281238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282238106Sdesfi
2283238106Sdeseval ac_res=\$$3
2284238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285238106Sdes$as_echo "$ac_res" >&6; }
2286238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2287238106Sdes
2288238106Sdes} # ac_fn_c_check_decl
2289238106Sdes
2290238106Sdes# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2291238106Sdes# ----------------------------------------------------
2292238106Sdes# Tries to find if the field MEMBER exists in type AGGR, after including
2293238106Sdes# INCLUDES, setting cache variable VAR accordingly.
2294238106Sdesac_fn_c_check_member ()
2295238106Sdes{
2296238106Sdes  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2298238106Sdes$as_echo_n "checking for $2.$3... " >&6; }
2299238106Sdesif eval \${$4+:} false; then :
2300238106Sdes  $as_echo_n "(cached) " >&6
2301238106Sdeselse
2302238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303238106Sdes/* end confdefs.h.  */
2304238106Sdes$5
2305238106Sdesint
2306238106Sdesmain ()
2307238106Sdes{
2308238106Sdesstatic $2 ac_aggr;
2309238106Sdesif (ac_aggr.$3)
2310238106Sdesreturn 0;
2311238106Sdes  ;
2312238106Sdes  return 0;
2313238106Sdes}
2314238106Sdes_ACEOF
2315238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
2316238106Sdes  eval "$4=yes"
2317238106Sdeselse
2318238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319238106Sdes/* end confdefs.h.  */
2320238106Sdes$5
2321238106Sdesint
2322238106Sdesmain ()
2323238106Sdes{
2324238106Sdesstatic $2 ac_aggr;
2325238106Sdesif (sizeof ac_aggr.$3)
2326238106Sdesreturn 0;
2327238106Sdes  ;
2328238106Sdes  return 0;
2329238106Sdes}
2330238106Sdes_ACEOF
2331238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
2332238106Sdes  eval "$4=yes"
2333238106Sdeselse
2334238106Sdes  eval "$4=no"
2335238106Sdesfi
2336238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337238106Sdesfi
2338238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339238106Sdesfi
2340238106Sdeseval ac_res=\$$4
2341238106Sdes	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342238106Sdes$as_echo "$ac_res" >&6; }
2343238106Sdes  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344238106Sdes
2345238106Sdes} # ac_fn_c_check_member
2346238106Sdescat >config.log <<_ACEOF
2347238106SdesThis file contains any messages produced by compilers while
2348238106Sdesrunning configure, to aid debugging if configure makes a mistake.
2349238106Sdes
2350294190SdesIt was created by unbound $as_me 1.5.7, which was
2351249141Sdesgenerated by GNU Autoconf 2.69.  Invocation command line was
2352238106Sdes
2353238106Sdes  $ $0 $@
2354238106Sdes
2355238106Sdes_ACEOF
2356238106Sdesexec 5>>config.log
2357238106Sdes{
2358238106Sdescat <<_ASUNAME
2359238106Sdes## --------- ##
2360238106Sdes## Platform. ##
2361238106Sdes## --------- ##
2362238106Sdes
2363238106Sdeshostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2364238106Sdesuname -m = `(uname -m) 2>/dev/null || echo unknown`
2365238106Sdesuname -r = `(uname -r) 2>/dev/null || echo unknown`
2366238106Sdesuname -s = `(uname -s) 2>/dev/null || echo unknown`
2367238106Sdesuname -v = `(uname -v) 2>/dev/null || echo unknown`
2368238106Sdes
2369238106Sdes/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2370238106Sdes/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2371238106Sdes
2372238106Sdes/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2373238106Sdes/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2374238106Sdes/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2375238106Sdes/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2376238106Sdes/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2377238106Sdes/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2378238106Sdes/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2379238106Sdes
2380238106Sdes_ASUNAME
2381238106Sdes
2382238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2383238106Sdesfor as_dir in $PATH
2384238106Sdesdo
2385238106Sdes  IFS=$as_save_IFS
2386238106Sdes  test -z "$as_dir" && as_dir=.
2387238106Sdes    $as_echo "PATH: $as_dir"
2388238106Sdes  done
2389238106SdesIFS=$as_save_IFS
2390238106Sdes
2391238106Sdes} >&5
2392238106Sdes
2393238106Sdescat >&5 <<_ACEOF
2394238106Sdes
2395238106Sdes
2396238106Sdes## ----------- ##
2397238106Sdes## Core tests. ##
2398238106Sdes## ----------- ##
2399238106Sdes
2400238106Sdes_ACEOF
2401238106Sdes
2402238106Sdes
2403238106Sdes# Keep a trace of the command line.
2404238106Sdes# Strip out --no-create and --no-recursion so they do not pile up.
2405238106Sdes# Strip out --silent because we don't want to record it for future runs.
2406238106Sdes# Also quote any args containing shell meta-characters.
2407238106Sdes# Make two passes to allow for proper duplicate-argument suppression.
2408238106Sdesac_configure_args=
2409238106Sdesac_configure_args0=
2410238106Sdesac_configure_args1=
2411238106Sdesac_must_keep_next=false
2412238106Sdesfor ac_pass in 1 2
2413238106Sdesdo
2414238106Sdes  for ac_arg
2415238106Sdes  do
2416238106Sdes    case $ac_arg in
2417238106Sdes    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2418238106Sdes    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2419238106Sdes    | -silent | --silent | --silen | --sile | --sil)
2420238106Sdes      continue ;;
2421238106Sdes    *\'*)
2422238106Sdes      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2423238106Sdes    esac
2424238106Sdes    case $ac_pass in
2425238106Sdes    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2426238106Sdes    2)
2427238106Sdes      as_fn_append ac_configure_args1 " '$ac_arg'"
2428238106Sdes      if test $ac_must_keep_next = true; then
2429238106Sdes	ac_must_keep_next=false # Got value, back to normal.
2430238106Sdes      else
2431238106Sdes	case $ac_arg in
2432238106Sdes	  *=* | --config-cache | -C | -disable-* | --disable-* \
2433238106Sdes	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2434238106Sdes	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2435238106Sdes	  | -with-* | --with-* | -without-* | --without-* | --x)
2436238106Sdes	    case "$ac_configure_args0 " in
2437238106Sdes	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2438238106Sdes	    esac
2439238106Sdes	    ;;
2440238106Sdes	  -* ) ac_must_keep_next=true ;;
2441238106Sdes	esac
2442238106Sdes      fi
2443238106Sdes      as_fn_append ac_configure_args " '$ac_arg'"
2444238106Sdes      ;;
2445238106Sdes    esac
2446238106Sdes  done
2447238106Sdesdone
2448238106Sdes{ ac_configure_args0=; unset ac_configure_args0;}
2449238106Sdes{ ac_configure_args1=; unset ac_configure_args1;}
2450238106Sdes
2451238106Sdes# When interrupted or exit'd, cleanup temporary files, and complete
2452238106Sdes# config.log.  We remove comments because anyway the quotes in there
2453238106Sdes# would cause problems or look ugly.
2454238106Sdes# WARNING: Use '\'' to represent an apostrophe within the trap.
2455238106Sdes# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2456238106Sdestrap 'exit_status=$?
2457238106Sdes  # Save into config.log some information that might help in debugging.
2458238106Sdes  {
2459238106Sdes    echo
2460238106Sdes
2461238106Sdes    $as_echo "## ---------------- ##
2462238106Sdes## Cache variables. ##
2463238106Sdes## ---------------- ##"
2464238106Sdes    echo
2465238106Sdes    # The following way of writing the cache mishandles newlines in values,
2466238106Sdes(
2467238106Sdes  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2468238106Sdes    eval ac_val=\$$ac_var
2469238106Sdes    case $ac_val in #(
2470238106Sdes    *${as_nl}*)
2471238106Sdes      case $ac_var in #(
2472238106Sdes      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2473238106Sdes$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2474238106Sdes      esac
2475238106Sdes      case $ac_var in #(
2476238106Sdes      _ | IFS | as_nl) ;; #(
2477238106Sdes      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2478238106Sdes      *) { eval $ac_var=; unset $ac_var;} ;;
2479238106Sdes      esac ;;
2480238106Sdes    esac
2481238106Sdes  done
2482238106Sdes  (set) 2>&1 |
2483238106Sdes    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2484238106Sdes    *${as_nl}ac_space=\ *)
2485238106Sdes      sed -n \
2486238106Sdes	"s/'\''/'\''\\\\'\'''\''/g;
2487238106Sdes	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2488238106Sdes      ;; #(
2489238106Sdes    *)
2490238106Sdes      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2491238106Sdes      ;;
2492238106Sdes    esac |
2493238106Sdes    sort
2494238106Sdes)
2495238106Sdes    echo
2496238106Sdes
2497238106Sdes    $as_echo "## ----------------- ##
2498238106Sdes## Output variables. ##
2499238106Sdes## ----------------- ##"
2500238106Sdes    echo
2501238106Sdes    for ac_var in $ac_subst_vars
2502238106Sdes    do
2503238106Sdes      eval ac_val=\$$ac_var
2504238106Sdes      case $ac_val in
2505238106Sdes      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2506238106Sdes      esac
2507238106Sdes      $as_echo "$ac_var='\''$ac_val'\''"
2508238106Sdes    done | sort
2509238106Sdes    echo
2510238106Sdes
2511238106Sdes    if test -n "$ac_subst_files"; then
2512238106Sdes      $as_echo "## ------------------- ##
2513238106Sdes## File substitutions. ##
2514238106Sdes## ------------------- ##"
2515238106Sdes      echo
2516238106Sdes      for ac_var in $ac_subst_files
2517238106Sdes      do
2518238106Sdes	eval ac_val=\$$ac_var
2519238106Sdes	case $ac_val in
2520238106Sdes	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2521238106Sdes	esac
2522238106Sdes	$as_echo "$ac_var='\''$ac_val'\''"
2523238106Sdes      done | sort
2524238106Sdes      echo
2525238106Sdes    fi
2526238106Sdes
2527238106Sdes    if test -s confdefs.h; then
2528238106Sdes      $as_echo "## ----------- ##
2529238106Sdes## confdefs.h. ##
2530238106Sdes## ----------- ##"
2531238106Sdes      echo
2532238106Sdes      cat confdefs.h
2533238106Sdes      echo
2534238106Sdes    fi
2535238106Sdes    test "$ac_signal" != 0 &&
2536238106Sdes      $as_echo "$as_me: caught signal $ac_signal"
2537238106Sdes    $as_echo "$as_me: exit $exit_status"
2538238106Sdes  } >&5
2539238106Sdes  rm -f core *.core core.conftest.* &&
2540238106Sdes    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2541238106Sdes    exit $exit_status
2542238106Sdes' 0
2543238106Sdesfor ac_signal in 1 2 13 15; do
2544238106Sdes  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2545238106Sdesdone
2546238106Sdesac_signal=0
2547238106Sdes
2548238106Sdes# confdefs.h avoids OS command line length limits that DEFS can exceed.
2549238106Sdesrm -f -r conftest* confdefs.h
2550238106Sdes
2551238106Sdes$as_echo "/* confdefs.h */" > confdefs.h
2552238106Sdes
2553238106Sdes# Predefined preprocessor variables.
2554238106Sdes
2555238106Sdescat >>confdefs.h <<_ACEOF
2556238106Sdes#define PACKAGE_NAME "$PACKAGE_NAME"
2557238106Sdes_ACEOF
2558238106Sdes
2559238106Sdescat >>confdefs.h <<_ACEOF
2560238106Sdes#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561238106Sdes_ACEOF
2562238106Sdes
2563238106Sdescat >>confdefs.h <<_ACEOF
2564238106Sdes#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565238106Sdes_ACEOF
2566238106Sdes
2567238106Sdescat >>confdefs.h <<_ACEOF
2568238106Sdes#define PACKAGE_STRING "$PACKAGE_STRING"
2569238106Sdes_ACEOF
2570238106Sdes
2571238106Sdescat >>confdefs.h <<_ACEOF
2572238106Sdes#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573238106Sdes_ACEOF
2574238106Sdes
2575238106Sdescat >>confdefs.h <<_ACEOF
2576238106Sdes#define PACKAGE_URL "$PACKAGE_URL"
2577238106Sdes_ACEOF
2578238106Sdes
2579238106Sdes
2580238106Sdes# Let the site file select an alternate cache file if it wants to.
2581238106Sdes# Prefer an explicitly selected file to automatically selected ones.
2582238106Sdesac_site_file1=NONE
2583238106Sdesac_site_file2=NONE
2584238106Sdesif test -n "$CONFIG_SITE"; then
2585238106Sdes  # We do not want a PATH search for config.site.
2586238106Sdes  case $CONFIG_SITE in #((
2587238106Sdes    -*)  ac_site_file1=./$CONFIG_SITE;;
2588238106Sdes    */*) ac_site_file1=$CONFIG_SITE;;
2589238106Sdes    *)   ac_site_file1=./$CONFIG_SITE;;
2590238106Sdes  esac
2591238106Sdeselif test "x$prefix" != xNONE; then
2592238106Sdes  ac_site_file1=$prefix/share/config.site
2593238106Sdes  ac_site_file2=$prefix/etc/config.site
2594238106Sdeselse
2595238106Sdes  ac_site_file1=$ac_default_prefix/share/config.site
2596238106Sdes  ac_site_file2=$ac_default_prefix/etc/config.site
2597238106Sdesfi
2598238106Sdesfor ac_site_file in "$ac_site_file1" "$ac_site_file2"
2599238106Sdesdo
2600238106Sdes  test "x$ac_site_file" = xNONE && continue
2601238106Sdes  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2602238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2603238106Sdes$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2604238106Sdes    sed 's/^/| /' "$ac_site_file" >&5
2605238106Sdes    . "$ac_site_file" \
2606238106Sdes      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2607238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2608238106Sdesas_fn_error $? "failed to load site script $ac_site_file
2609238106SdesSee \`config.log' for more details" "$LINENO" 5; }
2610238106Sdes  fi
2611238106Sdesdone
2612238106Sdes
2613238106Sdesif test -r "$cache_file"; then
2614238106Sdes  # Some versions of bash will fail to source /dev/null (special files
2615238106Sdes  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2616238106Sdes  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2617238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2618238106Sdes$as_echo "$as_me: loading cache $cache_file" >&6;}
2619238106Sdes    case $cache_file in
2620238106Sdes      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2621238106Sdes      *)                      . "./$cache_file";;
2622238106Sdes    esac
2623238106Sdes  fi
2624238106Sdeselse
2625238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2626238106Sdes$as_echo "$as_me: creating cache $cache_file" >&6;}
2627238106Sdes  >$cache_file
2628238106Sdesfi
2629238106Sdes
2630238106Sdes# Check that the precious variables saved in the cache have kept the same
2631238106Sdes# value.
2632238106Sdesac_cache_corrupted=false
2633238106Sdesfor ac_var in $ac_precious_vars; do
2634238106Sdes  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2635238106Sdes  eval ac_new_set=\$ac_env_${ac_var}_set
2636238106Sdes  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2637238106Sdes  eval ac_new_val=\$ac_env_${ac_var}_value
2638238106Sdes  case $ac_old_set,$ac_new_set in
2639238106Sdes    set,)
2640238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2641238106Sdes$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2642238106Sdes      ac_cache_corrupted=: ;;
2643238106Sdes    ,set)
2644238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2645238106Sdes$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2646238106Sdes      ac_cache_corrupted=: ;;
2647238106Sdes    ,);;
2648238106Sdes    *)
2649238106Sdes      if test "x$ac_old_val" != "x$ac_new_val"; then
2650238106Sdes	# differences in whitespace do not lead to failure.
2651238106Sdes	ac_old_val_w=`echo x $ac_old_val`
2652238106Sdes	ac_new_val_w=`echo x $ac_new_val`
2653238106Sdes	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2654238106Sdes	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2655238106Sdes$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2656238106Sdes	  ac_cache_corrupted=:
2657238106Sdes	else
2658238106Sdes	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2659238106Sdes$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2660238106Sdes	  eval $ac_var=\$ac_old_val
2661238106Sdes	fi
2662238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2663238106Sdes$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2664238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2665238106Sdes$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2666238106Sdes      fi;;
2667238106Sdes  esac
2668238106Sdes  # Pass precious variables to config.status.
2669238106Sdes  if test "$ac_new_set" = set; then
2670238106Sdes    case $ac_new_val in
2671238106Sdes    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2672238106Sdes    *) ac_arg=$ac_var=$ac_new_val ;;
2673238106Sdes    esac
2674238106Sdes    case " $ac_configure_args " in
2675238106Sdes      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2676238106Sdes      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2677238106Sdes    esac
2678238106Sdes  fi
2679238106Sdesdone
2680238106Sdesif $ac_cache_corrupted; then
2681238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2684238106Sdes$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2685238106Sdes  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2686238106Sdesfi
2687238106Sdes## -------------------- ##
2688238106Sdes## Main body of script. ##
2689238106Sdes## -------------------- ##
2690238106Sdes
2691238106Sdesac_ext=c
2692238106Sdesac_cpp='$CPP $CPPFLAGS'
2693238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
2696238106Sdes
2697238106Sdes
2698269257SdesUNBOUND_VERSION_MAJOR=1
2699238106Sdes
2700285206SdesUNBOUND_VERSION_MINOR=5
2701269257Sdes
2702294190SdesUNBOUND_VERSION_MICRO=7
2703269257Sdes
2704269257Sdes
2705285206SdesLIBUNBOUND_CURRENT=5
2706294190SdesLIBUNBOUND_REVISION=10
2707285206SdesLIBUNBOUND_AGE=3
2708238106Sdes# 1.0.0 had 0:12:0
2709238106Sdes# 1.0.1 had 0:13:0
2710238106Sdes# 1.0.2 had 0:14:0
2711238106Sdes# 1.1.0 had 0:15:0
2712238106Sdes# 1.1.1 had 0:16:0
2713238106Sdes# 1.2.0 had 0:17:0
2714238106Sdes# 1.2.1 had 0:18:0
2715238106Sdes# 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2716238106Sdes# 1.3.1 had 1:1:0
2717238106Sdes# 1.3.2 had 1:2:0
2718238106Sdes# 1.3.3 had 1:3:0
2719238106Sdes# 1.3.4 had 1:4:0
2720238106Sdes# 1.4.0-snapshots had 1:5:0
2721238106Sdes# 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2722238106Sdes# 1.4.1 had 2:1:0
2723238106Sdes# 1.4.2 had 2:2:0
2724238106Sdes# 1.4.3 had 2:3:0
2725238106Sdes# 1.4.4 had 2:4:0
2726238106Sdes# 1.4.5 had 2:5:0
2727238106Sdes# 1.4.6 had 2:6:0
2728238106Sdes# 1.4.7 had 2:7:0
2729238106Sdes# 1.4.8 had 2:8:0
2730238106Sdes# 1.4.9 had 2:9:0
2731238106Sdes# 1.4.10 had 2:10:0
2732238106Sdes# 1.4.11 had 2:11:0
2733238106Sdes# 1.4.12 had 2:12:0
2734238106Sdes# 1.4.13 had 2:13:0
2735238106Sdes# and 1.4.13p1 and 1.4.13.p2
2736238106Sdes# 1.4.14 had 2:14:0
2737238106Sdes# 1.4.15 had 3:0:1 # adds ub_version()
2738238106Sdes# 1.4.16 had 3:1:1
2739238106Sdes# 1.4.17 had 3:2:1
2740249141Sdes# 1.4.18 had 3:3:1
2741249141Sdes# 1.4.19 had 3:4:1
2742269257Sdes# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2743269257Sdes# 1.4.21 had 4:1:2
2744285206Sdes# 1.4.22 had 4:1:2
2745285206Sdes# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2746285206Sdes# 1.5.1 had 5:3:3
2747285206Sdes# 1.5.2 had 5:5:3
2748285206Sdes# 1.5.3 had 5:6:3
2749291767Sdes# 1.5.4 had 5:7:3
2750291767Sdes# 1.5.5 had 5:8:3
2751294190Sdes# 1.5.6 had 5:9:3
2752294190Sdes# 1.5.7 had 5:10:3
2753238106Sdes
2754238106Sdes#   Current  -- the number of the binary API that we're implementing
2755238106Sdes#   Revision -- which iteration of the implementation of the binary
2756238106Sdes#               API are we supplying?
2757238106Sdes#   Age      -- How many previous binary API versions do we also
2758238106Sdes#               support?
2759238106Sdes#
2760238106Sdes# If we release a new version that does not change the binary API,
2761238106Sdes# increment Revision.
2762238106Sdes#
2763238106Sdes# If we release a new version that changes the binary API, but does
2764238106Sdes# not break programs compiled against the old binary API, increment
2765238106Sdes# Current and Age.  Set Revision to 0, since this is the first
2766238106Sdes# implementation of the new API.
2767238106Sdes#
2768238106Sdes# Otherwise, we're changing the binary API and breaking bakward
2769238106Sdes# compatibility with old binaries.  Increment Current.  Set Age to 0,
2770238106Sdes# since we're backward compatible with no previous APIs.  Set Revision
2771238106Sdes# to 0 too.
2772238106Sdes
2773238106Sdes
2774238106Sdes
2775238106Sdes
2776238106SdesCFLAGS="$CFLAGS"
2777238106Sdesac_ext=c
2778238106Sdesac_cpp='$CPP $CPPFLAGS'
2779238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2780238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2781238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
2782238106Sdesif test -n "$ac_tool_prefix"; then
2783238106Sdes  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2784238106Sdesset dummy ${ac_tool_prefix}gcc; ac_word=$2
2785238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2786238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
2787238106Sdesif ${ac_cv_prog_CC+:} false; then :
2788238106Sdes  $as_echo_n "(cached) " >&6
2789238106Sdeselse
2790238106Sdes  if test -n "$CC"; then
2791238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
2792238106Sdeselse
2793238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2794238106Sdesfor as_dir in $PATH
2795238106Sdesdo
2796238106Sdes  IFS=$as_save_IFS
2797238106Sdes  test -z "$as_dir" && as_dir=.
2798238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
2799249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2800238106Sdes    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2801238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2802238106Sdes    break 2
2803238106Sdes  fi
2804238106Sdesdone
2805238106Sdes  done
2806238106SdesIFS=$as_save_IFS
2807238106Sdes
2808238106Sdesfi
2809238106Sdesfi
2810238106SdesCC=$ac_cv_prog_CC
2811238106Sdesif test -n "$CC"; then
2812238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2813238106Sdes$as_echo "$CC" >&6; }
2814238106Sdeselse
2815238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2816238106Sdes$as_echo "no" >&6; }
2817238106Sdesfi
2818238106Sdes
2819238106Sdes
2820238106Sdesfi
2821238106Sdesif test -z "$ac_cv_prog_CC"; then
2822238106Sdes  ac_ct_CC=$CC
2823238106Sdes  # Extract the first word of "gcc", so it can be a program name with args.
2824238106Sdesset dummy gcc; ac_word=$2
2825238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2826238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
2827238106Sdesif ${ac_cv_prog_ac_ct_CC+:} false; then :
2828238106Sdes  $as_echo_n "(cached) " >&6
2829238106Sdeselse
2830238106Sdes  if test -n "$ac_ct_CC"; then
2831238106Sdes  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2832238106Sdeselse
2833238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2834238106Sdesfor as_dir in $PATH
2835238106Sdesdo
2836238106Sdes  IFS=$as_save_IFS
2837238106Sdes  test -z "$as_dir" && as_dir=.
2838238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
2839249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2840238106Sdes    ac_cv_prog_ac_ct_CC="gcc"
2841238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2842238106Sdes    break 2
2843238106Sdes  fi
2844238106Sdesdone
2845238106Sdes  done
2846238106SdesIFS=$as_save_IFS
2847238106Sdes
2848238106Sdesfi
2849238106Sdesfi
2850238106Sdesac_ct_CC=$ac_cv_prog_ac_ct_CC
2851238106Sdesif test -n "$ac_ct_CC"; then
2852238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2853238106Sdes$as_echo "$ac_ct_CC" >&6; }
2854238106Sdeselse
2855238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2856238106Sdes$as_echo "no" >&6; }
2857238106Sdesfi
2858238106Sdes
2859238106Sdes  if test "x$ac_ct_CC" = x; then
2860238106Sdes    CC=""
2861238106Sdes  else
2862238106Sdes    case $cross_compiling:$ac_tool_warned in
2863238106Sdesyes:)
2864238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2865238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2866238106Sdesac_tool_warned=yes ;;
2867238106Sdesesac
2868238106Sdes    CC=$ac_ct_CC
2869238106Sdes  fi
2870238106Sdeselse
2871238106Sdes  CC="$ac_cv_prog_CC"
2872238106Sdesfi
2873238106Sdes
2874238106Sdesif test -z "$CC"; then
2875238106Sdes          if test -n "$ac_tool_prefix"; then
2876238106Sdes    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2877238106Sdesset dummy ${ac_tool_prefix}cc; ac_word=$2
2878238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
2880238106Sdesif ${ac_cv_prog_CC+:} false; then :
2881238106Sdes  $as_echo_n "(cached) " >&6
2882238106Sdeselse
2883238106Sdes  if test -n "$CC"; then
2884238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
2885238106Sdeselse
2886238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887238106Sdesfor as_dir in $PATH
2888238106Sdesdo
2889238106Sdes  IFS=$as_save_IFS
2890238106Sdes  test -z "$as_dir" && as_dir=.
2891238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
2892249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2893238106Sdes    ac_cv_prog_CC="${ac_tool_prefix}cc"
2894238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895238106Sdes    break 2
2896238106Sdes  fi
2897238106Sdesdone
2898238106Sdes  done
2899238106SdesIFS=$as_save_IFS
2900238106Sdes
2901238106Sdesfi
2902238106Sdesfi
2903238106SdesCC=$ac_cv_prog_CC
2904238106Sdesif test -n "$CC"; then
2905238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2906238106Sdes$as_echo "$CC" >&6; }
2907238106Sdeselse
2908238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909238106Sdes$as_echo "no" >&6; }
2910238106Sdesfi
2911238106Sdes
2912238106Sdes
2913238106Sdes  fi
2914238106Sdesfi
2915238106Sdesif test -z "$CC"; then
2916238106Sdes  # Extract the first word of "cc", so it can be a program name with args.
2917238106Sdesset dummy cc; ac_word=$2
2918238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2919238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
2920238106Sdesif ${ac_cv_prog_CC+:} false; then :
2921238106Sdes  $as_echo_n "(cached) " >&6
2922238106Sdeselse
2923238106Sdes  if test -n "$CC"; then
2924238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
2925238106Sdeselse
2926238106Sdes  ac_prog_rejected=no
2927238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928238106Sdesfor as_dir in $PATH
2929238106Sdesdo
2930238106Sdes  IFS=$as_save_IFS
2931238106Sdes  test -z "$as_dir" && as_dir=.
2932238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
2933249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2934238106Sdes    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2935238106Sdes       ac_prog_rejected=yes
2936238106Sdes       continue
2937238106Sdes     fi
2938238106Sdes    ac_cv_prog_CC="cc"
2939238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2940238106Sdes    break 2
2941238106Sdes  fi
2942238106Sdesdone
2943238106Sdes  done
2944238106SdesIFS=$as_save_IFS
2945238106Sdes
2946238106Sdesif test $ac_prog_rejected = yes; then
2947238106Sdes  # We found a bogon in the path, so make sure we never use it.
2948238106Sdes  set dummy $ac_cv_prog_CC
2949238106Sdes  shift
2950238106Sdes  if test $# != 0; then
2951238106Sdes    # We chose a different compiler from the bogus one.
2952238106Sdes    # However, it has the same basename, so the bogon will be chosen
2953238106Sdes    # first if we set CC to just the basename; use the full file name.
2954238106Sdes    shift
2955238106Sdes    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2956238106Sdes  fi
2957238106Sdesfi
2958238106Sdesfi
2959238106Sdesfi
2960238106SdesCC=$ac_cv_prog_CC
2961238106Sdesif test -n "$CC"; then
2962238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2963238106Sdes$as_echo "$CC" >&6; }
2964238106Sdeselse
2965238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2966238106Sdes$as_echo "no" >&6; }
2967238106Sdesfi
2968238106Sdes
2969238106Sdes
2970238106Sdesfi
2971238106Sdesif test -z "$CC"; then
2972238106Sdes  if test -n "$ac_tool_prefix"; then
2973238106Sdes  for ac_prog in cl.exe
2974238106Sdes  do
2975238106Sdes    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2976238106Sdesset dummy $ac_tool_prefix$ac_prog; ac_word=$2
2977238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2978238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
2979238106Sdesif ${ac_cv_prog_CC+:} false; then :
2980238106Sdes  $as_echo_n "(cached) " >&6
2981238106Sdeselse
2982238106Sdes  if test -n "$CC"; then
2983238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
2984238106Sdeselse
2985238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2986238106Sdesfor as_dir in $PATH
2987238106Sdesdo
2988238106Sdes  IFS=$as_save_IFS
2989238106Sdes  test -z "$as_dir" && as_dir=.
2990238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
2991249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2992238106Sdes    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2993238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2994238106Sdes    break 2
2995238106Sdes  fi
2996238106Sdesdone
2997238106Sdes  done
2998238106SdesIFS=$as_save_IFS
2999238106Sdes
3000238106Sdesfi
3001238106Sdesfi
3002238106SdesCC=$ac_cv_prog_CC
3003238106Sdesif test -n "$CC"; then
3004238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3005238106Sdes$as_echo "$CC" >&6; }
3006238106Sdeselse
3007238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3008238106Sdes$as_echo "no" >&6; }
3009238106Sdesfi
3010238106Sdes
3011238106Sdes
3012238106Sdes    test -n "$CC" && break
3013238106Sdes  done
3014238106Sdesfi
3015238106Sdesif test -z "$CC"; then
3016238106Sdes  ac_ct_CC=$CC
3017238106Sdes  for ac_prog in cl.exe
3018238106Sdesdo
3019238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
3020238106Sdesset dummy $ac_prog; ac_word=$2
3021238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3022238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
3023238106Sdesif ${ac_cv_prog_ac_ct_CC+:} false; then :
3024238106Sdes  $as_echo_n "(cached) " >&6
3025238106Sdeselse
3026238106Sdes  if test -n "$ac_ct_CC"; then
3027238106Sdes  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3028238106Sdeselse
3029238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3030238106Sdesfor as_dir in $PATH
3031238106Sdesdo
3032238106Sdes  IFS=$as_save_IFS
3033238106Sdes  test -z "$as_dir" && as_dir=.
3034238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
3035249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3036238106Sdes    ac_cv_prog_ac_ct_CC="$ac_prog"
3037238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3038238106Sdes    break 2
3039238106Sdes  fi
3040238106Sdesdone
3041238106Sdes  done
3042238106SdesIFS=$as_save_IFS
3043238106Sdes
3044238106Sdesfi
3045238106Sdesfi
3046238106Sdesac_ct_CC=$ac_cv_prog_ac_ct_CC
3047238106Sdesif test -n "$ac_ct_CC"; then
3048238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3049238106Sdes$as_echo "$ac_ct_CC" >&6; }
3050238106Sdeselse
3051238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052238106Sdes$as_echo "no" >&6; }
3053238106Sdesfi
3054238106Sdes
3055238106Sdes
3056238106Sdes  test -n "$ac_ct_CC" && break
3057238106Sdesdone
3058238106Sdes
3059238106Sdes  if test "x$ac_ct_CC" = x; then
3060238106Sdes    CC=""
3061238106Sdes  else
3062238106Sdes    case $cross_compiling:$ac_tool_warned in
3063238106Sdesyes:)
3064238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3065238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3066238106Sdesac_tool_warned=yes ;;
3067238106Sdesesac
3068238106Sdes    CC=$ac_ct_CC
3069238106Sdes  fi
3070238106Sdesfi
3071238106Sdes
3072238106Sdesfi
3073238106Sdes
3074238106Sdes
3075238106Sdestest -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3076238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3077238106Sdesas_fn_error $? "no acceptable C compiler found in \$PATH
3078238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3079238106Sdes
3080238106Sdes# Provide some information about the compiler.
3081238106Sdes$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3082238106Sdesset X $ac_compile
3083238106Sdesac_compiler=$2
3084238106Sdesfor ac_option in --version -v -V -qversion; do
3085238106Sdes  { { ac_try="$ac_compiler $ac_option >&5"
3086238106Sdescase "(($ac_try" in
3087238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3088238106Sdes  *) ac_try_echo=$ac_try;;
3089238106Sdesesac
3090238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3091238106Sdes$as_echo "$ac_try_echo"; } >&5
3092238106Sdes  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3093238106Sdes  ac_status=$?
3094238106Sdes  if test -s conftest.err; then
3095238106Sdes    sed '10a\
3096238106Sdes... rest of stderr output deleted ...
3097238106Sdes         10q' conftest.err >conftest.er1
3098238106Sdes    cat conftest.er1 >&5
3099238106Sdes  fi
3100238106Sdes  rm -f conftest.er1 conftest.err
3101238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3102238106Sdes  test $ac_status = 0; }
3103238106Sdesdone
3104238106Sdes
3105238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
3106238106Sdes/* end confdefs.h.  */
3107238106Sdes
3108238106Sdesint
3109238106Sdesmain ()
3110238106Sdes{
3111238106Sdes
3112238106Sdes  ;
3113238106Sdes  return 0;
3114238106Sdes}
3115238106Sdes_ACEOF
3116238106Sdesac_clean_files_save=$ac_clean_files
3117238106Sdesac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3118238106Sdes# Try to create an executable without -o first, disregard a.out.
3119238106Sdes# It will help us diagnose broken compilers, and finding out an intuition
3120238106Sdes# of exeext.
3121238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3122238106Sdes$as_echo_n "checking whether the C compiler works... " >&6; }
3123238106Sdesac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3124238106Sdes
3125238106Sdes# The possible output files:
3126238106Sdesac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3127238106Sdes
3128238106Sdesac_rmfiles=
3129238106Sdesfor ac_file in $ac_files
3130238106Sdesdo
3131238106Sdes  case $ac_file in
3132238106Sdes    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3133238106Sdes    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3134238106Sdes  esac
3135238106Sdesdone
3136238106Sdesrm -f $ac_rmfiles
3137238106Sdes
3138238106Sdesif { { ac_try="$ac_link_default"
3139238106Sdescase "(($ac_try" in
3140238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3141238106Sdes  *) ac_try_echo=$ac_try;;
3142238106Sdesesac
3143238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3144238106Sdes$as_echo "$ac_try_echo"; } >&5
3145238106Sdes  (eval "$ac_link_default") 2>&5
3146238106Sdes  ac_status=$?
3147238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3148238106Sdes  test $ac_status = 0; }; then :
3149238106Sdes  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3150238106Sdes# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3151238106Sdes# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3152238106Sdes# so that the user can short-circuit this test for compilers unknown to
3153238106Sdes# Autoconf.
3154238106Sdesfor ac_file in $ac_files ''
3155238106Sdesdo
3156238106Sdes  test -f "$ac_file" || continue
3157238106Sdes  case $ac_file in
3158238106Sdes    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3159238106Sdes	;;
3160238106Sdes    [ab].out )
3161238106Sdes	# We found the default executable, but exeext='' is most
3162238106Sdes	# certainly right.
3163238106Sdes	break;;
3164238106Sdes    *.* )
3165238106Sdes	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3166238106Sdes	then :; else
3167238106Sdes	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3168238106Sdes	fi
3169238106Sdes	# We set ac_cv_exeext here because the later test for it is not
3170238106Sdes	# safe: cross compilers may not add the suffix if given an `-o'
3171238106Sdes	# argument, so we may need to know it at that point already.
3172238106Sdes	# Even if this section looks crufty: it has the advantage of
3173238106Sdes	# actually working.
3174238106Sdes	break;;
3175238106Sdes    * )
3176238106Sdes	break;;
3177238106Sdes  esac
3178238106Sdesdone
3179238106Sdestest "$ac_cv_exeext" = no && ac_cv_exeext=
3180238106Sdes
3181238106Sdeselse
3182238106Sdes  ac_file=''
3183238106Sdesfi
3184238106Sdesif test -z "$ac_file"; then :
3185238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3186238106Sdes$as_echo "no" >&6; }
3187238106Sdes$as_echo "$as_me: failed program was:" >&5
3188238106Sdessed 's/^/| /' conftest.$ac_ext >&5
3189238106Sdes
3190238106Sdes{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3191238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3192238106Sdesas_fn_error 77 "C compiler cannot create executables
3193238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3194238106Sdeselse
3195238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3196238106Sdes$as_echo "yes" >&6; }
3197238106Sdesfi
3198238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3199238106Sdes$as_echo_n "checking for C compiler default output file name... " >&6; }
3200238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3201238106Sdes$as_echo "$ac_file" >&6; }
3202238106Sdesac_exeext=$ac_cv_exeext
3203238106Sdes
3204238106Sdesrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3205238106Sdesac_clean_files=$ac_clean_files_save
3206238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3207238106Sdes$as_echo_n "checking for suffix of executables... " >&6; }
3208238106Sdesif { { ac_try="$ac_link"
3209238106Sdescase "(($ac_try" in
3210238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3211238106Sdes  *) ac_try_echo=$ac_try;;
3212238106Sdesesac
3213238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3214238106Sdes$as_echo "$ac_try_echo"; } >&5
3215238106Sdes  (eval "$ac_link") 2>&5
3216238106Sdes  ac_status=$?
3217238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3218238106Sdes  test $ac_status = 0; }; then :
3219238106Sdes  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3220238106Sdes# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3221238106Sdes# work properly (i.e., refer to `conftest.exe'), while it won't with
3222238106Sdes# `rm'.
3223238106Sdesfor ac_file in conftest.exe conftest conftest.*; do
3224238106Sdes  test -f "$ac_file" || continue
3225238106Sdes  case $ac_file in
3226238106Sdes    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3227238106Sdes    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3228238106Sdes	  break;;
3229238106Sdes    * ) break;;
3230238106Sdes  esac
3231238106Sdesdone
3232238106Sdeselse
3233238106Sdes  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3234238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3235238106Sdesas_fn_error $? "cannot compute suffix of executables: cannot compile and link
3236238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3237238106Sdesfi
3238238106Sdesrm -f conftest conftest$ac_cv_exeext
3239238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3240238106Sdes$as_echo "$ac_cv_exeext" >&6; }
3241238106Sdes
3242238106Sdesrm -f conftest.$ac_ext
3243238106SdesEXEEXT=$ac_cv_exeext
3244238106Sdesac_exeext=$EXEEXT
3245238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
3246238106Sdes/* end confdefs.h.  */
3247238106Sdes#include <stdio.h>
3248238106Sdesint
3249238106Sdesmain ()
3250238106Sdes{
3251238106SdesFILE *f = fopen ("conftest.out", "w");
3252238106Sdes return ferror (f) || fclose (f) != 0;
3253238106Sdes
3254238106Sdes  ;
3255238106Sdes  return 0;
3256238106Sdes}
3257238106Sdes_ACEOF
3258238106Sdesac_clean_files="$ac_clean_files conftest.out"
3259238106Sdes# Check that the compiler produces executables we can run.  If not, either
3260238106Sdes# the compiler is broken, or we cross compile.
3261238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3262238106Sdes$as_echo_n "checking whether we are cross compiling... " >&6; }
3263238106Sdesif test "$cross_compiling" != yes; then
3264238106Sdes  { { ac_try="$ac_link"
3265238106Sdescase "(($ac_try" in
3266238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3267238106Sdes  *) ac_try_echo=$ac_try;;
3268238106Sdesesac
3269238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3270238106Sdes$as_echo "$ac_try_echo"; } >&5
3271238106Sdes  (eval "$ac_link") 2>&5
3272238106Sdes  ac_status=$?
3273238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3274238106Sdes  test $ac_status = 0; }
3275238106Sdes  if { ac_try='./conftest$ac_cv_exeext'
3276238106Sdes  { { case "(($ac_try" in
3277238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3278238106Sdes  *) ac_try_echo=$ac_try;;
3279238106Sdesesac
3280238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3281238106Sdes$as_echo "$ac_try_echo"; } >&5
3282238106Sdes  (eval "$ac_try") 2>&5
3283238106Sdes  ac_status=$?
3284238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3285238106Sdes  test $ac_status = 0; }; }; then
3286238106Sdes    cross_compiling=no
3287238106Sdes  else
3288238106Sdes    if test "$cross_compiling" = maybe; then
3289238106Sdes	cross_compiling=yes
3290238106Sdes    else
3291238106Sdes	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3292238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3293238106Sdesas_fn_error $? "cannot run C compiled programs.
3294238106SdesIf you meant to cross compile, use \`--host'.
3295238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3296238106Sdes    fi
3297238106Sdes  fi
3298238106Sdesfi
3299238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3300238106Sdes$as_echo "$cross_compiling" >&6; }
3301238106Sdes
3302238106Sdesrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3303238106Sdesac_clean_files=$ac_clean_files_save
3304238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3305238106Sdes$as_echo_n "checking for suffix of object files... " >&6; }
3306238106Sdesif ${ac_cv_objext+:} false; then :
3307238106Sdes  $as_echo_n "(cached) " >&6
3308238106Sdeselse
3309238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3310238106Sdes/* end confdefs.h.  */
3311238106Sdes
3312238106Sdesint
3313238106Sdesmain ()
3314238106Sdes{
3315238106Sdes
3316238106Sdes  ;
3317238106Sdes  return 0;
3318238106Sdes}
3319238106Sdes_ACEOF
3320238106Sdesrm -f conftest.o conftest.obj
3321238106Sdesif { { ac_try="$ac_compile"
3322238106Sdescase "(($ac_try" in
3323238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3324238106Sdes  *) ac_try_echo=$ac_try;;
3325238106Sdesesac
3326238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3327238106Sdes$as_echo "$ac_try_echo"; } >&5
3328238106Sdes  (eval "$ac_compile") 2>&5
3329238106Sdes  ac_status=$?
3330238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3331238106Sdes  test $ac_status = 0; }; then :
3332238106Sdes  for ac_file in conftest.o conftest.obj conftest.*; do
3333238106Sdes  test -f "$ac_file" || continue;
3334238106Sdes  case $ac_file in
3335238106Sdes    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3336238106Sdes    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3337238106Sdes       break;;
3338238106Sdes  esac
3339238106Sdesdone
3340238106Sdeselse
3341238106Sdes  $as_echo "$as_me: failed program was:" >&5
3342238106Sdessed 's/^/| /' conftest.$ac_ext >&5
3343238106Sdes
3344238106Sdes{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3345238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346238106Sdesas_fn_error $? "cannot compute suffix of object files: cannot compile
3347238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3348238106Sdesfi
3349238106Sdesrm -f conftest.$ac_cv_objext conftest.$ac_ext
3350238106Sdesfi
3351238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3352238106Sdes$as_echo "$ac_cv_objext" >&6; }
3353238106SdesOBJEXT=$ac_cv_objext
3354238106Sdesac_objext=$OBJEXT
3355238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3356238106Sdes$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3357238106Sdesif ${ac_cv_c_compiler_gnu+:} false; then :
3358238106Sdes  $as_echo_n "(cached) " >&6
3359238106Sdeselse
3360238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361238106Sdes/* end confdefs.h.  */
3362238106Sdes
3363238106Sdesint
3364238106Sdesmain ()
3365238106Sdes{
3366238106Sdes#ifndef __GNUC__
3367238106Sdes       choke me
3368238106Sdes#endif
3369238106Sdes
3370238106Sdes  ;
3371238106Sdes  return 0;
3372238106Sdes}
3373238106Sdes_ACEOF
3374238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
3375238106Sdes  ac_compiler_gnu=yes
3376238106Sdeselse
3377238106Sdes  ac_compiler_gnu=no
3378238106Sdesfi
3379238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3380238106Sdesac_cv_c_compiler_gnu=$ac_compiler_gnu
3381238106Sdes
3382238106Sdesfi
3383238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3384238106Sdes$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3385238106Sdesif test $ac_compiler_gnu = yes; then
3386238106Sdes  GCC=yes
3387238106Sdeselse
3388238106Sdes  GCC=
3389238106Sdesfi
3390238106Sdesac_test_CFLAGS=${CFLAGS+set}
3391238106Sdesac_save_CFLAGS=$CFLAGS
3392238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3393238106Sdes$as_echo_n "checking whether $CC accepts -g... " >&6; }
3394238106Sdesif ${ac_cv_prog_cc_g+:} false; then :
3395238106Sdes  $as_echo_n "(cached) " >&6
3396238106Sdeselse
3397238106Sdes  ac_save_c_werror_flag=$ac_c_werror_flag
3398238106Sdes   ac_c_werror_flag=yes
3399238106Sdes   ac_cv_prog_cc_g=no
3400238106Sdes   CFLAGS="-g"
3401238106Sdes   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402238106Sdes/* end confdefs.h.  */
3403238106Sdes
3404238106Sdesint
3405238106Sdesmain ()
3406238106Sdes{
3407238106Sdes
3408238106Sdes  ;
3409238106Sdes  return 0;
3410238106Sdes}
3411238106Sdes_ACEOF
3412238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
3413238106Sdes  ac_cv_prog_cc_g=yes
3414238106Sdeselse
3415238106Sdes  CFLAGS=""
3416238106Sdes      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3417238106Sdes/* end confdefs.h.  */
3418238106Sdes
3419238106Sdesint
3420238106Sdesmain ()
3421238106Sdes{
3422238106Sdes
3423238106Sdes  ;
3424238106Sdes  return 0;
3425238106Sdes}
3426238106Sdes_ACEOF
3427238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
3428238106Sdes
3429238106Sdeselse
3430238106Sdes  ac_c_werror_flag=$ac_save_c_werror_flag
3431238106Sdes	 CFLAGS="-g"
3432238106Sdes	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3433238106Sdes/* end confdefs.h.  */
3434238106Sdes
3435238106Sdesint
3436238106Sdesmain ()
3437238106Sdes{
3438238106Sdes
3439238106Sdes  ;
3440238106Sdes  return 0;
3441238106Sdes}
3442238106Sdes_ACEOF
3443238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
3444238106Sdes  ac_cv_prog_cc_g=yes
3445238106Sdesfi
3446238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3447238106Sdesfi
3448238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3449238106Sdesfi
3450238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3451238106Sdes   ac_c_werror_flag=$ac_save_c_werror_flag
3452238106Sdesfi
3453238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3454238106Sdes$as_echo "$ac_cv_prog_cc_g" >&6; }
3455238106Sdesif test "$ac_test_CFLAGS" = set; then
3456238106Sdes  CFLAGS=$ac_save_CFLAGS
3457238106Sdeselif test $ac_cv_prog_cc_g = yes; then
3458238106Sdes  if test "$GCC" = yes; then
3459238106Sdes    CFLAGS="-g -O2"
3460238106Sdes  else
3461238106Sdes    CFLAGS="-g"
3462238106Sdes  fi
3463238106Sdeselse
3464238106Sdes  if test "$GCC" = yes; then
3465238106Sdes    CFLAGS="-O2"
3466238106Sdes  else
3467238106Sdes    CFLAGS=
3468238106Sdes  fi
3469238106Sdesfi
3470238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3471238106Sdes$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3472238106Sdesif ${ac_cv_prog_cc_c89+:} false; then :
3473238106Sdes  $as_echo_n "(cached) " >&6
3474238106Sdeselse
3475238106Sdes  ac_cv_prog_cc_c89=no
3476238106Sdesac_save_CC=$CC
3477238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
3478238106Sdes/* end confdefs.h.  */
3479238106Sdes#include <stdarg.h>
3480238106Sdes#include <stdio.h>
3481249141Sdesstruct stat;
3482238106Sdes/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3483238106Sdesstruct buf { int x; };
3484238106SdesFILE * (*rcsopen) (struct buf *, struct stat *, int);
3485238106Sdesstatic char *e (p, i)
3486238106Sdes     char **p;
3487238106Sdes     int i;
3488238106Sdes{
3489238106Sdes  return p[i];
3490238106Sdes}
3491238106Sdesstatic char *f (char * (*g) (char **, int), char **p, ...)
3492238106Sdes{
3493238106Sdes  char *s;
3494238106Sdes  va_list v;
3495238106Sdes  va_start (v,p);
3496238106Sdes  s = g (p, va_arg (v,int));
3497238106Sdes  va_end (v);
3498238106Sdes  return s;
3499238106Sdes}
3500238106Sdes
3501238106Sdes/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3502238106Sdes   function prototypes and stuff, but not '\xHH' hex character constants.
3503238106Sdes   These don't provoke an error unfortunately, instead are silently treated
3504238106Sdes   as 'x'.  The following induces an error, until -std is added to get
3505238106Sdes   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3506238106Sdes   array size at least.  It's necessary to write '\x00'==0 to get something
3507238106Sdes   that's true only with -std.  */
3508238106Sdesint osf4_cc_array ['\x00' == 0 ? 1 : -1];
3509238106Sdes
3510238106Sdes/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3511238106Sdes   inside strings and character constants.  */
3512238106Sdes#define FOO(x) 'x'
3513238106Sdesint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3514238106Sdes
3515238106Sdesint test (int i, double x);
3516238106Sdesstruct s1 {int (*f) (int a);};
3517238106Sdesstruct s2 {int (*f) (double a);};
3518238106Sdesint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3519238106Sdesint argc;
3520238106Sdeschar **argv;
3521238106Sdesint
3522238106Sdesmain ()
3523238106Sdes{
3524238106Sdesreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3525238106Sdes  ;
3526238106Sdes  return 0;
3527238106Sdes}
3528238106Sdes_ACEOF
3529238106Sdesfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3530238106Sdes	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3531238106Sdesdo
3532238106Sdes  CC="$ac_save_CC $ac_arg"
3533238106Sdes  if ac_fn_c_try_compile "$LINENO"; then :
3534238106Sdes  ac_cv_prog_cc_c89=$ac_arg
3535238106Sdesfi
3536238106Sdesrm -f core conftest.err conftest.$ac_objext
3537238106Sdes  test "x$ac_cv_prog_cc_c89" != "xno" && break
3538238106Sdesdone
3539238106Sdesrm -f conftest.$ac_ext
3540238106SdesCC=$ac_save_CC
3541238106Sdes
3542238106Sdesfi
3543238106Sdes# AC_CACHE_VAL
3544238106Sdescase "x$ac_cv_prog_cc_c89" in
3545238106Sdes  x)
3546238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3547238106Sdes$as_echo "none needed" >&6; } ;;
3548238106Sdes  xno)
3549238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3550238106Sdes$as_echo "unsupported" >&6; } ;;
3551238106Sdes  *)
3552238106Sdes    CC="$CC $ac_cv_prog_cc_c89"
3553238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3554238106Sdes$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3555238106Sdesesac
3556238106Sdesif test "x$ac_cv_prog_cc_c89" != xno; then :
3557238106Sdes
3558238106Sdesfi
3559238106Sdes
3560238106Sdesac_ext=c
3561238106Sdesac_cpp='$CPP $CPPFLAGS'
3562238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3563238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3564238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
3565238106Sdes
3566238106Sdes
3567238106Sdesac_ext=c
3568238106Sdesac_cpp='$CPP $CPPFLAGS'
3569238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3570238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3571238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
3572238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3573238106Sdes$as_echo_n "checking how to run the C preprocessor... " >&6; }
3574238106Sdes# On Suns, sometimes $CPP names a directory.
3575238106Sdesif test -n "$CPP" && test -d "$CPP"; then
3576238106Sdes  CPP=
3577238106Sdesfi
3578238106Sdesif test -z "$CPP"; then
3579238106Sdes  if ${ac_cv_prog_CPP+:} false; then :
3580238106Sdes  $as_echo_n "(cached) " >&6
3581238106Sdeselse
3582238106Sdes      # Double quotes because CPP needs to be expanded
3583238106Sdes    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3584238106Sdes    do
3585238106Sdes      ac_preproc_ok=false
3586238106Sdesfor ac_c_preproc_warn_flag in '' yes
3587238106Sdesdo
3588238106Sdes  # Use a header file that comes with gcc, so configuring glibc
3589238106Sdes  # with a fresh cross-compiler works.
3590238106Sdes  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3591238106Sdes  # <limits.h> exists even on freestanding compilers.
3592238106Sdes  # On the NeXT, cc -E runs the code through the compiler's parser,
3593238106Sdes  # not just through cpp. "Syntax error" is here to catch this case.
3594238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3595238106Sdes/* end confdefs.h.  */
3596238106Sdes#ifdef __STDC__
3597238106Sdes# include <limits.h>
3598238106Sdes#else
3599238106Sdes# include <assert.h>
3600238106Sdes#endif
3601238106Sdes		     Syntax error
3602238106Sdes_ACEOF
3603238106Sdesif ac_fn_c_try_cpp "$LINENO"; then :
3604238106Sdes
3605238106Sdeselse
3606238106Sdes  # Broken: fails on valid input.
3607238106Sdescontinue
3608238106Sdesfi
3609238106Sdesrm -f conftest.err conftest.i conftest.$ac_ext
3610238106Sdes
3611238106Sdes  # OK, works on sane cases.  Now check whether nonexistent headers
3612238106Sdes  # can be detected and how.
3613238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3614238106Sdes/* end confdefs.h.  */
3615238106Sdes#include <ac_nonexistent.h>
3616238106Sdes_ACEOF
3617238106Sdesif ac_fn_c_try_cpp "$LINENO"; then :
3618238106Sdes  # Broken: success on invalid input.
3619238106Sdescontinue
3620238106Sdeselse
3621238106Sdes  # Passes both tests.
3622238106Sdesac_preproc_ok=:
3623238106Sdesbreak
3624238106Sdesfi
3625238106Sdesrm -f conftest.err conftest.i conftest.$ac_ext
3626238106Sdes
3627238106Sdesdone
3628238106Sdes# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3629238106Sdesrm -f conftest.i conftest.err conftest.$ac_ext
3630238106Sdesif $ac_preproc_ok; then :
3631238106Sdes  break
3632238106Sdesfi
3633238106Sdes
3634238106Sdes    done
3635238106Sdes    ac_cv_prog_CPP=$CPP
3636238106Sdes
3637238106Sdesfi
3638238106Sdes  CPP=$ac_cv_prog_CPP
3639238106Sdeselse
3640238106Sdes  ac_cv_prog_CPP=$CPP
3641238106Sdesfi
3642238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3643238106Sdes$as_echo "$CPP" >&6; }
3644238106Sdesac_preproc_ok=false
3645238106Sdesfor ac_c_preproc_warn_flag in '' yes
3646238106Sdesdo
3647238106Sdes  # Use a header file that comes with gcc, so configuring glibc
3648238106Sdes  # with a fresh cross-compiler works.
3649238106Sdes  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3650238106Sdes  # <limits.h> exists even on freestanding compilers.
3651238106Sdes  # On the NeXT, cc -E runs the code through the compiler's parser,
3652238106Sdes  # not just through cpp. "Syntax error" is here to catch this case.
3653238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3654238106Sdes/* end confdefs.h.  */
3655238106Sdes#ifdef __STDC__
3656238106Sdes# include <limits.h>
3657238106Sdes#else
3658238106Sdes# include <assert.h>
3659238106Sdes#endif
3660238106Sdes		     Syntax error
3661238106Sdes_ACEOF
3662238106Sdesif ac_fn_c_try_cpp "$LINENO"; then :
3663238106Sdes
3664238106Sdeselse
3665238106Sdes  # Broken: fails on valid input.
3666238106Sdescontinue
3667238106Sdesfi
3668238106Sdesrm -f conftest.err conftest.i conftest.$ac_ext
3669238106Sdes
3670238106Sdes  # OK, works on sane cases.  Now check whether nonexistent headers
3671238106Sdes  # can be detected and how.
3672238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3673238106Sdes/* end confdefs.h.  */
3674238106Sdes#include <ac_nonexistent.h>
3675238106Sdes_ACEOF
3676238106Sdesif ac_fn_c_try_cpp "$LINENO"; then :
3677238106Sdes  # Broken: success on invalid input.
3678238106Sdescontinue
3679238106Sdeselse
3680238106Sdes  # Passes both tests.
3681238106Sdesac_preproc_ok=:
3682238106Sdesbreak
3683238106Sdesfi
3684238106Sdesrm -f conftest.err conftest.i conftest.$ac_ext
3685238106Sdes
3686238106Sdesdone
3687238106Sdes# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3688238106Sdesrm -f conftest.i conftest.err conftest.$ac_ext
3689238106Sdesif $ac_preproc_ok; then :
3690238106Sdes
3691238106Sdeselse
3692238106Sdes  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3693238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3694238106Sdesas_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3695238106SdesSee \`config.log' for more details" "$LINENO" 5; }
3696238106Sdesfi
3697238106Sdes
3698238106Sdesac_ext=c
3699238106Sdesac_cpp='$CPP $CPPFLAGS'
3700238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3701238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3702238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
3703238106Sdes
3704238106Sdes
3705238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3706238106Sdes$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3707238106Sdesif ${ac_cv_path_GREP+:} false; then :
3708238106Sdes  $as_echo_n "(cached) " >&6
3709238106Sdeselse
3710238106Sdes  if test -z "$GREP"; then
3711238106Sdes  ac_path_GREP_found=false
3712238106Sdes  # Loop through the user's path and test for each of PROGNAME-LIST
3713238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714238106Sdesfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3715238106Sdesdo
3716238106Sdes  IFS=$as_save_IFS
3717238106Sdes  test -z "$as_dir" && as_dir=.
3718238106Sdes    for ac_prog in grep ggrep; do
3719238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
3720238106Sdes      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3721249141Sdes      as_fn_executable_p "$ac_path_GREP" || continue
3722238106Sdes# Check for GNU ac_path_GREP and select it if it is found.
3723238106Sdes  # Check for GNU $ac_path_GREP
3724238106Sdescase `"$ac_path_GREP" --version 2>&1` in
3725238106Sdes*GNU*)
3726238106Sdes  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3727238106Sdes*)
3728238106Sdes  ac_count=0
3729238106Sdes  $as_echo_n 0123456789 >"conftest.in"
3730238106Sdes  while :
3731238106Sdes  do
3732238106Sdes    cat "conftest.in" "conftest.in" >"conftest.tmp"
3733238106Sdes    mv "conftest.tmp" "conftest.in"
3734238106Sdes    cp "conftest.in" "conftest.nl"
3735238106Sdes    $as_echo 'GREP' >> "conftest.nl"
3736238106Sdes    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3737238106Sdes    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3738238106Sdes    as_fn_arith $ac_count + 1 && ac_count=$as_val
3739238106Sdes    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3740238106Sdes      # Best one so far, save it but keep looking for a better one
3741238106Sdes      ac_cv_path_GREP="$ac_path_GREP"
3742238106Sdes      ac_path_GREP_max=$ac_count
3743238106Sdes    fi
3744238106Sdes    # 10*(2^10) chars as input seems more than enough
3745238106Sdes    test $ac_count -gt 10 && break
3746238106Sdes  done
3747238106Sdes  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3748238106Sdesesac
3749238106Sdes
3750238106Sdes      $ac_path_GREP_found && break 3
3751238106Sdes    done
3752238106Sdes  done
3753238106Sdes  done
3754238106SdesIFS=$as_save_IFS
3755238106Sdes  if test -z "$ac_cv_path_GREP"; then
3756238106Sdes    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3757238106Sdes  fi
3758238106Sdeselse
3759238106Sdes  ac_cv_path_GREP=$GREP
3760238106Sdesfi
3761238106Sdes
3762238106Sdesfi
3763238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3764238106Sdes$as_echo "$ac_cv_path_GREP" >&6; }
3765238106Sdes GREP="$ac_cv_path_GREP"
3766238106Sdes
3767238106Sdes
3768238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3769238106Sdes$as_echo_n "checking for egrep... " >&6; }
3770238106Sdesif ${ac_cv_path_EGREP+:} false; then :
3771238106Sdes  $as_echo_n "(cached) " >&6
3772238106Sdeselse
3773238106Sdes  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3774238106Sdes   then ac_cv_path_EGREP="$GREP -E"
3775238106Sdes   else
3776238106Sdes     if test -z "$EGREP"; then
3777238106Sdes  ac_path_EGREP_found=false
3778238106Sdes  # Loop through the user's path and test for each of PROGNAME-LIST
3779238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780238106Sdesfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3781238106Sdesdo
3782238106Sdes  IFS=$as_save_IFS
3783238106Sdes  test -z "$as_dir" && as_dir=.
3784238106Sdes    for ac_prog in egrep; do
3785238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
3786238106Sdes      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3787249141Sdes      as_fn_executable_p "$ac_path_EGREP" || continue
3788238106Sdes# Check for GNU ac_path_EGREP and select it if it is found.
3789238106Sdes  # Check for GNU $ac_path_EGREP
3790238106Sdescase `"$ac_path_EGREP" --version 2>&1` in
3791238106Sdes*GNU*)
3792238106Sdes  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3793238106Sdes*)
3794238106Sdes  ac_count=0
3795238106Sdes  $as_echo_n 0123456789 >"conftest.in"
3796238106Sdes  while :
3797238106Sdes  do
3798238106Sdes    cat "conftest.in" "conftest.in" >"conftest.tmp"
3799238106Sdes    mv "conftest.tmp" "conftest.in"
3800238106Sdes    cp "conftest.in" "conftest.nl"
3801238106Sdes    $as_echo 'EGREP' >> "conftest.nl"
3802238106Sdes    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3803238106Sdes    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3804238106Sdes    as_fn_arith $ac_count + 1 && ac_count=$as_val
3805238106Sdes    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3806238106Sdes      # Best one so far, save it but keep looking for a better one
3807238106Sdes      ac_cv_path_EGREP="$ac_path_EGREP"
3808238106Sdes      ac_path_EGREP_max=$ac_count
3809238106Sdes    fi
3810238106Sdes    # 10*(2^10) chars as input seems more than enough
3811238106Sdes    test $ac_count -gt 10 && break
3812238106Sdes  done
3813238106Sdes  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3814238106Sdesesac
3815238106Sdes
3816238106Sdes      $ac_path_EGREP_found && break 3
3817238106Sdes    done
3818238106Sdes  done
3819238106Sdes  done
3820238106SdesIFS=$as_save_IFS
3821238106Sdes  if test -z "$ac_cv_path_EGREP"; then
3822238106Sdes    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3823238106Sdes  fi
3824238106Sdeselse
3825238106Sdes  ac_cv_path_EGREP=$EGREP
3826238106Sdesfi
3827238106Sdes
3828238106Sdes   fi
3829238106Sdesfi
3830238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3831238106Sdes$as_echo "$ac_cv_path_EGREP" >&6; }
3832238106Sdes EGREP="$ac_cv_path_EGREP"
3833238106Sdes
3834238106Sdes
3835238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3836238106Sdes$as_echo_n "checking for ANSI C header files... " >&6; }
3837238106Sdesif ${ac_cv_header_stdc+:} false; then :
3838238106Sdes  $as_echo_n "(cached) " >&6
3839238106Sdeselse
3840238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3841238106Sdes/* end confdefs.h.  */
3842238106Sdes#include <stdlib.h>
3843238106Sdes#include <stdarg.h>
3844238106Sdes#include <string.h>
3845238106Sdes#include <float.h>
3846238106Sdes
3847238106Sdesint
3848238106Sdesmain ()
3849238106Sdes{
3850238106Sdes
3851238106Sdes  ;
3852238106Sdes  return 0;
3853238106Sdes}
3854238106Sdes_ACEOF
3855238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
3856238106Sdes  ac_cv_header_stdc=yes
3857238106Sdeselse
3858238106Sdes  ac_cv_header_stdc=no
3859238106Sdesfi
3860238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3861238106Sdes
3862238106Sdesif test $ac_cv_header_stdc = yes; then
3863238106Sdes  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3864238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3865238106Sdes/* end confdefs.h.  */
3866238106Sdes#include <string.h>
3867238106Sdes
3868238106Sdes_ACEOF
3869238106Sdesif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3870238106Sdes  $EGREP "memchr" >/dev/null 2>&1; then :
3871238106Sdes
3872238106Sdeselse
3873238106Sdes  ac_cv_header_stdc=no
3874238106Sdesfi
3875238106Sdesrm -f conftest*
3876238106Sdes
3877238106Sdesfi
3878238106Sdes
3879238106Sdesif test $ac_cv_header_stdc = yes; then
3880238106Sdes  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3881238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3882238106Sdes/* end confdefs.h.  */
3883238106Sdes#include <stdlib.h>
3884238106Sdes
3885238106Sdes_ACEOF
3886238106Sdesif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3887238106Sdes  $EGREP "free" >/dev/null 2>&1; then :
3888238106Sdes
3889238106Sdeselse
3890238106Sdes  ac_cv_header_stdc=no
3891238106Sdesfi
3892238106Sdesrm -f conftest*
3893238106Sdes
3894238106Sdesfi
3895238106Sdes
3896238106Sdesif test $ac_cv_header_stdc = yes; then
3897238106Sdes  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3898238106Sdes  if test "$cross_compiling" = yes; then :
3899238106Sdes  :
3900238106Sdeselse
3901238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3902238106Sdes/* end confdefs.h.  */
3903238106Sdes#include <ctype.h>
3904238106Sdes#include <stdlib.h>
3905238106Sdes#if ((' ' & 0x0FF) == 0x020)
3906238106Sdes# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3907238106Sdes# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3908238106Sdes#else
3909238106Sdes# define ISLOWER(c) \
3910238106Sdes		   (('a' <= (c) && (c) <= 'i') \
3911238106Sdes		     || ('j' <= (c) && (c) <= 'r') \
3912238106Sdes		     || ('s' <= (c) && (c) <= 'z'))
3913238106Sdes# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3914238106Sdes#endif
3915238106Sdes
3916238106Sdes#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3917238106Sdesint
3918238106Sdesmain ()
3919238106Sdes{
3920238106Sdes  int i;
3921238106Sdes  for (i = 0; i < 256; i++)
3922238106Sdes    if (XOR (islower (i), ISLOWER (i))
3923238106Sdes	|| toupper (i) != TOUPPER (i))
3924238106Sdes      return 2;
3925238106Sdes  return 0;
3926238106Sdes}
3927238106Sdes_ACEOF
3928238106Sdesif ac_fn_c_try_run "$LINENO"; then :
3929238106Sdes
3930238106Sdeselse
3931238106Sdes  ac_cv_header_stdc=no
3932238106Sdesfi
3933238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3934238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
3935238106Sdesfi
3936238106Sdes
3937238106Sdesfi
3938238106Sdesfi
3939238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3940238106Sdes$as_echo "$ac_cv_header_stdc" >&6; }
3941238106Sdesif test $ac_cv_header_stdc = yes; then
3942238106Sdes
3943238106Sdes$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3944238106Sdes
3945238106Sdesfi
3946238106Sdes
3947238106Sdes# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3948238106Sdesfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3949238106Sdes		  inttypes.h stdint.h unistd.h
3950238106Sdesdo :
3951238106Sdes  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3952238106Sdesac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3953238106Sdes"
3954238106Sdesif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3955238106Sdes  cat >>confdefs.h <<_ACEOF
3956238106Sdes#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3957238106Sdes_ACEOF
3958238106Sdes
3959238106Sdesfi
3960238106Sdes
3961238106Sdesdone
3962238106Sdes
3963238106Sdes
3964238106Sdes
3965238106Sdes  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3966238106Sdesif test "x$ac_cv_header_minix_config_h" = xyes; then :
3967238106Sdes  MINIX=yes
3968238106Sdeselse
3969238106Sdes  MINIX=
3970238106Sdesfi
3971238106Sdes
3972238106Sdes
3973238106Sdes  if test "$MINIX" = yes; then
3974238106Sdes
3975238106Sdes$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3976238106Sdes
3977238106Sdes
3978238106Sdes$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3979238106Sdes
3980238106Sdes
3981238106Sdes$as_echo "#define _MINIX 1" >>confdefs.h
3982238106Sdes
3983238106Sdes  fi
3984238106Sdes
3985238106Sdes
3986238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3987238106Sdes$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3988238106Sdesif ${ac_cv_safe_to_define___extensions__+:} false; then :
3989238106Sdes  $as_echo_n "(cached) " >&6
3990238106Sdeselse
3991238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992238106Sdes/* end confdefs.h.  */
3993238106Sdes
3994249141Sdes#         define __EXTENSIONS__ 1
3995249141Sdes          $ac_includes_default
3996238106Sdesint
3997238106Sdesmain ()
3998238106Sdes{
3999238106Sdes
4000238106Sdes  ;
4001238106Sdes  return 0;
4002238106Sdes}
4003238106Sdes_ACEOF
4004238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4005238106Sdes  ac_cv_safe_to_define___extensions__=yes
4006238106Sdeselse
4007238106Sdes  ac_cv_safe_to_define___extensions__=no
4008238106Sdesfi
4009238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4010238106Sdesfi
4011238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4012238106Sdes$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4013238106Sdes  test $ac_cv_safe_to_define___extensions__ = yes &&
4014238106Sdes    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4015238106Sdes
4016238106Sdes  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4017238106Sdes
4018238106Sdes  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4019238106Sdes
4020238106Sdes  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4021238106Sdes
4022238106Sdes  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4023238106Sdes
4024238106Sdes
4025238106Sdes
4026269257Sdesif test "$ac_cv_header_minix_config_h" = "yes"; then
4027238106Sdes
4028269257Sdes$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4029269257Sdes
4030269257Sdesfi
4031269257Sdes
4032238106Sdescase "$prefix" in
4033238106Sdes        NONE)
4034238106Sdes		prefix="/usr/local"
4035238106Sdes        ;;
4036238106Sdesesac
4037238106Sdes
4038238106Sdes# are we on MinGW?
4039238106Sdesif uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4040238106Sdeselse
4041238106Sdes	if echo $target | grep mingw32 >/dev/null; then on_mingw="yes"
4042238106Sdes	else on_mingw="no"; fi
4043238106Sdesfi
4044238106Sdes
4045238106Sdes#
4046238106Sdes# Determine configuration file
4047238106Sdes# the eval is to evaluate shell expansion twice
4048238106Sdesif test $on_mingw = "no"; then
4049238106Sdes  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4050238106Sdeselse
4051238106Sdes  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
4052238106Sdesfi
4053238106Sdes
4054238106Sdes# Check whether --with-conf_file was given.
4055238106Sdesif test "${with_conf_file+set}" = set; then :
4056238106Sdes  withval=$with_conf_file; ub_conf_file="$withval"
4057238106Sdesfi
4058238106Sdes
4059238106Sdes
4060238106Sdeshdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4061238106Sdes
4062238106Sdes
4063238106Sdescat >>confdefs.h <<_ACEOF
4064238106Sdes#define CONFIGFILE "$hdr_config"
4065238106Sdes_ACEOF
4066238106Sdes
4067285206Sdesub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4068285206Sdes$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4069285206Sdes	 X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4070285206Sdes	 X"$ub_conf_file" : 'X\(//\)$' \| \
4071285206Sdes	 X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4072285206Sdes$as_echo X"$ub_conf_file" |
4073285206Sdes    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4074285206Sdes	    s//\1/
4075285206Sdes	    q
4076285206Sdes	  }
4077285206Sdes	  /^X\(\/\/\)[^/].*/{
4078285206Sdes	    s//\1/
4079285206Sdes	    q
4080285206Sdes	  }
4081285206Sdes	  /^X\(\/\/\)$/{
4082285206Sdes	    s//\1/
4083285206Sdes	    q
4084285206Sdes	  }
4085285206Sdes	  /^X\(\/\).*/{
4086285206Sdes	    s//\1/
4087285206Sdes	    q
4088285206Sdes	  }
4089285206Sdes	  s/.*/./; q'`
4090238106Sdes
4091285206Sdes
4092238106Sdes# Determine run, chroot directory and pidfile locations
4093238106Sdes
4094238106Sdes# Check whether --with-run-dir was given.
4095238106Sdesif test "${with_run_dir+set}" = set; then :
4096238106Sdes  withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4097238106Sdeselse
4098238106Sdes  if test $on_mingw = no; then
4099238106Sdes    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4100238106Sdeselse
4101238106Sdes    UNBOUND_RUN_DIR=""
4102238106Sdesfi
4103238106Sdes
4104238106Sdesfi
4105238106Sdes
4106238106Sdes
4107238106Sdeshdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4108238106Sdes
4109238106Sdes
4110238106Sdescat >>confdefs.h <<_ACEOF
4111238106Sdes#define RUN_DIR "$hdr_run"
4112238106Sdes_ACEOF
4113238106Sdes
4114238106Sdes
4115238106Sdes
4116238106Sdes# Check whether --with-chroot-dir was given.
4117238106Sdesif test "${with_chroot_dir+set}" = set; then :
4118238106Sdes  withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4119238106Sdeselse
4120238106Sdes  if test $on_mingw = no; then
4121238106Sdes    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4122238106Sdeselse
4123238106Sdes    UNBOUND_CHROOT_DIR=""
4124238106Sdesfi
4125238106Sdes
4126238106Sdesfi
4127238106Sdes
4128238106Sdes
4129238106Sdeshdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4130238106Sdes
4131238106Sdes
4132238106Sdescat >>confdefs.h <<_ACEOF
4133238106Sdes#define CHROOT_DIR "$hdr_chroot"
4134238106Sdes_ACEOF
4135238106Sdes
4136238106Sdes
4137238106Sdes
4138238106Sdes# Check whether --with-share-dir was given.
4139238106Sdesif test "${with_share_dir+set}" = set; then :
4140238106Sdes  withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4141238106Sdeselse
4142238106Sdes  UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4143238106Sdesfi
4144238106Sdes
4145238106Sdes
4146238106Sdes
4147238106Sdescat >>confdefs.h <<_ACEOF
4148238106Sdes#define SHARE_DIR "$UNBOUND_SHARE_DIR"
4149238106Sdes_ACEOF
4150238106Sdes
4151238106Sdes
4152238106Sdes
4153238106Sdes# Check whether --with-pidfile was given.
4154238106Sdesif test "${with_pidfile+set}" = set; then :
4155238106Sdes  withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4156238106Sdeselse
4157238106Sdes  if test $on_mingw = no; then
4158238106Sdes    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4159238106Sdeselse
4160238106Sdes    UNBOUND_PIDFILE=""
4161238106Sdesfi
4162238106Sdes
4163238106Sdesfi
4164238106Sdes
4165238106Sdes
4166238106Sdeshdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4167238106Sdes
4168238106Sdes
4169238106Sdescat >>confdefs.h <<_ACEOF
4170238106Sdes#define PIDFILE "$hdr_pid"
4171238106Sdes_ACEOF
4172238106Sdes
4173238106Sdes
4174238106Sdes
4175238106Sdes# Check whether --with-rootkey-file was given.
4176238106Sdesif test "${with_rootkey_file+set}" = set; then :
4177238106Sdes  withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4178238106Sdeselse
4179238106Sdes  if test $on_mingw = no; then
4180238106Sdes    UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4181238106Sdeselse
4182238106Sdes    UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key"
4183238106Sdesfi
4184238106Sdes
4185238106Sdesfi
4186238106Sdes
4187238106Sdes
4188238106Sdeshdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4189238106Sdes
4190238106Sdes
4191238106Sdescat >>confdefs.h <<_ACEOF
4192238106Sdes#define ROOT_ANCHOR_FILE "$hdr_rkey"
4193238106Sdes_ACEOF
4194238106Sdes
4195238106Sdes
4196238106Sdes
4197238106Sdes# Check whether --with-rootcert-file was given.
4198238106Sdesif test "${with_rootcert_file+set}" = set; then :
4199238106Sdes  withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4200238106Sdeselse
4201238106Sdes  if test $on_mingw = no; then
4202238106Sdes    UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4203238106Sdeselse
4204238106Sdes    UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem"
4205238106Sdesfi
4206238106Sdes
4207238106Sdesfi
4208238106Sdes
4209238106Sdes
4210238106Sdeshdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4211238106Sdes
4212238106Sdes
4213238106Sdescat >>confdefs.h <<_ACEOF
4214238106Sdes#define ROOT_CERT_FILE "$hdr_rpem"
4215238106Sdes_ACEOF
4216238106Sdes
4217238106Sdes
4218238106Sdes
4219238106Sdes# Check whether --with-username was given.
4220238106Sdesif test "${with_username+set}" = set; then :
4221238106Sdes  withval=$with_username; UNBOUND_USERNAME="$withval"
4222238106Sdeselse
4223238106Sdes  UNBOUND_USERNAME="unbound"
4224238106Sdesfi
4225238106Sdes
4226238106Sdes
4227238106Sdes
4228238106Sdescat >>confdefs.h <<_ACEOF
4229238106Sdes#define UB_USERNAME "$UNBOUND_USERNAME"
4230238106Sdes_ACEOF
4231238106Sdes
4232238106Sdes
4233238106Sdes
4234238106Sdes$as_echo "#define WINVER 0x0502" >>confdefs.h
4235238106Sdes
4236269257Sdeswnvs=`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/' `
4237238106Sdes
4238238106Sdes
4239238106Sdescat >>confdefs.h <<_ACEOF
4240238106Sdes#define RSRC_PACKAGE_VERSION $wnvs
4241238106Sdes_ACEOF
4242238106Sdes
4243238106Sdes
4244238106Sdes# Checks for typedefs, structures, and compiler characteristics.
4245238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4246238106Sdes$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4247238106Sdesif ${ac_cv_c_const+:} false; then :
4248238106Sdes  $as_echo_n "(cached) " >&6
4249238106Sdeselse
4250238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4251238106Sdes/* end confdefs.h.  */
4252238106Sdes
4253238106Sdesint
4254238106Sdesmain ()
4255238106Sdes{
4256249141Sdes
4257238106Sdes#ifndef __cplusplus
4258249141Sdes  /* Ultrix mips cc rejects this sort of thing.  */
4259238106Sdes  typedef int charset[2];
4260249141Sdes  const charset cs = { 0, 0 };
4261238106Sdes  /* SunOS 4.1.1 cc rejects this.  */
4262238106Sdes  char const *const *pcpcc;
4263238106Sdes  char **ppc;
4264238106Sdes  /* NEC SVR4.0.2 mips cc rejects this.  */
4265238106Sdes  struct point {int x, y;};
4266238106Sdes  static struct point const zero = {0,0};
4267238106Sdes  /* AIX XL C 1.02.0.0 rejects this.
4268238106Sdes     It does not let you subtract one const X* pointer from another in
4269238106Sdes     an arm of an if-expression whose if-part is not a constant
4270238106Sdes     expression */
4271238106Sdes  const char *g = "string";
4272238106Sdes  pcpcc = &g + (g ? g-g : 0);
4273238106Sdes  /* HPUX 7.0 cc rejects these. */
4274238106Sdes  ++pcpcc;
4275238106Sdes  ppc = (char**) pcpcc;
4276238106Sdes  pcpcc = (char const *const *) ppc;
4277249141Sdes  { /* SCO 3.2v4 cc rejects this sort of thing.  */
4278249141Sdes    char tx;
4279249141Sdes    char *t = &tx;
4280238106Sdes    char const *s = 0 ? (char *) 0 : (char const *) 0;
4281238106Sdes
4282238106Sdes    *t++ = 0;
4283238106Sdes    if (s) return 0;
4284238106Sdes  }
4285238106Sdes  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4286238106Sdes    int x[] = {25, 17};
4287238106Sdes    const int *foo = &x[0];
4288238106Sdes    ++foo;
4289238106Sdes  }
4290238106Sdes  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4291238106Sdes    typedef const int *iptr;
4292238106Sdes    iptr p = 0;
4293238106Sdes    ++p;
4294238106Sdes  }
4295249141Sdes  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4296238106Sdes       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4297249141Sdes    struct s { int j; const int *ap[3]; } bx;
4298249141Sdes    struct s *b = &bx; b->j = 5;
4299238106Sdes  }
4300238106Sdes  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4301238106Sdes    const int foo = 10;
4302238106Sdes    if (!foo) return 0;
4303238106Sdes  }
4304238106Sdes  return !cs[0] && !zero.x;
4305238106Sdes#endif
4306238106Sdes
4307238106Sdes  ;
4308238106Sdes  return 0;
4309238106Sdes}
4310238106Sdes_ACEOF
4311238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4312238106Sdes  ac_cv_c_const=yes
4313238106Sdeselse
4314238106Sdes  ac_cv_c_const=no
4315238106Sdesfi
4316238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4317238106Sdesfi
4318238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4319238106Sdes$as_echo "$ac_cv_c_const" >&6; }
4320238106Sdesif test $ac_cv_c_const = no; then
4321238106Sdes
4322238106Sdes$as_echo "#define const /**/" >>confdefs.h
4323238106Sdes
4324238106Sdesfi
4325238106Sdes
4326238106Sdesac_ext=c
4327238106Sdesac_cpp='$CPP $CPPFLAGS'
4328238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4329238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4330238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
4331238106Sdes
4332249141Sdes# allow user to override the -g -O2 flags.
4333249141Sdesif test "x$CFLAGS" = "x" ; then
4334238106Sdes
4335238106Sdes
4336238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4337238106Sdes$as_echo_n "checking whether $CC supports -g... " >&6; }
4338238106Sdescache=`echo g | sed 'y%.=/+-%___p_%'`
4339238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
4340238106Sdes  $as_echo_n "(cached) " >&6
4341238106Sdeselse
4342238106Sdes
4343269257Sdesecho 'void f(void){}' >conftest.c
4344238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4345238106Sdeseval "cv_prog_cc_flag_$cache=yes"
4346238106Sdeselse
4347238106Sdeseval "cv_prog_cc_flag_$cache=no"
4348238106Sdesfi
4349238106Sdesrm -f conftest conftest.o conftest.c
4350238106Sdes
4351238106Sdesfi
4352238106Sdes
4353238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4354238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4355238106Sdes$as_echo "yes" >&6; }
4356238106Sdes:
4357238106SdesCFLAGS="$CFLAGS -g"
4358238106Sdeselse
4359238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360238106Sdes$as_echo "no" >&6; }
4361238106Sdes:
4362238106Sdes
4363238106Sdesfi
4364238106Sdes
4365238106Sdes
4366238106Sdes
4367238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4368238106Sdes$as_echo_n "checking whether $CC supports -O2... " >&6; }
4369238106Sdescache=`echo O2 | sed 'y%.=/+-%___p_%'`
4370238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
4371238106Sdes  $as_echo_n "(cached) " >&6
4372238106Sdeselse
4373238106Sdes
4374269257Sdesecho 'void f(void){}' >conftest.c
4375238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4376238106Sdeseval "cv_prog_cc_flag_$cache=yes"
4377238106Sdeselse
4378238106Sdeseval "cv_prog_cc_flag_$cache=no"
4379238106Sdesfi
4380238106Sdesrm -f conftest conftest.o conftest.c
4381238106Sdes
4382238106Sdesfi
4383238106Sdes
4384238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4385238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4386238106Sdes$as_echo "yes" >&6; }
4387238106Sdes:
4388238106SdesCFLAGS="$CFLAGS -O2"
4389238106Sdeselse
4390238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391238106Sdes$as_echo "no" >&6; }
4392238106Sdes:
4393238106Sdes
4394238106Sdesfi
4395238106Sdes
4396249141Sdesfi
4397238106Sdesac_ext=c
4398238106Sdesac_cpp='$CPP $CPPFLAGS'
4399238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4400238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4401238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
4402238106Sdesif test -n "$ac_tool_prefix"; then
4403238106Sdes  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4404238106Sdesset dummy ${ac_tool_prefix}gcc; ac_word=$2
4405238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4406238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4407238106Sdesif ${ac_cv_prog_CC+:} false; then :
4408238106Sdes  $as_echo_n "(cached) " >&6
4409238106Sdeselse
4410238106Sdes  if test -n "$CC"; then
4411238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
4412238106Sdeselse
4413238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414238106Sdesfor as_dir in $PATH
4415238106Sdesdo
4416238106Sdes  IFS=$as_save_IFS
4417238106Sdes  test -z "$as_dir" && as_dir=.
4418238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4419249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4420238106Sdes    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4421238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4422238106Sdes    break 2
4423238106Sdes  fi
4424238106Sdesdone
4425238106Sdes  done
4426238106SdesIFS=$as_save_IFS
4427238106Sdes
4428238106Sdesfi
4429238106Sdesfi
4430238106SdesCC=$ac_cv_prog_CC
4431238106Sdesif test -n "$CC"; then
4432238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4433238106Sdes$as_echo "$CC" >&6; }
4434238106Sdeselse
4435238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436238106Sdes$as_echo "no" >&6; }
4437238106Sdesfi
4438238106Sdes
4439238106Sdes
4440238106Sdesfi
4441238106Sdesif test -z "$ac_cv_prog_CC"; then
4442238106Sdes  ac_ct_CC=$CC
4443238106Sdes  # Extract the first word of "gcc", so it can be a program name with args.
4444238106Sdesset dummy gcc; ac_word=$2
4445238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4447238106Sdesif ${ac_cv_prog_ac_ct_CC+:} false; then :
4448238106Sdes  $as_echo_n "(cached) " >&6
4449238106Sdeselse
4450238106Sdes  if test -n "$ac_ct_CC"; then
4451238106Sdes  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4452238106Sdeselse
4453238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454238106Sdesfor as_dir in $PATH
4455238106Sdesdo
4456238106Sdes  IFS=$as_save_IFS
4457238106Sdes  test -z "$as_dir" && as_dir=.
4458238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4459249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4460238106Sdes    ac_cv_prog_ac_ct_CC="gcc"
4461238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4462238106Sdes    break 2
4463238106Sdes  fi
4464238106Sdesdone
4465238106Sdes  done
4466238106SdesIFS=$as_save_IFS
4467238106Sdes
4468238106Sdesfi
4469238106Sdesfi
4470238106Sdesac_ct_CC=$ac_cv_prog_ac_ct_CC
4471238106Sdesif test -n "$ac_ct_CC"; then
4472238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4473238106Sdes$as_echo "$ac_ct_CC" >&6; }
4474238106Sdeselse
4475238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476238106Sdes$as_echo "no" >&6; }
4477238106Sdesfi
4478238106Sdes
4479238106Sdes  if test "x$ac_ct_CC" = x; then
4480238106Sdes    CC=""
4481238106Sdes  else
4482238106Sdes    case $cross_compiling:$ac_tool_warned in
4483238106Sdesyes:)
4484238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4485238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4486238106Sdesac_tool_warned=yes ;;
4487238106Sdesesac
4488238106Sdes    CC=$ac_ct_CC
4489238106Sdes  fi
4490238106Sdeselse
4491238106Sdes  CC="$ac_cv_prog_CC"
4492238106Sdesfi
4493238106Sdes
4494238106Sdesif test -z "$CC"; then
4495238106Sdes          if test -n "$ac_tool_prefix"; then
4496238106Sdes    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4497238106Sdesset dummy ${ac_tool_prefix}cc; ac_word=$2
4498238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4500238106Sdesif ${ac_cv_prog_CC+:} false; then :
4501238106Sdes  $as_echo_n "(cached) " >&6
4502238106Sdeselse
4503238106Sdes  if test -n "$CC"; then
4504238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
4505238106Sdeselse
4506238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4507238106Sdesfor as_dir in $PATH
4508238106Sdesdo
4509238106Sdes  IFS=$as_save_IFS
4510238106Sdes  test -z "$as_dir" && as_dir=.
4511238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4512249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4513238106Sdes    ac_cv_prog_CC="${ac_tool_prefix}cc"
4514238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4515238106Sdes    break 2
4516238106Sdes  fi
4517238106Sdesdone
4518238106Sdes  done
4519238106SdesIFS=$as_save_IFS
4520238106Sdes
4521238106Sdesfi
4522238106Sdesfi
4523238106SdesCC=$ac_cv_prog_CC
4524238106Sdesif test -n "$CC"; then
4525238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4526238106Sdes$as_echo "$CC" >&6; }
4527238106Sdeselse
4528238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4529238106Sdes$as_echo "no" >&6; }
4530238106Sdesfi
4531238106Sdes
4532238106Sdes
4533238106Sdes  fi
4534238106Sdesfi
4535238106Sdesif test -z "$CC"; then
4536238106Sdes  # Extract the first word of "cc", so it can be a program name with args.
4537238106Sdesset dummy cc; ac_word=$2
4538238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4539238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4540238106Sdesif ${ac_cv_prog_CC+:} false; then :
4541238106Sdes  $as_echo_n "(cached) " >&6
4542238106Sdeselse
4543238106Sdes  if test -n "$CC"; then
4544238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
4545238106Sdeselse
4546238106Sdes  ac_prog_rejected=no
4547238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548238106Sdesfor as_dir in $PATH
4549238106Sdesdo
4550238106Sdes  IFS=$as_save_IFS
4551238106Sdes  test -z "$as_dir" && as_dir=.
4552238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4553249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4554238106Sdes    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4555238106Sdes       ac_prog_rejected=yes
4556238106Sdes       continue
4557238106Sdes     fi
4558238106Sdes    ac_cv_prog_CC="cc"
4559238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560238106Sdes    break 2
4561238106Sdes  fi
4562238106Sdesdone
4563238106Sdes  done
4564238106SdesIFS=$as_save_IFS
4565238106Sdes
4566238106Sdesif test $ac_prog_rejected = yes; then
4567238106Sdes  # We found a bogon in the path, so make sure we never use it.
4568238106Sdes  set dummy $ac_cv_prog_CC
4569238106Sdes  shift
4570238106Sdes  if test $# != 0; then
4571238106Sdes    # We chose a different compiler from the bogus one.
4572238106Sdes    # However, it has the same basename, so the bogon will be chosen
4573238106Sdes    # first if we set CC to just the basename; use the full file name.
4574238106Sdes    shift
4575238106Sdes    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4576238106Sdes  fi
4577238106Sdesfi
4578238106Sdesfi
4579238106Sdesfi
4580238106SdesCC=$ac_cv_prog_CC
4581238106Sdesif test -n "$CC"; then
4582238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4583238106Sdes$as_echo "$CC" >&6; }
4584238106Sdeselse
4585238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4586238106Sdes$as_echo "no" >&6; }
4587238106Sdesfi
4588238106Sdes
4589238106Sdes
4590238106Sdesfi
4591238106Sdesif test -z "$CC"; then
4592238106Sdes  if test -n "$ac_tool_prefix"; then
4593238106Sdes  for ac_prog in cl.exe
4594238106Sdes  do
4595238106Sdes    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4596238106Sdesset dummy $ac_tool_prefix$ac_prog; ac_word=$2
4597238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4598238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4599238106Sdesif ${ac_cv_prog_CC+:} false; then :
4600238106Sdes  $as_echo_n "(cached) " >&6
4601238106Sdeselse
4602238106Sdes  if test -n "$CC"; then
4603238106Sdes  ac_cv_prog_CC="$CC" # Let the user override the test.
4604238106Sdeselse
4605238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4606238106Sdesfor as_dir in $PATH
4607238106Sdesdo
4608238106Sdes  IFS=$as_save_IFS
4609238106Sdes  test -z "$as_dir" && as_dir=.
4610238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4611249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4612238106Sdes    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4613238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4614238106Sdes    break 2
4615238106Sdes  fi
4616238106Sdesdone
4617238106Sdes  done
4618238106SdesIFS=$as_save_IFS
4619238106Sdes
4620238106Sdesfi
4621238106Sdesfi
4622238106SdesCC=$ac_cv_prog_CC
4623238106Sdesif test -n "$CC"; then
4624238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4625238106Sdes$as_echo "$CC" >&6; }
4626238106Sdeselse
4627238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4628238106Sdes$as_echo "no" >&6; }
4629238106Sdesfi
4630238106Sdes
4631238106Sdes
4632238106Sdes    test -n "$CC" && break
4633238106Sdes  done
4634238106Sdesfi
4635238106Sdesif test -z "$CC"; then
4636238106Sdes  ac_ct_CC=$CC
4637238106Sdes  for ac_prog in cl.exe
4638238106Sdesdo
4639238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
4640238106Sdesset dummy $ac_prog; ac_word=$2
4641238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
4643238106Sdesif ${ac_cv_prog_ac_ct_CC+:} false; then :
4644238106Sdes  $as_echo_n "(cached) " >&6
4645238106Sdeselse
4646238106Sdes  if test -n "$ac_ct_CC"; then
4647238106Sdes  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4648238106Sdeselse
4649238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650238106Sdesfor as_dir in $PATH
4651238106Sdesdo
4652238106Sdes  IFS=$as_save_IFS
4653238106Sdes  test -z "$as_dir" && as_dir=.
4654238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
4655249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4656238106Sdes    ac_cv_prog_ac_ct_CC="$ac_prog"
4657238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658238106Sdes    break 2
4659238106Sdes  fi
4660238106Sdesdone
4661238106Sdes  done
4662238106SdesIFS=$as_save_IFS
4663238106Sdes
4664238106Sdesfi
4665238106Sdesfi
4666238106Sdesac_ct_CC=$ac_cv_prog_ac_ct_CC
4667238106Sdesif test -n "$ac_ct_CC"; then
4668238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4669238106Sdes$as_echo "$ac_ct_CC" >&6; }
4670238106Sdeselse
4671238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672238106Sdes$as_echo "no" >&6; }
4673238106Sdesfi
4674238106Sdes
4675238106Sdes
4676238106Sdes  test -n "$ac_ct_CC" && break
4677238106Sdesdone
4678238106Sdes
4679238106Sdes  if test "x$ac_ct_CC" = x; then
4680238106Sdes    CC=""
4681238106Sdes  else
4682238106Sdes    case $cross_compiling:$ac_tool_warned in
4683238106Sdesyes:)
4684238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4685238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4686238106Sdesac_tool_warned=yes ;;
4687238106Sdesesac
4688238106Sdes    CC=$ac_ct_CC
4689238106Sdes  fi
4690238106Sdesfi
4691238106Sdes
4692238106Sdesfi
4693238106Sdes
4694238106Sdes
4695238106Sdestest -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4696238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4697238106Sdesas_fn_error $? "no acceptable C compiler found in \$PATH
4698238106SdesSee \`config.log' for more details" "$LINENO" 5; }
4699238106Sdes
4700238106Sdes# Provide some information about the compiler.
4701238106Sdes$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4702238106Sdesset X $ac_compile
4703238106Sdesac_compiler=$2
4704238106Sdesfor ac_option in --version -v -V -qversion; do
4705238106Sdes  { { ac_try="$ac_compiler $ac_option >&5"
4706238106Sdescase "(($ac_try" in
4707238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4708238106Sdes  *) ac_try_echo=$ac_try;;
4709238106Sdesesac
4710238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4711238106Sdes$as_echo "$ac_try_echo"; } >&5
4712238106Sdes  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4713238106Sdes  ac_status=$?
4714238106Sdes  if test -s conftest.err; then
4715238106Sdes    sed '10a\
4716238106Sdes... rest of stderr output deleted ...
4717238106Sdes         10q' conftest.err >conftest.er1
4718238106Sdes    cat conftest.er1 >&5
4719238106Sdes  fi
4720238106Sdes  rm -f conftest.er1 conftest.err
4721238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4722238106Sdes  test $ac_status = 0; }
4723238106Sdesdone
4724238106Sdes
4725238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4726238106Sdes$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4727238106Sdesif ${ac_cv_c_compiler_gnu+:} false; then :
4728238106Sdes  $as_echo_n "(cached) " >&6
4729238106Sdeselse
4730238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4731238106Sdes/* end confdefs.h.  */
4732238106Sdes
4733238106Sdesint
4734238106Sdesmain ()
4735238106Sdes{
4736238106Sdes#ifndef __GNUC__
4737238106Sdes       choke me
4738238106Sdes#endif
4739238106Sdes
4740238106Sdes  ;
4741238106Sdes  return 0;
4742238106Sdes}
4743238106Sdes_ACEOF
4744238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4745238106Sdes  ac_compiler_gnu=yes
4746238106Sdeselse
4747238106Sdes  ac_compiler_gnu=no
4748238106Sdesfi
4749238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4750238106Sdesac_cv_c_compiler_gnu=$ac_compiler_gnu
4751238106Sdes
4752238106Sdesfi
4753238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4754238106Sdes$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4755238106Sdesif test $ac_compiler_gnu = yes; then
4756238106Sdes  GCC=yes
4757238106Sdeselse
4758238106Sdes  GCC=
4759238106Sdesfi
4760238106Sdesac_test_CFLAGS=${CFLAGS+set}
4761238106Sdesac_save_CFLAGS=$CFLAGS
4762238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4763238106Sdes$as_echo_n "checking whether $CC accepts -g... " >&6; }
4764238106Sdesif ${ac_cv_prog_cc_g+:} false; then :
4765238106Sdes  $as_echo_n "(cached) " >&6
4766238106Sdeselse
4767238106Sdes  ac_save_c_werror_flag=$ac_c_werror_flag
4768238106Sdes   ac_c_werror_flag=yes
4769238106Sdes   ac_cv_prog_cc_g=no
4770238106Sdes   CFLAGS="-g"
4771238106Sdes   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4772238106Sdes/* end confdefs.h.  */
4773238106Sdes
4774238106Sdesint
4775238106Sdesmain ()
4776238106Sdes{
4777238106Sdes
4778238106Sdes  ;
4779238106Sdes  return 0;
4780238106Sdes}
4781238106Sdes_ACEOF
4782238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4783238106Sdes  ac_cv_prog_cc_g=yes
4784238106Sdeselse
4785238106Sdes  CFLAGS=""
4786238106Sdes      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787238106Sdes/* end confdefs.h.  */
4788238106Sdes
4789238106Sdesint
4790238106Sdesmain ()
4791238106Sdes{
4792238106Sdes
4793238106Sdes  ;
4794238106Sdes  return 0;
4795238106Sdes}
4796238106Sdes_ACEOF
4797238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4798238106Sdes
4799238106Sdeselse
4800238106Sdes  ac_c_werror_flag=$ac_save_c_werror_flag
4801238106Sdes	 CFLAGS="-g"
4802238106Sdes	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803238106Sdes/* end confdefs.h.  */
4804238106Sdes
4805238106Sdesint
4806238106Sdesmain ()
4807238106Sdes{
4808238106Sdes
4809238106Sdes  ;
4810238106Sdes  return 0;
4811238106Sdes}
4812238106Sdes_ACEOF
4813238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
4814238106Sdes  ac_cv_prog_cc_g=yes
4815238106Sdesfi
4816238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4817238106Sdesfi
4818238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4819238106Sdesfi
4820238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4821238106Sdes   ac_c_werror_flag=$ac_save_c_werror_flag
4822238106Sdesfi
4823238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4824238106Sdes$as_echo "$ac_cv_prog_cc_g" >&6; }
4825238106Sdesif test "$ac_test_CFLAGS" = set; then
4826238106Sdes  CFLAGS=$ac_save_CFLAGS
4827238106Sdeselif test $ac_cv_prog_cc_g = yes; then
4828238106Sdes  if test "$GCC" = yes; then
4829238106Sdes    CFLAGS="-g -O2"
4830238106Sdes  else
4831238106Sdes    CFLAGS="-g"
4832238106Sdes  fi
4833238106Sdeselse
4834238106Sdes  if test "$GCC" = yes; then
4835238106Sdes    CFLAGS="-O2"
4836238106Sdes  else
4837238106Sdes    CFLAGS=
4838238106Sdes  fi
4839238106Sdesfi
4840238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4841238106Sdes$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4842238106Sdesif ${ac_cv_prog_cc_c89+:} false; then :
4843238106Sdes  $as_echo_n "(cached) " >&6
4844238106Sdeselse
4845238106Sdes  ac_cv_prog_cc_c89=no
4846238106Sdesac_save_CC=$CC
4847238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848238106Sdes/* end confdefs.h.  */
4849238106Sdes#include <stdarg.h>
4850238106Sdes#include <stdio.h>
4851249141Sdesstruct stat;
4852238106Sdes/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4853238106Sdesstruct buf { int x; };
4854238106SdesFILE * (*rcsopen) (struct buf *, struct stat *, int);
4855238106Sdesstatic char *e (p, i)
4856238106Sdes     char **p;
4857238106Sdes     int i;
4858238106Sdes{
4859238106Sdes  return p[i];
4860238106Sdes}
4861238106Sdesstatic char *f (char * (*g) (char **, int), char **p, ...)
4862238106Sdes{
4863238106Sdes  char *s;
4864238106Sdes  va_list v;
4865238106Sdes  va_start (v,p);
4866238106Sdes  s = g (p, va_arg (v,int));
4867238106Sdes  va_end (v);
4868238106Sdes  return s;
4869238106Sdes}
4870238106Sdes
4871238106Sdes/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4872238106Sdes   function prototypes and stuff, but not '\xHH' hex character constants.
4873238106Sdes   These don't provoke an error unfortunately, instead are silently treated
4874238106Sdes   as 'x'.  The following induces an error, until -std is added to get
4875238106Sdes   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4876238106Sdes   array size at least.  It's necessary to write '\x00'==0 to get something
4877238106Sdes   that's true only with -std.  */
4878238106Sdesint osf4_cc_array ['\x00' == 0 ? 1 : -1];
4879238106Sdes
4880238106Sdes/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4881238106Sdes   inside strings and character constants.  */
4882238106Sdes#define FOO(x) 'x'
4883238106Sdesint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4884238106Sdes
4885238106Sdesint test (int i, double x);
4886238106Sdesstruct s1 {int (*f) (int a);};
4887238106Sdesstruct s2 {int (*f) (double a);};
4888238106Sdesint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4889238106Sdesint argc;
4890238106Sdeschar **argv;
4891238106Sdesint
4892238106Sdesmain ()
4893238106Sdes{
4894238106Sdesreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4895238106Sdes  ;
4896238106Sdes  return 0;
4897238106Sdes}
4898238106Sdes_ACEOF
4899238106Sdesfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4900238106Sdes	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4901238106Sdesdo
4902238106Sdes  CC="$ac_save_CC $ac_arg"
4903238106Sdes  if ac_fn_c_try_compile "$LINENO"; then :
4904238106Sdes  ac_cv_prog_cc_c89=$ac_arg
4905238106Sdesfi
4906238106Sdesrm -f core conftest.err conftest.$ac_objext
4907238106Sdes  test "x$ac_cv_prog_cc_c89" != "xno" && break
4908238106Sdesdone
4909238106Sdesrm -f conftest.$ac_ext
4910238106SdesCC=$ac_save_CC
4911238106Sdes
4912238106Sdesfi
4913238106Sdes# AC_CACHE_VAL
4914238106Sdescase "x$ac_cv_prog_cc_c89" in
4915238106Sdes  x)
4916238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4917238106Sdes$as_echo "none needed" >&6; } ;;
4918238106Sdes  xno)
4919238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4920238106Sdes$as_echo "unsupported" >&6; } ;;
4921238106Sdes  *)
4922238106Sdes    CC="$CC $ac_cv_prog_cc_c89"
4923238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4924238106Sdes$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4925238106Sdesesac
4926238106Sdesif test "x$ac_cv_prog_cc_c89" != xno; then :
4927238106Sdes
4928238106Sdesfi
4929238106Sdes
4930238106Sdesac_ext=c
4931238106Sdesac_cpp='$CPP $CPPFLAGS'
4932238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4933238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4934238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
4935238106Sdes
4936238106Sdes
4937238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
4938238106Sdes$as_echo_n "checking $CC dependency flag... " >&6; }
4939238106Sdesecho 'void f(){}' >conftest.c
4940238106Sdesif test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4941238106Sdes	DEPFLAG="-MM"
4942238106Sdeselse
4943238106Sdes  if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4944238106Sdes	DEPFLAG="-xM1"
4945238106Sdes  else
4946238106Sdes	DEPFLAG="-MM"  # dunno do something
4947238106Sdes  fi
4948238106Sdesfi
4949238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
4950238106Sdes$as_echo "$DEPFLAG" >&6; }
4951238106Sdesrm -f conftest.c
4952238106Sdes
4953238106Sdes
4954238106Sdes
4955238106Sdes
4956238106Sdes
4957238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
4958238106Sdes$as_echo_n "checking whether $CC supports -Werror... " >&6; }
4959238106Sdescache=`echo Werror | sed 'y%.=/+-%___p_%'`
4960238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
4961238106Sdes  $as_echo_n "(cached) " >&6
4962238106Sdeselse
4963238106Sdes
4964269257Sdesecho 'void f(void){}' >conftest.c
4965238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
4966238106Sdeseval "cv_prog_cc_flag_$cache=yes"
4967238106Sdeselse
4968238106Sdeseval "cv_prog_cc_flag_$cache=no"
4969238106Sdesfi
4970238106Sdesrm -f conftest conftest.o conftest.c
4971238106Sdes
4972238106Sdesfi
4973238106Sdes
4974238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4975238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4976238106Sdes$as_echo "yes" >&6; }
4977238106Sdes:
4978238106SdesERRFLAG="-Werror"
4979238106Sdeselse
4980238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981238106Sdes$as_echo "no" >&6; }
4982238106Sdes:
4983238106SdesERRFLAG="-errwarn"
4984238106Sdesfi
4985238106Sdes
4986238106Sdes
4987238106Sdes
4988238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
4989238106Sdes$as_echo_n "checking whether $CC supports -Wall... " >&6; }
4990238106Sdescache=`echo Wall | sed 'y%.=/+-%___p_%'`
4991238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
4992238106Sdes  $as_echo_n "(cached) " >&6
4993238106Sdeselse
4994238106Sdes
4995269257Sdesecho 'void f(void){}' >conftest.c
4996238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
4997238106Sdeseval "cv_prog_cc_flag_$cache=yes"
4998238106Sdeselse
4999238106Sdeseval "cv_prog_cc_flag_$cache=no"
5000238106Sdesfi
5001238106Sdesrm -f conftest conftest.o conftest.c
5002238106Sdes
5003238106Sdesfi
5004238106Sdes
5005238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5006238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5007238106Sdes$as_echo "yes" >&6; }
5008238106Sdes:
5009238106SdesERRFLAG="$ERRFLAG -Wall"
5010238106Sdeselse
5011238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012238106Sdes$as_echo "no" >&6; }
5013238106Sdes:
5014238106SdesERRFLAG="$ERRFLAG -errfmt"
5015238106Sdesfi
5016238106Sdes
5017238106Sdes
5018238106Sdes
5019238106Sdes
5020238106Sdes
5021238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5022238106Sdes$as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5023238106Sdescache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5024238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5025238106Sdes  $as_echo_n "(cached) " >&6
5026238106Sdeselse
5027238106Sdes
5028269257Sdesecho 'void f(void){}' >conftest.c
5029238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5030238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5031238106Sdeselse
5032238106Sdeseval "cv_prog_cc_flag_$cache=no"
5033238106Sdesfi
5034238106Sdesrm -f conftest conftest.o conftest.c
5035238106Sdes
5036238106Sdesfi
5037238106Sdes
5038238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5039238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5040238106Sdes$as_echo "yes" >&6; }
5041238106Sdes:
5042238106SdesC99FLAG="-std=c99"
5043238106Sdeselse
5044238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045238106Sdes$as_echo "no" >&6; }
5046238106Sdes:
5047238106Sdes
5048238106Sdesfi
5049238106Sdes
5050238106Sdes
5051238106Sdes
5052238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5053238106Sdes$as_echo_n "checking whether $CC supports -xc99... " >&6; }
5054238106Sdescache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5055238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5056238106Sdes  $as_echo_n "(cached) " >&6
5057238106Sdeselse
5058238106Sdes
5059269257Sdesecho 'void f(void){}' >conftest.c
5060238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5061238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5062238106Sdeselse
5063238106Sdeseval "cv_prog_cc_flag_$cache=no"
5064238106Sdesfi
5065238106Sdesrm -f conftest conftest.o conftest.c
5066238106Sdes
5067238106Sdesfi
5068238106Sdes
5069238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5070238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5071238106Sdes$as_echo "yes" >&6; }
5072238106Sdes:
5073238106SdesC99FLAG="-xc99"
5074238106Sdeselse
5075238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076238106Sdes$as_echo "no" >&6; }
5077238106Sdes:
5078238106Sdes
5079238106Sdesfi
5080238106Sdes
5081238106Sdes
5082238106Sdesfor ac_header in getopt.h time.h
5083238106Sdesdo :
5084238106Sdes  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5085238106Sdesac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5086238106Sdes"
5087238106Sdesif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5088238106Sdes  cat >>confdefs.h <<_ACEOF
5089238106Sdes#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5090238106Sdes_ACEOF
5091238106Sdes
5092238106Sdesfi
5093238106Sdes
5094238106Sdesdone
5095238106Sdes
5096238106Sdes
5097238106Sdes
5098238106Sdes
5099238106Sdes
5100238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5101238106Sdes$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5102238106Sdescache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5103238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5104238106Sdes  $as_echo_n "(cached) " >&6
5105238106Sdeselse
5106238106Sdes
5107238106Sdesecho '
5108238106Sdes#include "confdefs.h"
5109238106Sdes#include <stdlib.h>
5110238106Sdes#include <ctype.h>
5111238106Sdes#include <sys/time.h>
5112238106Sdes#ifdef HAVE_TIME_H
5113238106Sdes#include <time.h>
5114238106Sdes#endif
5115238106Sdes#include <unistd.h>
5116238106Sdes#include <netdb.h>
5117238106Sdes#ifdef HAVE_GETOPT_H
5118238106Sdes#include <getopt.h>
5119238106Sdes#endif
5120238106Sdes
5121238106Sdesint test() {
5122238106Sdes	int a;
5123238106Sdes	char **opts = NULL;
5124238106Sdes	struct timeval tv;
5125238106Sdes	char *t;
5126238106Sdes	time_t time = 0;
5127238106Sdes	char *buf = NULL;
5128238106Sdes	const char* str = NULL;
5129238106Sdes	struct msghdr msg;
5130238106Sdes	msg.msg_control = 0;
5131238106Sdes	t = ctime_r(&time, buf);
5132238106Sdes	tv.tv_usec = 10;
5133238106Sdes	srandom(32);
5134238106Sdes	a = getopt(2, opts, "a");
5135238106Sdes	a = isascii(32);
5136238106Sdes	str = gai_strerror(0);
5137238106Sdes	if(str && t && tv.tv_usec && msg.msg_control)
5138238106Sdes		a = 0;
5139238106Sdes	return a;
5140238106Sdes}
5141238106Sdes' > conftest.c
5142238106Sdesecho 'void f(){}' >>conftest.c
5143238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5144238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5145238106Sdeselse
5146238106Sdes
5147238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5148238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5149238106Sdeselse
5150238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5151238106Sdes#echo 'Test with flag fails too!'
5152238106Sdes#cat conftest.c
5153238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5154238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5155238106Sdes#exit 1
5156238106Sdesfi
5157238106Sdes
5158238106Sdesfi
5159238106Sdesrm -f conftest conftest.c conftest.o
5160238106Sdes
5161238106Sdesfi
5162238106Sdes
5163238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5164238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5165238106Sdes$as_echo "yes" >&6; }
5166238106Sdes:
5167238106SdesCFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5168238106Sdeselse
5169238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5170238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5171238106Sdes$as_echo "no" >&6; }
5172238106Sdes#echo 'Test with flag is no!'
5173238106Sdes#cat conftest.c
5174238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5175238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5176238106Sdes#exit 1
5177238106Sdes:
5178238106Sdes
5179238106Sdeselse
5180238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5181238106Sdes$as_echo "failed" >&6; }
5182238106Sdes:
5183238106Sdes
5184238106Sdesfi
5185238106Sdesfi
5186238106Sdes
5187238106Sdes
5188238106Sdes
5189238106Sdes
5190238106Sdes
5191238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5192238106Sdes$as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5193238106Sdescache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5194238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5195238106Sdes  $as_echo_n "(cached) " >&6
5196238106Sdeselse
5197238106Sdes
5198238106Sdesecho '
5199238106Sdes#include "confdefs.h"
5200238106Sdes#include <stdlib.h>
5201238106Sdes#include <ctype.h>
5202238106Sdes#include <sys/time.h>
5203238106Sdes#ifdef HAVE_TIME_H
5204238106Sdes#include <time.h>
5205238106Sdes#endif
5206238106Sdes#include <unistd.h>
5207238106Sdes#include <netdb.h>
5208238106Sdes#ifdef HAVE_GETOPT_H
5209238106Sdes#include <getopt.h>
5210238106Sdes#endif
5211238106Sdes
5212238106Sdesint test() {
5213238106Sdes	int a;
5214238106Sdes	char **opts = NULL;
5215238106Sdes	struct timeval tv;
5216238106Sdes	char *t;
5217238106Sdes	time_t time = 0;
5218238106Sdes	char *buf = NULL;
5219238106Sdes	const char* str = NULL;
5220238106Sdes	struct msghdr msg;
5221238106Sdes	msg.msg_control = 0;
5222238106Sdes	t = ctime_r(&time, buf);
5223238106Sdes	tv.tv_usec = 10;
5224238106Sdes	srandom(32);
5225238106Sdes	a = getopt(2, opts, "a");
5226238106Sdes	a = isascii(32);
5227238106Sdes	str = gai_strerror(0);
5228238106Sdes	if(str && t && tv.tv_usec && msg.msg_control)
5229238106Sdes		a = 0;
5230238106Sdes	return a;
5231238106Sdes}
5232238106Sdes' > conftest.c
5233238106Sdesecho 'void f(){}' >>conftest.c
5234238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5235238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5236238106Sdeselse
5237238106Sdes
5238238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5239238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5240238106Sdeselse
5241238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5242238106Sdes#echo 'Test with flag fails too!'
5243238106Sdes#cat conftest.c
5244238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5245238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5246238106Sdes#exit 1
5247238106Sdesfi
5248238106Sdes
5249238106Sdesfi
5250238106Sdesrm -f conftest conftest.c conftest.o
5251238106Sdes
5252238106Sdesfi
5253238106Sdes
5254238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5255238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5256238106Sdes$as_echo "yes" >&6; }
5257238106Sdes:
5258238106SdesCFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5259238106Sdeselse
5260238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5261238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262238106Sdes$as_echo "no" >&6; }
5263238106Sdes#echo 'Test with flag is no!'
5264238106Sdes#cat conftest.c
5265238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5266238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5267238106Sdes#exit 1
5268238106Sdes:
5269238106Sdes
5270238106Sdeselse
5271238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5272238106Sdes$as_echo "failed" >&6; }
5273238106Sdes:
5274238106Sdes
5275238106Sdesfi
5276238106Sdesfi
5277238106Sdes
5278238106Sdes
5279238106Sdes
5280238106Sdes
5281238106Sdes
5282238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5283238106Sdes$as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5284238106Sdescache=`$as_echo "$C99FLAG" | $as_tr_sh`
5285238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5286238106Sdes  $as_echo_n "(cached) " >&6
5287238106Sdeselse
5288238106Sdes
5289238106Sdesecho '
5290238106Sdes#include <stdbool.h>
5291238106Sdes#include <ctype.h>
5292238106Sdesint test() {
5293238106Sdes        int a = 0;
5294238106Sdes        return a;
5295238106Sdes}
5296238106Sdes' > conftest.c
5297238106Sdesecho 'void f(){}' >>conftest.c
5298238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5299238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5300238106Sdeselse
5301238106Sdes
5302238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5303238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5304238106Sdeselse
5305238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5306238106Sdes#echo 'Test with flag fails too!'
5307238106Sdes#cat conftest.c
5308238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5309238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5310238106Sdes#exit 1
5311238106Sdesfi
5312238106Sdes
5313238106Sdesfi
5314238106Sdesrm -f conftest conftest.c conftest.o
5315238106Sdes
5316238106Sdesfi
5317238106Sdes
5318238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5319238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5320238106Sdes$as_echo "yes" >&6; }
5321238106Sdes:
5322238106SdesCFLAGS="$CFLAGS $C99FLAG"
5323238106Sdeselse
5324238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5325238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326238106Sdes$as_echo "no" >&6; }
5327238106Sdes#echo 'Test with flag is no!'
5328238106Sdes#cat conftest.c
5329238106Sdes#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5330238106Sdes#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5331238106Sdes#exit 1
5332238106Sdes:
5333238106Sdes
5334238106Sdeselse
5335238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5336238106Sdes$as_echo "failed" >&6; }
5337238106Sdes:
5338238106Sdes
5339238106Sdesfi
5340238106Sdesfi
5341238106Sdes
5342238106Sdes
5343238106Sdes
5344238106Sdes
5345238106Sdes
5346238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE as a flag for $CC" >&5
5347238106Sdes$as_echo_n "checking whether we need -D_BSD_SOURCE as a flag for $CC... " >&6; }
5348238106Sdescache=_D_BSD_SOURCE
5349238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5350238106Sdes  $as_echo_n "(cached) " >&6
5351238106Sdeselse
5352238106Sdes
5353238106Sdesecho '
5354238106Sdes#include <ctype.h>
5355238106Sdes
5356238106Sdesint test() {
5357238106Sdes        int a;
5358238106Sdes        a = isascii(32);
5359238106Sdes        return a;
5360238106Sdes}
5361238106Sdes' > conftest.c
5362238106Sdesecho 'void f(){}' >>conftest.c
5363238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5364238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5365238106Sdeselse
5366238106Sdes
5367238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5368238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5369238106Sdeselse
5370238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5371238106Sdes#echo 'Test with flag fails too!'
5372238106Sdes#cat conftest.c
5373238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5374238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5375238106Sdes#exit 1
5376238106Sdesfi
5377238106Sdes
5378238106Sdesfi
5379238106Sdesrm -f conftest conftest.c conftest.o
5380238106Sdes
5381238106Sdesfi
5382238106Sdes
5383238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5384238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5385238106Sdes$as_echo "yes" >&6; }
5386238106Sdes:
5387238106SdesCFLAGS="$CFLAGS -D_BSD_SOURCE"
5388238106Sdeselse
5389238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5390238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391238106Sdes$as_echo "no" >&6; }
5392238106Sdes#echo 'Test with flag is no!'
5393238106Sdes#cat conftest.c
5394238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1"
5395238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE $ERRFLAG -c conftest.c 2>&1`
5396238106Sdes#exit 1
5397238106Sdes:
5398238106Sdes
5399238106Sdeselse
5400238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5401238106Sdes$as_echo "failed" >&6; }
5402238106Sdes:
5403238106Sdes
5404238106Sdesfi
5405238106Sdesfi
5406238106Sdes
5407238106Sdes
5408238106Sdes
5409238106Sdes
5410238106Sdes
5411238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5412238106Sdes$as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5413238106Sdescache=_D_GNU_SOURCE
5414238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5415238106Sdes  $as_echo_n "(cached) " >&6
5416238106Sdeselse
5417238106Sdes
5418238106Sdesecho '
5419238106Sdes#include <netinet/in.h>
5420238106Sdes
5421238106Sdesint test() {
5422238106Sdes        struct in6_pktinfo inf;
5423238106Sdes	int a = (int)sizeof(inf);
5424238106Sdes        return a;
5425238106Sdes}
5426238106Sdes' > conftest.c
5427238106Sdesecho 'void f(){}' >>conftest.c
5428238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5429238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5430238106Sdeselse
5431238106Sdes
5432238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5433238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5434238106Sdeselse
5435238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5436238106Sdes#echo 'Test with flag fails too!'
5437238106Sdes#cat conftest.c
5438238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5439238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5440238106Sdes#exit 1
5441238106Sdesfi
5442238106Sdes
5443238106Sdesfi
5444238106Sdesrm -f conftest conftest.c conftest.o
5445238106Sdes
5446238106Sdesfi
5447238106Sdes
5448238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5449238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5450238106Sdes$as_echo "yes" >&6; }
5451238106Sdes:
5452238106SdesCFLAGS="$CFLAGS -D_GNU_SOURCE"
5453238106Sdeselse
5454238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5455238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456238106Sdes$as_echo "no" >&6; }
5457238106Sdes#echo 'Test with flag is no!'
5458238106Sdes#cat conftest.c
5459238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5460238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5461238106Sdes#exit 1
5462238106Sdes:
5463238106Sdes
5464238106Sdeselse
5465238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5466238106Sdes$as_echo "failed" >&6; }
5467238106Sdes:
5468238106Sdes
5469238106Sdesfi
5470238106Sdesfi
5471238106Sdes
5472238106Sdes
5473238106Sdes# check again for GNU_SOURCE for setresgid. May fail if setresgid
5474238106Sdes# is not available at all. -D_FRSRESGID is to make this check unique.
5475238106Sdes# otherwise we would get the previous cached result.
5476238106Sdes
5477238106Sdes
5478238106Sdes
5479238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5480238106Sdes$as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5481238106Sdescache=_D_GNU_SOURCE__D_FRSRESGID
5482238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5483238106Sdes  $as_echo_n "(cached) " >&6
5484238106Sdeselse
5485238106Sdes
5486238106Sdesecho '
5487238106Sdes#include <unistd.h>
5488238106Sdes
5489238106Sdesint test() {
5490238106Sdes	int a = setresgid(0,0,0);
5491238106Sdes	a = setresuid(0,0,0);
5492238106Sdes        return a;
5493238106Sdes}
5494238106Sdes' > conftest.c
5495238106Sdesecho 'void f(){}' >>conftest.c
5496238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5497238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5498238106Sdeselse
5499238106Sdes
5500238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5501238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5502238106Sdeselse
5503238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5504238106Sdes#echo 'Test with flag fails too!'
5505238106Sdes#cat conftest.c
5506238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5507238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5508238106Sdes#exit 1
5509238106Sdesfi
5510238106Sdes
5511238106Sdesfi
5512238106Sdesrm -f conftest conftest.c conftest.o
5513238106Sdes
5514238106Sdesfi
5515238106Sdes
5516238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5517238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5518238106Sdes$as_echo "yes" >&6; }
5519238106Sdes:
5520238106SdesCFLAGS="$CFLAGS -D_GNU_SOURCE"
5521238106Sdeselse
5522238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5523238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524238106Sdes$as_echo "no" >&6; }
5525238106Sdes#echo 'Test with flag is no!'
5526238106Sdes#cat conftest.c
5527238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5528238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5529238106Sdes#exit 1
5530238106Sdes:
5531238106Sdes
5532238106Sdeselse
5533238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5534238106Sdes$as_echo "failed" >&6; }
5535238106Sdes:
5536238106Sdes
5537238106Sdesfi
5538238106Sdesfi
5539238106Sdes
5540238106Sdes
5541238106Sdes
5542238106Sdes
5543238106Sdes
5544238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5545238106Sdes$as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5546249141Sdescache=_D_POSIX_C_SOURCE_200112
5547238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5548238106Sdes  $as_echo_n "(cached) " >&6
5549238106Sdeselse
5550238106Sdes
5551238106Sdesecho '
5552238106Sdes#include "confdefs.h"
5553238106Sdes#ifdef HAVE_TIME_H
5554238106Sdes#include <time.h>
5555238106Sdes#endif
5556238106Sdes#include <netdb.h>
5557238106Sdes
5558238106Sdesint test() {
5559238106Sdes        int a = 0;
5560238106Sdes        char *t;
5561238106Sdes        time_t time = 0;
5562238106Sdes        char *buf = NULL;
5563238106Sdes	const char* str = NULL;
5564238106Sdes        t = ctime_r(&time, buf);
5565238106Sdes	str = gai_strerror(0);
5566238106Sdes	if(t && str)
5567238106Sdes		a = 0;
5568238106Sdes        return a;
5569238106Sdes}
5570238106Sdes' > conftest.c
5571238106Sdesecho 'void f(){}' >>conftest.c
5572238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5573238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5574238106Sdeselse
5575238106Sdes
5576238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5577238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5578238106Sdeselse
5579238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5580238106Sdes#echo 'Test with flag fails too!'
5581238106Sdes#cat conftest.c
5582238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5583238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5584238106Sdes#exit 1
5585238106Sdesfi
5586238106Sdes
5587238106Sdesfi
5588238106Sdesrm -f conftest conftest.c conftest.o
5589238106Sdes
5590238106Sdesfi
5591238106Sdes
5592238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5593238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5594238106Sdes$as_echo "yes" >&6; }
5595238106Sdes:
5596238106SdesCFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5597238106Sdeselse
5598238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5599238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600238106Sdes$as_echo "no" >&6; }
5601238106Sdes#echo 'Test with flag is no!'
5602238106Sdes#cat conftest.c
5603238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5604238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5605238106Sdes#exit 1
5606238106Sdes:
5607238106Sdes
5608238106Sdeselse
5609238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5610238106Sdes$as_echo "failed" >&6; }
5611238106Sdes:
5612238106Sdes
5613238106Sdesfi
5614238106Sdesfi
5615238106Sdes
5616238106Sdes
5617238106Sdes
5618238106Sdes
5619238106Sdes
5620238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5621238106Sdes$as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5622238106Sdescache=_D__EXTENSIONS__
5623238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5624238106Sdes  $as_echo_n "(cached) " >&6
5625238106Sdeselse
5626238106Sdes
5627238106Sdesecho '
5628238106Sdes#include "confdefs.h"
5629238106Sdes#include <stdlib.h>
5630238106Sdes#include <ctype.h>
5631238106Sdes#include <sys/time.h>
5632238106Sdes#ifdef HAVE_TIME_H
5633238106Sdes#include <time.h>
5634238106Sdes#endif
5635238106Sdes#include <unistd.h>
5636238106Sdes#ifdef HAVE_GETOPT_H
5637238106Sdes#include <getopt.h>
5638238106Sdes#endif
5639238106Sdes
5640238106Sdesint test() {
5641238106Sdes        int a;
5642238106Sdes        char **opts = NULL;
5643238106Sdes        struct timeval tv;
5644238106Sdes        tv.tv_usec = 10;
5645238106Sdes        srandom(32);
5646238106Sdes        a = getopt(2, opts, "a");
5647238106Sdes        a = isascii(32);
5648238106Sdes	if(tv.tv_usec)
5649238106Sdes		a = 0;
5650238106Sdes        return a;
5651238106Sdes}
5652238106Sdes' > conftest.c
5653238106Sdesecho 'void f(){}' >>conftest.c
5654238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5655238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
5656238106Sdeselse
5657238106Sdes
5658238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5659238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
5660238106Sdeselse
5661238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
5662238106Sdes#echo 'Test with flag fails too!'
5663238106Sdes#cat conftest.c
5664238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5665238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5666238106Sdes#exit 1
5667238106Sdesfi
5668238106Sdes
5669238106Sdesfi
5670238106Sdesrm -f conftest conftest.c conftest.o
5671238106Sdes
5672238106Sdesfi
5673238106Sdes
5674238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5675238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5676238106Sdes$as_echo "yes" >&6; }
5677238106Sdes:
5678238106SdesCFLAGS="$CFLAGS -D__EXTENSIONS__"
5679238106Sdeselse
5680238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5681238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682238106Sdes$as_echo "no" >&6; }
5683238106Sdes#echo 'Test with flag is no!'
5684238106Sdes#cat conftest.c
5685238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5686238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5687238106Sdes#exit 1
5688238106Sdes:
5689238106Sdes
5690238106Sdeselse
5691238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5692238106Sdes$as_echo "failed" >&6; }
5693238106Sdes:
5694238106Sdes
5695238106Sdesfi
5696238106Sdesfi
5697238106Sdes
5698238106Sdes
5699238106Sdes
5700238106Sdes
5701238106Sdes# debug mode flags warnings
5702238106Sdes# Check whether --enable-checking was given.
5703238106Sdesif test "${enable_checking+set}" = set; then :
5704238106Sdes  enableval=$enable_checking;
5705238106Sdesfi
5706238106Sdes
5707238106Sdes# Check whether --enable-debug was given.
5708238106Sdesif test "${enable_debug+set}" = set; then :
5709238106Sdes  enableval=$enable_debug;
5710238106Sdesfi
5711238106Sdes
5712238106Sdesif test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5713238106Sdeselse debug_enabled="$enable_checking"; fi
5714238106Sdes
5715238106Sdescase "$debug_enabled" in
5716238106Sdes        yes)
5717238106Sdes
5718238106Sdes
5719238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5720238106Sdes$as_echo_n "checking whether $CC supports -W... " >&6; }
5721238106Sdescache=`echo W | sed 'y%.=/+-%___p_%'`
5722238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5723238106Sdes  $as_echo_n "(cached) " >&6
5724238106Sdeselse
5725238106Sdes
5726269257Sdesecho 'void f(void){}' >conftest.c
5727238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5728238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5729238106Sdeselse
5730238106Sdeseval "cv_prog_cc_flag_$cache=no"
5731238106Sdesfi
5732238106Sdesrm -f conftest conftest.o conftest.c
5733238106Sdes
5734238106Sdesfi
5735238106Sdes
5736238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5737238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5738238106Sdes$as_echo "yes" >&6; }
5739238106Sdes:
5740238106SdesCFLAGS="$CFLAGS -W"
5741238106Sdeselse
5742238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743238106Sdes$as_echo "no" >&6; }
5744238106Sdes:
5745238106Sdes
5746238106Sdesfi
5747238106Sdes
5748238106Sdes
5749238106Sdes
5750238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5751238106Sdes$as_echo_n "checking whether $CC supports -Wall... " >&6; }
5752238106Sdescache=`echo Wall | sed 'y%.=/+-%___p_%'`
5753238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5754238106Sdes  $as_echo_n "(cached) " >&6
5755238106Sdeselse
5756238106Sdes
5757269257Sdesecho 'void f(void){}' >conftest.c
5758238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5759238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5760238106Sdeselse
5761238106Sdeseval "cv_prog_cc_flag_$cache=no"
5762238106Sdesfi
5763238106Sdesrm -f conftest conftest.o conftest.c
5764238106Sdes
5765238106Sdesfi
5766238106Sdes
5767238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5768238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5769238106Sdes$as_echo "yes" >&6; }
5770238106Sdes:
5771238106SdesCFLAGS="$CFLAGS -Wall"
5772238106Sdeselse
5773238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774238106Sdes$as_echo "no" >&6; }
5775238106Sdes:
5776238106Sdes
5777238106Sdesfi
5778238106Sdes
5779238106Sdes
5780238106Sdes
5781238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5782238106Sdes$as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5783238106Sdescache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5784238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5785238106Sdes  $as_echo_n "(cached) " >&6
5786238106Sdeselse
5787238106Sdes
5788269257Sdesecho 'void f(void){}' >conftest.c
5789238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5790238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5791238106Sdeselse
5792238106Sdeseval "cv_prog_cc_flag_$cache=no"
5793238106Sdesfi
5794238106Sdesrm -f conftest conftest.o conftest.c
5795238106Sdes
5796238106Sdesfi
5797238106Sdes
5798238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5799238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5800238106Sdes$as_echo "yes" >&6; }
5801238106Sdes:
5802238106SdesCFLAGS="$CFLAGS -Wextra"
5803238106Sdeselse
5804238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805238106Sdes$as_echo "no" >&6; }
5806238106Sdes:
5807238106Sdes
5808238106Sdesfi
5809238106Sdes
5810238106Sdes
5811238106Sdes
5812238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5813238106Sdes$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5814238106Sdescache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5815238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
5816238106Sdes  $as_echo_n "(cached) " >&6
5817238106Sdeselse
5818238106Sdes
5819269257Sdesecho 'void f(void){}' >conftest.c
5820238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5821238106Sdeseval "cv_prog_cc_flag_$cache=yes"
5822238106Sdeselse
5823238106Sdeseval "cv_prog_cc_flag_$cache=no"
5824238106Sdesfi
5825238106Sdesrm -f conftest conftest.o conftest.c
5826238106Sdes
5827238106Sdesfi
5828238106Sdes
5829238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5830238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5831238106Sdes$as_echo "yes" >&6; }
5832238106Sdes:
5833238106SdesCFLAGS="$CFLAGS -Wdeclaration-after-statement"
5834238106Sdeselse
5835238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836238106Sdes$as_echo "no" >&6; }
5837238106Sdes:
5838238106Sdes
5839238106Sdesfi
5840238106Sdes
5841238106Sdes
5842238106Sdes$as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5843238106Sdes
5844238106Sdes		;;
5845238106Sdes	no|*)
5846238106Sdes		# nothing to do.
5847238106Sdes		;;
5848238106Sdesesac
5849269257Sdes
5850269257Sdes    # Check whether --enable-flto was given.
5851269257Sdesif test "${enable_flto+set}" = set; then :
5852269257Sdes  enableval=$enable_flto;
5853269257Sdesfi
5854269257Sdes
5855269257Sdes    if test "x$enable_flto" != "xno"; then :
5856269257Sdes
5857269257Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5858238106Sdes$as_echo_n "checking if $CC supports -flto... " >&6; }
5859269257Sdes        BAKCFLAGS="$CFLAGS"
5860269257Sdes        CFLAGS="$CFLAGS -flto"
5861269257Sdes        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5862238106Sdes/* end confdefs.h.  */
5863238106Sdes
5864238106Sdesint
5865238106Sdesmain ()
5866238106Sdes{
5867238106Sdes
5868238106Sdes  ;
5869238106Sdes  return 0;
5870238106Sdes}
5871238106Sdes_ACEOF
5872238106Sdesif ac_fn_c_try_link "$LINENO"; then :
5873238106Sdes
5874269257Sdes            if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5875269257Sdes                CFLAGS="$BAKCFLAGS"
5876269257Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877238106Sdes$as_echo "no" >&6; }
5878269257Sdes            else
5879269257Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5880238106Sdes$as_echo "yes" >&6; }
5881269257Sdes            fi
5882269257Sdes            rm -f conftest conftest.c conftest.o
5883238106Sdes
5884238106Sdeselse
5885238106Sdes  CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5886238106Sdes$as_echo "no" >&6; }
5887238106Sdesfi
5888238106Sdesrm -f core conftest.err conftest.$ac_objext \
5889238106Sdes    conftest$ac_exeext conftest.$ac_ext
5890238106Sdes
5891269257Sdesfi
5892238106Sdes
5893269257Sdes
5894291767Sdes    # Check whether --enable-pie was given.
5895291767Sdesif test "${enable_pie+set}" = set; then :
5896291767Sdes  enableval=$enable_pie;
5897291767Sdesfi
5898291767Sdes
5899291767Sdes    if test "x$enable_pie" = "xyes"; then :
5900291767Sdes
5901291767Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
5902291767Sdes$as_echo_n "checking if $CC supports PIE... " >&6; }
5903291767Sdes	BAKLDFLAGS="$LDFLAGS"
5904291767Sdes	BAKCFLAGS="$CFLAGS"
5905291767Sdes	LDFLAGS="$LDFLAGS -pie"
5906291767Sdes	CFLAGS="$CFLAGS -fPIE"
5907291767Sdes	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5908291767Sdes/* end confdefs.h.  */
5909291767Sdes
5910291767Sdesint
5911291767Sdesmain ()
5912291767Sdes{
5913291767Sdes
5914291767Sdes  ;
5915291767Sdes  return 0;
5916291767Sdes}
5917291767Sdes_ACEOF
5918291767Sdesif ac_fn_c_try_link "$LINENO"; then :
5919291767Sdes
5920291767Sdes	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5921291767Sdes		LDFLAGS="$BAKLDFLAGS"
5922291767Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923291767Sdes$as_echo "no" >&6; }
5924291767Sdes	    else
5925291767Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5926291767Sdes$as_echo "yes" >&6; }
5927291767Sdes	    fi
5928291767Sdes	    rm -f conftest conftest.c conftest.o
5929291767Sdes
5930291767Sdeselse
5931291767Sdes  LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932291767Sdes$as_echo "no" >&6; }
5933291767Sdesfi
5934291767Sdesrm -f core conftest.err conftest.$ac_objext \
5935291767Sdes    conftest$ac_exeext conftest.$ac_ext
5936291767Sdes
5937291767Sdesfi
5938291767Sdes
5939291767Sdes
5940291767Sdes    # Check whether --enable-relro_now was given.
5941291767Sdesif test "${enable_relro_now+set}" = set; then :
5942291767Sdes  enableval=$enable_relro_now;
5943291767Sdesfi
5944291767Sdes
5945291767Sdes    if test "x$enable_relro_now" = "xyes"; then :
5946291767Sdes
5947291767Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
5948291767Sdes$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
5949291767Sdes	BAKLDFLAGS="$LDFLAGS"
5950291767Sdes	LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
5951291767Sdes	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5952291767Sdes/* end confdefs.h.  */
5953291767Sdes
5954291767Sdesint
5955291767Sdesmain ()
5956291767Sdes{
5957291767Sdes
5958291767Sdes  ;
5959291767Sdes  return 0;
5960291767Sdes}
5961291767Sdes_ACEOF
5962291767Sdesif ac_fn_c_try_link "$LINENO"; then :
5963291767Sdes
5964291767Sdes	    if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5965291767Sdes		LDFLAGS="$BAKLDFLAGS"
5966291767Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967291767Sdes$as_echo "no" >&6; }
5968291767Sdes	    else
5969291767Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5970291767Sdes$as_echo "yes" >&6; }
5971291767Sdes	    fi
5972291767Sdes	    rm -f conftest conftest.c conftest.o
5973291767Sdes
5974291767Sdeselse
5975291767Sdes  LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976291767Sdes$as_echo "no" >&6; }
5977291767Sdesfi
5978291767Sdesrm -f core conftest.err conftest.$ac_objext \
5979291767Sdes    conftest$ac_exeext conftest.$ac_ext
5980291767Sdes
5981291767Sdesfi
5982291767Sdes
5983291767Sdes
5984238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5985238106Sdes$as_echo_n "checking for inline... " >&6; }
5986238106Sdesif ${ac_cv_c_inline+:} false; then :
5987238106Sdes  $as_echo_n "(cached) " >&6
5988238106Sdeselse
5989238106Sdes  ac_cv_c_inline=no
5990238106Sdesfor ac_kw in inline __inline__ __inline; do
5991238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5992238106Sdes/* end confdefs.h.  */
5993238106Sdes#ifndef __cplusplus
5994238106Sdestypedef int foo_t;
5995238106Sdesstatic $ac_kw foo_t static_foo () {return 0; }
5996238106Sdes$ac_kw foo_t foo () {return 0; }
5997238106Sdes#endif
5998238106Sdes
5999238106Sdes_ACEOF
6000238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
6001238106Sdes  ac_cv_c_inline=$ac_kw
6002238106Sdesfi
6003238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6004238106Sdes  test "$ac_cv_c_inline" != no && break
6005238106Sdesdone
6006238106Sdes
6007238106Sdesfi
6008238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6009238106Sdes$as_echo "$ac_cv_c_inline" >&6; }
6010238106Sdes
6011238106Sdescase $ac_cv_c_inline in
6012238106Sdes  inline | yes) ;;
6013238106Sdes  *)
6014238106Sdes    case $ac_cv_c_inline in
6015238106Sdes      no) ac_val=;;
6016238106Sdes      *) ac_val=$ac_cv_c_inline;;
6017238106Sdes    esac
6018238106Sdes    cat >>confdefs.h <<_ACEOF
6019238106Sdes#ifndef __cplusplus
6020238106Sdes#define inline $ac_val
6021238106Sdes#endif
6022238106Sdes_ACEOF
6023238106Sdes    ;;
6024238106Sdesesac
6025238106Sdes
6026238106Sdes
6027238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6028238106Sdes$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6029238106Sdesif ${ac_cv_c_format_attribute+:} false; then :
6030238106Sdes  $as_echo_n "(cached) " >&6
6031238106Sdeselse
6032238106Sdes  ac_cv_c_format_attribute=no
6033238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034238106Sdes/* end confdefs.h.  */
6035238106Sdes#include <stdio.h>
6036238106Sdesvoid f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6037238106Sdesvoid (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6038238106Sdes
6039238106Sdesint
6040238106Sdesmain ()
6041238106Sdes{
6042238106Sdes
6043238106Sdes   f ("%s", "str");
6044238106Sdes
6045238106Sdes  ;
6046238106Sdes  return 0;
6047238106Sdes}
6048238106Sdes_ACEOF
6049238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
6050238106Sdes  ac_cv_c_format_attribute="yes"
6051238106Sdeselse
6052238106Sdes  ac_cv_c_format_attribute="no"
6053238106Sdesfi
6054238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6055238106Sdes
6056238106Sdesfi
6057238106Sdes
6058238106Sdes
6059238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6060238106Sdes$as_echo "$ac_cv_c_format_attribute" >&6; }
6061238106Sdesif test $ac_cv_c_format_attribute = yes; then
6062238106Sdes
6063238106Sdes$as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6064238106Sdes
6065238106Sdesfi
6066238106Sdes
6067238106Sdes
6068238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6069238106Sdes$as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6070238106Sdesif ${ac_cv_c_unused_attribute+:} false; then :
6071238106Sdes  $as_echo_n "(cached) " >&6
6072238106Sdeselse
6073238106Sdes  ac_cv_c_unused_attribute=no
6074238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
6075238106Sdes/* end confdefs.h.  */
6076238106Sdes#include <stdio.h>
6077238106Sdesvoid f (char *u __attribute__((unused)));
6078238106Sdes
6079238106Sdesint
6080238106Sdesmain ()
6081238106Sdes{
6082238106Sdes
6083238106Sdes   f ("x");
6084238106Sdes
6085238106Sdes  ;
6086238106Sdes  return 0;
6087238106Sdes}
6088238106Sdes_ACEOF
6089238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
6090238106Sdes  ac_cv_c_unused_attribute="yes"
6091238106Sdeselse
6092238106Sdes  ac_cv_c_unused_attribute="no"
6093238106Sdesfi
6094238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6095238106Sdes
6096238106Sdesfi
6097238106Sdes
6098238106Sdes
6099238106Sdes
6100238106Sdes
6101238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6102238106Sdes$as_echo "$ac_cv_c_unused_attribute" >&6; }
6103238106Sdesif test $ac_cv_c_unused_attribute = yes; then
6104238106Sdes
6105238106Sdes$as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6106238106Sdes
6107238106Sdesfi
6108238106Sdes
6109238106Sdes
6110238106Sdesif test "$srcdir" != "."; then
6111238106Sdes	CPPFLAGS="$CPPFLAGS -I$srcdir"
6112238106Sdesfi
6113238106Sdes
6114238106Sdes
6115238106Sdes
6116238106Sdesfor ac_prog in flex lex
6117238106Sdesdo
6118238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
6119238106Sdesset dummy $ac_prog; ac_word=$2
6120238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6122238106Sdesif ${ac_cv_prog_LEX+:} false; then :
6123238106Sdes  $as_echo_n "(cached) " >&6
6124238106Sdeselse
6125238106Sdes  if test -n "$LEX"; then
6126238106Sdes  ac_cv_prog_LEX="$LEX" # Let the user override the test.
6127238106Sdeselse
6128238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129238106Sdesfor as_dir in $PATH
6130238106Sdesdo
6131238106Sdes  IFS=$as_save_IFS
6132238106Sdes  test -z "$as_dir" && as_dir=.
6133238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6134249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6135238106Sdes    ac_cv_prog_LEX="$ac_prog"
6136238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6137238106Sdes    break 2
6138238106Sdes  fi
6139238106Sdesdone
6140238106Sdes  done
6141238106SdesIFS=$as_save_IFS
6142238106Sdes
6143238106Sdesfi
6144238106Sdesfi
6145238106SdesLEX=$ac_cv_prog_LEX
6146238106Sdesif test -n "$LEX"; then
6147238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6148238106Sdes$as_echo "$LEX" >&6; }
6149238106Sdeselse
6150238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151238106Sdes$as_echo "no" >&6; }
6152238106Sdesfi
6153238106Sdes
6154238106Sdes
6155238106Sdes  test -n "$LEX" && break
6156238106Sdesdone
6157238106Sdestest -n "$LEX" || LEX=":"
6158238106Sdes
6159238106Sdesif test "x$LEX" != "x:"; then
6160238106Sdes  cat >conftest.l <<_ACEOF
6161238106Sdes%%
6162238106Sdesa { ECHO; }
6163238106Sdesb { REJECT; }
6164238106Sdesc { yymore (); }
6165238106Sdesd { yyless (1); }
6166249141Sdese { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6167249141Sdes    yyless ((input () != 0)); }
6168238106Sdesf { unput (yytext[0]); }
6169238106Sdes. { BEGIN INITIAL; }
6170238106Sdes%%
6171238106Sdes#ifdef YYTEXT_POINTER
6172238106Sdesextern char *yytext;
6173238106Sdes#endif
6174238106Sdesint
6175238106Sdesmain (void)
6176238106Sdes{
6177238106Sdes  return ! yylex () + ! yywrap ();
6178238106Sdes}
6179238106Sdes_ACEOF
6180238106Sdes{ { ac_try="$LEX conftest.l"
6181238106Sdescase "(($ac_try" in
6182238106Sdes  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6183238106Sdes  *) ac_try_echo=$ac_try;;
6184238106Sdesesac
6185238106Sdeseval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6186238106Sdes$as_echo "$ac_try_echo"; } >&5
6187238106Sdes  (eval "$LEX conftest.l") 2>&5
6188238106Sdes  ac_status=$?
6189238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6190238106Sdes  test $ac_status = 0; }
6191238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6192238106Sdes$as_echo_n "checking lex output file root... " >&6; }
6193238106Sdesif ${ac_cv_prog_lex_root+:} false; then :
6194238106Sdes  $as_echo_n "(cached) " >&6
6195238106Sdeselse
6196238106Sdes
6197238106Sdesif test -f lex.yy.c; then
6198238106Sdes  ac_cv_prog_lex_root=lex.yy
6199238106Sdeselif test -f lexyy.c; then
6200238106Sdes  ac_cv_prog_lex_root=lexyy
6201238106Sdeselse
6202238106Sdes  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6203238106Sdesfi
6204238106Sdesfi
6205238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6206238106Sdes$as_echo "$ac_cv_prog_lex_root" >&6; }
6207238106SdesLEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6208238106Sdes
6209238106Sdesif test -z "${LEXLIB+set}"; then
6210238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6211238106Sdes$as_echo_n "checking lex library... " >&6; }
6212238106Sdesif ${ac_cv_lib_lex+:} false; then :
6213238106Sdes  $as_echo_n "(cached) " >&6
6214238106Sdeselse
6215238106Sdes
6216238106Sdes    ac_save_LIBS=$LIBS
6217238106Sdes    ac_cv_lib_lex='none needed'
6218238106Sdes    for ac_lib in '' -lfl -ll; do
6219238106Sdes      LIBS="$ac_lib $ac_save_LIBS"
6220238106Sdes      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6221238106Sdes/* end confdefs.h.  */
6222238106Sdes`cat $LEX_OUTPUT_ROOT.c`
6223238106Sdes_ACEOF
6224238106Sdesif ac_fn_c_try_link "$LINENO"; then :
6225238106Sdes  ac_cv_lib_lex=$ac_lib
6226238106Sdesfi
6227238106Sdesrm -f core conftest.err conftest.$ac_objext \
6228238106Sdes    conftest$ac_exeext conftest.$ac_ext
6229238106Sdes      test "$ac_cv_lib_lex" != 'none needed' && break
6230238106Sdes    done
6231238106Sdes    LIBS=$ac_save_LIBS
6232238106Sdes
6233238106Sdesfi
6234238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6235238106Sdes$as_echo "$ac_cv_lib_lex" >&6; }
6236238106Sdes  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6237238106Sdesfi
6238238106Sdes
6239238106Sdes
6240238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6241238106Sdes$as_echo_n "checking whether yytext is a pointer... " >&6; }
6242238106Sdesif ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6243238106Sdes  $as_echo_n "(cached) " >&6
6244238106Sdeselse
6245238106Sdes  # POSIX says lex can declare yytext either as a pointer or an array; the
6246238106Sdes# default is implementation-dependent.  Figure out which it is, since
6247238106Sdes# not all implementations provide the %pointer and %array declarations.
6248238106Sdesac_cv_prog_lex_yytext_pointer=no
6249238106Sdesac_save_LIBS=$LIBS
6250238106SdesLIBS="$LEXLIB $ac_save_LIBS"
6251238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
6252238106Sdes/* end confdefs.h.  */
6253238106Sdes
6254238106Sdes  #define YYTEXT_POINTER 1
6255238106Sdes`cat $LEX_OUTPUT_ROOT.c`
6256238106Sdes_ACEOF
6257238106Sdesif ac_fn_c_try_link "$LINENO"; then :
6258238106Sdes  ac_cv_prog_lex_yytext_pointer=yes
6259238106Sdesfi
6260238106Sdesrm -f core conftest.err conftest.$ac_objext \
6261238106Sdes    conftest$ac_exeext conftest.$ac_ext
6262238106SdesLIBS=$ac_save_LIBS
6263238106Sdes
6264238106Sdesfi
6265238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6266238106Sdes$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6267238106Sdesif test $ac_cv_prog_lex_yytext_pointer = yes; then
6268238106Sdes
6269238106Sdes$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6270238106Sdes
6271238106Sdesfi
6272238106Sdesrm -f conftest.l $LEX_OUTPUT_ROOT.c
6273238106Sdes
6274238106Sdesfi
6275238106Sdes
6276238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6277238106Sdes$as_echo_n "checking for yylex_destroy... " >&6; }
6278238106Sdes	if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6279238106Sdes
6280238106Sdes$as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6281238106Sdes
6282238106Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6283238106Sdes$as_echo "yes" >&6; }
6284238106Sdes	else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6285238106Sdes$as_echo "no" >&6; }; fi
6286238106Sdes
6287238106Sdesfor ac_prog in 'bison -y' byacc
6288238106Sdesdo
6289238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
6290238106Sdesset dummy $ac_prog; ac_word=$2
6291238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6292238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6293238106Sdesif ${ac_cv_prog_YACC+:} false; then :
6294238106Sdes  $as_echo_n "(cached) " >&6
6295238106Sdeselse
6296238106Sdes  if test -n "$YACC"; then
6297238106Sdes  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6298238106Sdeselse
6299238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6300238106Sdesfor as_dir in $PATH
6301238106Sdesdo
6302238106Sdes  IFS=$as_save_IFS
6303238106Sdes  test -z "$as_dir" && as_dir=.
6304238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6305249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6306238106Sdes    ac_cv_prog_YACC="$ac_prog"
6307238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6308238106Sdes    break 2
6309238106Sdes  fi
6310238106Sdesdone
6311238106Sdes  done
6312238106SdesIFS=$as_save_IFS
6313238106Sdes
6314238106Sdesfi
6315238106Sdesfi
6316238106SdesYACC=$ac_cv_prog_YACC
6317238106Sdesif test -n "$YACC"; then
6318238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6319238106Sdes$as_echo "$YACC" >&6; }
6320238106Sdeselse
6321238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322238106Sdes$as_echo "no" >&6; }
6323238106Sdesfi
6324238106Sdes
6325238106Sdes
6326238106Sdes  test -n "$YACC" && break
6327238106Sdesdone
6328238106Sdestest -n "$YACC" || YACC="yacc"
6329238106Sdes
6330238106Sdes# Extract the first word of "doxygen", so it can be a program name with args.
6331238106Sdesset dummy doxygen; ac_word=$2
6332238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6333238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6334238106Sdesif ${ac_cv_prog_doxygen+:} false; then :
6335238106Sdes  $as_echo_n "(cached) " >&6
6336238106Sdeselse
6337238106Sdes  if test -n "$doxygen"; then
6338238106Sdes  ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6339238106Sdeselse
6340238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341238106Sdesfor as_dir in $PATH
6342238106Sdesdo
6343238106Sdes  IFS=$as_save_IFS
6344238106Sdes  test -z "$as_dir" && as_dir=.
6345238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6346249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347238106Sdes    ac_cv_prog_doxygen="doxygen"
6348238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349238106Sdes    break 2
6350238106Sdes  fi
6351238106Sdesdone
6352238106Sdes  done
6353238106SdesIFS=$as_save_IFS
6354238106Sdes
6355238106Sdesfi
6356238106Sdesfi
6357238106Sdesdoxygen=$ac_cv_prog_doxygen
6358238106Sdesif test -n "$doxygen"; then
6359238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6360238106Sdes$as_echo "$doxygen" >&6; }
6361238106Sdeselse
6362238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363238106Sdes$as_echo "no" >&6; }
6364238106Sdesfi
6365238106Sdes
6366238106Sdes
6367238106Sdesif test -n "$ac_tool_prefix"; then
6368238106Sdes  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6369238106Sdesset dummy ${ac_tool_prefix}strip; ac_word=$2
6370238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6371238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6372238106Sdesif ${ac_cv_prog_STRIP+:} false; then :
6373238106Sdes  $as_echo_n "(cached) " >&6
6374238106Sdeselse
6375238106Sdes  if test -n "$STRIP"; then
6376238106Sdes  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6377238106Sdeselse
6378238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379238106Sdesfor as_dir in $PATH
6380238106Sdesdo
6381238106Sdes  IFS=$as_save_IFS
6382238106Sdes  test -z "$as_dir" && as_dir=.
6383238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6384249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6385238106Sdes    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6386238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6387238106Sdes    break 2
6388238106Sdes  fi
6389238106Sdesdone
6390238106Sdes  done
6391238106SdesIFS=$as_save_IFS
6392238106Sdes
6393238106Sdesfi
6394238106Sdesfi
6395238106SdesSTRIP=$ac_cv_prog_STRIP
6396238106Sdesif test -n "$STRIP"; then
6397238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6398238106Sdes$as_echo "$STRIP" >&6; }
6399238106Sdeselse
6400238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401238106Sdes$as_echo "no" >&6; }
6402238106Sdesfi
6403238106Sdes
6404238106Sdes
6405238106Sdesfi
6406238106Sdesif test -z "$ac_cv_prog_STRIP"; then
6407238106Sdes  ac_ct_STRIP=$STRIP
6408238106Sdes  # Extract the first word of "strip", so it can be a program name with args.
6409238106Sdesset dummy strip; ac_word=$2
6410238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6411238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6412238106Sdesif ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6413238106Sdes  $as_echo_n "(cached) " >&6
6414238106Sdeselse
6415238106Sdes  if test -n "$ac_ct_STRIP"; then
6416238106Sdes  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6417238106Sdeselse
6418238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6419238106Sdesfor as_dir in $PATH
6420238106Sdesdo
6421238106Sdes  IFS=$as_save_IFS
6422238106Sdes  test -z "$as_dir" && as_dir=.
6423238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6424249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6425238106Sdes    ac_cv_prog_ac_ct_STRIP="strip"
6426238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6427238106Sdes    break 2
6428238106Sdes  fi
6429238106Sdesdone
6430238106Sdes  done
6431238106SdesIFS=$as_save_IFS
6432238106Sdes
6433238106Sdesfi
6434238106Sdesfi
6435238106Sdesac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6436238106Sdesif test -n "$ac_ct_STRIP"; then
6437238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6438238106Sdes$as_echo "$ac_ct_STRIP" >&6; }
6439238106Sdeselse
6440238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441238106Sdes$as_echo "no" >&6; }
6442238106Sdesfi
6443238106Sdes
6444238106Sdes  if test "x$ac_ct_STRIP" = x; then
6445238106Sdes    STRIP=""
6446238106Sdes  else
6447238106Sdes    case $cross_compiling:$ac_tool_warned in
6448238106Sdesyes:)
6449238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6450238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6451238106Sdesac_tool_warned=yes ;;
6452238106Sdesesac
6453238106Sdes    STRIP=$ac_ct_STRIP
6454238106Sdes  fi
6455238106Sdeselse
6456238106Sdes  STRIP="$ac_cv_prog_STRIP"
6457238106Sdesfi
6458238106Sdes
6459255840Sdesac_aux_dir=
6460255840Sdesfor ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6461255840Sdes  if test -f "$ac_dir/install-sh"; then
6462255840Sdes    ac_aux_dir=$ac_dir
6463255840Sdes    ac_install_sh="$ac_aux_dir/install-sh -c"
6464255840Sdes    break
6465255840Sdes  elif test -f "$ac_dir/install.sh"; then
6466255840Sdes    ac_aux_dir=$ac_dir
6467255840Sdes    ac_install_sh="$ac_aux_dir/install.sh -c"
6468255840Sdes    break
6469255840Sdes  elif test -f "$ac_dir/shtool"; then
6470255840Sdes    ac_aux_dir=$ac_dir
6471255840Sdes    ac_install_sh="$ac_aux_dir/shtool install -c"
6472255840Sdes    break
6473255840Sdes  fi
6474255840Sdesdone
6475255840Sdesif test -z "$ac_aux_dir"; then
6476255840Sdes  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6477255840Sdesfi
6478238106Sdes
6479255840Sdes# These three variables are undocumented and unsupported,
6480255840Sdes# and are intended to be withdrawn in a future Autoconf release.
6481255840Sdes# They can cause serious problems if a builder's source tree is in a directory
6482255840Sdes# whose full name contains unusual characters.
6483255840Sdesac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6484255840Sdesac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6485255840Sdesac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6486255840Sdes
6487255840Sdes
6488255840Sdes# Make sure we can run config.sub.
6489255840Sdes$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6490255840Sdes  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6491255840Sdes
6492255840Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6493255840Sdes$as_echo_n "checking build system type... " >&6; }
6494255840Sdesif ${ac_cv_build+:} false; then :
6495255840Sdes  $as_echo_n "(cached) " >&6
6496255840Sdeselse
6497255840Sdes  ac_build_alias=$build_alias
6498255840Sdestest "x$ac_build_alias" = x &&
6499255840Sdes  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6500255840Sdestest "x$ac_build_alias" = x &&
6501255840Sdes  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6502255840Sdesac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6503255840Sdes  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6504255840Sdes
6505255840Sdesfi
6506255840Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6507255840Sdes$as_echo "$ac_cv_build" >&6; }
6508255840Sdescase $ac_cv_build in
6509255840Sdes*-*-*) ;;
6510255840Sdes*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6511255840Sdesesac
6512255840Sdesbuild=$ac_cv_build
6513255840Sdesac_save_IFS=$IFS; IFS='-'
6514255840Sdesset x $ac_cv_build
6515255840Sdesshift
6516255840Sdesbuild_cpu=$1
6517255840Sdesbuild_vendor=$2
6518255840Sdesshift; shift
6519255840Sdes# Remember, the first character of IFS is used to create $*,
6520255840Sdes# except with old shells:
6521255840Sdesbuild_os=$*
6522255840SdesIFS=$ac_save_IFS
6523255840Sdescase $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6524255840Sdes
6525255840Sdes
6526255840Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6527255840Sdes$as_echo_n "checking host system type... " >&6; }
6528255840Sdesif ${ac_cv_host+:} false; then :
6529255840Sdes  $as_echo_n "(cached) " >&6
6530255840Sdeselse
6531255840Sdes  if test "x$host_alias" = x; then
6532255840Sdes  ac_cv_host=$ac_cv_build
6533255840Sdeselse
6534255840Sdes  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6535255840Sdes    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6536255840Sdesfi
6537255840Sdes
6538255840Sdesfi
6539255840Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6540255840Sdes$as_echo "$ac_cv_host" >&6; }
6541255840Sdescase $ac_cv_host in
6542255840Sdes*-*-*) ;;
6543255840Sdes*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6544255840Sdesesac
6545255840Sdeshost=$ac_cv_host
6546255840Sdesac_save_IFS=$IFS; IFS='-'
6547255840Sdesset x $ac_cv_host
6548255840Sdesshift
6549255840Sdeshost_cpu=$1
6550255840Sdeshost_vendor=$2
6551255840Sdesshift; shift
6552255840Sdes# Remember, the first character of IFS is used to create $*,
6553255840Sdes# except with old shells:
6554255840Sdeshost_os=$*
6555255840SdesIFS=$ac_save_IFS
6556255840Sdescase $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6557255840Sdes
6558255840Sdes
6559255840Sdes
6560238106Sdes# skip these tests, we do not need them.
6561238106Sdes
6562238106Sdes
6563238106Sdes
6564238106Sdes
6565238106Sdes
6566238106Sdes
6567238106Sdes
6568238106Sdes
6569238106Sdes# always use ./libtool unless override from commandline (libtool=mylibtool)
6570238106Sdesif test -z "$libtool"; then
6571238106Sdes	libtool="./libtool"
6572238106Sdesfi
6573238106Sdes
6574238106Sdes# avoid libtool max commandline length test on systems that fork slowly.
6575238106Sdes
6576238106Sdesif echo "$host_os" | grep "sunos4" >/dev/null; then
6577238106Sdes	lt_cv_sys_max_cmd_len=32750;
6578238106Sdesfi
6579238106Sdesif test -n "$ac_tool_prefix"; then
6580238106Sdes  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6581238106Sdesset dummy ${ac_tool_prefix}ar; ac_word=$2
6582238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6584238106Sdesif ${ac_cv_path_AR+:} false; then :
6585238106Sdes  $as_echo_n "(cached) " >&6
6586238106Sdeselse
6587238106Sdes  case $AR in
6588238106Sdes  [\\/]* | ?:[\\/]*)
6589238106Sdes  ac_cv_path_AR="$AR" # Let the user override the test with a path.
6590238106Sdes  ;;
6591238106Sdes  *)
6592238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593238106Sdesfor as_dir in $PATH
6594238106Sdesdo
6595238106Sdes  IFS=$as_save_IFS
6596238106Sdes  test -z "$as_dir" && as_dir=.
6597238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6598249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599238106Sdes    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6600238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601238106Sdes    break 2
6602238106Sdes  fi
6603238106Sdesdone
6604238106Sdes  done
6605238106SdesIFS=$as_save_IFS
6606238106Sdes
6607238106Sdes  ;;
6608238106Sdesesac
6609238106Sdesfi
6610238106SdesAR=$ac_cv_path_AR
6611238106Sdesif test -n "$AR"; then
6612238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6613238106Sdes$as_echo "$AR" >&6; }
6614238106Sdeselse
6615238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616238106Sdes$as_echo "no" >&6; }
6617238106Sdesfi
6618238106Sdes
6619238106Sdes
6620238106Sdesfi
6621238106Sdesif test -z "$ac_cv_path_AR"; then
6622238106Sdes  ac_pt_AR=$AR
6623238106Sdes  # Extract the first word of "ar", so it can be a program name with args.
6624238106Sdesset dummy ar; ac_word=$2
6625238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
6627238106Sdesif ${ac_cv_path_ac_pt_AR+:} false; then :
6628238106Sdes  $as_echo_n "(cached) " >&6
6629238106Sdeselse
6630238106Sdes  case $ac_pt_AR in
6631238106Sdes  [\\/]* | ?:[\\/]*)
6632238106Sdes  ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6633238106Sdes  ;;
6634238106Sdes  *)
6635238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636238106Sdesfor as_dir in $PATH
6637238106Sdesdo
6638238106Sdes  IFS=$as_save_IFS
6639238106Sdes  test -z "$as_dir" && as_dir=.
6640238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6641249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6642238106Sdes    ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6643238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6644238106Sdes    break 2
6645238106Sdes  fi
6646238106Sdesdone
6647238106Sdes  done
6648238106SdesIFS=$as_save_IFS
6649238106Sdes
6650238106Sdes  ;;
6651238106Sdesesac
6652238106Sdesfi
6653238106Sdesac_pt_AR=$ac_cv_path_ac_pt_AR
6654238106Sdesif test -n "$ac_pt_AR"; then
6655238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6656238106Sdes$as_echo "$ac_pt_AR" >&6; }
6657238106Sdeselse
6658238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659238106Sdes$as_echo "no" >&6; }
6660238106Sdesfi
6661238106Sdes
6662238106Sdes  if test "x$ac_pt_AR" = x; then
6663238106Sdes    AR="false"
6664238106Sdes  else
6665238106Sdes    case $cross_compiling:$ac_tool_warned in
6666238106Sdesyes:)
6667238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6668238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6669238106Sdesac_tool_warned=yes ;;
6670238106Sdesesac
6671238106Sdes    AR=$ac_pt_AR
6672238106Sdes  fi
6673238106Sdeselse
6674238106Sdes  AR="$ac_cv_path_AR"
6675238106Sdesfi
6676238106Sdes
6677238106Sdesif test $AR = false; then
6678238106Sdes	as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6679238106Sdesfi
6680238106Sdes
6681238106Sdescase `pwd` in
6682238106Sdes  *\ * | *\	*)
6683238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6684238106Sdes$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6685238106Sdesesac
6686238106Sdes
6687238106Sdes
6688238106Sdes
6689249141Sdesmacro_version='2.4.2'
6690249141Sdesmacro_revision='1.3337'
6691238106Sdes
6692238106Sdes
6693238106Sdes
6694238106Sdes
6695238106Sdes
6696238106Sdes
6697238106Sdes
6698238106Sdes
6699238106Sdes
6700238106Sdes
6701238106Sdes
6702238106Sdes
6703238106Sdes
6704238106Sdesltmain="$ac_aux_dir/ltmain.sh"
6705238106Sdes
6706238106Sdes# Backslashify metacharacters that are still active within
6707238106Sdes# double-quoted strings.
6708238106Sdessed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6709238106Sdes
6710238106Sdes# Same as above, but do not quote variable references.
6711238106Sdesdouble_quote_subst='s/\(["`\\]\)/\\\1/g'
6712238106Sdes
6713238106Sdes# Sed substitution to delay expansion of an escaped shell variable in a
6714238106Sdes# double_quote_subst'ed string.
6715238106Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6716238106Sdes
6717238106Sdes# Sed substitution to delay expansion of an escaped single quote.
6718238106Sdesdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6719238106Sdes
6720238106Sdes# Sed substitution to avoid accidental globbing in evaled expressions
6721238106Sdesno_glob_subst='s/\*/\\\*/g'
6722238106Sdes
6723238106SdesECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6724238106SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6725238106SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6726238106Sdes
6727238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6728238106Sdes$as_echo_n "checking how to print strings... " >&6; }
6729238106Sdes# Test print first, because it will be a builtin if present.
6730238106Sdesif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6731238106Sdes   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6732238106Sdes  ECHO='print -r --'
6733238106Sdeselif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6734238106Sdes  ECHO='printf %s\n'
6735238106Sdeselse
6736238106Sdes  # Use this function as a fallback that always works.
6737238106Sdes  func_fallback_echo ()
6738238106Sdes  {
6739238106Sdes    eval 'cat <<_LTECHO_EOF
6740238106Sdes$1
6741238106Sdes_LTECHO_EOF'
6742238106Sdes  }
6743238106Sdes  ECHO='func_fallback_echo'
6744238106Sdesfi
6745238106Sdes
6746238106Sdes# func_echo_all arg...
6747238106Sdes# Invoke $ECHO with all args, space-separated.
6748238106Sdesfunc_echo_all ()
6749238106Sdes{
6750238106Sdes    $ECHO ""
6751238106Sdes}
6752238106Sdes
6753238106Sdescase "$ECHO" in
6754238106Sdes  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6755238106Sdes$as_echo "printf" >&6; } ;;
6756238106Sdes  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6757238106Sdes$as_echo "print -r" >&6; } ;;
6758238106Sdes  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6759238106Sdes$as_echo "cat" >&6; } ;;
6760238106Sdesesac
6761238106Sdes
6762238106Sdes
6763238106Sdes
6764238106Sdes
6765238106Sdes
6766238106Sdes
6767238106Sdes
6768238106Sdes
6769238106Sdes
6770238106Sdes
6771238106Sdes
6772238106Sdes
6773238106Sdes
6774238106Sdes
6775238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6776238106Sdes$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6777238106Sdesif ${ac_cv_path_SED+:} false; then :
6778238106Sdes  $as_echo_n "(cached) " >&6
6779238106Sdeselse
6780238106Sdes            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6781238106Sdes     for ac_i in 1 2 3 4 5 6 7; do
6782238106Sdes       ac_script="$ac_script$as_nl$ac_script"
6783238106Sdes     done
6784238106Sdes     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6785238106Sdes     { ac_script=; unset ac_script;}
6786238106Sdes     if test -z "$SED"; then
6787238106Sdes  ac_path_SED_found=false
6788238106Sdes  # Loop through the user's path and test for each of PROGNAME-LIST
6789238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6790238106Sdesfor as_dir in $PATH
6791238106Sdesdo
6792238106Sdes  IFS=$as_save_IFS
6793238106Sdes  test -z "$as_dir" && as_dir=.
6794238106Sdes    for ac_prog in sed gsed; do
6795238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6796238106Sdes      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6797249141Sdes      as_fn_executable_p "$ac_path_SED" || continue
6798238106Sdes# Check for GNU ac_path_SED and select it if it is found.
6799238106Sdes  # Check for GNU $ac_path_SED
6800238106Sdescase `"$ac_path_SED" --version 2>&1` in
6801238106Sdes*GNU*)
6802238106Sdes  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6803238106Sdes*)
6804238106Sdes  ac_count=0
6805238106Sdes  $as_echo_n 0123456789 >"conftest.in"
6806238106Sdes  while :
6807238106Sdes  do
6808238106Sdes    cat "conftest.in" "conftest.in" >"conftest.tmp"
6809238106Sdes    mv "conftest.tmp" "conftest.in"
6810238106Sdes    cp "conftest.in" "conftest.nl"
6811238106Sdes    $as_echo '' >> "conftest.nl"
6812238106Sdes    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6813238106Sdes    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6814238106Sdes    as_fn_arith $ac_count + 1 && ac_count=$as_val
6815238106Sdes    if test $ac_count -gt ${ac_path_SED_max-0}; then
6816238106Sdes      # Best one so far, save it but keep looking for a better one
6817238106Sdes      ac_cv_path_SED="$ac_path_SED"
6818238106Sdes      ac_path_SED_max=$ac_count
6819238106Sdes    fi
6820238106Sdes    # 10*(2^10) chars as input seems more than enough
6821238106Sdes    test $ac_count -gt 10 && break
6822238106Sdes  done
6823238106Sdes  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6824238106Sdesesac
6825238106Sdes
6826238106Sdes      $ac_path_SED_found && break 3
6827238106Sdes    done
6828238106Sdes  done
6829238106Sdes  done
6830238106SdesIFS=$as_save_IFS
6831238106Sdes  if test -z "$ac_cv_path_SED"; then
6832238106Sdes    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6833238106Sdes  fi
6834238106Sdeselse
6835238106Sdes  ac_cv_path_SED=$SED
6836238106Sdesfi
6837238106Sdes
6838238106Sdesfi
6839238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6840238106Sdes$as_echo "$ac_cv_path_SED" >&6; }
6841238106Sdes SED="$ac_cv_path_SED"
6842238106Sdes  rm -f conftest.sed
6843238106Sdes
6844238106Sdestest -z "$SED" && SED=sed
6845238106SdesXsed="$SED -e 1s/^X//"
6846238106Sdes
6847238106Sdes
6848238106Sdes
6849238106Sdes
6850238106Sdes
6851238106Sdes
6852238106Sdes
6853238106Sdes
6854238106Sdes
6855238106Sdes
6856238106Sdes
6857238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6858238106Sdes$as_echo_n "checking for fgrep... " >&6; }
6859238106Sdesif ${ac_cv_path_FGREP+:} false; then :
6860238106Sdes  $as_echo_n "(cached) " >&6
6861238106Sdeselse
6862238106Sdes  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6863238106Sdes   then ac_cv_path_FGREP="$GREP -F"
6864238106Sdes   else
6865238106Sdes     if test -z "$FGREP"; then
6866238106Sdes  ac_path_FGREP_found=false
6867238106Sdes  # Loop through the user's path and test for each of PROGNAME-LIST
6868238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869238106Sdesfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6870238106Sdesdo
6871238106Sdes  IFS=$as_save_IFS
6872238106Sdes  test -z "$as_dir" && as_dir=.
6873238106Sdes    for ac_prog in fgrep; do
6874238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
6875238106Sdes      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6876249141Sdes      as_fn_executable_p "$ac_path_FGREP" || continue
6877238106Sdes# Check for GNU ac_path_FGREP and select it if it is found.
6878238106Sdes  # Check for GNU $ac_path_FGREP
6879238106Sdescase `"$ac_path_FGREP" --version 2>&1` in
6880238106Sdes*GNU*)
6881238106Sdes  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6882238106Sdes*)
6883238106Sdes  ac_count=0
6884238106Sdes  $as_echo_n 0123456789 >"conftest.in"
6885238106Sdes  while :
6886238106Sdes  do
6887238106Sdes    cat "conftest.in" "conftest.in" >"conftest.tmp"
6888238106Sdes    mv "conftest.tmp" "conftest.in"
6889238106Sdes    cp "conftest.in" "conftest.nl"
6890238106Sdes    $as_echo 'FGREP' >> "conftest.nl"
6891238106Sdes    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6892238106Sdes    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6893238106Sdes    as_fn_arith $ac_count + 1 && ac_count=$as_val
6894238106Sdes    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6895238106Sdes      # Best one so far, save it but keep looking for a better one
6896238106Sdes      ac_cv_path_FGREP="$ac_path_FGREP"
6897238106Sdes      ac_path_FGREP_max=$ac_count
6898238106Sdes    fi
6899238106Sdes    # 10*(2^10) chars as input seems more than enough
6900238106Sdes    test $ac_count -gt 10 && break
6901238106Sdes  done
6902238106Sdes  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6903238106Sdesesac
6904238106Sdes
6905238106Sdes      $ac_path_FGREP_found && break 3
6906238106Sdes    done
6907238106Sdes  done
6908238106Sdes  done
6909238106SdesIFS=$as_save_IFS
6910238106Sdes  if test -z "$ac_cv_path_FGREP"; then
6911238106Sdes    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6912238106Sdes  fi
6913238106Sdeselse
6914238106Sdes  ac_cv_path_FGREP=$FGREP
6915238106Sdesfi
6916238106Sdes
6917238106Sdes   fi
6918238106Sdesfi
6919238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6920238106Sdes$as_echo "$ac_cv_path_FGREP" >&6; }
6921238106Sdes FGREP="$ac_cv_path_FGREP"
6922238106Sdes
6923238106Sdes
6924238106Sdestest -z "$GREP" && GREP=grep
6925238106Sdes
6926238106Sdes
6927238106Sdes
6928238106Sdes
6929238106Sdes
6930238106Sdes
6931238106Sdes
6932238106Sdes
6933238106Sdes
6934238106Sdes
6935238106Sdes
6936238106Sdes
6937238106Sdes
6938238106Sdes
6939238106Sdes
6940238106Sdes
6941238106Sdes
6942238106Sdes
6943238106Sdes
6944238106Sdes# Check whether --with-gnu-ld was given.
6945238106Sdesif test "${with_gnu_ld+set}" = set; then :
6946238106Sdes  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6947238106Sdeselse
6948238106Sdes  with_gnu_ld=no
6949238106Sdesfi
6950238106Sdes
6951238106Sdesac_prog=ld
6952238106Sdesif test "$GCC" = yes; then
6953238106Sdes  # Check if gcc -print-prog-name=ld gives a path.
6954238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6955238106Sdes$as_echo_n "checking for ld used by $CC... " >&6; }
6956238106Sdes  case $host in
6957238106Sdes  *-*-mingw*)
6958238106Sdes    # gcc leaves a trailing carriage return which upsets mingw
6959238106Sdes    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6960238106Sdes  *)
6961238106Sdes    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6962238106Sdes  esac
6963238106Sdes  case $ac_prog in
6964238106Sdes    # Accept absolute paths.
6965238106Sdes    [\\/]* | ?:[\\/]*)
6966238106Sdes      re_direlt='/[^/][^/]*/\.\./'
6967238106Sdes      # Canonicalize the pathname of ld
6968238106Sdes      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6969238106Sdes      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6970238106Sdes	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6971238106Sdes      done
6972238106Sdes      test -z "$LD" && LD="$ac_prog"
6973238106Sdes      ;;
6974238106Sdes  "")
6975238106Sdes    # If it fails, then pretend we aren't using GCC.
6976238106Sdes    ac_prog=ld
6977238106Sdes    ;;
6978238106Sdes  *)
6979238106Sdes    # If it is relative, then search for the first ld in PATH.
6980238106Sdes    with_gnu_ld=unknown
6981238106Sdes    ;;
6982238106Sdes  esac
6983238106Sdeselif test "$with_gnu_ld" = yes; then
6984238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6985238106Sdes$as_echo_n "checking for GNU ld... " >&6; }
6986238106Sdeselse
6987238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6988238106Sdes$as_echo_n "checking for non-GNU ld... " >&6; }
6989238106Sdesfi
6990238106Sdesif ${lt_cv_path_LD+:} false; then :
6991238106Sdes  $as_echo_n "(cached) " >&6
6992238106Sdeselse
6993238106Sdes  if test -z "$LD"; then
6994238106Sdes  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6995238106Sdes  for ac_dir in $PATH; do
6996238106Sdes    IFS="$lt_save_ifs"
6997238106Sdes    test -z "$ac_dir" && ac_dir=.
6998238106Sdes    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6999238106Sdes      lt_cv_path_LD="$ac_dir/$ac_prog"
7000238106Sdes      # Check to see if the program is GNU ld.  I'd rather use --version,
7001238106Sdes      # but apparently some variants of GNU ld only accept -v.
7002238106Sdes      # Break only if it was the GNU/non-GNU ld that we prefer.
7003238106Sdes      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7004238106Sdes      *GNU* | *'with BFD'*)
7005238106Sdes	test "$with_gnu_ld" != no && break
7006238106Sdes	;;
7007238106Sdes      *)
7008238106Sdes	test "$with_gnu_ld" != yes && break
7009238106Sdes	;;
7010238106Sdes      esac
7011238106Sdes    fi
7012238106Sdes  done
7013238106Sdes  IFS="$lt_save_ifs"
7014238106Sdeselse
7015238106Sdes  lt_cv_path_LD="$LD" # Let the user override the test with a path.
7016238106Sdesfi
7017238106Sdesfi
7018238106Sdes
7019238106SdesLD="$lt_cv_path_LD"
7020238106Sdesif test -n "$LD"; then
7021238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7022238106Sdes$as_echo "$LD" >&6; }
7023238106Sdeselse
7024238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025238106Sdes$as_echo "no" >&6; }
7026238106Sdesfi
7027238106Sdestest -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7028238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7029238106Sdes$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7030238106Sdesif ${lt_cv_prog_gnu_ld+:} false; then :
7031238106Sdes  $as_echo_n "(cached) " >&6
7032238106Sdeselse
7033238106Sdes  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7034238106Sdescase `$LD -v 2>&1 </dev/null` in
7035238106Sdes*GNU* | *'with BFD'*)
7036238106Sdes  lt_cv_prog_gnu_ld=yes
7037238106Sdes  ;;
7038238106Sdes*)
7039238106Sdes  lt_cv_prog_gnu_ld=no
7040238106Sdes  ;;
7041238106Sdesesac
7042238106Sdesfi
7043238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7044238106Sdes$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7045238106Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld
7046238106Sdes
7047238106Sdes
7048238106Sdes
7049238106Sdes
7050238106Sdes
7051238106Sdes
7052238106Sdes
7053238106Sdes
7054238106Sdes
7055238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7056238106Sdes$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7057238106Sdesif ${lt_cv_path_NM+:} false; then :
7058238106Sdes  $as_echo_n "(cached) " >&6
7059238106Sdeselse
7060238106Sdes  if test -n "$NM"; then
7061238106Sdes  # Let the user override the test.
7062238106Sdes  lt_cv_path_NM="$NM"
7063238106Sdeselse
7064238106Sdes  lt_nm_to_check="${ac_tool_prefix}nm"
7065238106Sdes  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7066238106Sdes    lt_nm_to_check="$lt_nm_to_check nm"
7067238106Sdes  fi
7068238106Sdes  for lt_tmp_nm in $lt_nm_to_check; do
7069238106Sdes    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7070238106Sdes    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7071238106Sdes      IFS="$lt_save_ifs"
7072238106Sdes      test -z "$ac_dir" && ac_dir=.
7073238106Sdes      tmp_nm="$ac_dir/$lt_tmp_nm"
7074238106Sdes      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7075238106Sdes	# Check to see if the nm accepts a BSD-compat flag.
7076238106Sdes	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7077238106Sdes	#   nm: unknown option "B" ignored
7078238106Sdes	# Tru64's nm complains that /dev/null is an invalid object file
7079238106Sdes	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7080238106Sdes	*/dev/null* | *'Invalid file or object type'*)
7081238106Sdes	  lt_cv_path_NM="$tmp_nm -B"
7082238106Sdes	  break
7083238106Sdes	  ;;
7084238106Sdes	*)
7085238106Sdes	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7086238106Sdes	  */dev/null*)
7087238106Sdes	    lt_cv_path_NM="$tmp_nm -p"
7088238106Sdes	    break
7089238106Sdes	    ;;
7090238106Sdes	  *)
7091238106Sdes	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7092238106Sdes	    continue # so that we can try to find one that supports BSD flags
7093238106Sdes	    ;;
7094238106Sdes	  esac
7095238106Sdes	  ;;
7096238106Sdes	esac
7097238106Sdes      fi
7098238106Sdes    done
7099238106Sdes    IFS="$lt_save_ifs"
7100238106Sdes  done
7101238106Sdes  : ${lt_cv_path_NM=no}
7102238106Sdesfi
7103238106Sdesfi
7104238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7105238106Sdes$as_echo "$lt_cv_path_NM" >&6; }
7106238106Sdesif test "$lt_cv_path_NM" != "no"; then
7107238106Sdes  NM="$lt_cv_path_NM"
7108238106Sdeselse
7109238106Sdes  # Didn't find any BSD compatible name lister, look for dumpbin.
7110238106Sdes  if test -n "$DUMPBIN"; then :
7111238106Sdes    # Let the user override the test.
7112238106Sdes  else
7113238106Sdes    if test -n "$ac_tool_prefix"; then
7114238106Sdes  for ac_prog in dumpbin "link -dump"
7115238106Sdes  do
7116238106Sdes    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7117238106Sdesset dummy $ac_tool_prefix$ac_prog; ac_word=$2
7118238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7120238106Sdesif ${ac_cv_prog_DUMPBIN+:} false; then :
7121238106Sdes  $as_echo_n "(cached) " >&6
7122238106Sdeselse
7123238106Sdes  if test -n "$DUMPBIN"; then
7124238106Sdes  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7125238106Sdeselse
7126238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127238106Sdesfor as_dir in $PATH
7128238106Sdesdo
7129238106Sdes  IFS=$as_save_IFS
7130238106Sdes  test -z "$as_dir" && as_dir=.
7131238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7132249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133238106Sdes    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7134238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7135238106Sdes    break 2
7136238106Sdes  fi
7137238106Sdesdone
7138238106Sdes  done
7139238106SdesIFS=$as_save_IFS
7140238106Sdes
7141238106Sdesfi
7142238106Sdesfi
7143238106SdesDUMPBIN=$ac_cv_prog_DUMPBIN
7144238106Sdesif test -n "$DUMPBIN"; then
7145238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7146238106Sdes$as_echo "$DUMPBIN" >&6; }
7147238106Sdeselse
7148238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7149238106Sdes$as_echo "no" >&6; }
7150238106Sdesfi
7151238106Sdes
7152238106Sdes
7153238106Sdes    test -n "$DUMPBIN" && break
7154238106Sdes  done
7155238106Sdesfi
7156238106Sdesif test -z "$DUMPBIN"; then
7157238106Sdes  ac_ct_DUMPBIN=$DUMPBIN
7158238106Sdes  for ac_prog in dumpbin "link -dump"
7159238106Sdesdo
7160238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
7161238106Sdesset dummy $ac_prog; ac_word=$2
7162238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7163238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7164238106Sdesif ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7165238106Sdes  $as_echo_n "(cached) " >&6
7166238106Sdeselse
7167238106Sdes  if test -n "$ac_ct_DUMPBIN"; then
7168238106Sdes  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7169238106Sdeselse
7170238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7171238106Sdesfor as_dir in $PATH
7172238106Sdesdo
7173238106Sdes  IFS=$as_save_IFS
7174238106Sdes  test -z "$as_dir" && as_dir=.
7175238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7176249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7177238106Sdes    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7178238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7179238106Sdes    break 2
7180238106Sdes  fi
7181238106Sdesdone
7182238106Sdes  done
7183238106SdesIFS=$as_save_IFS
7184238106Sdes
7185238106Sdesfi
7186238106Sdesfi
7187238106Sdesac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7188238106Sdesif test -n "$ac_ct_DUMPBIN"; then
7189238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7190238106Sdes$as_echo "$ac_ct_DUMPBIN" >&6; }
7191238106Sdeselse
7192238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7193238106Sdes$as_echo "no" >&6; }
7194238106Sdesfi
7195238106Sdes
7196238106Sdes
7197238106Sdes  test -n "$ac_ct_DUMPBIN" && break
7198238106Sdesdone
7199238106Sdes
7200238106Sdes  if test "x$ac_ct_DUMPBIN" = x; then
7201238106Sdes    DUMPBIN=":"
7202238106Sdes  else
7203238106Sdes    case $cross_compiling:$ac_tool_warned in
7204238106Sdesyes:)
7205238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7206238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7207238106Sdesac_tool_warned=yes ;;
7208238106Sdesesac
7209238106Sdes    DUMPBIN=$ac_ct_DUMPBIN
7210238106Sdes  fi
7211238106Sdesfi
7212238106Sdes
7213238106Sdes    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
7214238106Sdes    *COFF*)
7215238106Sdes      DUMPBIN="$DUMPBIN -symbols"
7216238106Sdes      ;;
7217238106Sdes    *)
7218238106Sdes      DUMPBIN=:
7219238106Sdes      ;;
7220238106Sdes    esac
7221238106Sdes  fi
7222238106Sdes
7223238106Sdes  if test "$DUMPBIN" != ":"; then
7224238106Sdes    NM="$DUMPBIN"
7225238106Sdes  fi
7226238106Sdesfi
7227238106Sdestest -z "$NM" && NM=nm
7228238106Sdes
7229238106Sdes
7230238106Sdes
7231238106Sdes
7232238106Sdes
7233238106Sdes
7234238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7235238106Sdes$as_echo_n "checking the name lister ($NM) interface... " >&6; }
7236238106Sdesif ${lt_cv_nm_interface+:} false; then :
7237238106Sdes  $as_echo_n "(cached) " >&6
7238238106Sdeselse
7239238106Sdes  lt_cv_nm_interface="BSD nm"
7240238106Sdes  echo "int some_variable = 0;" > conftest.$ac_ext
7241238106Sdes  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7242238106Sdes  (eval "$ac_compile" 2>conftest.err)
7243238106Sdes  cat conftest.err >&5
7244238106Sdes  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7245238106Sdes  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7246238106Sdes  cat conftest.err >&5
7247238106Sdes  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7248238106Sdes  cat conftest.out >&5
7249238106Sdes  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7250238106Sdes    lt_cv_nm_interface="MS dumpbin"
7251238106Sdes  fi
7252238106Sdes  rm -f conftest*
7253238106Sdesfi
7254238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7255238106Sdes$as_echo "$lt_cv_nm_interface" >&6; }
7256238106Sdes
7257238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7258238106Sdes$as_echo_n "checking whether ln -s works... " >&6; }
7259238106SdesLN_S=$as_ln_s
7260238106Sdesif test "$LN_S" = "ln -s"; then
7261238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7262238106Sdes$as_echo "yes" >&6; }
7263238106Sdeselse
7264238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7265238106Sdes$as_echo "no, using $LN_S" >&6; }
7266238106Sdesfi
7267238106Sdes
7268238106Sdes# find the maximum length of command line arguments
7269238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7270238106Sdes$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7271238106Sdesif ${lt_cv_sys_max_cmd_len+:} false; then :
7272238106Sdes  $as_echo_n "(cached) " >&6
7273238106Sdeselse
7274238106Sdes    i=0
7275238106Sdes  teststring="ABCD"
7276238106Sdes
7277238106Sdes  case $build_os in
7278238106Sdes  msdosdjgpp*)
7279238106Sdes    # On DJGPP, this test can blow up pretty badly due to problems in libc
7280238106Sdes    # (any single argument exceeding 2000 bytes causes a buffer overrun
7281238106Sdes    # during glob expansion).  Even if it were fixed, the result of this
7282238106Sdes    # check would be larger than it should be.
7283238106Sdes    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7284238106Sdes    ;;
7285238106Sdes
7286238106Sdes  gnu*)
7287238106Sdes    # Under GNU Hurd, this test is not required because there is
7288238106Sdes    # no limit to the length of command line arguments.
7289238106Sdes    # Libtool will interpret -1 as no limit whatsoever
7290238106Sdes    lt_cv_sys_max_cmd_len=-1;
7291238106Sdes    ;;
7292238106Sdes
7293238106Sdes  cygwin* | mingw* | cegcc*)
7294238106Sdes    # On Win9x/ME, this test blows up -- it succeeds, but takes
7295238106Sdes    # about 5 minutes as the teststring grows exponentially.
7296238106Sdes    # Worse, since 9x/ME are not pre-emptively multitasking,
7297238106Sdes    # you end up with a "frozen" computer, even though with patience
7298238106Sdes    # the test eventually succeeds (with a max line length of 256k).
7299238106Sdes    # Instead, let's just punt: use the minimum linelength reported by
7300238106Sdes    # all of the supported platforms: 8192 (on NT/2K/XP).
7301238106Sdes    lt_cv_sys_max_cmd_len=8192;
7302238106Sdes    ;;
7303238106Sdes
7304238106Sdes  mint*)
7305238106Sdes    # On MiNT this can take a long time and run out of memory.
7306238106Sdes    lt_cv_sys_max_cmd_len=8192;
7307238106Sdes    ;;
7308238106Sdes
7309238106Sdes  amigaos*)
7310238106Sdes    # On AmigaOS with pdksh, this test takes hours, literally.
7311238106Sdes    # So we just punt and use a minimum line length of 8192.
7312238106Sdes    lt_cv_sys_max_cmd_len=8192;
7313238106Sdes    ;;
7314238106Sdes
7315238106Sdes  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7316238106Sdes    # This has been around since 386BSD, at least.  Likely further.
7317238106Sdes    if test -x /sbin/sysctl; then
7318238106Sdes      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7319238106Sdes    elif test -x /usr/sbin/sysctl; then
7320238106Sdes      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7321238106Sdes    else
7322238106Sdes      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7323238106Sdes    fi
7324238106Sdes    # And add a safety zone
7325238106Sdes    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7326238106Sdes    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7327238106Sdes    ;;
7328238106Sdes
7329238106Sdes  interix*)
7330238106Sdes    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7331238106Sdes    lt_cv_sys_max_cmd_len=196608
7332238106Sdes    ;;
7333238106Sdes
7334249141Sdes  os2*)
7335249141Sdes    # The test takes a long time on OS/2.
7336249141Sdes    lt_cv_sys_max_cmd_len=8192
7337249141Sdes    ;;
7338249141Sdes
7339238106Sdes  osf*)
7340238106Sdes    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7341238106Sdes    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7342238106Sdes    # nice to cause kernel panics so lets avoid the loop below.
7343238106Sdes    # First set a reasonable default.
7344238106Sdes    lt_cv_sys_max_cmd_len=16384
7345238106Sdes    #
7346238106Sdes    if test -x /sbin/sysconfig; then
7347238106Sdes      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7348238106Sdes        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7349238106Sdes      esac
7350238106Sdes    fi
7351238106Sdes    ;;
7352238106Sdes  sco3.2v5*)
7353238106Sdes    lt_cv_sys_max_cmd_len=102400
7354238106Sdes    ;;
7355238106Sdes  sysv5* | sco5v6* | sysv4.2uw2*)
7356238106Sdes    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7357238106Sdes    if test -n "$kargmax"; then
7358238106Sdes      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7359238106Sdes    else
7360238106Sdes      lt_cv_sys_max_cmd_len=32768
7361238106Sdes    fi
7362238106Sdes    ;;
7363238106Sdes  *)
7364238106Sdes    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7365238106Sdes    if test -n "$lt_cv_sys_max_cmd_len"; then
7366238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7367238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7368238106Sdes    else
7369238106Sdes      # Make teststring a little bigger before we do anything with it.
7370238106Sdes      # a 1K string should be a reasonable start.
7371238106Sdes      for i in 1 2 3 4 5 6 7 8 ; do
7372238106Sdes        teststring=$teststring$teststring
7373238106Sdes      done
7374238106Sdes      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7375238106Sdes      # If test is not a shell built-in, we'll probably end up computing a
7376238106Sdes      # maximum length that is only half of the actual maximum length, but
7377238106Sdes      # we can't tell.
7378249141Sdes      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
7379238106Sdes	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7380238106Sdes	      test $i != 17 # 1/2 MB should be enough
7381238106Sdes      do
7382238106Sdes        i=`expr $i + 1`
7383238106Sdes        teststring=$teststring$teststring
7384238106Sdes      done
7385238106Sdes      # Only check the string length outside the loop.
7386238106Sdes      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7387238106Sdes      teststring=
7388238106Sdes      # Add a significant safety factor because C++ compilers can tack on
7389238106Sdes      # massive amounts of additional arguments before passing them to the
7390238106Sdes      # linker.  It appears as though 1/2 is a usable value.
7391238106Sdes      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7392238106Sdes    fi
7393238106Sdes    ;;
7394238106Sdes  esac
7395238106Sdes
7396238106Sdesfi
7397238106Sdes
7398238106Sdesif test -n $lt_cv_sys_max_cmd_len ; then
7399238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7400238106Sdes$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7401238106Sdeselse
7402238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7403238106Sdes$as_echo "none" >&6; }
7404238106Sdesfi
7405238106Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len
7406238106Sdes
7407238106Sdes
7408238106Sdes
7409238106Sdes
7410238106Sdes
7411238106Sdes
7412238106Sdes: ${CP="cp -f"}
7413238106Sdes: ${MV="mv -f"}
7414238106Sdes: ${RM="rm -f"}
7415238106Sdes
7416238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
7417238106Sdes$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
7418238106Sdes# Try some XSI features
7419238106Sdesxsi_shell=no
7420238106Sdes( _lt_dummy="a/b/c"
7421238106Sdes  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7422238106Sdes      = c,a/b,b/c, \
7423238106Sdes    && eval 'test $(( 1 + 1 )) -eq 2 \
7424238106Sdes    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7425238106Sdes  && xsi_shell=yes
7426238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
7427238106Sdes$as_echo "$xsi_shell" >&6; }
7428238106Sdes
7429238106Sdes
7430238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
7431238106Sdes$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
7432238106Sdeslt_shell_append=no
7433238106Sdes( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
7434238106Sdes    >/dev/null 2>&1 \
7435238106Sdes  && lt_shell_append=yes
7436238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
7437238106Sdes$as_echo "$lt_shell_append" >&6; }
7438238106Sdes
7439238106Sdes
7440238106Sdesif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7441238106Sdes  lt_unset=unset
7442238106Sdeselse
7443238106Sdes  lt_unset=false
7444238106Sdesfi
7445238106Sdes
7446238106Sdes
7447238106Sdes
7448238106Sdes
7449238106Sdes
7450238106Sdes# test EBCDIC or ASCII
7451238106Sdescase `echo X|tr X '\101'` in
7452238106Sdes A) # ASCII based system
7453238106Sdes    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7454238106Sdes  lt_SP2NL='tr \040 \012'
7455238106Sdes  lt_NL2SP='tr \015\012 \040\040'
7456238106Sdes  ;;
7457238106Sdes *) # EBCDIC based system
7458238106Sdes  lt_SP2NL='tr \100 \n'
7459238106Sdes  lt_NL2SP='tr \r\n \100\100'
7460238106Sdes  ;;
7461238106Sdesesac
7462238106Sdes
7463238106Sdes
7464238106Sdes
7465238106Sdes
7466238106Sdes
7467238106Sdes
7468238106Sdes
7469238106Sdes
7470238106Sdes
7471238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7472238106Sdes$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7473238106Sdesif ${lt_cv_to_host_file_cmd+:} false; then :
7474238106Sdes  $as_echo_n "(cached) " >&6
7475238106Sdeselse
7476238106Sdes  case $host in
7477238106Sdes  *-*-mingw* )
7478238106Sdes    case $build in
7479238106Sdes      *-*-mingw* ) # actually msys
7480238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7481238106Sdes        ;;
7482238106Sdes      *-*-cygwin* )
7483238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7484238106Sdes        ;;
7485238106Sdes      * ) # otherwise, assume *nix
7486238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7487238106Sdes        ;;
7488238106Sdes    esac
7489238106Sdes    ;;
7490238106Sdes  *-*-cygwin* )
7491238106Sdes    case $build in
7492238106Sdes      *-*-mingw* ) # actually msys
7493238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7494238106Sdes        ;;
7495238106Sdes      *-*-cygwin* )
7496238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_noop
7497238106Sdes        ;;
7498238106Sdes      * ) # otherwise, assume *nix
7499238106Sdes        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7500238106Sdes        ;;
7501238106Sdes    esac
7502238106Sdes    ;;
7503238106Sdes  * ) # unhandled hosts (and "normal" native builds)
7504238106Sdes    lt_cv_to_host_file_cmd=func_convert_file_noop
7505238106Sdes    ;;
7506238106Sdesesac
7507238106Sdes
7508238106Sdesfi
7509238106Sdes
7510238106Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd
7511238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7512238106Sdes$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7513238106Sdes
7514238106Sdes
7515238106Sdes
7516238106Sdes
7517238106Sdes
7518238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7519238106Sdes$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7520238106Sdesif ${lt_cv_to_tool_file_cmd+:} false; then :
7521238106Sdes  $as_echo_n "(cached) " >&6
7522238106Sdeselse
7523238106Sdes  #assume ordinary cross tools, or native build.
7524238106Sdeslt_cv_to_tool_file_cmd=func_convert_file_noop
7525238106Sdescase $host in
7526238106Sdes  *-*-mingw* )
7527238106Sdes    case $build in
7528238106Sdes      *-*-mingw* ) # actually msys
7529238106Sdes        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7530238106Sdes        ;;
7531238106Sdes    esac
7532238106Sdes    ;;
7533238106Sdesesac
7534238106Sdes
7535238106Sdesfi
7536238106Sdes
7537238106Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd
7538238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7539238106Sdes$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7540238106Sdes
7541238106Sdes
7542238106Sdes
7543238106Sdes
7544238106Sdes
7545238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7546238106Sdes$as_echo_n "checking for $LD option to reload object files... " >&6; }
7547238106Sdesif ${lt_cv_ld_reload_flag+:} false; then :
7548238106Sdes  $as_echo_n "(cached) " >&6
7549238106Sdeselse
7550238106Sdes  lt_cv_ld_reload_flag='-r'
7551238106Sdesfi
7552238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7553238106Sdes$as_echo "$lt_cv_ld_reload_flag" >&6; }
7554238106Sdesreload_flag=$lt_cv_ld_reload_flag
7555238106Sdescase $reload_flag in
7556238106Sdes"" | " "*) ;;
7557238106Sdes*) reload_flag=" $reload_flag" ;;
7558238106Sdesesac
7559238106Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs'
7560238106Sdescase $host_os in
7561238106Sdes  cygwin* | mingw* | pw32* | cegcc*)
7562238106Sdes    if test "$GCC" != yes; then
7563238106Sdes      reload_cmds=false
7564238106Sdes    fi
7565238106Sdes    ;;
7566238106Sdes  darwin*)
7567238106Sdes    if test "$GCC" = yes; then
7568238106Sdes      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
7569238106Sdes    else
7570238106Sdes      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7571238106Sdes    fi
7572238106Sdes    ;;
7573238106Sdesesac
7574238106Sdes
7575238106Sdes
7576238106Sdes
7577238106Sdes
7578238106Sdes
7579238106Sdes
7580238106Sdes
7581238106Sdes
7582238106Sdes
7583238106Sdesif test -n "$ac_tool_prefix"; then
7584238106Sdes  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7585238106Sdesset dummy ${ac_tool_prefix}objdump; ac_word=$2
7586238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7588238106Sdesif ${ac_cv_prog_OBJDUMP+:} false; then :
7589238106Sdes  $as_echo_n "(cached) " >&6
7590238106Sdeselse
7591238106Sdes  if test -n "$OBJDUMP"; then
7592238106Sdes  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7593238106Sdeselse
7594238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7595238106Sdesfor as_dir in $PATH
7596238106Sdesdo
7597238106Sdes  IFS=$as_save_IFS
7598238106Sdes  test -z "$as_dir" && as_dir=.
7599238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7600249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7601238106Sdes    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7602238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7603238106Sdes    break 2
7604238106Sdes  fi
7605238106Sdesdone
7606238106Sdes  done
7607238106SdesIFS=$as_save_IFS
7608238106Sdes
7609238106Sdesfi
7610238106Sdesfi
7611238106SdesOBJDUMP=$ac_cv_prog_OBJDUMP
7612238106Sdesif test -n "$OBJDUMP"; then
7613238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7614238106Sdes$as_echo "$OBJDUMP" >&6; }
7615238106Sdeselse
7616238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617238106Sdes$as_echo "no" >&6; }
7618238106Sdesfi
7619238106Sdes
7620238106Sdes
7621238106Sdesfi
7622238106Sdesif test -z "$ac_cv_prog_OBJDUMP"; then
7623238106Sdes  ac_ct_OBJDUMP=$OBJDUMP
7624238106Sdes  # Extract the first word of "objdump", so it can be a program name with args.
7625238106Sdesset dummy objdump; ac_word=$2
7626238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7627238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7628238106Sdesif ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7629238106Sdes  $as_echo_n "(cached) " >&6
7630238106Sdeselse
7631238106Sdes  if test -n "$ac_ct_OBJDUMP"; then
7632238106Sdes  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7633238106Sdeselse
7634238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635238106Sdesfor as_dir in $PATH
7636238106Sdesdo
7637238106Sdes  IFS=$as_save_IFS
7638238106Sdes  test -z "$as_dir" && as_dir=.
7639238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7640249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7641238106Sdes    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7642238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7643238106Sdes    break 2
7644238106Sdes  fi
7645238106Sdesdone
7646238106Sdes  done
7647238106SdesIFS=$as_save_IFS
7648238106Sdes
7649238106Sdesfi
7650238106Sdesfi
7651238106Sdesac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7652238106Sdesif test -n "$ac_ct_OBJDUMP"; then
7653238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7654238106Sdes$as_echo "$ac_ct_OBJDUMP" >&6; }
7655238106Sdeselse
7656238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657238106Sdes$as_echo "no" >&6; }
7658238106Sdesfi
7659238106Sdes
7660238106Sdes  if test "x$ac_ct_OBJDUMP" = x; then
7661238106Sdes    OBJDUMP="false"
7662238106Sdes  else
7663238106Sdes    case $cross_compiling:$ac_tool_warned in
7664238106Sdesyes:)
7665238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7666238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7667238106Sdesac_tool_warned=yes ;;
7668238106Sdesesac
7669238106Sdes    OBJDUMP=$ac_ct_OBJDUMP
7670238106Sdes  fi
7671238106Sdeselse
7672238106Sdes  OBJDUMP="$ac_cv_prog_OBJDUMP"
7673238106Sdesfi
7674238106Sdes
7675238106Sdestest -z "$OBJDUMP" && OBJDUMP=objdump
7676238106Sdes
7677238106Sdes
7678238106Sdes
7679238106Sdes
7680238106Sdes
7681238106Sdes
7682238106Sdes
7683238106Sdes
7684238106Sdes
7685238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7686238106Sdes$as_echo_n "checking how to recognize dependent libraries... " >&6; }
7687238106Sdesif ${lt_cv_deplibs_check_method+:} false; then :
7688238106Sdes  $as_echo_n "(cached) " >&6
7689238106Sdeselse
7690238106Sdes  lt_cv_file_magic_cmd='$MAGIC_CMD'
7691238106Sdeslt_cv_file_magic_test_file=
7692238106Sdeslt_cv_deplibs_check_method='unknown'
7693238106Sdes# Need to set the preceding variable on all platforms that support
7694238106Sdes# interlibrary dependencies.
7695238106Sdes# 'none' -- dependencies not supported.
7696238106Sdes# `unknown' -- same as none, but documents that we really don't know.
7697238106Sdes# 'pass_all' -- all dependencies passed with no checks.
7698238106Sdes# 'test_compile' -- check by making test program.
7699238106Sdes# 'file_magic [[regex]]' -- check by looking for files in library path
7700238106Sdes# which responds to the $file_magic_cmd with a given extended regex.
7701238106Sdes# If you have `file' or equivalent on your system and you're not sure
7702238106Sdes# whether `pass_all' will *always* work, you probably want this one.
7703238106Sdes
7704238106Sdescase $host_os in
7705238106Sdesaix[4-9]*)
7706238106Sdes  lt_cv_deplibs_check_method=pass_all
7707238106Sdes  ;;
7708238106Sdes
7709238106Sdesbeos*)
7710238106Sdes  lt_cv_deplibs_check_method=pass_all
7711238106Sdes  ;;
7712238106Sdes
7713238106Sdesbsdi[45]*)
7714238106Sdes  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7715238106Sdes  lt_cv_file_magic_cmd='/usr/bin/file -L'
7716238106Sdes  lt_cv_file_magic_test_file=/shlib/libc.so
7717238106Sdes  ;;
7718238106Sdes
7719238106Sdescygwin*)
7720238106Sdes  # func_win32_libid is a shell function defined in ltmain.sh
7721238106Sdes  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7722238106Sdes  lt_cv_file_magic_cmd='func_win32_libid'
7723238106Sdes  ;;
7724238106Sdes
7725238106Sdesmingw* | pw32*)
7726238106Sdes  # Base MSYS/MinGW do not provide the 'file' command needed by
7727238106Sdes  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7728238106Sdes  # unless we find 'file', for example because we are cross-compiling.
7729238106Sdes  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
7730238106Sdes  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
7731238106Sdes    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7732238106Sdes    lt_cv_file_magic_cmd='func_win32_libid'
7733238106Sdes  else
7734238106Sdes    # Keep this pattern in sync with the one in func_win32_libid.
7735238106Sdes    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7736238106Sdes    lt_cv_file_magic_cmd='$OBJDUMP -f'
7737238106Sdes  fi
7738238106Sdes  ;;
7739238106Sdes
7740238106Sdescegcc*)
7741238106Sdes  # use the weaker test based on 'objdump'. See mingw*.
7742238106Sdes  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7743238106Sdes  lt_cv_file_magic_cmd='$OBJDUMP -f'
7744238106Sdes  ;;
7745238106Sdes
7746238106Sdesdarwin* | rhapsody*)
7747238106Sdes  lt_cv_deplibs_check_method=pass_all
7748238106Sdes  ;;
7749238106Sdes
7750238106Sdesfreebsd* | dragonfly*)
7751238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7752238106Sdes    case $host_cpu in
7753238106Sdes    i*86 )
7754238106Sdes      # Not sure whether the presence of OpenBSD here was a mistake.
7755238106Sdes      # Let's accept both of them until this is cleared up.
7756238106Sdes      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7757238106Sdes      lt_cv_file_magic_cmd=/usr/bin/file
7758238106Sdes      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7759238106Sdes      ;;
7760238106Sdes    esac
7761238106Sdes  else
7762238106Sdes    lt_cv_deplibs_check_method=pass_all
7763238106Sdes  fi
7764238106Sdes  ;;
7765238106Sdes
7766238106Sdesgnu*)
7767238106Sdes  lt_cv_deplibs_check_method=pass_all
7768238106Sdes  ;;
7769238106Sdes
7770238106Sdeshaiku*)
7771238106Sdes  lt_cv_deplibs_check_method=pass_all
7772238106Sdes  ;;
7773238106Sdes
7774238106Sdeshpux10.20* | hpux11*)
7775238106Sdes  lt_cv_file_magic_cmd=/usr/bin/file
7776238106Sdes  case $host_cpu in
7777238106Sdes  ia64*)
7778238106Sdes    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7779238106Sdes    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7780238106Sdes    ;;
7781238106Sdes  hppa*64*)
7782238106Sdes    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]'
7783238106Sdes    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7784238106Sdes    ;;
7785238106Sdes  *)
7786238106Sdes    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7787238106Sdes    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7788238106Sdes    ;;
7789238106Sdes  esac
7790238106Sdes  ;;
7791238106Sdes
7792238106Sdesinterix[3-9]*)
7793238106Sdes  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7794238106Sdes  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7795238106Sdes  ;;
7796238106Sdes
7797238106Sdesirix5* | irix6* | nonstopux*)
7798238106Sdes  case $LD in
7799238106Sdes  *-32|*"-32 ") libmagic=32-bit;;
7800238106Sdes  *-n32|*"-n32 ") libmagic=N32;;
7801238106Sdes  *-64|*"-64 ") libmagic=64-bit;;
7802238106Sdes  *) libmagic=never-match;;
7803238106Sdes  esac
7804238106Sdes  lt_cv_deplibs_check_method=pass_all
7805238106Sdes  ;;
7806238106Sdes
7807249141Sdes# This must be glibc/ELF.
7808238106Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu)
7809238106Sdes  lt_cv_deplibs_check_method=pass_all
7810238106Sdes  ;;
7811238106Sdes
7812238106Sdesnetbsd*)
7813238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7814238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7815238106Sdes  else
7816238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7817238106Sdes  fi
7818238106Sdes  ;;
7819238106Sdes
7820238106Sdesnewos6*)
7821238106Sdes  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7822238106Sdes  lt_cv_file_magic_cmd=/usr/bin/file
7823238106Sdes  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7824238106Sdes  ;;
7825238106Sdes
7826238106Sdes*nto* | *qnx*)
7827238106Sdes  lt_cv_deplibs_check_method=pass_all
7828238106Sdes  ;;
7829238106Sdes
7830238106Sdesopenbsd*)
7831238106Sdes  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7832238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7833238106Sdes  else
7834238106Sdes    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7835238106Sdes  fi
7836238106Sdes  ;;
7837238106Sdes
7838238106Sdesosf3* | osf4* | osf5*)
7839238106Sdes  lt_cv_deplibs_check_method=pass_all
7840238106Sdes  ;;
7841238106Sdes
7842238106Sdesrdos*)
7843238106Sdes  lt_cv_deplibs_check_method=pass_all
7844238106Sdes  ;;
7845238106Sdes
7846238106Sdessolaris*)
7847238106Sdes  lt_cv_deplibs_check_method=pass_all
7848238106Sdes  ;;
7849238106Sdes
7850238106Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7851238106Sdes  lt_cv_deplibs_check_method=pass_all
7852238106Sdes  ;;
7853238106Sdes
7854238106Sdessysv4 | sysv4.3*)
7855238106Sdes  case $host_vendor in
7856238106Sdes  motorola)
7857238106Sdes    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]'
7858238106Sdes    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7859238106Sdes    ;;
7860238106Sdes  ncr)
7861238106Sdes    lt_cv_deplibs_check_method=pass_all
7862238106Sdes    ;;
7863238106Sdes  sequent)
7864238106Sdes    lt_cv_file_magic_cmd='/bin/file'
7865238106Sdes    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7866238106Sdes    ;;
7867238106Sdes  sni)
7868238106Sdes    lt_cv_file_magic_cmd='/bin/file'
7869238106Sdes    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7870238106Sdes    lt_cv_file_magic_test_file=/lib/libc.so
7871238106Sdes    ;;
7872238106Sdes  siemens)
7873238106Sdes    lt_cv_deplibs_check_method=pass_all
7874238106Sdes    ;;
7875238106Sdes  pc)
7876238106Sdes    lt_cv_deplibs_check_method=pass_all
7877238106Sdes    ;;
7878238106Sdes  esac
7879238106Sdes  ;;
7880238106Sdes
7881238106Sdestpf*)
7882238106Sdes  lt_cv_deplibs_check_method=pass_all
7883238106Sdes  ;;
7884238106Sdesesac
7885238106Sdes
7886238106Sdesfi
7887238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7888238106Sdes$as_echo "$lt_cv_deplibs_check_method" >&6; }
7889238106Sdes
7890238106Sdesfile_magic_glob=
7891238106Sdeswant_nocaseglob=no
7892238106Sdesif test "$build" = "$host"; then
7893238106Sdes  case $host_os in
7894238106Sdes  mingw* | pw32*)
7895238106Sdes    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7896238106Sdes      want_nocaseglob=yes
7897238106Sdes    else
7898238106Sdes      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7899238106Sdes    fi
7900238106Sdes    ;;
7901238106Sdes  esac
7902238106Sdesfi
7903238106Sdes
7904238106Sdesfile_magic_cmd=$lt_cv_file_magic_cmd
7905238106Sdesdeplibs_check_method=$lt_cv_deplibs_check_method
7906238106Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown
7907238106Sdes
7908238106Sdes
7909238106Sdes
7910238106Sdes
7911238106Sdes
7912238106Sdes
7913238106Sdes
7914238106Sdes
7915238106Sdes
7916238106Sdes
7917238106Sdes
7918238106Sdes
7919238106Sdes
7920238106Sdes
7921238106Sdes
7922238106Sdes
7923238106Sdes
7924238106Sdes
7925238106Sdes
7926238106Sdes
7927238106Sdes
7928238106Sdes
7929238106Sdesif test -n "$ac_tool_prefix"; then
7930238106Sdes  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7931238106Sdesset dummy ${ac_tool_prefix}dlltool; ac_word=$2
7932238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7934238106Sdesif ${ac_cv_prog_DLLTOOL+:} false; then :
7935238106Sdes  $as_echo_n "(cached) " >&6
7936238106Sdeselse
7937238106Sdes  if test -n "$DLLTOOL"; then
7938238106Sdes  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7939238106Sdeselse
7940238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941238106Sdesfor as_dir in $PATH
7942238106Sdesdo
7943238106Sdes  IFS=$as_save_IFS
7944238106Sdes  test -z "$as_dir" && as_dir=.
7945238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7946249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7947238106Sdes    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7948238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7949238106Sdes    break 2
7950238106Sdes  fi
7951238106Sdesdone
7952238106Sdes  done
7953238106SdesIFS=$as_save_IFS
7954238106Sdes
7955238106Sdesfi
7956238106Sdesfi
7957238106SdesDLLTOOL=$ac_cv_prog_DLLTOOL
7958238106Sdesif test -n "$DLLTOOL"; then
7959238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7960238106Sdes$as_echo "$DLLTOOL" >&6; }
7961238106Sdeselse
7962238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7963238106Sdes$as_echo "no" >&6; }
7964238106Sdesfi
7965238106Sdes
7966238106Sdes
7967238106Sdesfi
7968238106Sdesif test -z "$ac_cv_prog_DLLTOOL"; then
7969238106Sdes  ac_ct_DLLTOOL=$DLLTOOL
7970238106Sdes  # Extract the first word of "dlltool", so it can be a program name with args.
7971238106Sdesset dummy dlltool; ac_word=$2
7972238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
7974238106Sdesif ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7975238106Sdes  $as_echo_n "(cached) " >&6
7976238106Sdeselse
7977238106Sdes  if test -n "$ac_ct_DLLTOOL"; then
7978238106Sdes  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7979238106Sdeselse
7980238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981238106Sdesfor as_dir in $PATH
7982238106Sdesdo
7983238106Sdes  IFS=$as_save_IFS
7984238106Sdes  test -z "$as_dir" && as_dir=.
7985238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
7986249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7987238106Sdes    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7988238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7989238106Sdes    break 2
7990238106Sdes  fi
7991238106Sdesdone
7992238106Sdes  done
7993238106SdesIFS=$as_save_IFS
7994238106Sdes
7995238106Sdesfi
7996238106Sdesfi
7997238106Sdesac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7998238106Sdesif test -n "$ac_ct_DLLTOOL"; then
7999238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8000238106Sdes$as_echo "$ac_ct_DLLTOOL" >&6; }
8001238106Sdeselse
8002238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003238106Sdes$as_echo "no" >&6; }
8004238106Sdesfi
8005238106Sdes
8006238106Sdes  if test "x$ac_ct_DLLTOOL" = x; then
8007238106Sdes    DLLTOOL="false"
8008238106Sdes  else
8009238106Sdes    case $cross_compiling:$ac_tool_warned in
8010238106Sdesyes:)
8011238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8012238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8013238106Sdesac_tool_warned=yes ;;
8014238106Sdesesac
8015238106Sdes    DLLTOOL=$ac_ct_DLLTOOL
8016238106Sdes  fi
8017238106Sdeselse
8018238106Sdes  DLLTOOL="$ac_cv_prog_DLLTOOL"
8019238106Sdesfi
8020238106Sdes
8021238106Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool
8022238106Sdes
8023238106Sdes
8024238106Sdes
8025238106Sdes
8026238106Sdes
8027238106Sdes
8028238106Sdes
8029238106Sdes
8030238106Sdes
8031238106Sdes
8032238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8033238106Sdes$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8034238106Sdesif ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8035238106Sdes  $as_echo_n "(cached) " >&6
8036238106Sdeselse
8037238106Sdes  lt_cv_sharedlib_from_linklib_cmd='unknown'
8038238106Sdes
8039238106Sdescase $host_os in
8040238106Sdescygwin* | mingw* | pw32* | cegcc*)
8041238106Sdes  # two different shell functions defined in ltmain.sh
8042238106Sdes  # decide which to use based on capabilities of $DLLTOOL
8043238106Sdes  case `$DLLTOOL --help 2>&1` in
8044238106Sdes  *--identify-strict*)
8045238106Sdes    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8046238106Sdes    ;;
8047238106Sdes  *)
8048238106Sdes    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8049238106Sdes    ;;
8050238106Sdes  esac
8051238106Sdes  ;;
8052238106Sdes*)
8053238106Sdes  # fallback: assume linklib IS sharedlib
8054238106Sdes  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
8055238106Sdes  ;;
8056238106Sdesesac
8057238106Sdes
8058238106Sdesfi
8059238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8060238106Sdes$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8061238106Sdessharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8062238106Sdestest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8063238106Sdes
8064238106Sdes
8065238106Sdes
8066238106Sdes
8067238106Sdes
8068238106Sdes
8069238106Sdes
8070238106Sdesif test -n "$ac_tool_prefix"; then
8071238106Sdes  for ac_prog in ar
8072238106Sdes  do
8073238106Sdes    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8074238106Sdesset dummy $ac_tool_prefix$ac_prog; ac_word=$2
8075238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8076238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8077238106Sdesif ${ac_cv_prog_AR+:} false; then :
8078238106Sdes  $as_echo_n "(cached) " >&6
8079238106Sdeselse
8080238106Sdes  if test -n "$AR"; then
8081238106Sdes  ac_cv_prog_AR="$AR" # Let the user override the test.
8082238106Sdeselse
8083238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8084238106Sdesfor as_dir in $PATH
8085238106Sdesdo
8086238106Sdes  IFS=$as_save_IFS
8087238106Sdes  test -z "$as_dir" && as_dir=.
8088238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8089249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8090238106Sdes    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8091238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8092238106Sdes    break 2
8093238106Sdes  fi
8094238106Sdesdone
8095238106Sdes  done
8096238106SdesIFS=$as_save_IFS
8097238106Sdes
8098238106Sdesfi
8099238106Sdesfi
8100238106SdesAR=$ac_cv_prog_AR
8101238106Sdesif test -n "$AR"; then
8102238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8103238106Sdes$as_echo "$AR" >&6; }
8104238106Sdeselse
8105238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8106238106Sdes$as_echo "no" >&6; }
8107238106Sdesfi
8108238106Sdes
8109238106Sdes
8110238106Sdes    test -n "$AR" && break
8111238106Sdes  done
8112238106Sdesfi
8113238106Sdesif test -z "$AR"; then
8114238106Sdes  ac_ct_AR=$AR
8115238106Sdes  for ac_prog in ar
8116238106Sdesdo
8117238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
8118238106Sdesset dummy $ac_prog; ac_word=$2
8119238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8121238106Sdesif ${ac_cv_prog_ac_ct_AR+:} false; then :
8122238106Sdes  $as_echo_n "(cached) " >&6
8123238106Sdeselse
8124238106Sdes  if test -n "$ac_ct_AR"; then
8125238106Sdes  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8126238106Sdeselse
8127238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128238106Sdesfor as_dir in $PATH
8129238106Sdesdo
8130238106Sdes  IFS=$as_save_IFS
8131238106Sdes  test -z "$as_dir" && as_dir=.
8132238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8133249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134238106Sdes    ac_cv_prog_ac_ct_AR="$ac_prog"
8135238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136238106Sdes    break 2
8137238106Sdes  fi
8138238106Sdesdone
8139238106Sdes  done
8140238106SdesIFS=$as_save_IFS
8141238106Sdes
8142238106Sdesfi
8143238106Sdesfi
8144238106Sdesac_ct_AR=$ac_cv_prog_ac_ct_AR
8145238106Sdesif test -n "$ac_ct_AR"; then
8146238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8147238106Sdes$as_echo "$ac_ct_AR" >&6; }
8148238106Sdeselse
8149238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150238106Sdes$as_echo "no" >&6; }
8151238106Sdesfi
8152238106Sdes
8153238106Sdes
8154238106Sdes  test -n "$ac_ct_AR" && break
8155238106Sdesdone
8156238106Sdes
8157238106Sdes  if test "x$ac_ct_AR" = x; then
8158238106Sdes    AR="false"
8159238106Sdes  else
8160238106Sdes    case $cross_compiling:$ac_tool_warned in
8161238106Sdesyes:)
8162238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8163238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8164238106Sdesac_tool_warned=yes ;;
8165238106Sdesesac
8166238106Sdes    AR=$ac_ct_AR
8167238106Sdes  fi
8168238106Sdesfi
8169238106Sdes
8170238106Sdes: ${AR=ar}
8171238106Sdes: ${AR_FLAGS=cru}
8172238106Sdes
8173238106Sdes
8174238106Sdes
8175238106Sdes
8176238106Sdes
8177238106Sdes
8178238106Sdes
8179238106Sdes
8180238106Sdes
8181238106Sdes
8182238106Sdes
8183238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8184238106Sdes$as_echo_n "checking for archiver @FILE support... " >&6; }
8185238106Sdesif ${lt_cv_ar_at_file+:} false; then :
8186238106Sdes  $as_echo_n "(cached) " >&6
8187238106Sdeselse
8188238106Sdes  lt_cv_ar_at_file=no
8189238106Sdes   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8190238106Sdes/* end confdefs.h.  */
8191238106Sdes
8192238106Sdesint
8193238106Sdesmain ()
8194238106Sdes{
8195238106Sdes
8196238106Sdes  ;
8197238106Sdes  return 0;
8198238106Sdes}
8199238106Sdes_ACEOF
8200238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
8201238106Sdes  echo conftest.$ac_objext > conftest.lst
8202238106Sdes      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8203238106Sdes      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8204238106Sdes  (eval $lt_ar_try) 2>&5
8205238106Sdes  ac_status=$?
8206238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8207238106Sdes  test $ac_status = 0; }
8208238106Sdes      if test "$ac_status" -eq 0; then
8209238106Sdes	# Ensure the archiver fails upon bogus file names.
8210238106Sdes	rm -f conftest.$ac_objext libconftest.a
8211238106Sdes	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8212238106Sdes  (eval $lt_ar_try) 2>&5
8213238106Sdes  ac_status=$?
8214238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8215238106Sdes  test $ac_status = 0; }
8216238106Sdes	if test "$ac_status" -ne 0; then
8217238106Sdes          lt_cv_ar_at_file=@
8218238106Sdes        fi
8219238106Sdes      fi
8220238106Sdes      rm -f conftest.* libconftest.a
8221238106Sdes
8222238106Sdesfi
8223238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8224238106Sdes
8225238106Sdesfi
8226238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8227238106Sdes$as_echo "$lt_cv_ar_at_file" >&6; }
8228238106Sdes
8229238106Sdesif test "x$lt_cv_ar_at_file" = xno; then
8230238106Sdes  archiver_list_spec=
8231238106Sdeselse
8232238106Sdes  archiver_list_spec=$lt_cv_ar_at_file
8233238106Sdesfi
8234238106Sdes
8235238106Sdes
8236238106Sdes
8237238106Sdes
8238238106Sdes
8239238106Sdes
8240238106Sdes
8241238106Sdesif test -n "$ac_tool_prefix"; then
8242238106Sdes  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8243238106Sdesset dummy ${ac_tool_prefix}strip; ac_word=$2
8244238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8245238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8246238106Sdesif ${ac_cv_prog_STRIP+:} false; then :
8247238106Sdes  $as_echo_n "(cached) " >&6
8248238106Sdeselse
8249238106Sdes  if test -n "$STRIP"; then
8250238106Sdes  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8251238106Sdeselse
8252238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253238106Sdesfor as_dir in $PATH
8254238106Sdesdo
8255238106Sdes  IFS=$as_save_IFS
8256238106Sdes  test -z "$as_dir" && as_dir=.
8257238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8258249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8259238106Sdes    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8260238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8261238106Sdes    break 2
8262238106Sdes  fi
8263238106Sdesdone
8264238106Sdes  done
8265238106SdesIFS=$as_save_IFS
8266238106Sdes
8267238106Sdesfi
8268238106Sdesfi
8269238106SdesSTRIP=$ac_cv_prog_STRIP
8270238106Sdesif test -n "$STRIP"; then
8271238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8272238106Sdes$as_echo "$STRIP" >&6; }
8273238106Sdeselse
8274238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8275238106Sdes$as_echo "no" >&6; }
8276238106Sdesfi
8277238106Sdes
8278238106Sdes
8279238106Sdesfi
8280238106Sdesif test -z "$ac_cv_prog_STRIP"; then
8281238106Sdes  ac_ct_STRIP=$STRIP
8282238106Sdes  # Extract the first word of "strip", so it can be a program name with args.
8283238106Sdesset dummy strip; ac_word=$2
8284238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8286238106Sdesif ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8287238106Sdes  $as_echo_n "(cached) " >&6
8288238106Sdeselse
8289238106Sdes  if test -n "$ac_ct_STRIP"; then
8290238106Sdes  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8291238106Sdeselse
8292238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293238106Sdesfor as_dir in $PATH
8294238106Sdesdo
8295238106Sdes  IFS=$as_save_IFS
8296238106Sdes  test -z "$as_dir" && as_dir=.
8297238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8298249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299238106Sdes    ac_cv_prog_ac_ct_STRIP="strip"
8300238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301238106Sdes    break 2
8302238106Sdes  fi
8303238106Sdesdone
8304238106Sdes  done
8305238106SdesIFS=$as_save_IFS
8306238106Sdes
8307238106Sdesfi
8308238106Sdesfi
8309238106Sdesac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8310238106Sdesif test -n "$ac_ct_STRIP"; then
8311238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8312238106Sdes$as_echo "$ac_ct_STRIP" >&6; }
8313238106Sdeselse
8314238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8315238106Sdes$as_echo "no" >&6; }
8316238106Sdesfi
8317238106Sdes
8318238106Sdes  if test "x$ac_ct_STRIP" = x; then
8319238106Sdes    STRIP=":"
8320238106Sdes  else
8321238106Sdes    case $cross_compiling:$ac_tool_warned in
8322238106Sdesyes:)
8323238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8324238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8325238106Sdesac_tool_warned=yes ;;
8326238106Sdesesac
8327238106Sdes    STRIP=$ac_ct_STRIP
8328238106Sdes  fi
8329238106Sdeselse
8330238106Sdes  STRIP="$ac_cv_prog_STRIP"
8331238106Sdesfi
8332238106Sdes
8333238106Sdestest -z "$STRIP" && STRIP=:
8334238106Sdes
8335238106Sdes
8336238106Sdes
8337238106Sdes
8338238106Sdes
8339238106Sdes
8340238106Sdesif test -n "$ac_tool_prefix"; then
8341238106Sdes  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8342238106Sdesset dummy ${ac_tool_prefix}ranlib; ac_word=$2
8343238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8344238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8345238106Sdesif ${ac_cv_prog_RANLIB+:} false; then :
8346238106Sdes  $as_echo_n "(cached) " >&6
8347238106Sdeselse
8348238106Sdes  if test -n "$RANLIB"; then
8349238106Sdes  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8350238106Sdeselse
8351238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8352238106Sdesfor as_dir in $PATH
8353238106Sdesdo
8354238106Sdes  IFS=$as_save_IFS
8355238106Sdes  test -z "$as_dir" && as_dir=.
8356238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8357249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8358238106Sdes    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8359238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8360238106Sdes    break 2
8361238106Sdes  fi
8362238106Sdesdone
8363238106Sdes  done
8364238106SdesIFS=$as_save_IFS
8365238106Sdes
8366238106Sdesfi
8367238106Sdesfi
8368238106SdesRANLIB=$ac_cv_prog_RANLIB
8369238106Sdesif test -n "$RANLIB"; then
8370238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8371238106Sdes$as_echo "$RANLIB" >&6; }
8372238106Sdeselse
8373238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374238106Sdes$as_echo "no" >&6; }
8375238106Sdesfi
8376238106Sdes
8377238106Sdes
8378238106Sdesfi
8379238106Sdesif test -z "$ac_cv_prog_RANLIB"; then
8380238106Sdes  ac_ct_RANLIB=$RANLIB
8381238106Sdes  # Extract the first word of "ranlib", so it can be a program name with args.
8382238106Sdesset dummy ranlib; ac_word=$2
8383238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8385238106Sdesif ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8386238106Sdes  $as_echo_n "(cached) " >&6
8387238106Sdeselse
8388238106Sdes  if test -n "$ac_ct_RANLIB"; then
8389238106Sdes  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8390238106Sdeselse
8391238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392238106Sdesfor as_dir in $PATH
8393238106Sdesdo
8394238106Sdes  IFS=$as_save_IFS
8395238106Sdes  test -z "$as_dir" && as_dir=.
8396238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8397249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398238106Sdes    ac_cv_prog_ac_ct_RANLIB="ranlib"
8399238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400238106Sdes    break 2
8401238106Sdes  fi
8402238106Sdesdone
8403238106Sdes  done
8404238106SdesIFS=$as_save_IFS
8405238106Sdes
8406238106Sdesfi
8407238106Sdesfi
8408238106Sdesac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8409238106Sdesif test -n "$ac_ct_RANLIB"; then
8410238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8411238106Sdes$as_echo "$ac_ct_RANLIB" >&6; }
8412238106Sdeselse
8413238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414238106Sdes$as_echo "no" >&6; }
8415238106Sdesfi
8416238106Sdes
8417238106Sdes  if test "x$ac_ct_RANLIB" = x; then
8418238106Sdes    RANLIB=":"
8419238106Sdes  else
8420238106Sdes    case $cross_compiling:$ac_tool_warned in
8421238106Sdesyes:)
8422238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8423238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8424238106Sdesac_tool_warned=yes ;;
8425238106Sdesesac
8426238106Sdes    RANLIB=$ac_ct_RANLIB
8427238106Sdes  fi
8428238106Sdeselse
8429238106Sdes  RANLIB="$ac_cv_prog_RANLIB"
8430238106Sdesfi
8431238106Sdes
8432238106Sdestest -z "$RANLIB" && RANLIB=:
8433238106Sdes
8434238106Sdes
8435238106Sdes
8436238106Sdes
8437238106Sdes
8438238106Sdes
8439238106Sdes# Determine commands to create old-style static archives.
8440238106Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8441238106Sdesold_postinstall_cmds='chmod 644 $oldlib'
8442238106Sdesold_postuninstall_cmds=
8443238106Sdes
8444238106Sdesif test -n "$RANLIB"; then
8445238106Sdes  case $host_os in
8446238106Sdes  openbsd*)
8447249141Sdes    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8448238106Sdes    ;;
8449238106Sdes  *)
8450249141Sdes    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8451238106Sdes    ;;
8452238106Sdes  esac
8453249141Sdes  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8454238106Sdesfi
8455238106Sdes
8456238106Sdescase $host_os in
8457238106Sdes  darwin*)
8458238106Sdes    lock_old_archive_extraction=yes ;;
8459238106Sdes  *)
8460238106Sdes    lock_old_archive_extraction=no ;;
8461238106Sdesesac
8462238106Sdes
8463238106Sdes
8464238106Sdes
8465238106Sdes
8466238106Sdes
8467238106Sdes
8468238106Sdes
8469238106Sdes
8470238106Sdes
8471238106Sdes
8472238106Sdes
8473238106Sdes
8474238106Sdes
8475238106Sdes
8476238106Sdes
8477238106Sdes
8478238106Sdes
8479238106Sdes
8480238106Sdes
8481238106Sdes
8482238106Sdes
8483238106Sdesfor ac_prog in gawk mawk nawk awk
8484238106Sdesdo
8485238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
8486238106Sdesset dummy $ac_prog; ac_word=$2
8487238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
8489238106Sdesif ${ac_cv_prog_AWK+:} false; then :
8490238106Sdes  $as_echo_n "(cached) " >&6
8491238106Sdeselse
8492238106Sdes  if test -n "$AWK"; then
8493238106Sdes  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8494238106Sdeselse
8495238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496238106Sdesfor as_dir in $PATH
8497238106Sdesdo
8498238106Sdes  IFS=$as_save_IFS
8499238106Sdes  test -z "$as_dir" && as_dir=.
8500238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
8501249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502238106Sdes    ac_cv_prog_AWK="$ac_prog"
8503238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504238106Sdes    break 2
8505238106Sdes  fi
8506238106Sdesdone
8507238106Sdes  done
8508238106SdesIFS=$as_save_IFS
8509238106Sdes
8510238106Sdesfi
8511238106Sdesfi
8512238106SdesAWK=$ac_cv_prog_AWK
8513238106Sdesif test -n "$AWK"; then
8514238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8515238106Sdes$as_echo "$AWK" >&6; }
8516238106Sdeselse
8517238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518238106Sdes$as_echo "no" >&6; }
8519238106Sdesfi
8520238106Sdes
8521238106Sdes
8522238106Sdes  test -n "$AWK" && break
8523238106Sdesdone
8524238106Sdes
8525238106Sdes
8526238106Sdes
8527238106Sdes
8528238106Sdes
8529238106Sdes
8530238106Sdes
8531238106Sdes
8532238106Sdes
8533238106Sdes
8534238106Sdes
8535238106Sdes
8536238106Sdes
8537238106Sdes
8538238106Sdes
8539238106Sdes
8540238106Sdes
8541238106Sdes
8542238106Sdes
8543238106Sdes# If no C compiler was specified, use CC.
8544238106SdesLTCC=${LTCC-"$CC"}
8545238106Sdes
8546238106Sdes# If no C compiler flags were specified, use CFLAGS.
8547238106SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8548238106Sdes
8549238106Sdes# Allow CC to be a program name with arguments.
8550238106Sdescompiler=$CC
8551238106Sdes
8552238106Sdes
8553238106Sdes# Check for command to grab the raw symbol name followed by C symbol from nm.
8554238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8555238106Sdes$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8556238106Sdesif ${lt_cv_sys_global_symbol_pipe+:} false; then :
8557238106Sdes  $as_echo_n "(cached) " >&6
8558238106Sdeselse
8559238106Sdes
8560238106Sdes# These are sane defaults that work on at least a few old systems.
8561238106Sdes# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8562238106Sdes
8563238106Sdes# Character class describing NM global symbol codes.
8564238106Sdessymcode='[BCDEGRST]'
8565238106Sdes
8566238106Sdes# Regexp to match symbols that can be accessed directly from C.
8567238106Sdessympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8568238106Sdes
8569238106Sdes# Define system-specific variables.
8570238106Sdescase $host_os in
8571238106Sdesaix*)
8572238106Sdes  symcode='[BCDT]'
8573238106Sdes  ;;
8574238106Sdescygwin* | mingw* | pw32* | cegcc*)
8575238106Sdes  symcode='[ABCDGISTW]'
8576238106Sdes  ;;
8577238106Sdeshpux*)
8578238106Sdes  if test "$host_cpu" = ia64; then
8579238106Sdes    symcode='[ABCDEGRST]'
8580238106Sdes  fi
8581238106Sdes  ;;
8582238106Sdesirix* | nonstopux*)
8583238106Sdes  symcode='[BCDEGRST]'
8584238106Sdes  ;;
8585238106Sdesosf*)
8586238106Sdes  symcode='[BCDEGQRST]'
8587238106Sdes  ;;
8588238106Sdessolaris*)
8589238106Sdes  symcode='[BDRT]'
8590238106Sdes  ;;
8591238106Sdessco3.2v5*)
8592238106Sdes  symcode='[DT]'
8593238106Sdes  ;;
8594238106Sdessysv4.2uw2*)
8595238106Sdes  symcode='[DT]'
8596238106Sdes  ;;
8597238106Sdessysv5* | sco5v6* | unixware* | OpenUNIX*)
8598238106Sdes  symcode='[ABDT]'
8599238106Sdes  ;;
8600238106Sdessysv4)
8601238106Sdes  symcode='[DFNSTU]'
8602238106Sdes  ;;
8603238106Sdesesac
8604238106Sdes
8605238106Sdes# If we're using GNU nm, then use its standard symbol codes.
8606238106Sdescase `$NM -V 2>&1` in
8607238106Sdes*GNU* | *'with BFD'*)
8608238106Sdes  symcode='[ABCDGIRSTW]' ;;
8609238106Sdesesac
8610238106Sdes
8611238106Sdes# Transform an extracted symbol line into a proper C declaration.
8612238106Sdes# Some systems (esp. on ia64) link data and code symbols differently,
8613238106Sdes# so use this general approach.
8614238106Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
8615238106Sdes
8616238106Sdes# Transform an extracted symbol line into symbol name and symbol address
8617238106Sdeslt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
8618238106Sdeslt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
8619238106Sdes
8620238106Sdes# Handle CRLF in mingw tool chain
8621238106Sdesopt_cr=
8622238106Sdescase $build_os in
8623238106Sdesmingw*)
8624238106Sdes  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8625238106Sdes  ;;
8626238106Sdesesac
8627238106Sdes
8628238106Sdes# Try without a prefix underscore, then with it.
8629238106Sdesfor ac_symprfx in "" "_"; do
8630238106Sdes
8631238106Sdes  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8632238106Sdes  symxfrm="\\1 $ac_symprfx\\2 \\2"
8633238106Sdes
8634238106Sdes  # Write the raw and C identifiers.
8635238106Sdes  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8636238106Sdes    # Fake it for dumpbin and say T for any non-static function
8637238106Sdes    # and D for any global variable.
8638238106Sdes    # Also find C++ and __fastcall symbols from MSVC++,
8639238106Sdes    # which start with @ or ?.
8640238106Sdes    lt_cv_sys_global_symbol_pipe="$AWK '"\
8641238106Sdes"     {last_section=section; section=\$ 3};"\
8642249141Sdes"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8643238106Sdes"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8644238106Sdes"     \$ 0!~/External *\|/{next};"\
8645238106Sdes"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8646238106Sdes"     {if(hide[section]) next};"\
8647238106Sdes"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
8648238106Sdes"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
8649238106Sdes"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
8650238106Sdes"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
8651238106Sdes"     ' prfx=^$ac_symprfx"
8652238106Sdes  else
8653238106Sdes    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8654238106Sdes  fi
8655238106Sdes  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8656238106Sdes
8657238106Sdes  # Check to see that the pipe works correctly.
8658238106Sdes  pipe_works=no
8659238106Sdes
8660238106Sdes  rm -f conftest*
8661238106Sdes  cat > conftest.$ac_ext <<_LT_EOF
8662238106Sdes#ifdef __cplusplus
8663238106Sdesextern "C" {
8664238106Sdes#endif
8665238106Sdeschar nm_test_var;
8666238106Sdesvoid nm_test_func(void);
8667238106Sdesvoid nm_test_func(void){}
8668238106Sdes#ifdef __cplusplus
8669238106Sdes}
8670238106Sdes#endif
8671238106Sdesint main(){nm_test_var='a';nm_test_func();return(0);}
8672238106Sdes_LT_EOF
8673238106Sdes
8674238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8675238106Sdes  (eval $ac_compile) 2>&5
8676238106Sdes  ac_status=$?
8677238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8678238106Sdes  test $ac_status = 0; }; then
8679238106Sdes    # Now try to grab the symbols.
8680238106Sdes    nlist=conftest.nm
8681238106Sdes    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8682238106Sdes  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8683238106Sdes  ac_status=$?
8684238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8685238106Sdes  test $ac_status = 0; } && test -s "$nlist"; then
8686238106Sdes      # Try sorting and uniquifying the output.
8687238106Sdes      if sort "$nlist" | uniq > "$nlist"T; then
8688238106Sdes	mv -f "$nlist"T "$nlist"
8689238106Sdes      else
8690238106Sdes	rm -f "$nlist"T
8691238106Sdes      fi
8692238106Sdes
8693238106Sdes      # Make sure that we snagged all the symbols we need.
8694238106Sdes      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8695238106Sdes	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8696238106Sdes	  cat <<_LT_EOF > conftest.$ac_ext
8697238106Sdes/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8698238106Sdes#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
8699238106Sdes/* DATA imports from DLLs on WIN32 con't be const, because runtime
8700238106Sdes   relocations are performed -- see ld's documentation on pseudo-relocs.  */
8701238106Sdes# define LT_DLSYM_CONST
8702238106Sdes#elif defined(__osf__)
8703238106Sdes/* This system does not cope well with relocations in const data.  */
8704238106Sdes# define LT_DLSYM_CONST
8705238106Sdes#else
8706238106Sdes# define LT_DLSYM_CONST const
8707238106Sdes#endif
8708238106Sdes
8709238106Sdes#ifdef __cplusplus
8710238106Sdesextern "C" {
8711238106Sdes#endif
8712238106Sdes
8713238106Sdes_LT_EOF
8714238106Sdes	  # Now generate the symbol file.
8715238106Sdes	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8716238106Sdes
8717238106Sdes	  cat <<_LT_EOF >> conftest.$ac_ext
8718238106Sdes
8719238106Sdes/* The mapping between symbol names and symbols.  */
8720238106SdesLT_DLSYM_CONST struct {
8721238106Sdes  const char *name;
8722238106Sdes  void       *address;
8723238106Sdes}
8724238106Sdeslt__PROGRAM__LTX_preloaded_symbols[] =
8725238106Sdes{
8726238106Sdes  { "@PROGRAM@", (void *) 0 },
8727238106Sdes_LT_EOF
8728238106Sdes	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8729238106Sdes	  cat <<\_LT_EOF >> conftest.$ac_ext
8730238106Sdes  {0, (void *) 0}
8731238106Sdes};
8732238106Sdes
8733238106Sdes/* This works around a problem in FreeBSD linker */
8734238106Sdes#ifdef FREEBSD_WORKAROUND
8735238106Sdesstatic const void *lt_preloaded_setup() {
8736238106Sdes  return lt__PROGRAM__LTX_preloaded_symbols;
8737238106Sdes}
8738238106Sdes#endif
8739238106Sdes
8740238106Sdes#ifdef __cplusplus
8741238106Sdes}
8742238106Sdes#endif
8743238106Sdes_LT_EOF
8744238106Sdes	  # Now try linking the two files.
8745238106Sdes	  mv conftest.$ac_objext conftstm.$ac_objext
8746238106Sdes	  lt_globsym_save_LIBS=$LIBS
8747238106Sdes	  lt_globsym_save_CFLAGS=$CFLAGS
8748238106Sdes	  LIBS="conftstm.$ac_objext"
8749238106Sdes	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8750238106Sdes	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8751238106Sdes  (eval $ac_link) 2>&5
8752238106Sdes  ac_status=$?
8753238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8754238106Sdes  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
8755238106Sdes	    pipe_works=yes
8756238106Sdes	  fi
8757238106Sdes	  LIBS=$lt_globsym_save_LIBS
8758238106Sdes	  CFLAGS=$lt_globsym_save_CFLAGS
8759238106Sdes	else
8760238106Sdes	  echo "cannot find nm_test_func in $nlist" >&5
8761238106Sdes	fi
8762238106Sdes      else
8763238106Sdes	echo "cannot find nm_test_var in $nlist" >&5
8764238106Sdes      fi
8765238106Sdes    else
8766238106Sdes      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8767238106Sdes    fi
8768238106Sdes  else
8769238106Sdes    echo "$progname: failed program was:" >&5
8770238106Sdes    cat conftest.$ac_ext >&5
8771238106Sdes  fi
8772238106Sdes  rm -rf conftest* conftst*
8773238106Sdes
8774238106Sdes  # Do not use the global_symbol_pipe unless it works.
8775238106Sdes  if test "$pipe_works" = yes; then
8776238106Sdes    break
8777238106Sdes  else
8778238106Sdes    lt_cv_sys_global_symbol_pipe=
8779238106Sdes  fi
8780238106Sdesdone
8781238106Sdes
8782238106Sdesfi
8783238106Sdes
8784238106Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then
8785238106Sdes  lt_cv_sys_global_symbol_to_cdecl=
8786238106Sdesfi
8787238106Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8788238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8789238106Sdes$as_echo "failed" >&6; }
8790238106Sdeselse
8791238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8792238106Sdes$as_echo "ok" >&6; }
8793238106Sdesfi
8794238106Sdes
8795238106Sdes# Response file support.
8796238106Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then
8797238106Sdes  nm_file_list_spec='@'
8798238106Sdeselif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8799238106Sdes  nm_file_list_spec='@'
8800238106Sdesfi
8801238106Sdes
8802238106Sdes
8803238106Sdes
8804238106Sdes
8805238106Sdes
8806238106Sdes
8807238106Sdes
8808238106Sdes
8809238106Sdes
8810238106Sdes
8811238106Sdes
8812238106Sdes
8813238106Sdes
8814238106Sdes
8815238106Sdes
8816238106Sdes
8817238106Sdes
8818238106Sdes
8819238106Sdes
8820238106Sdes
8821238106Sdes
8822238106Sdes
8823238106Sdes
8824238106Sdes
8825238106Sdes
8826238106Sdes
8827238106Sdes
8828238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8829238106Sdes$as_echo_n "checking for sysroot... " >&6; }
8830238106Sdes
8831238106Sdes# Check whether --with-sysroot was given.
8832238106Sdesif test "${with_sysroot+set}" = set; then :
8833238106Sdes  withval=$with_sysroot;
8834238106Sdeselse
8835238106Sdes  with_sysroot=no
8836238106Sdesfi
8837238106Sdes
8838238106Sdes
8839238106Sdeslt_sysroot=
8840238106Sdescase ${with_sysroot} in #(
8841238106Sdes yes)
8842238106Sdes   if test "$GCC" = yes; then
8843238106Sdes     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8844238106Sdes   fi
8845238106Sdes   ;; #(
8846238106Sdes /*)
8847238106Sdes   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8848238106Sdes   ;; #(
8849238106Sdes no|'')
8850238106Sdes   ;; #(
8851238106Sdes *)
8852238106Sdes   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
8853238106Sdes$as_echo "${with_sysroot}" >&6; }
8854238106Sdes   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8855238106Sdes   ;;
8856238106Sdesesac
8857238106Sdes
8858238106Sdes { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8859238106Sdes$as_echo "${lt_sysroot:-no}" >&6; }
8860238106Sdes
8861238106Sdes
8862238106Sdes
8863238106Sdes
8864238106Sdes
8865238106Sdes# Check whether --enable-libtool-lock was given.
8866238106Sdesif test "${enable_libtool_lock+set}" = set; then :
8867238106Sdes  enableval=$enable_libtool_lock;
8868238106Sdesfi
8869238106Sdes
8870238106Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8871238106Sdes
8872238106Sdes# Some flags need to be propagated to the compiler or linker for good
8873238106Sdes# libtool support.
8874238106Sdescase $host in
8875238106Sdesia64-*-hpux*)
8876238106Sdes  # Find out which ABI we are using.
8877238106Sdes  echo 'int i;' > conftest.$ac_ext
8878238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8879238106Sdes  (eval $ac_compile) 2>&5
8880238106Sdes  ac_status=$?
8881238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8882238106Sdes  test $ac_status = 0; }; then
8883238106Sdes    case `/usr/bin/file conftest.$ac_objext` in
8884238106Sdes      *ELF-32*)
8885238106Sdes	HPUX_IA64_MODE="32"
8886238106Sdes	;;
8887238106Sdes      *ELF-64*)
8888238106Sdes	HPUX_IA64_MODE="64"
8889238106Sdes	;;
8890238106Sdes    esac
8891238106Sdes  fi
8892238106Sdes  rm -rf conftest*
8893238106Sdes  ;;
8894238106Sdes*-*-irix6*)
8895238106Sdes  # Find out which ABI we are using.
8896238106Sdes  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8897238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8898238106Sdes  (eval $ac_compile) 2>&5
8899238106Sdes  ac_status=$?
8900238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8901238106Sdes  test $ac_status = 0; }; then
8902238106Sdes    if test "$lt_cv_prog_gnu_ld" = yes; then
8903238106Sdes      case `/usr/bin/file conftest.$ac_objext` in
8904238106Sdes	*32-bit*)
8905238106Sdes	  LD="${LD-ld} -melf32bsmip"
8906238106Sdes	  ;;
8907238106Sdes	*N32*)
8908238106Sdes	  LD="${LD-ld} -melf32bmipn32"
8909238106Sdes	  ;;
8910238106Sdes	*64-bit*)
8911238106Sdes	  LD="${LD-ld} -melf64bmip"
8912238106Sdes	;;
8913238106Sdes      esac
8914238106Sdes    else
8915238106Sdes      case `/usr/bin/file conftest.$ac_objext` in
8916238106Sdes	*32-bit*)
8917238106Sdes	  LD="${LD-ld} -32"
8918238106Sdes	  ;;
8919238106Sdes	*N32*)
8920238106Sdes	  LD="${LD-ld} -n32"
8921238106Sdes	  ;;
8922238106Sdes	*64-bit*)
8923238106Sdes	  LD="${LD-ld} -64"
8924238106Sdes	  ;;
8925238106Sdes      esac
8926238106Sdes    fi
8927238106Sdes  fi
8928238106Sdes  rm -rf conftest*
8929238106Sdes  ;;
8930238106Sdes
8931285206Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8932238106Sdess390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8933238106Sdes  # Find out which ABI we are using.
8934238106Sdes  echo 'int i;' > conftest.$ac_ext
8935238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8936238106Sdes  (eval $ac_compile) 2>&5
8937238106Sdes  ac_status=$?
8938238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8939238106Sdes  test $ac_status = 0; }; then
8940238106Sdes    case `/usr/bin/file conftest.o` in
8941238106Sdes      *32-bit*)
8942238106Sdes	case $host in
8943238106Sdes	  x86_64-*kfreebsd*-gnu)
8944238106Sdes	    LD="${LD-ld} -m elf_i386_fbsd"
8945238106Sdes	    ;;
8946238106Sdes	  x86_64-*linux*)
8947238106Sdes	    LD="${LD-ld} -m elf_i386"
8948238106Sdes	    ;;
8949285206Sdes	  powerpc64le-*linux*)
8950285206Sdes	    LD="${LD-ld} -m elf32lppclinux"
8951285206Sdes	    ;;
8952285206Sdes	  powerpc64-*linux*)
8953238106Sdes	    LD="${LD-ld} -m elf32ppclinux"
8954238106Sdes	    ;;
8955238106Sdes	  s390x-*linux*)
8956238106Sdes	    LD="${LD-ld} -m elf_s390"
8957238106Sdes	    ;;
8958238106Sdes	  sparc64-*linux*)
8959238106Sdes	    LD="${LD-ld} -m elf32_sparc"
8960238106Sdes	    ;;
8961238106Sdes	esac
8962238106Sdes	;;
8963238106Sdes      *64-bit*)
8964238106Sdes	case $host in
8965238106Sdes	  x86_64-*kfreebsd*-gnu)
8966238106Sdes	    LD="${LD-ld} -m elf_x86_64_fbsd"
8967238106Sdes	    ;;
8968238106Sdes	  x86_64-*linux*)
8969238106Sdes	    LD="${LD-ld} -m elf_x86_64"
8970238106Sdes	    ;;
8971285206Sdes	  powerpcle-*linux*)
8972285206Sdes	    LD="${LD-ld} -m elf64lppc"
8973285206Sdes	    ;;
8974285206Sdes	  powerpc-*linux*)
8975238106Sdes	    LD="${LD-ld} -m elf64ppc"
8976238106Sdes	    ;;
8977238106Sdes	  s390*-*linux*|s390*-*tpf*)
8978238106Sdes	    LD="${LD-ld} -m elf64_s390"
8979238106Sdes	    ;;
8980238106Sdes	  sparc*-*linux*)
8981238106Sdes	    LD="${LD-ld} -m elf64_sparc"
8982238106Sdes	    ;;
8983238106Sdes	esac
8984238106Sdes	;;
8985238106Sdes    esac
8986238106Sdes  fi
8987238106Sdes  rm -rf conftest*
8988238106Sdes  ;;
8989238106Sdes
8990238106Sdes*-*-sco3.2v5*)
8991238106Sdes  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8992238106Sdes  SAVE_CFLAGS="$CFLAGS"
8993238106Sdes  CFLAGS="$CFLAGS -belf"
8994238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
8995238106Sdes$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
8996238106Sdesif ${lt_cv_cc_needs_belf+:} false; then :
8997238106Sdes  $as_echo_n "(cached) " >&6
8998238106Sdeselse
8999238106Sdes  ac_ext=c
9000238106Sdesac_cpp='$CPP $CPPFLAGS'
9001238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9002238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9003238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
9004238106Sdes
9005238106Sdes     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9006238106Sdes/* end confdefs.h.  */
9007238106Sdes
9008238106Sdesint
9009238106Sdesmain ()
9010238106Sdes{
9011238106Sdes
9012238106Sdes  ;
9013238106Sdes  return 0;
9014238106Sdes}
9015238106Sdes_ACEOF
9016238106Sdesif ac_fn_c_try_link "$LINENO"; then :
9017238106Sdes  lt_cv_cc_needs_belf=yes
9018238106Sdeselse
9019238106Sdes  lt_cv_cc_needs_belf=no
9020238106Sdesfi
9021238106Sdesrm -f core conftest.err conftest.$ac_objext \
9022238106Sdes    conftest$ac_exeext conftest.$ac_ext
9023238106Sdes     ac_ext=c
9024238106Sdesac_cpp='$CPP $CPPFLAGS'
9025238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9026238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9027238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
9028238106Sdes
9029238106Sdesfi
9030238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9031238106Sdes$as_echo "$lt_cv_cc_needs_belf" >&6; }
9032238106Sdes  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
9033238106Sdes    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9034238106Sdes    CFLAGS="$SAVE_CFLAGS"
9035238106Sdes  fi
9036238106Sdes  ;;
9037249141Sdes*-*solaris*)
9038238106Sdes  # Find out which ABI we are using.
9039238106Sdes  echo 'int i;' > conftest.$ac_ext
9040238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9041238106Sdes  (eval $ac_compile) 2>&5
9042238106Sdes  ac_status=$?
9043238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9044238106Sdes  test $ac_status = 0; }; then
9045238106Sdes    case `/usr/bin/file conftest.o` in
9046238106Sdes    *64-bit*)
9047238106Sdes      case $lt_cv_prog_gnu_ld in
9048249141Sdes      yes*)
9049249141Sdes        case $host in
9050249141Sdes        i?86-*-solaris*)
9051249141Sdes          LD="${LD-ld} -m elf_x86_64"
9052249141Sdes          ;;
9053249141Sdes        sparc*-*-solaris*)
9054249141Sdes          LD="${LD-ld} -m elf64_sparc"
9055249141Sdes          ;;
9056249141Sdes        esac
9057249141Sdes        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9058249141Sdes        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9059249141Sdes          LD="${LD-ld}_sol2"
9060249141Sdes        fi
9061249141Sdes        ;;
9062238106Sdes      *)
9063238106Sdes	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9064238106Sdes	  LD="${LD-ld} -64"
9065238106Sdes	fi
9066238106Sdes	;;
9067238106Sdes      esac
9068238106Sdes      ;;
9069238106Sdes    esac
9070238106Sdes  fi
9071238106Sdes  rm -rf conftest*
9072238106Sdes  ;;
9073238106Sdesesac
9074238106Sdes
9075238106Sdesneed_locks="$enable_libtool_lock"
9076238106Sdes
9077238106Sdesif test -n "$ac_tool_prefix"; then
9078238106Sdes  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9079238106Sdesset dummy ${ac_tool_prefix}mt; ac_word=$2
9080238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9081238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9082238106Sdesif ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9083238106Sdes  $as_echo_n "(cached) " >&6
9084238106Sdeselse
9085238106Sdes  if test -n "$MANIFEST_TOOL"; then
9086238106Sdes  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9087238106Sdeselse
9088238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9089238106Sdesfor as_dir in $PATH
9090238106Sdesdo
9091238106Sdes  IFS=$as_save_IFS
9092238106Sdes  test -z "$as_dir" && as_dir=.
9093238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9094249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9095238106Sdes    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9096238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9097238106Sdes    break 2
9098238106Sdes  fi
9099238106Sdesdone
9100238106Sdes  done
9101238106SdesIFS=$as_save_IFS
9102238106Sdes
9103238106Sdesfi
9104238106Sdesfi
9105238106SdesMANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9106238106Sdesif test -n "$MANIFEST_TOOL"; then
9107238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9108238106Sdes$as_echo "$MANIFEST_TOOL" >&6; }
9109238106Sdeselse
9110238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111238106Sdes$as_echo "no" >&6; }
9112238106Sdesfi
9113238106Sdes
9114238106Sdes
9115238106Sdesfi
9116238106Sdesif test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9117238106Sdes  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9118238106Sdes  # Extract the first word of "mt", so it can be a program name with args.
9119238106Sdesset dummy mt; ac_word=$2
9120238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9122238106Sdesif ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9123238106Sdes  $as_echo_n "(cached) " >&6
9124238106Sdeselse
9125238106Sdes  if test -n "$ac_ct_MANIFEST_TOOL"; then
9126238106Sdes  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9127238106Sdeselse
9128238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129238106Sdesfor as_dir in $PATH
9130238106Sdesdo
9131238106Sdes  IFS=$as_save_IFS
9132238106Sdes  test -z "$as_dir" && as_dir=.
9133238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9134249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135238106Sdes    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9136238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137238106Sdes    break 2
9138238106Sdes  fi
9139238106Sdesdone
9140238106Sdes  done
9141238106SdesIFS=$as_save_IFS
9142238106Sdes
9143238106Sdesfi
9144238106Sdesfi
9145238106Sdesac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9146238106Sdesif test -n "$ac_ct_MANIFEST_TOOL"; then
9147238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9148238106Sdes$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9149238106Sdeselse
9150238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151238106Sdes$as_echo "no" >&6; }
9152238106Sdesfi
9153238106Sdes
9154238106Sdes  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9155238106Sdes    MANIFEST_TOOL=":"
9156238106Sdes  else
9157238106Sdes    case $cross_compiling:$ac_tool_warned in
9158238106Sdesyes:)
9159238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9160238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9161238106Sdesac_tool_warned=yes ;;
9162238106Sdesesac
9163238106Sdes    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9164238106Sdes  fi
9165238106Sdeselse
9166238106Sdes  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9167238106Sdesfi
9168238106Sdes
9169238106Sdestest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9170238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9171238106Sdes$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9172238106Sdesif ${lt_cv_path_mainfest_tool+:} false; then :
9173238106Sdes  $as_echo_n "(cached) " >&6
9174238106Sdeselse
9175238106Sdes  lt_cv_path_mainfest_tool=no
9176238106Sdes  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9177238106Sdes  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9178238106Sdes  cat conftest.err >&5
9179238106Sdes  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9180238106Sdes    lt_cv_path_mainfest_tool=yes
9181238106Sdes  fi
9182238106Sdes  rm -f conftest*
9183238106Sdesfi
9184238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9185238106Sdes$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9186238106Sdesif test "x$lt_cv_path_mainfest_tool" != xyes; then
9187238106Sdes  MANIFEST_TOOL=:
9188238106Sdesfi
9189238106Sdes
9190238106Sdes
9191238106Sdes
9192238106Sdes
9193238106Sdes
9194238106Sdes
9195238106Sdes  case $host_os in
9196238106Sdes    rhapsody* | darwin*)
9197238106Sdes    if test -n "$ac_tool_prefix"; then
9198238106Sdes  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9199238106Sdesset dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9200238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9201238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9202238106Sdesif ${ac_cv_prog_DSYMUTIL+:} false; then :
9203238106Sdes  $as_echo_n "(cached) " >&6
9204238106Sdeselse
9205238106Sdes  if test -n "$DSYMUTIL"; then
9206238106Sdes  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9207238106Sdeselse
9208238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9209238106Sdesfor as_dir in $PATH
9210238106Sdesdo
9211238106Sdes  IFS=$as_save_IFS
9212238106Sdes  test -z "$as_dir" && as_dir=.
9213238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9214249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9215238106Sdes    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9216238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9217238106Sdes    break 2
9218238106Sdes  fi
9219238106Sdesdone
9220238106Sdes  done
9221238106SdesIFS=$as_save_IFS
9222238106Sdes
9223238106Sdesfi
9224238106Sdesfi
9225238106SdesDSYMUTIL=$ac_cv_prog_DSYMUTIL
9226238106Sdesif test -n "$DSYMUTIL"; then
9227238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9228238106Sdes$as_echo "$DSYMUTIL" >&6; }
9229238106Sdeselse
9230238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231238106Sdes$as_echo "no" >&6; }
9232238106Sdesfi
9233238106Sdes
9234238106Sdes
9235238106Sdesfi
9236238106Sdesif test -z "$ac_cv_prog_DSYMUTIL"; then
9237238106Sdes  ac_ct_DSYMUTIL=$DSYMUTIL
9238238106Sdes  # Extract the first word of "dsymutil", so it can be a program name with args.
9239238106Sdesset dummy dsymutil; ac_word=$2
9240238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9241238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9242238106Sdesif ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9243238106Sdes  $as_echo_n "(cached) " >&6
9244238106Sdeselse
9245238106Sdes  if test -n "$ac_ct_DSYMUTIL"; then
9246238106Sdes  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9247238106Sdeselse
9248238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249238106Sdesfor as_dir in $PATH
9250238106Sdesdo
9251238106Sdes  IFS=$as_save_IFS
9252238106Sdes  test -z "$as_dir" && as_dir=.
9253238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9254249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9255238106Sdes    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9256238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257238106Sdes    break 2
9258238106Sdes  fi
9259238106Sdesdone
9260238106Sdes  done
9261238106SdesIFS=$as_save_IFS
9262238106Sdes
9263238106Sdesfi
9264238106Sdesfi
9265238106Sdesac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9266238106Sdesif test -n "$ac_ct_DSYMUTIL"; then
9267238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9268238106Sdes$as_echo "$ac_ct_DSYMUTIL" >&6; }
9269238106Sdeselse
9270238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271238106Sdes$as_echo "no" >&6; }
9272238106Sdesfi
9273238106Sdes
9274238106Sdes  if test "x$ac_ct_DSYMUTIL" = x; then
9275238106Sdes    DSYMUTIL=":"
9276238106Sdes  else
9277238106Sdes    case $cross_compiling:$ac_tool_warned in
9278238106Sdesyes:)
9279238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9280238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9281238106Sdesac_tool_warned=yes ;;
9282238106Sdesesac
9283238106Sdes    DSYMUTIL=$ac_ct_DSYMUTIL
9284238106Sdes  fi
9285238106Sdeselse
9286238106Sdes  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9287238106Sdesfi
9288238106Sdes
9289238106Sdes    if test -n "$ac_tool_prefix"; then
9290238106Sdes  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9291238106Sdesset dummy ${ac_tool_prefix}nmedit; ac_word=$2
9292238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9294238106Sdesif ${ac_cv_prog_NMEDIT+:} false; then :
9295238106Sdes  $as_echo_n "(cached) " >&6
9296238106Sdeselse
9297238106Sdes  if test -n "$NMEDIT"; then
9298238106Sdes  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9299238106Sdeselse
9300238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9301238106Sdesfor as_dir in $PATH
9302238106Sdesdo
9303238106Sdes  IFS=$as_save_IFS
9304238106Sdes  test -z "$as_dir" && as_dir=.
9305238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9306249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9307238106Sdes    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9308238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9309238106Sdes    break 2
9310238106Sdes  fi
9311238106Sdesdone
9312238106Sdes  done
9313238106SdesIFS=$as_save_IFS
9314238106Sdes
9315238106Sdesfi
9316238106Sdesfi
9317238106SdesNMEDIT=$ac_cv_prog_NMEDIT
9318238106Sdesif test -n "$NMEDIT"; then
9319238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9320238106Sdes$as_echo "$NMEDIT" >&6; }
9321238106Sdeselse
9322238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323238106Sdes$as_echo "no" >&6; }
9324238106Sdesfi
9325238106Sdes
9326238106Sdes
9327238106Sdesfi
9328238106Sdesif test -z "$ac_cv_prog_NMEDIT"; then
9329238106Sdes  ac_ct_NMEDIT=$NMEDIT
9330238106Sdes  # Extract the first word of "nmedit", so it can be a program name with args.
9331238106Sdesset dummy nmedit; ac_word=$2
9332238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9333238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9334238106Sdesif ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9335238106Sdes  $as_echo_n "(cached) " >&6
9336238106Sdeselse
9337238106Sdes  if test -n "$ac_ct_NMEDIT"; then
9338238106Sdes  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9339238106Sdeselse
9340238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341238106Sdesfor as_dir in $PATH
9342238106Sdesdo
9343238106Sdes  IFS=$as_save_IFS
9344238106Sdes  test -z "$as_dir" && as_dir=.
9345238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9346249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347238106Sdes    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9348238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349238106Sdes    break 2
9350238106Sdes  fi
9351238106Sdesdone
9352238106Sdes  done
9353238106SdesIFS=$as_save_IFS
9354238106Sdes
9355238106Sdesfi
9356238106Sdesfi
9357238106Sdesac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9358238106Sdesif test -n "$ac_ct_NMEDIT"; then
9359238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9360238106Sdes$as_echo "$ac_ct_NMEDIT" >&6; }
9361238106Sdeselse
9362238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363238106Sdes$as_echo "no" >&6; }
9364238106Sdesfi
9365238106Sdes
9366238106Sdes  if test "x$ac_ct_NMEDIT" = x; then
9367238106Sdes    NMEDIT=":"
9368238106Sdes  else
9369238106Sdes    case $cross_compiling:$ac_tool_warned in
9370238106Sdesyes:)
9371238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9372238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9373238106Sdesac_tool_warned=yes ;;
9374238106Sdesesac
9375238106Sdes    NMEDIT=$ac_ct_NMEDIT
9376238106Sdes  fi
9377238106Sdeselse
9378238106Sdes  NMEDIT="$ac_cv_prog_NMEDIT"
9379238106Sdesfi
9380238106Sdes
9381238106Sdes    if test -n "$ac_tool_prefix"; then
9382238106Sdes  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9383238106Sdesset dummy ${ac_tool_prefix}lipo; ac_word=$2
9384238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9385238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9386238106Sdesif ${ac_cv_prog_LIPO+:} false; then :
9387238106Sdes  $as_echo_n "(cached) " >&6
9388238106Sdeselse
9389238106Sdes  if test -n "$LIPO"; then
9390238106Sdes  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9391238106Sdeselse
9392238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393238106Sdesfor as_dir in $PATH
9394238106Sdesdo
9395238106Sdes  IFS=$as_save_IFS
9396238106Sdes  test -z "$as_dir" && as_dir=.
9397238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9398249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399238106Sdes    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9400238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401238106Sdes    break 2
9402238106Sdes  fi
9403238106Sdesdone
9404238106Sdes  done
9405238106SdesIFS=$as_save_IFS
9406238106Sdes
9407238106Sdesfi
9408238106Sdesfi
9409238106SdesLIPO=$ac_cv_prog_LIPO
9410238106Sdesif test -n "$LIPO"; then
9411238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9412238106Sdes$as_echo "$LIPO" >&6; }
9413238106Sdeselse
9414238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415238106Sdes$as_echo "no" >&6; }
9416238106Sdesfi
9417238106Sdes
9418238106Sdes
9419238106Sdesfi
9420238106Sdesif test -z "$ac_cv_prog_LIPO"; then
9421238106Sdes  ac_ct_LIPO=$LIPO
9422238106Sdes  # Extract the first word of "lipo", so it can be a program name with args.
9423238106Sdesset dummy lipo; ac_word=$2
9424238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9425238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9426238106Sdesif ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9427238106Sdes  $as_echo_n "(cached) " >&6
9428238106Sdeselse
9429238106Sdes  if test -n "$ac_ct_LIPO"; then
9430238106Sdes  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9431238106Sdeselse
9432238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9433238106Sdesfor as_dir in $PATH
9434238106Sdesdo
9435238106Sdes  IFS=$as_save_IFS
9436238106Sdes  test -z "$as_dir" && as_dir=.
9437238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9438249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9439238106Sdes    ac_cv_prog_ac_ct_LIPO="lipo"
9440238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9441238106Sdes    break 2
9442238106Sdes  fi
9443238106Sdesdone
9444238106Sdes  done
9445238106SdesIFS=$as_save_IFS
9446238106Sdes
9447238106Sdesfi
9448238106Sdesfi
9449238106Sdesac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9450238106Sdesif test -n "$ac_ct_LIPO"; then
9451238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9452238106Sdes$as_echo "$ac_ct_LIPO" >&6; }
9453238106Sdeselse
9454238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9455238106Sdes$as_echo "no" >&6; }
9456238106Sdesfi
9457238106Sdes
9458238106Sdes  if test "x$ac_ct_LIPO" = x; then
9459238106Sdes    LIPO=":"
9460238106Sdes  else
9461238106Sdes    case $cross_compiling:$ac_tool_warned in
9462238106Sdesyes:)
9463238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9464238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9465238106Sdesac_tool_warned=yes ;;
9466238106Sdesesac
9467238106Sdes    LIPO=$ac_ct_LIPO
9468238106Sdes  fi
9469238106Sdeselse
9470238106Sdes  LIPO="$ac_cv_prog_LIPO"
9471238106Sdesfi
9472238106Sdes
9473238106Sdes    if test -n "$ac_tool_prefix"; then
9474238106Sdes  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9475238106Sdesset dummy ${ac_tool_prefix}otool; ac_word=$2
9476238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9477238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9478238106Sdesif ${ac_cv_prog_OTOOL+:} false; then :
9479238106Sdes  $as_echo_n "(cached) " >&6
9480238106Sdeselse
9481238106Sdes  if test -n "$OTOOL"; then
9482238106Sdes  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9483238106Sdeselse
9484238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9485238106Sdesfor as_dir in $PATH
9486238106Sdesdo
9487238106Sdes  IFS=$as_save_IFS
9488238106Sdes  test -z "$as_dir" && as_dir=.
9489238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9490249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9491238106Sdes    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9492238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9493238106Sdes    break 2
9494238106Sdes  fi
9495238106Sdesdone
9496238106Sdes  done
9497238106SdesIFS=$as_save_IFS
9498238106Sdes
9499238106Sdesfi
9500238106Sdesfi
9501238106SdesOTOOL=$ac_cv_prog_OTOOL
9502238106Sdesif test -n "$OTOOL"; then
9503238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9504238106Sdes$as_echo "$OTOOL" >&6; }
9505238106Sdeselse
9506238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9507238106Sdes$as_echo "no" >&6; }
9508238106Sdesfi
9509238106Sdes
9510238106Sdes
9511238106Sdesfi
9512238106Sdesif test -z "$ac_cv_prog_OTOOL"; then
9513238106Sdes  ac_ct_OTOOL=$OTOOL
9514238106Sdes  # Extract the first word of "otool", so it can be a program name with args.
9515238106Sdesset dummy otool; ac_word=$2
9516238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9517238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9518238106Sdesif ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9519238106Sdes  $as_echo_n "(cached) " >&6
9520238106Sdeselse
9521238106Sdes  if test -n "$ac_ct_OTOOL"; then
9522238106Sdes  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9523238106Sdeselse
9524238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9525238106Sdesfor as_dir in $PATH
9526238106Sdesdo
9527238106Sdes  IFS=$as_save_IFS
9528238106Sdes  test -z "$as_dir" && as_dir=.
9529238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9530249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9531238106Sdes    ac_cv_prog_ac_ct_OTOOL="otool"
9532238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9533238106Sdes    break 2
9534238106Sdes  fi
9535238106Sdesdone
9536238106Sdes  done
9537238106SdesIFS=$as_save_IFS
9538238106Sdes
9539238106Sdesfi
9540238106Sdesfi
9541238106Sdesac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9542238106Sdesif test -n "$ac_ct_OTOOL"; then
9543238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9544238106Sdes$as_echo "$ac_ct_OTOOL" >&6; }
9545238106Sdeselse
9546238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9547238106Sdes$as_echo "no" >&6; }
9548238106Sdesfi
9549238106Sdes
9550238106Sdes  if test "x$ac_ct_OTOOL" = x; then
9551238106Sdes    OTOOL=":"
9552238106Sdes  else
9553238106Sdes    case $cross_compiling:$ac_tool_warned in
9554238106Sdesyes:)
9555238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9556238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9557238106Sdesac_tool_warned=yes ;;
9558238106Sdesesac
9559238106Sdes    OTOOL=$ac_ct_OTOOL
9560238106Sdes  fi
9561238106Sdeselse
9562238106Sdes  OTOOL="$ac_cv_prog_OTOOL"
9563238106Sdesfi
9564238106Sdes
9565238106Sdes    if test -n "$ac_tool_prefix"; then
9566238106Sdes  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9567238106Sdesset dummy ${ac_tool_prefix}otool64; ac_word=$2
9568238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9569238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9570238106Sdesif ${ac_cv_prog_OTOOL64+:} false; then :
9571238106Sdes  $as_echo_n "(cached) " >&6
9572238106Sdeselse
9573238106Sdes  if test -n "$OTOOL64"; then
9574238106Sdes  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9575238106Sdeselse
9576238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577238106Sdesfor as_dir in $PATH
9578238106Sdesdo
9579238106Sdes  IFS=$as_save_IFS
9580238106Sdes  test -z "$as_dir" && as_dir=.
9581238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9582249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583238106Sdes    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9584238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585238106Sdes    break 2
9586238106Sdes  fi
9587238106Sdesdone
9588238106Sdes  done
9589238106SdesIFS=$as_save_IFS
9590238106Sdes
9591238106Sdesfi
9592238106Sdesfi
9593238106SdesOTOOL64=$ac_cv_prog_OTOOL64
9594238106Sdesif test -n "$OTOOL64"; then
9595238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9596238106Sdes$as_echo "$OTOOL64" >&6; }
9597238106Sdeselse
9598238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599238106Sdes$as_echo "no" >&6; }
9600238106Sdesfi
9601238106Sdes
9602238106Sdes
9603238106Sdesfi
9604238106Sdesif test -z "$ac_cv_prog_OTOOL64"; then
9605238106Sdes  ac_ct_OTOOL64=$OTOOL64
9606238106Sdes  # Extract the first word of "otool64", so it can be a program name with args.
9607238106Sdesset dummy otool64; ac_word=$2
9608238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
9610238106Sdesif ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9611238106Sdes  $as_echo_n "(cached) " >&6
9612238106Sdeselse
9613238106Sdes  if test -n "$ac_ct_OTOOL64"; then
9614238106Sdes  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9615238106Sdeselse
9616238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9617238106Sdesfor as_dir in $PATH
9618238106Sdesdo
9619238106Sdes  IFS=$as_save_IFS
9620238106Sdes  test -z "$as_dir" && as_dir=.
9621238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
9622249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9623238106Sdes    ac_cv_prog_ac_ct_OTOOL64="otool64"
9624238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9625238106Sdes    break 2
9626238106Sdes  fi
9627238106Sdesdone
9628238106Sdes  done
9629238106SdesIFS=$as_save_IFS
9630238106Sdes
9631238106Sdesfi
9632238106Sdesfi
9633238106Sdesac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9634238106Sdesif test -n "$ac_ct_OTOOL64"; then
9635238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9636238106Sdes$as_echo "$ac_ct_OTOOL64" >&6; }
9637238106Sdeselse
9638238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639238106Sdes$as_echo "no" >&6; }
9640238106Sdesfi
9641238106Sdes
9642238106Sdes  if test "x$ac_ct_OTOOL64" = x; then
9643238106Sdes    OTOOL64=":"
9644238106Sdes  else
9645238106Sdes    case $cross_compiling:$ac_tool_warned in
9646238106Sdesyes:)
9647238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9648238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9649238106Sdesac_tool_warned=yes ;;
9650238106Sdesesac
9651238106Sdes    OTOOL64=$ac_ct_OTOOL64
9652238106Sdes  fi
9653238106Sdeselse
9654238106Sdes  OTOOL64="$ac_cv_prog_OTOOL64"
9655238106Sdesfi
9656238106Sdes
9657238106Sdes
9658238106Sdes
9659238106Sdes
9660238106Sdes
9661238106Sdes
9662238106Sdes
9663238106Sdes
9664238106Sdes
9665238106Sdes
9666238106Sdes
9667238106Sdes
9668238106Sdes
9669238106Sdes
9670238106Sdes
9671238106Sdes
9672238106Sdes
9673238106Sdes
9674238106Sdes
9675238106Sdes
9676238106Sdes
9677238106Sdes
9678238106Sdes
9679238106Sdes
9680238106Sdes
9681238106Sdes
9682238106Sdes
9683238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9684238106Sdes$as_echo_n "checking for -single_module linker flag... " >&6; }
9685238106Sdesif ${lt_cv_apple_cc_single_mod+:} false; then :
9686238106Sdes  $as_echo_n "(cached) " >&6
9687238106Sdeselse
9688238106Sdes  lt_cv_apple_cc_single_mod=no
9689238106Sdes      if test -z "${LT_MULTI_MODULE}"; then
9690238106Sdes	# By default we will add the -single_module flag. You can override
9691238106Sdes	# by either setting the environment variable LT_MULTI_MODULE
9692238106Sdes	# non-empty at configure time, or by adding -multi_module to the
9693238106Sdes	# link flags.
9694238106Sdes	rm -rf libconftest.dylib*
9695238106Sdes	echo "int foo(void){return 1;}" > conftest.c
9696238106Sdes	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9697238106Sdes-dynamiclib -Wl,-single_module conftest.c" >&5
9698238106Sdes	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9699238106Sdes	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9700238106Sdes        _lt_result=$?
9701249141Sdes	# If there is a non-empty error log, and "single_module"
9702249141Sdes	# appears in it, assume the flag caused a linker warning
9703249141Sdes        if test -s conftest.err && $GREP single_module conftest.err; then
9704249141Sdes	  cat conftest.err >&5
9705249141Sdes	# Otherwise, if the output was created with a 0 exit code from
9706249141Sdes	# the compiler, it worked.
9707249141Sdes	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
9708238106Sdes	  lt_cv_apple_cc_single_mod=yes
9709238106Sdes	else
9710238106Sdes	  cat conftest.err >&5
9711238106Sdes	fi
9712238106Sdes	rm -rf libconftest.dylib*
9713238106Sdes	rm -f conftest.*
9714238106Sdes      fi
9715238106Sdesfi
9716238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9717238106Sdes$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9718249141Sdes
9719238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9720238106Sdes$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9721238106Sdesif ${lt_cv_ld_exported_symbols_list+:} false; then :
9722238106Sdes  $as_echo_n "(cached) " >&6
9723238106Sdeselse
9724238106Sdes  lt_cv_ld_exported_symbols_list=no
9725238106Sdes      save_LDFLAGS=$LDFLAGS
9726238106Sdes      echo "_main" > conftest.sym
9727238106Sdes      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9728238106Sdes      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9729238106Sdes/* end confdefs.h.  */
9730238106Sdes
9731238106Sdesint
9732238106Sdesmain ()
9733238106Sdes{
9734238106Sdes
9735238106Sdes  ;
9736238106Sdes  return 0;
9737238106Sdes}
9738238106Sdes_ACEOF
9739238106Sdesif ac_fn_c_try_link "$LINENO"; then :
9740238106Sdes  lt_cv_ld_exported_symbols_list=yes
9741238106Sdeselse
9742238106Sdes  lt_cv_ld_exported_symbols_list=no
9743238106Sdesfi
9744238106Sdesrm -f core conftest.err conftest.$ac_objext \
9745238106Sdes    conftest$ac_exeext conftest.$ac_ext
9746238106Sdes	LDFLAGS="$save_LDFLAGS"
9747238106Sdes
9748238106Sdesfi
9749238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
9750238106Sdes$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
9751249141Sdes
9752238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
9753238106Sdes$as_echo_n "checking for -force_load linker flag... " >&6; }
9754238106Sdesif ${lt_cv_ld_force_load+:} false; then :
9755238106Sdes  $as_echo_n "(cached) " >&6
9756238106Sdeselse
9757238106Sdes  lt_cv_ld_force_load=no
9758238106Sdes      cat > conftest.c << _LT_EOF
9759238106Sdesint forced_loaded() { return 2;}
9760238106Sdes_LT_EOF
9761238106Sdes      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
9762238106Sdes      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9763238106Sdes      echo "$AR cru libconftest.a conftest.o" >&5
9764238106Sdes      $AR cru libconftest.a conftest.o 2>&5
9765238106Sdes      echo "$RANLIB libconftest.a" >&5
9766238106Sdes      $RANLIB libconftest.a 2>&5
9767238106Sdes      cat > conftest.c << _LT_EOF
9768238106Sdesint main() { return 0;}
9769238106Sdes_LT_EOF
9770238106Sdes      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9771238106Sdes      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9772238106Sdes      _lt_result=$?
9773249141Sdes      if test -s conftest.err && $GREP force_load conftest.err; then
9774249141Sdes	cat conftest.err >&5
9775249141Sdes      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
9776238106Sdes	lt_cv_ld_force_load=yes
9777238106Sdes      else
9778238106Sdes	cat conftest.err >&5
9779238106Sdes      fi
9780238106Sdes        rm -f conftest.err libconftest.a conftest conftest.c
9781238106Sdes        rm -rf conftest.dSYM
9782238106Sdes
9783238106Sdesfi
9784238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9785238106Sdes$as_echo "$lt_cv_ld_force_load" >&6; }
9786238106Sdes    case $host_os in
9787238106Sdes    rhapsody* | darwin1.[012])
9788238106Sdes      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
9789238106Sdes    darwin1.*)
9790238106Sdes      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9791238106Sdes    darwin*) # darwin 5.x on
9792238106Sdes      # if running on 10.5 or later, the deployment target defaults
9793238106Sdes      # to the OS version, if on x86, and 10.4, the deployment
9794238106Sdes      # target defaults to 10.4. Don't you love it?
9795238106Sdes      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9796238106Sdes	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
9797238106Sdes	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9798238106Sdes	10.[012]*)
9799238106Sdes	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9800238106Sdes	10.*)
9801238106Sdes	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9802238106Sdes      esac
9803238106Sdes    ;;
9804238106Sdes  esac
9805238106Sdes    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
9806238106Sdes      _lt_dar_single_mod='$single_module'
9807238106Sdes    fi
9808238106Sdes    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
9809238106Sdes      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
9810238106Sdes    else
9811238106Sdes      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9812238106Sdes    fi
9813238106Sdes    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
9814238106Sdes      _lt_dsymutil='~$DSYMUTIL $lib || :'
9815238106Sdes    else
9816238106Sdes      _lt_dsymutil=
9817238106Sdes    fi
9818238106Sdes    ;;
9819238106Sdes  esac
9820238106Sdes
9821238106Sdesfor ac_header in dlfcn.h
9822238106Sdesdo :
9823238106Sdes  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
9824238106Sdes"
9825238106Sdesif test "x$ac_cv_header_dlfcn_h" = xyes; then :
9826238106Sdes  cat >>confdefs.h <<_ACEOF
9827238106Sdes#define HAVE_DLFCN_H 1
9828238106Sdes_ACEOF
9829238106Sdes
9830238106Sdesfi
9831238106Sdes
9832238106Sdesdone
9833238106Sdes
9834238106Sdes
9835238106Sdes
9836238106Sdes
9837238106Sdes
9838238106Sdes
9839238106Sdes
9840238106Sdes# Set options
9841238106Sdes
9842238106Sdes
9843238106Sdes
9844238106Sdes        enable_dlopen=no
9845238106Sdes
9846238106Sdes
9847238106Sdes  enable_win32_dll=no
9848238106Sdes
9849238106Sdes
9850238106Sdes            # Check whether --enable-shared was given.
9851238106Sdesif test "${enable_shared+set}" = set; then :
9852238106Sdes  enableval=$enable_shared; p=${PACKAGE-default}
9853238106Sdes    case $enableval in
9854238106Sdes    yes) enable_shared=yes ;;
9855238106Sdes    no) enable_shared=no ;;
9856238106Sdes    *)
9857238106Sdes      enable_shared=no
9858238106Sdes      # Look at the argument we got.  We use all the common list separators.
9859238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9860238106Sdes      for pkg in $enableval; do
9861238106Sdes	IFS="$lt_save_ifs"
9862238106Sdes	if test "X$pkg" = "X$p"; then
9863238106Sdes	  enable_shared=yes
9864238106Sdes	fi
9865238106Sdes      done
9866238106Sdes      IFS="$lt_save_ifs"
9867238106Sdes      ;;
9868238106Sdes    esac
9869238106Sdeselse
9870238106Sdes  enable_shared=yes
9871238106Sdesfi
9872238106Sdes
9873238106Sdes
9874238106Sdes
9875238106Sdes
9876238106Sdes
9877238106Sdes
9878238106Sdes
9879238106Sdes
9880238106Sdes
9881238106Sdes  # Check whether --enable-static was given.
9882238106Sdesif test "${enable_static+set}" = set; then :
9883238106Sdes  enableval=$enable_static; p=${PACKAGE-default}
9884238106Sdes    case $enableval in
9885238106Sdes    yes) enable_static=yes ;;
9886238106Sdes    no) enable_static=no ;;
9887238106Sdes    *)
9888238106Sdes     enable_static=no
9889238106Sdes      # Look at the argument we got.  We use all the common list separators.
9890238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9891238106Sdes      for pkg in $enableval; do
9892238106Sdes	IFS="$lt_save_ifs"
9893238106Sdes	if test "X$pkg" = "X$p"; then
9894238106Sdes	  enable_static=yes
9895238106Sdes	fi
9896238106Sdes      done
9897238106Sdes      IFS="$lt_save_ifs"
9898238106Sdes      ;;
9899238106Sdes    esac
9900238106Sdeselse
9901238106Sdes  enable_static=yes
9902238106Sdesfi
9903238106Sdes
9904238106Sdes
9905238106Sdes
9906238106Sdes
9907238106Sdes
9908238106Sdes
9909238106Sdes
9910238106Sdes
9911238106Sdes
9912238106Sdes
9913238106Sdes# Check whether --with-pic was given.
9914238106Sdesif test "${with_pic+set}" = set; then :
9915249141Sdes  withval=$with_pic; lt_p=${PACKAGE-default}
9916249141Sdes    case $withval in
9917249141Sdes    yes|no) pic_mode=$withval ;;
9918249141Sdes    *)
9919249141Sdes      pic_mode=default
9920249141Sdes      # Look at the argument we got.  We use all the common list separators.
9921249141Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9922249141Sdes      for lt_pkg in $withval; do
9923249141Sdes	IFS="$lt_save_ifs"
9924249141Sdes	if test "X$lt_pkg" = "X$lt_p"; then
9925249141Sdes	  pic_mode=yes
9926249141Sdes	fi
9927249141Sdes      done
9928249141Sdes      IFS="$lt_save_ifs"
9929249141Sdes      ;;
9930249141Sdes    esac
9931238106Sdeselse
9932238106Sdes  pic_mode=default
9933238106Sdesfi
9934238106Sdes
9935238106Sdes
9936238106Sdestest -z "$pic_mode" && pic_mode=default
9937238106Sdes
9938238106Sdes
9939238106Sdes
9940238106Sdes
9941238106Sdes
9942238106Sdes
9943238106Sdes
9944238106Sdes  # Check whether --enable-fast-install was given.
9945238106Sdesif test "${enable_fast_install+set}" = set; then :
9946238106Sdes  enableval=$enable_fast_install; p=${PACKAGE-default}
9947238106Sdes    case $enableval in
9948238106Sdes    yes) enable_fast_install=yes ;;
9949238106Sdes    no) enable_fast_install=no ;;
9950238106Sdes    *)
9951238106Sdes      enable_fast_install=no
9952238106Sdes      # Look at the argument we got.  We use all the common list separators.
9953238106Sdes      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9954238106Sdes      for pkg in $enableval; do
9955238106Sdes	IFS="$lt_save_ifs"
9956238106Sdes	if test "X$pkg" = "X$p"; then
9957238106Sdes	  enable_fast_install=yes
9958238106Sdes	fi
9959238106Sdes      done
9960238106Sdes      IFS="$lt_save_ifs"
9961238106Sdes      ;;
9962238106Sdes    esac
9963238106Sdeselse
9964238106Sdes  enable_fast_install=yes
9965238106Sdesfi
9966238106Sdes
9967238106Sdes
9968238106Sdes
9969238106Sdes
9970238106Sdes
9971238106Sdes
9972238106Sdes
9973238106Sdes
9974238106Sdes
9975238106Sdes
9976238106Sdes
9977238106Sdes# This can be used to rebuild libtool when needed
9978238106SdesLIBTOOL_DEPS="$ltmain"
9979238106Sdes
9980238106Sdes# Always use our own libtool.
9981238106SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool'
9982238106Sdes
9983238106Sdes
9984238106Sdes
9985238106Sdes
9986238106Sdes
9987238106Sdes
9988238106Sdes
9989238106Sdes
9990238106Sdes
9991238106Sdes
9992238106Sdes
9993238106Sdes
9994238106Sdes
9995238106Sdes
9996238106Sdes
9997238106Sdes
9998238106Sdes
9999238106Sdes
10000238106Sdes
10001238106Sdes
10002238106Sdes
10003238106Sdes
10004238106Sdes
10005238106Sdes
10006238106Sdes
10007238106Sdes
10008249141Sdes
10009249141Sdes
10010249141Sdes
10011249141Sdes
10012238106Sdestest -z "$LN_S" && LN_S="ln -s"
10013238106Sdes
10014238106Sdes
10015238106Sdes
10016238106Sdes
10017238106Sdes
10018238106Sdes
10019238106Sdes
10020238106Sdes
10021238106Sdes
10022238106Sdes
10023238106Sdes
10024238106Sdes
10025238106Sdes
10026238106Sdes
10027238106Sdesif test -n "${ZSH_VERSION+set}" ; then
10028238106Sdes   setopt NO_GLOB_SUBST
10029238106Sdesfi
10030238106Sdes
10031238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10032238106Sdes$as_echo_n "checking for objdir... " >&6; }
10033238106Sdesif ${lt_cv_objdir+:} false; then :
10034238106Sdes  $as_echo_n "(cached) " >&6
10035238106Sdeselse
10036238106Sdes  rm -f .libs 2>/dev/null
10037238106Sdesmkdir .libs 2>/dev/null
10038238106Sdesif test -d .libs; then
10039238106Sdes  lt_cv_objdir=.libs
10040238106Sdeselse
10041238106Sdes  # MS-DOS does not allow filenames that begin with a dot.
10042238106Sdes  lt_cv_objdir=_libs
10043238106Sdesfi
10044238106Sdesrmdir .libs 2>/dev/null
10045238106Sdesfi
10046238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10047238106Sdes$as_echo "$lt_cv_objdir" >&6; }
10048238106Sdesobjdir=$lt_cv_objdir
10049238106Sdes
10050238106Sdes
10051238106Sdes
10052238106Sdes
10053238106Sdes
10054238106Sdescat >>confdefs.h <<_ACEOF
10055238106Sdes#define LT_OBJDIR "$lt_cv_objdir/"
10056238106Sdes_ACEOF
10057238106Sdes
10058238106Sdes
10059238106Sdes
10060238106Sdes
10061238106Sdescase $host_os in
10062238106Sdesaix3*)
10063238106Sdes  # AIX sometimes has problems with the GCC collect2 program.  For some
10064238106Sdes  # reason, if we set the COLLECT_NAMES environment variable, the problems
10065238106Sdes  # vanish in a puff of smoke.
10066238106Sdes  if test "X${COLLECT_NAMES+set}" != Xset; then
10067238106Sdes    COLLECT_NAMES=
10068238106Sdes    export COLLECT_NAMES
10069238106Sdes  fi
10070238106Sdes  ;;
10071238106Sdesesac
10072238106Sdes
10073238106Sdes# Global variables:
10074238106Sdesofile=libtool
10075238106Sdescan_build_shared=yes
10076238106Sdes
10077238106Sdes# All known linkers require a `.a' archive for static linking (except MSVC,
10078238106Sdes# which needs '.lib').
10079238106Sdeslibext=a
10080238106Sdes
10081238106Sdeswith_gnu_ld="$lt_cv_prog_gnu_ld"
10082238106Sdes
10083238106Sdesold_CC="$CC"
10084238106Sdesold_CFLAGS="$CFLAGS"
10085238106Sdes
10086238106Sdes# Set sane defaults for various variables
10087238106Sdestest -z "$CC" && CC=cc
10088238106Sdestest -z "$LTCC" && LTCC=$CC
10089238106Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10090238106Sdestest -z "$LD" && LD=ld
10091238106Sdestest -z "$ac_objext" && ac_objext=o
10092238106Sdes
10093238106Sdesfor cc_temp in $compiler""; do
10094238106Sdes  case $cc_temp in
10095238106Sdes    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10096238106Sdes    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10097238106Sdes    \-*) ;;
10098238106Sdes    *) break;;
10099238106Sdes  esac
10100238106Sdesdone
10101238106Sdescc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10102238106Sdes
10103238106Sdes
10104238106Sdes# Only perform the check for file, if the check method requires it
10105238106Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file
10106238106Sdescase $deplibs_check_method in
10107238106Sdesfile_magic*)
10108238106Sdes  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10109238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10110238106Sdes$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10111238106Sdesif ${lt_cv_path_MAGIC_CMD+:} false; then :
10112238106Sdes  $as_echo_n "(cached) " >&6
10113238106Sdeselse
10114238106Sdes  case $MAGIC_CMD in
10115238106Sdes[\\/*] |  ?:[\\/]*)
10116238106Sdes  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10117238106Sdes  ;;
10118238106Sdes*)
10119238106Sdes  lt_save_MAGIC_CMD="$MAGIC_CMD"
10120238106Sdes  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10121238106Sdes  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10122238106Sdes  for ac_dir in $ac_dummy; do
10123238106Sdes    IFS="$lt_save_ifs"
10124238106Sdes    test -z "$ac_dir" && ac_dir=.
10125238106Sdes    if test -f $ac_dir/${ac_tool_prefix}file; then
10126238106Sdes      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
10127238106Sdes      if test -n "$file_magic_test_file"; then
10128238106Sdes	case $deplibs_check_method in
10129238106Sdes	"file_magic "*)
10130238106Sdes	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10131238106Sdes	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10132238106Sdes	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10133238106Sdes	    $EGREP "$file_magic_regex" > /dev/null; then
10134238106Sdes	    :
10135238106Sdes	  else
10136238106Sdes	    cat <<_LT_EOF 1>&2
10137238106Sdes
10138238106Sdes*** Warning: the command libtool uses to detect shared libraries,
10139238106Sdes*** $file_magic_cmd, produces output that libtool cannot recognize.
10140238106Sdes*** The result is that libtool may fail to recognize shared libraries
10141238106Sdes*** as such.  This will affect the creation of libtool libraries that
10142238106Sdes*** depend on shared libraries, but programs linked with such libtool
10143238106Sdes*** libraries will work regardless of this problem.  Nevertheless, you
10144238106Sdes*** may want to report the problem to your system manager and/or to
10145238106Sdes*** bug-libtool@gnu.org
10146238106Sdes
10147238106Sdes_LT_EOF
10148238106Sdes	  fi ;;
10149238106Sdes	esac
10150238106Sdes      fi
10151238106Sdes      break
10152238106Sdes    fi
10153238106Sdes  done
10154238106Sdes  IFS="$lt_save_ifs"
10155238106Sdes  MAGIC_CMD="$lt_save_MAGIC_CMD"
10156238106Sdes  ;;
10157238106Sdesesac
10158238106Sdesfi
10159238106Sdes
10160238106SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10161238106Sdesif test -n "$MAGIC_CMD"; then
10162238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10163238106Sdes$as_echo "$MAGIC_CMD" >&6; }
10164238106Sdeselse
10165238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166238106Sdes$as_echo "no" >&6; }
10167238106Sdesfi
10168238106Sdes
10169238106Sdes
10170238106Sdes
10171238106Sdes
10172238106Sdes
10173238106Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then
10174238106Sdes  if test -n "$ac_tool_prefix"; then
10175238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10176238106Sdes$as_echo_n "checking for file... " >&6; }
10177238106Sdesif ${lt_cv_path_MAGIC_CMD+:} false; then :
10178238106Sdes  $as_echo_n "(cached) " >&6
10179238106Sdeselse
10180238106Sdes  case $MAGIC_CMD in
10181238106Sdes[\\/*] |  ?:[\\/]*)
10182238106Sdes  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10183238106Sdes  ;;
10184238106Sdes*)
10185238106Sdes  lt_save_MAGIC_CMD="$MAGIC_CMD"
10186238106Sdes  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10187238106Sdes  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10188238106Sdes  for ac_dir in $ac_dummy; do
10189238106Sdes    IFS="$lt_save_ifs"
10190238106Sdes    test -z "$ac_dir" && ac_dir=.
10191238106Sdes    if test -f $ac_dir/file; then
10192238106Sdes      lt_cv_path_MAGIC_CMD="$ac_dir/file"
10193238106Sdes      if test -n "$file_magic_test_file"; then
10194238106Sdes	case $deplibs_check_method in
10195238106Sdes	"file_magic "*)
10196238106Sdes	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10197238106Sdes	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10198238106Sdes	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10199238106Sdes	    $EGREP "$file_magic_regex" > /dev/null; then
10200238106Sdes	    :
10201238106Sdes	  else
10202238106Sdes	    cat <<_LT_EOF 1>&2
10203238106Sdes
10204238106Sdes*** Warning: the command libtool uses to detect shared libraries,
10205238106Sdes*** $file_magic_cmd, produces output that libtool cannot recognize.
10206238106Sdes*** The result is that libtool may fail to recognize shared libraries
10207238106Sdes*** as such.  This will affect the creation of libtool libraries that
10208238106Sdes*** depend on shared libraries, but programs linked with such libtool
10209238106Sdes*** libraries will work regardless of this problem.  Nevertheless, you
10210238106Sdes*** may want to report the problem to your system manager and/or to
10211238106Sdes*** bug-libtool@gnu.org
10212238106Sdes
10213238106Sdes_LT_EOF
10214238106Sdes	  fi ;;
10215238106Sdes	esac
10216238106Sdes      fi
10217238106Sdes      break
10218238106Sdes    fi
10219238106Sdes  done
10220238106Sdes  IFS="$lt_save_ifs"
10221238106Sdes  MAGIC_CMD="$lt_save_MAGIC_CMD"
10222238106Sdes  ;;
10223238106Sdesesac
10224238106Sdesfi
10225238106Sdes
10226238106SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10227238106Sdesif test -n "$MAGIC_CMD"; then
10228238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10229238106Sdes$as_echo "$MAGIC_CMD" >&6; }
10230238106Sdeselse
10231238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232238106Sdes$as_echo "no" >&6; }
10233238106Sdesfi
10234238106Sdes
10235238106Sdes
10236238106Sdes  else
10237238106Sdes    MAGIC_CMD=:
10238238106Sdes  fi
10239238106Sdesfi
10240238106Sdes
10241238106Sdes  fi
10242238106Sdes  ;;
10243238106Sdesesac
10244238106Sdes
10245238106Sdes# Use C for the default configuration in the libtool script
10246238106Sdes
10247238106Sdeslt_save_CC="$CC"
10248238106Sdesac_ext=c
10249238106Sdesac_cpp='$CPP $CPPFLAGS'
10250238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10251238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10252238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
10253238106Sdes
10254238106Sdes
10255238106Sdes# Source file extension for C test sources.
10256238106Sdesac_ext=c
10257238106Sdes
10258238106Sdes# Object file extension for compiled C test sources.
10259238106Sdesobjext=o
10260238106Sdesobjext=$objext
10261238106Sdes
10262238106Sdes# Code to be used in simple compile tests
10263238106Sdeslt_simple_compile_test_code="int some_variable = 0;"
10264238106Sdes
10265238106Sdes# Code to be used in simple link tests
10266238106Sdeslt_simple_link_test_code='int main(){return(0);}'
10267238106Sdes
10268238106Sdes
10269238106Sdes
10270238106Sdes
10271238106Sdes
10272238106Sdes
10273238106Sdes
10274238106Sdes# If no C compiler was specified, use CC.
10275238106SdesLTCC=${LTCC-"$CC"}
10276238106Sdes
10277238106Sdes# If no C compiler flags were specified, use CFLAGS.
10278238106SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10279238106Sdes
10280238106Sdes# Allow CC to be a program name with arguments.
10281238106Sdescompiler=$CC
10282238106Sdes
10283238106Sdes# Save the default compiler, since it gets overwritten when the other
10284238106Sdes# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10285238106Sdescompiler_DEFAULT=$CC
10286238106Sdes
10287238106Sdes# save warnings/boilerplate of simple test code
10288238106Sdesac_outfile=conftest.$ac_objext
10289238106Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext
10290238106Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10291238106Sdes_lt_compiler_boilerplate=`cat conftest.err`
10292238106Sdes$RM conftest*
10293238106Sdes
10294238106Sdesac_outfile=conftest.$ac_objext
10295238106Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext
10296238106Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10297238106Sdes_lt_linker_boilerplate=`cat conftest.err`
10298238106Sdes$RM -r conftest*
10299238106Sdes
10300238106Sdes
10301238106Sdesif test -n "$compiler"; then
10302238106Sdes
10303238106Sdeslt_prog_compiler_no_builtin_flag=
10304238106Sdes
10305238106Sdesif test "$GCC" = yes; then
10306238106Sdes  case $cc_basename in
10307238106Sdes  nvcc*)
10308238106Sdes    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10309238106Sdes  *)
10310238106Sdes    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10311238106Sdes  esac
10312238106Sdes
10313238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10314238106Sdes$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10315238106Sdesif ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10316238106Sdes  $as_echo_n "(cached) " >&6
10317238106Sdeselse
10318238106Sdes  lt_cv_prog_compiler_rtti_exceptions=no
10319238106Sdes   ac_outfile=conftest.$ac_objext
10320238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10321238106Sdes   lt_compiler_flag="-fno-rtti -fno-exceptions"
10322238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
10323238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
10324238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
10325238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
10326238106Sdes   # The option is referenced via a variable to avoid confusing sed.
10327238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
10328238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10329238106Sdes   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10330238106Sdes   -e 's:$: $lt_compiler_flag:'`
10331238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10332238106Sdes   (eval "$lt_compile" 2>conftest.err)
10333238106Sdes   ac_status=$?
10334238106Sdes   cat conftest.err >&5
10335238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336238106Sdes   if (exit $ac_status) && test -s "$ac_outfile"; then
10337238106Sdes     # The compiler can only warn and ignore the option if not recognized
10338238106Sdes     # So say no if there are warnings other than the usual output.
10339238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10340238106Sdes     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10341238106Sdes     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10342238106Sdes       lt_cv_prog_compiler_rtti_exceptions=yes
10343238106Sdes     fi
10344238106Sdes   fi
10345238106Sdes   $RM conftest*
10346238106Sdes
10347238106Sdesfi
10348238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10349238106Sdes$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10350238106Sdes
10351238106Sdesif test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
10352238106Sdes    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10353238106Sdeselse
10354238106Sdes    :
10355238106Sdesfi
10356238106Sdes
10357238106Sdesfi
10358238106Sdes
10359238106Sdes
10360238106Sdes
10361238106Sdes
10362238106Sdes
10363238106Sdes
10364238106Sdes  lt_prog_compiler_wl=
10365238106Sdeslt_prog_compiler_pic=
10366238106Sdeslt_prog_compiler_static=
10367238106Sdes
10368238106Sdes
10369238106Sdes  if test "$GCC" = yes; then
10370238106Sdes    lt_prog_compiler_wl='-Wl,'
10371238106Sdes    lt_prog_compiler_static='-static'
10372238106Sdes
10373238106Sdes    case $host_os in
10374238106Sdes      aix*)
10375238106Sdes      # All AIX code is PIC.
10376238106Sdes      if test "$host_cpu" = ia64; then
10377238106Sdes	# AIX 5 now supports IA64 processor
10378238106Sdes	lt_prog_compiler_static='-Bstatic'
10379238106Sdes      fi
10380238106Sdes      ;;
10381238106Sdes
10382238106Sdes    amigaos*)
10383238106Sdes      case $host_cpu in
10384238106Sdes      powerpc)
10385238106Sdes            # see comment about AmigaOS4 .so support
10386238106Sdes            lt_prog_compiler_pic='-fPIC'
10387238106Sdes        ;;
10388238106Sdes      m68k)
10389238106Sdes            # FIXME: we need at least 68020 code to build shared libraries, but
10390238106Sdes            # adding the `-m68020' flag to GCC prevents building anything better,
10391238106Sdes            # like `-m68040'.
10392238106Sdes            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10393238106Sdes        ;;
10394238106Sdes      esac
10395238106Sdes      ;;
10396238106Sdes
10397238106Sdes    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10398238106Sdes      # PIC is the default for these OSes.
10399238106Sdes      ;;
10400238106Sdes
10401238106Sdes    mingw* | cygwin* | pw32* | os2* | cegcc*)
10402238106Sdes      # This hack is so that the source file can tell whether it is being
10403238106Sdes      # built for inclusion in a dll (and should export symbols for example).
10404238106Sdes      # Although the cygwin gcc ignores -fPIC, still need this for old-style
10405238106Sdes      # (--disable-auto-import) libraries
10406238106Sdes      lt_prog_compiler_pic='-DDLL_EXPORT'
10407238106Sdes      ;;
10408238106Sdes
10409238106Sdes    darwin* | rhapsody*)
10410238106Sdes      # PIC is the default on this platform
10411238106Sdes      # Common symbols not allowed in MH_DYLIB files
10412238106Sdes      lt_prog_compiler_pic='-fno-common'
10413238106Sdes      ;;
10414238106Sdes
10415238106Sdes    haiku*)
10416238106Sdes      # PIC is the default for Haiku.
10417238106Sdes      # The "-static" flag exists, but is broken.
10418238106Sdes      lt_prog_compiler_static=
10419238106Sdes      ;;
10420238106Sdes
10421238106Sdes    hpux*)
10422238106Sdes      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10423238106Sdes      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10424238106Sdes      # sets the default TLS model and affects inlining.
10425238106Sdes      case $host_cpu in
10426238106Sdes      hppa*64*)
10427238106Sdes	# +Z the default
10428238106Sdes	;;
10429238106Sdes      *)
10430238106Sdes	lt_prog_compiler_pic='-fPIC'
10431238106Sdes	;;
10432238106Sdes      esac
10433238106Sdes      ;;
10434238106Sdes
10435238106Sdes    interix[3-9]*)
10436238106Sdes      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10437238106Sdes      # Instead, we relocate shared libraries at runtime.
10438238106Sdes      ;;
10439238106Sdes
10440238106Sdes    msdosdjgpp*)
10441238106Sdes      # Just because we use GCC doesn't mean we suddenly get shared libraries
10442238106Sdes      # on systems that don't support them.
10443238106Sdes      lt_prog_compiler_can_build_shared=no
10444238106Sdes      enable_shared=no
10445238106Sdes      ;;
10446238106Sdes
10447238106Sdes    *nto* | *qnx*)
10448238106Sdes      # QNX uses GNU C++, but need to define -shared option too, otherwise
10449238106Sdes      # it will coredump.
10450238106Sdes      lt_prog_compiler_pic='-fPIC -shared'
10451238106Sdes      ;;
10452238106Sdes
10453238106Sdes    sysv4*MP*)
10454238106Sdes      if test -d /usr/nec; then
10455238106Sdes	lt_prog_compiler_pic=-Kconform_pic
10456238106Sdes      fi
10457238106Sdes      ;;
10458238106Sdes
10459238106Sdes    *)
10460238106Sdes      lt_prog_compiler_pic='-fPIC'
10461238106Sdes      ;;
10462238106Sdes    esac
10463238106Sdes
10464238106Sdes    case $cc_basename in
10465238106Sdes    nvcc*) # Cuda Compiler Driver 2.2
10466238106Sdes      lt_prog_compiler_wl='-Xlinker '
10467249141Sdes      if test -n "$lt_prog_compiler_pic"; then
10468249141Sdes        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10469249141Sdes      fi
10470238106Sdes      ;;
10471238106Sdes    esac
10472238106Sdes  else
10473238106Sdes    # PORTME Check for flag to pass linker flags through the system compiler.
10474238106Sdes    case $host_os in
10475238106Sdes    aix*)
10476238106Sdes      lt_prog_compiler_wl='-Wl,'
10477238106Sdes      if test "$host_cpu" = ia64; then
10478238106Sdes	# AIX 5 now supports IA64 processor
10479238106Sdes	lt_prog_compiler_static='-Bstatic'
10480238106Sdes      else
10481238106Sdes	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10482238106Sdes      fi
10483238106Sdes      ;;
10484238106Sdes
10485238106Sdes    mingw* | cygwin* | pw32* | os2* | cegcc*)
10486238106Sdes      # This hack is so that the source file can tell whether it is being
10487238106Sdes      # built for inclusion in a dll (and should export symbols for example).
10488238106Sdes      lt_prog_compiler_pic='-DDLL_EXPORT'
10489238106Sdes      ;;
10490238106Sdes
10491238106Sdes    hpux9* | hpux10* | hpux11*)
10492238106Sdes      lt_prog_compiler_wl='-Wl,'
10493238106Sdes      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10494238106Sdes      # not for PA HP-UX.
10495238106Sdes      case $host_cpu in
10496238106Sdes      hppa*64*|ia64*)
10497238106Sdes	# +Z the default
10498238106Sdes	;;
10499238106Sdes      *)
10500238106Sdes	lt_prog_compiler_pic='+Z'
10501238106Sdes	;;
10502238106Sdes      esac
10503238106Sdes      # Is there a better lt_prog_compiler_static that works with the bundled CC?
10504238106Sdes      lt_prog_compiler_static='${wl}-a ${wl}archive'
10505238106Sdes      ;;
10506238106Sdes
10507238106Sdes    irix5* | irix6* | nonstopux*)
10508238106Sdes      lt_prog_compiler_wl='-Wl,'
10509238106Sdes      # PIC (with -KPIC) is the default.
10510238106Sdes      lt_prog_compiler_static='-non_shared'
10511238106Sdes      ;;
10512238106Sdes
10513238106Sdes    linux* | k*bsd*-gnu | kopensolaris*-gnu)
10514238106Sdes      case $cc_basename in
10515238106Sdes      # old Intel for x86_64 which still supported -KPIC.
10516238106Sdes      ecc*)
10517238106Sdes	lt_prog_compiler_wl='-Wl,'
10518238106Sdes	lt_prog_compiler_pic='-KPIC'
10519238106Sdes	lt_prog_compiler_static='-static'
10520238106Sdes        ;;
10521238106Sdes      # icc used to be incompatible with GCC.
10522238106Sdes      # ICC 10 doesn't accept -KPIC any more.
10523238106Sdes      icc* | ifort*)
10524238106Sdes	lt_prog_compiler_wl='-Wl,'
10525238106Sdes	lt_prog_compiler_pic='-fPIC'
10526238106Sdes	lt_prog_compiler_static='-static'
10527238106Sdes        ;;
10528238106Sdes      # Lahey Fortran 8.1.
10529238106Sdes      lf95*)
10530238106Sdes	lt_prog_compiler_wl='-Wl,'
10531238106Sdes	lt_prog_compiler_pic='--shared'
10532238106Sdes	lt_prog_compiler_static='--static'
10533238106Sdes	;;
10534238106Sdes      nagfor*)
10535238106Sdes	# NAG Fortran compiler
10536238106Sdes	lt_prog_compiler_wl='-Wl,-Wl,,'
10537238106Sdes	lt_prog_compiler_pic='-PIC'
10538238106Sdes	lt_prog_compiler_static='-Bstatic'
10539238106Sdes	;;
10540238106Sdes      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10541238106Sdes        # Portland Group compilers (*not* the Pentium gcc compiler,
10542238106Sdes	# which looks to be a dead project)
10543238106Sdes	lt_prog_compiler_wl='-Wl,'
10544238106Sdes	lt_prog_compiler_pic='-fpic'
10545238106Sdes	lt_prog_compiler_static='-Bstatic'
10546238106Sdes        ;;
10547238106Sdes      ccc*)
10548238106Sdes        lt_prog_compiler_wl='-Wl,'
10549238106Sdes        # All Alpha code is PIC.
10550238106Sdes        lt_prog_compiler_static='-non_shared'
10551238106Sdes        ;;
10552238106Sdes      xl* | bgxl* | bgf* | mpixl*)
10553238106Sdes	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10554238106Sdes	lt_prog_compiler_wl='-Wl,'
10555238106Sdes	lt_prog_compiler_pic='-qpic'
10556238106Sdes	lt_prog_compiler_static='-qstaticlink'
10557238106Sdes	;;
10558238106Sdes      *)
10559238106Sdes	case `$CC -V 2>&1 | sed 5q` in
10560249141Sdes	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10561238106Sdes	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
10562238106Sdes	  lt_prog_compiler_pic='-KPIC'
10563238106Sdes	  lt_prog_compiler_static='-Bstatic'
10564238106Sdes	  lt_prog_compiler_wl=''
10565238106Sdes	  ;;
10566249141Sdes	*Sun\ F* | *Sun*Fortran*)
10567249141Sdes	  lt_prog_compiler_pic='-KPIC'
10568249141Sdes	  lt_prog_compiler_static='-Bstatic'
10569249141Sdes	  lt_prog_compiler_wl='-Qoption ld '
10570249141Sdes	  ;;
10571238106Sdes	*Sun\ C*)
10572238106Sdes	  # Sun C 5.9
10573238106Sdes	  lt_prog_compiler_pic='-KPIC'
10574238106Sdes	  lt_prog_compiler_static='-Bstatic'
10575238106Sdes	  lt_prog_compiler_wl='-Wl,'
10576238106Sdes	  ;;
10577249141Sdes        *Intel*\ [CF]*Compiler*)
10578249141Sdes	  lt_prog_compiler_wl='-Wl,'
10579249141Sdes	  lt_prog_compiler_pic='-fPIC'
10580249141Sdes	  lt_prog_compiler_static='-static'
10581249141Sdes	  ;;
10582249141Sdes	*Portland\ Group*)
10583249141Sdes	  lt_prog_compiler_wl='-Wl,'
10584249141Sdes	  lt_prog_compiler_pic='-fpic'
10585249141Sdes	  lt_prog_compiler_static='-Bstatic'
10586249141Sdes	  ;;
10587238106Sdes	esac
10588238106Sdes	;;
10589238106Sdes      esac
10590238106Sdes      ;;
10591238106Sdes
10592238106Sdes    newsos6)
10593238106Sdes      lt_prog_compiler_pic='-KPIC'
10594238106Sdes      lt_prog_compiler_static='-Bstatic'
10595238106Sdes      ;;
10596238106Sdes
10597238106Sdes    *nto* | *qnx*)
10598238106Sdes      # QNX uses GNU C++, but need to define -shared option too, otherwise
10599238106Sdes      # it will coredump.
10600238106Sdes      lt_prog_compiler_pic='-fPIC -shared'
10601238106Sdes      ;;
10602238106Sdes
10603238106Sdes    osf3* | osf4* | osf5*)
10604238106Sdes      lt_prog_compiler_wl='-Wl,'
10605238106Sdes      # All OSF/1 code is PIC.
10606238106Sdes      lt_prog_compiler_static='-non_shared'
10607238106Sdes      ;;
10608238106Sdes
10609238106Sdes    rdos*)
10610238106Sdes      lt_prog_compiler_static='-non_shared'
10611238106Sdes      ;;
10612238106Sdes
10613238106Sdes    solaris*)
10614238106Sdes      lt_prog_compiler_pic='-KPIC'
10615238106Sdes      lt_prog_compiler_static='-Bstatic'
10616238106Sdes      case $cc_basename in
10617238106Sdes      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10618238106Sdes	lt_prog_compiler_wl='-Qoption ld ';;
10619238106Sdes      *)
10620238106Sdes	lt_prog_compiler_wl='-Wl,';;
10621238106Sdes      esac
10622238106Sdes      ;;
10623238106Sdes
10624238106Sdes    sunos4*)
10625238106Sdes      lt_prog_compiler_wl='-Qoption ld '
10626238106Sdes      lt_prog_compiler_pic='-PIC'
10627238106Sdes      lt_prog_compiler_static='-Bstatic'
10628238106Sdes      ;;
10629238106Sdes
10630238106Sdes    sysv4 | sysv4.2uw2* | sysv4.3*)
10631238106Sdes      lt_prog_compiler_wl='-Wl,'
10632238106Sdes      lt_prog_compiler_pic='-KPIC'
10633238106Sdes      lt_prog_compiler_static='-Bstatic'
10634238106Sdes      ;;
10635238106Sdes
10636238106Sdes    sysv4*MP*)
10637238106Sdes      if test -d /usr/nec ;then
10638238106Sdes	lt_prog_compiler_pic='-Kconform_pic'
10639238106Sdes	lt_prog_compiler_static='-Bstatic'
10640238106Sdes      fi
10641238106Sdes      ;;
10642238106Sdes
10643238106Sdes    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10644238106Sdes      lt_prog_compiler_wl='-Wl,'
10645238106Sdes      lt_prog_compiler_pic='-KPIC'
10646238106Sdes      lt_prog_compiler_static='-Bstatic'
10647238106Sdes      ;;
10648238106Sdes
10649238106Sdes    unicos*)
10650238106Sdes      lt_prog_compiler_wl='-Wl,'
10651238106Sdes      lt_prog_compiler_can_build_shared=no
10652238106Sdes      ;;
10653238106Sdes
10654238106Sdes    uts4*)
10655238106Sdes      lt_prog_compiler_pic='-pic'
10656238106Sdes      lt_prog_compiler_static='-Bstatic'
10657238106Sdes      ;;
10658238106Sdes
10659238106Sdes    *)
10660238106Sdes      lt_prog_compiler_can_build_shared=no
10661238106Sdes      ;;
10662238106Sdes    esac
10663238106Sdes  fi
10664238106Sdes
10665238106Sdescase $host_os in
10666238106Sdes  # For platforms which do not support PIC, -DPIC is meaningless:
10667238106Sdes  *djgpp*)
10668238106Sdes    lt_prog_compiler_pic=
10669238106Sdes    ;;
10670238106Sdes  *)
10671238106Sdes    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10672238106Sdes    ;;
10673238106Sdesesac
10674238106Sdes
10675238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10676238106Sdes$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
10677238106Sdesif ${lt_cv_prog_compiler_pic+:} false; then :
10678238106Sdes  $as_echo_n "(cached) " >&6
10679238106Sdeselse
10680238106Sdes  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10681238106Sdesfi
10682238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10683238106Sdes$as_echo "$lt_cv_prog_compiler_pic" >&6; }
10684238106Sdeslt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10685238106Sdes
10686238106Sdes#
10687238106Sdes# Check to make sure the PIC flag actually works.
10688238106Sdes#
10689238106Sdesif test -n "$lt_prog_compiler_pic"; then
10690238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10691238106Sdes$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10692238106Sdesif ${lt_cv_prog_compiler_pic_works+:} false; then :
10693238106Sdes  $as_echo_n "(cached) " >&6
10694238106Sdeselse
10695238106Sdes  lt_cv_prog_compiler_pic_works=no
10696238106Sdes   ac_outfile=conftest.$ac_objext
10697238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10698238106Sdes   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
10699238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
10700238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
10701238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
10702238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
10703238106Sdes   # The option is referenced via a variable to avoid confusing sed.
10704238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
10705238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10706238106Sdes   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10707238106Sdes   -e 's:$: $lt_compiler_flag:'`
10708238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10709238106Sdes   (eval "$lt_compile" 2>conftest.err)
10710238106Sdes   ac_status=$?
10711238106Sdes   cat conftest.err >&5
10712238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10713238106Sdes   if (exit $ac_status) && test -s "$ac_outfile"; then
10714238106Sdes     # The compiler can only warn and ignore the option if not recognized
10715238106Sdes     # So say no if there are warnings other than the usual output.
10716238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10717238106Sdes     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10718238106Sdes     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10719238106Sdes       lt_cv_prog_compiler_pic_works=yes
10720238106Sdes     fi
10721238106Sdes   fi
10722238106Sdes   $RM conftest*
10723238106Sdes
10724238106Sdesfi
10725238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10726238106Sdes$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
10727238106Sdes
10728238106Sdesif test x"$lt_cv_prog_compiler_pic_works" = xyes; then
10729238106Sdes    case $lt_prog_compiler_pic in
10730238106Sdes     "" | " "*) ;;
10731238106Sdes     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
10732238106Sdes     esac
10733238106Sdeselse
10734238106Sdes    lt_prog_compiler_pic=
10735238106Sdes     lt_prog_compiler_can_build_shared=no
10736238106Sdesfi
10737238106Sdes
10738238106Sdesfi
10739238106Sdes
10740238106Sdes
10741238106Sdes
10742238106Sdes
10743238106Sdes
10744238106Sdes
10745238106Sdes
10746238106Sdes
10747238106Sdes
10748238106Sdes
10749238106Sdes
10750238106Sdes#
10751238106Sdes# Check to make sure the static flag actually works.
10752238106Sdes#
10753238106Sdeswl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
10754238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
10755238106Sdes$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
10756238106Sdesif ${lt_cv_prog_compiler_static_works+:} false; then :
10757238106Sdes  $as_echo_n "(cached) " >&6
10758238106Sdeselse
10759238106Sdes  lt_cv_prog_compiler_static_works=no
10760238106Sdes   save_LDFLAGS="$LDFLAGS"
10761238106Sdes   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
10762238106Sdes   echo "$lt_simple_link_test_code" > conftest.$ac_ext
10763238106Sdes   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10764238106Sdes     # The linker can only warn and ignore the option if not recognized
10765238106Sdes     # So say no if there are warnings
10766238106Sdes     if test -s conftest.err; then
10767238106Sdes       # Append any errors to the config.log.
10768238106Sdes       cat conftest.err 1>&5
10769238106Sdes       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10770238106Sdes       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10771238106Sdes       if diff conftest.exp conftest.er2 >/dev/null; then
10772238106Sdes         lt_cv_prog_compiler_static_works=yes
10773238106Sdes       fi
10774238106Sdes     else
10775238106Sdes       lt_cv_prog_compiler_static_works=yes
10776238106Sdes     fi
10777238106Sdes   fi
10778238106Sdes   $RM -r conftest*
10779238106Sdes   LDFLAGS="$save_LDFLAGS"
10780238106Sdes
10781238106Sdesfi
10782238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
10783238106Sdes$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
10784238106Sdes
10785238106Sdesif test x"$lt_cv_prog_compiler_static_works" = xyes; then
10786238106Sdes    :
10787238106Sdeselse
10788238106Sdes    lt_prog_compiler_static=
10789238106Sdesfi
10790238106Sdes
10791238106Sdes
10792238106Sdes
10793238106Sdes
10794238106Sdes
10795238106Sdes
10796238106Sdes
10797238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10798238106Sdes$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10799238106Sdesif ${lt_cv_prog_compiler_c_o+:} false; then :
10800238106Sdes  $as_echo_n "(cached) " >&6
10801238106Sdeselse
10802238106Sdes  lt_cv_prog_compiler_c_o=no
10803238106Sdes   $RM -r conftest 2>/dev/null
10804238106Sdes   mkdir conftest
10805238106Sdes   cd conftest
10806238106Sdes   mkdir out
10807238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10808238106Sdes
10809238106Sdes   lt_compiler_flag="-o out/conftest2.$ac_objext"
10810238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
10811238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
10812238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
10813238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
10814238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
10815238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10816238106Sdes   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10817238106Sdes   -e 's:$: $lt_compiler_flag:'`
10818238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10819238106Sdes   (eval "$lt_compile" 2>out/conftest.err)
10820238106Sdes   ac_status=$?
10821238106Sdes   cat out/conftest.err >&5
10822238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823238106Sdes   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10824238106Sdes   then
10825238106Sdes     # The compiler can only warn and ignore the option if not recognized
10826238106Sdes     # So say no if there are warnings
10827238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10828238106Sdes     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10829238106Sdes     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10830238106Sdes       lt_cv_prog_compiler_c_o=yes
10831238106Sdes     fi
10832238106Sdes   fi
10833238106Sdes   chmod u+w . 2>&5
10834238106Sdes   $RM conftest*
10835238106Sdes   # SGI C++ compiler will create directory out/ii_files/ for
10836238106Sdes   # template instantiation
10837238106Sdes   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10838238106Sdes   $RM out/* && rmdir out
10839238106Sdes   cd ..
10840238106Sdes   $RM -r conftest
10841238106Sdes   $RM conftest*
10842238106Sdes
10843238106Sdesfi
10844238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10845238106Sdes$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10846238106Sdes
10847238106Sdes
10848238106Sdes
10849238106Sdes
10850238106Sdes
10851238106Sdes
10852238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10853238106Sdes$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10854238106Sdesif ${lt_cv_prog_compiler_c_o+:} false; then :
10855238106Sdes  $as_echo_n "(cached) " >&6
10856238106Sdeselse
10857238106Sdes  lt_cv_prog_compiler_c_o=no
10858238106Sdes   $RM -r conftest 2>/dev/null
10859238106Sdes   mkdir conftest
10860238106Sdes   cd conftest
10861238106Sdes   mkdir out
10862238106Sdes   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10863238106Sdes
10864238106Sdes   lt_compiler_flag="-o out/conftest2.$ac_objext"
10865238106Sdes   # Insert the option either (1) after the last *FLAGS variable, or
10866238106Sdes   # (2) before a word containing "conftest.", or (3) at the end.
10867238106Sdes   # Note that $ac_compile itself does not contain backslashes and begins
10868238106Sdes   # with a dollar sign (not a hyphen), so the echo should work correctly.
10869238106Sdes   lt_compile=`echo "$ac_compile" | $SED \
10870238106Sdes   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10871238106Sdes   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10872238106Sdes   -e 's:$: $lt_compiler_flag:'`
10873238106Sdes   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10874238106Sdes   (eval "$lt_compile" 2>out/conftest.err)
10875238106Sdes   ac_status=$?
10876238106Sdes   cat out/conftest.err >&5
10877238106Sdes   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10878238106Sdes   if (exit $ac_status) && test -s out/conftest2.$ac_objext
10879238106Sdes   then
10880238106Sdes     # The compiler can only warn and ignore the option if not recognized
10881238106Sdes     # So say no if there are warnings
10882238106Sdes     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10883238106Sdes     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10884238106Sdes     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10885238106Sdes       lt_cv_prog_compiler_c_o=yes
10886238106Sdes     fi
10887238106Sdes   fi
10888238106Sdes   chmod u+w . 2>&5
10889238106Sdes   $RM conftest*
10890238106Sdes   # SGI C++ compiler will create directory out/ii_files/ for
10891238106Sdes   # template instantiation
10892238106Sdes   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10893238106Sdes   $RM out/* && rmdir out
10894238106Sdes   cd ..
10895238106Sdes   $RM -r conftest
10896238106Sdes   $RM conftest*
10897238106Sdes
10898238106Sdesfi
10899238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10900238106Sdes$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
10901238106Sdes
10902238106Sdes
10903238106Sdes
10904238106Sdes
10905238106Sdeshard_links="nottested"
10906238106Sdesif test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
10907238106Sdes  # do not overwrite the value of need_locks provided by the user
10908238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
10909238106Sdes$as_echo_n "checking if we can lock with hard links... " >&6; }
10910238106Sdes  hard_links=yes
10911238106Sdes  $RM conftest*
10912238106Sdes  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10913238106Sdes  touch conftest.a
10914238106Sdes  ln conftest.a conftest.b 2>&5 || hard_links=no
10915238106Sdes  ln conftest.a conftest.b 2>/dev/null && hard_links=no
10916238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
10917238106Sdes$as_echo "$hard_links" >&6; }
10918238106Sdes  if test "$hard_links" = no; then
10919238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
10920238106Sdes$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
10921238106Sdes    need_locks=warn
10922238106Sdes  fi
10923238106Sdeselse
10924238106Sdes  need_locks=no
10925238106Sdesfi
10926238106Sdes
10927238106Sdes
10928238106Sdes
10929238106Sdes
10930238106Sdes
10931238106Sdes
10932238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10933238106Sdes$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10934238106Sdes
10935238106Sdes  runpath_var=
10936238106Sdes  allow_undefined_flag=
10937238106Sdes  always_export_symbols=no
10938238106Sdes  archive_cmds=
10939238106Sdes  archive_expsym_cmds=
10940238106Sdes  compiler_needs_object=no
10941238106Sdes  enable_shared_with_static_runtimes=no
10942238106Sdes  export_dynamic_flag_spec=
10943238106Sdes  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10944238106Sdes  hardcode_automatic=no
10945238106Sdes  hardcode_direct=no
10946238106Sdes  hardcode_direct_absolute=no
10947238106Sdes  hardcode_libdir_flag_spec=
10948238106Sdes  hardcode_libdir_separator=
10949238106Sdes  hardcode_minus_L=no
10950238106Sdes  hardcode_shlibpath_var=unsupported
10951238106Sdes  inherit_rpath=no
10952238106Sdes  link_all_deplibs=unknown
10953238106Sdes  module_cmds=
10954238106Sdes  module_expsym_cmds=
10955238106Sdes  old_archive_from_new_cmds=
10956238106Sdes  old_archive_from_expsyms_cmds=
10957238106Sdes  thread_safe_flag_spec=
10958238106Sdes  whole_archive_flag_spec=
10959238106Sdes  # include_expsyms should be a list of space-separated symbols to be *always*
10960238106Sdes  # included in the symbol list
10961238106Sdes  include_expsyms=
10962238106Sdes  # exclude_expsyms can be an extended regexp of symbols to exclude
10963238106Sdes  # it will be wrapped by ` (' and `)$', so one must not match beginning or
10964238106Sdes  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10965238106Sdes  # as well as any symbol that contains `d'.
10966238106Sdes  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10967238106Sdes  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10968238106Sdes  # platforms (ab)use it in PIC code, but their linkers get confused if
10969238106Sdes  # the symbol is explicitly referenced.  Since portable code cannot
10970238106Sdes  # rely on this symbol name, it's probably fine to never include it in
10971238106Sdes  # preloaded symbol tables.
10972238106Sdes  # Exclude shared library initialization/finalization symbols.
10973238106Sdes  extract_expsyms_cmds=
10974238106Sdes
10975238106Sdes  case $host_os in
10976238106Sdes  cygwin* | mingw* | pw32* | cegcc*)
10977238106Sdes    # FIXME: the MSVC++ port hasn't been tested in a loooong time
10978238106Sdes    # When not using gcc, we currently assume that we are using
10979238106Sdes    # Microsoft Visual C++.
10980238106Sdes    if test "$GCC" != yes; then
10981238106Sdes      with_gnu_ld=no
10982238106Sdes    fi
10983238106Sdes    ;;
10984238106Sdes  interix*)
10985238106Sdes    # we just hope/assume this is gcc and not c89 (= MSVC++)
10986238106Sdes    with_gnu_ld=yes
10987238106Sdes    ;;
10988238106Sdes  openbsd*)
10989238106Sdes    with_gnu_ld=no
10990238106Sdes    ;;
10991238106Sdes  esac
10992238106Sdes
10993238106Sdes  ld_shlibs=yes
10994238106Sdes
10995238106Sdes  # On some targets, GNU ld is compatible enough with the native linker
10996238106Sdes  # that we're better off using the native interface for both.
10997238106Sdes  lt_use_gnu_ld_interface=no
10998238106Sdes  if test "$with_gnu_ld" = yes; then
10999238106Sdes    case $host_os in
11000238106Sdes      aix*)
11001238106Sdes	# The AIX port of GNU ld has always aspired to compatibility
11002238106Sdes	# with the native linker.  However, as the warning in the GNU ld
11003238106Sdes	# block says, versions before 2.19.5* couldn't really create working
11004238106Sdes	# shared libraries, regardless of the interface used.
11005238106Sdes	case `$LD -v 2>&1` in
11006238106Sdes	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11007238106Sdes	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11008238106Sdes	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11009238106Sdes	  *)
11010238106Sdes	    lt_use_gnu_ld_interface=yes
11011238106Sdes	    ;;
11012238106Sdes	esac
11013238106Sdes	;;
11014238106Sdes      *)
11015238106Sdes	lt_use_gnu_ld_interface=yes
11016238106Sdes	;;
11017238106Sdes    esac
11018238106Sdes  fi
11019238106Sdes
11020238106Sdes  if test "$lt_use_gnu_ld_interface" = yes; then
11021238106Sdes    # If archive_cmds runs LD, not CC, wlarc should be empty
11022238106Sdes    wlarc='${wl}'
11023238106Sdes
11024238106Sdes    # Set some defaults for GNU ld with shared library support. These
11025238106Sdes    # are reset later if shared libraries are not supported. Putting them
11026238106Sdes    # here allows them to be overridden if necessary.
11027238106Sdes    runpath_var=LD_RUN_PATH
11028238106Sdes    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11029238106Sdes    export_dynamic_flag_spec='${wl}--export-dynamic'
11030238106Sdes    # ancient GNU ld didn't support --whole-archive et. al.
11031238106Sdes    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11032238106Sdes      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11033238106Sdes    else
11034238106Sdes      whole_archive_flag_spec=
11035238106Sdes    fi
11036238106Sdes    supports_anon_versioning=no
11037238106Sdes    case `$LD -v 2>&1` in
11038238106Sdes      *GNU\ gold*) supports_anon_versioning=yes ;;
11039238106Sdes      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11040238106Sdes      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11041238106Sdes      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11042238106Sdes      *\ 2.11.*) ;; # other 2.11 versions
11043238106Sdes      *) supports_anon_versioning=yes ;;
11044238106Sdes    esac
11045238106Sdes
11046238106Sdes    # See if GNU ld supports shared libraries.
11047238106Sdes    case $host_os in
11048238106Sdes    aix[3-9]*)
11049238106Sdes      # On AIX/PPC, the GNU linker is very broken
11050238106Sdes      if test "$host_cpu" != ia64; then
11051238106Sdes	ld_shlibs=no
11052238106Sdes	cat <<_LT_EOF 1>&2
11053238106Sdes
11054238106Sdes*** Warning: the GNU linker, at least up to release 2.19, is reported
11055238106Sdes*** to be unable to reliably create shared libraries on AIX.
11056238106Sdes*** Therefore, libtool is disabling shared libraries support.  If you
11057238106Sdes*** really care for shared libraries, you may want to install binutils
11058238106Sdes*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11059238106Sdes*** You will then need to restart the configuration process.
11060238106Sdes
11061238106Sdes_LT_EOF
11062238106Sdes      fi
11063238106Sdes      ;;
11064238106Sdes
11065238106Sdes    amigaos*)
11066238106Sdes      case $host_cpu in
11067238106Sdes      powerpc)
11068238106Sdes            # see comment about AmigaOS4 .so support
11069238106Sdes            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11070238106Sdes            archive_expsym_cmds=''
11071238106Sdes        ;;
11072238106Sdes      m68k)
11073238106Sdes            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)'
11074238106Sdes            hardcode_libdir_flag_spec='-L$libdir'
11075238106Sdes            hardcode_minus_L=yes
11076238106Sdes        ;;
11077238106Sdes      esac
11078238106Sdes      ;;
11079238106Sdes
11080238106Sdes    beos*)
11081238106Sdes      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11082238106Sdes	allow_undefined_flag=unsupported
11083238106Sdes	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11084238106Sdes	# support --undefined.  This deserves some investigation.  FIXME
11085238106Sdes	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11086238106Sdes      else
11087238106Sdes	ld_shlibs=no
11088238106Sdes      fi
11089238106Sdes      ;;
11090238106Sdes
11091238106Sdes    cygwin* | mingw* | pw32* | cegcc*)
11092238106Sdes      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11093238106Sdes      # as there is no search path for DLLs.
11094238106Sdes      hardcode_libdir_flag_spec='-L$libdir'
11095238106Sdes      export_dynamic_flag_spec='${wl}--export-all-symbols'
11096238106Sdes      allow_undefined_flag=unsupported
11097238106Sdes      always_export_symbols=no
11098238106Sdes      enable_shared_with_static_runtimes=yes
11099238106Sdes      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'
11100238106Sdes      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11101238106Sdes
11102238106Sdes      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11103238106Sdes        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11104238106Sdes	# If the export-symbols file already is a .def file (1st line
11105238106Sdes	# is EXPORTS), use it as is; otherwise, prepend...
11106238106Sdes	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11107238106Sdes	  cp $export_symbols $output_objdir/$soname.def;
11108238106Sdes	else
11109238106Sdes	  echo EXPORTS > $output_objdir/$soname.def;
11110238106Sdes	  cat $export_symbols >> $output_objdir/$soname.def;
11111238106Sdes	fi~
11112238106Sdes	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11113238106Sdes      else
11114238106Sdes	ld_shlibs=no
11115238106Sdes      fi
11116238106Sdes      ;;
11117238106Sdes
11118238106Sdes    haiku*)
11119238106Sdes      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11120238106Sdes      link_all_deplibs=yes
11121238106Sdes      ;;
11122238106Sdes
11123238106Sdes    interix[3-9]*)
11124238106Sdes      hardcode_direct=no
11125238106Sdes      hardcode_shlibpath_var=no
11126238106Sdes      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11127238106Sdes      export_dynamic_flag_spec='${wl}-E'
11128238106Sdes      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11129238106Sdes      # Instead, shared libraries are loaded at an image base (0x10000000 by
11130238106Sdes      # default) and relocated if they conflict, which is a slow very memory
11131238106Sdes      # consuming and fragmenting process.  To avoid this, we pick a random,
11132238106Sdes      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11133238106Sdes      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11134238106Sdes      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11135238106Sdes      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'
11136238106Sdes      ;;
11137238106Sdes
11138238106Sdes    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11139238106Sdes      tmp_diet=no
11140238106Sdes      if test "$host_os" = linux-dietlibc; then
11141238106Sdes	case $cc_basename in
11142238106Sdes	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11143238106Sdes	esac
11144238106Sdes      fi
11145238106Sdes      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11146238106Sdes	 && test "$tmp_diet" = no
11147238106Sdes      then
11148238106Sdes	tmp_addflag=' $pic_flag'
11149238106Sdes	tmp_sharedflag='-shared'
11150238106Sdes	case $cc_basename,$host_cpu in
11151238106Sdes        pgcc*)				# Portland Group C compiler
11152238106Sdes	  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'
11153238106Sdes	  tmp_addflag=' $pic_flag'
11154238106Sdes	  ;;
11155238106Sdes	pgf77* | pgf90* | pgf95* | pgfortran*)
11156238106Sdes					# Portland Group f77 and f90 compilers
11157238106Sdes	  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'
11158238106Sdes	  tmp_addflag=' $pic_flag -Mnomain' ;;
11159238106Sdes	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11160238106Sdes	  tmp_addflag=' -i_dynamic' ;;
11161238106Sdes	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11162238106Sdes	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11163238106Sdes	ifc* | ifort*)			# Intel Fortran compiler
11164238106Sdes	  tmp_addflag=' -nofor_main' ;;
11165238106Sdes	lf95*)				# Lahey Fortran 8.1
11166238106Sdes	  whole_archive_flag_spec=
11167238106Sdes	  tmp_sharedflag='--shared' ;;
11168238106Sdes	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11169238106Sdes	  tmp_sharedflag='-qmkshrobj'
11170238106Sdes	  tmp_addflag= ;;
11171238106Sdes	nvcc*)	# Cuda Compiler Driver 2.2
11172238106Sdes	  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'
11173238106Sdes	  compiler_needs_object=yes
11174238106Sdes	  ;;
11175238106Sdes	esac
11176238106Sdes	case `$CC -V 2>&1 | sed 5q` in
11177238106Sdes	*Sun\ C*)			# Sun C 5.9
11178238106Sdes	  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'
11179238106Sdes	  compiler_needs_object=yes
11180238106Sdes	  tmp_sharedflag='-G' ;;
11181238106Sdes	*Sun\ F*)			# Sun Fortran 8.3
11182238106Sdes	  tmp_sharedflag='-G' ;;
11183238106Sdes	esac
11184238106Sdes	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11185238106Sdes
11186238106Sdes        if test "x$supports_anon_versioning" = xyes; then
11187238106Sdes          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11188238106Sdes	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11189238106Sdes	    echo "local: *; };" >> $output_objdir/$libname.ver~
11190238106Sdes	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11191238106Sdes        fi
11192238106Sdes
11193238106Sdes	case $cc_basename in
11194238106Sdes	xlf* | bgf* | bgxlf* | mpixlf*)
11195238106Sdes	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11196238106Sdes	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11197249141Sdes	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11198238106Sdes	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11199238106Sdes	  if test "x$supports_anon_versioning" = xyes; then
11200238106Sdes	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11201238106Sdes	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11202238106Sdes	      echo "local: *; };" >> $output_objdir/$libname.ver~
11203238106Sdes	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11204238106Sdes	  fi
11205238106Sdes	  ;;
11206238106Sdes	esac
11207238106Sdes      else
11208238106Sdes        ld_shlibs=no
11209238106Sdes      fi
11210238106Sdes      ;;
11211238106Sdes
11212238106Sdes    netbsd*)
11213238106Sdes      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11214238106Sdes	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11215238106Sdes	wlarc=
11216238106Sdes      else
11217238106Sdes	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11218238106Sdes	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11219238106Sdes      fi
11220238106Sdes      ;;
11221238106Sdes
11222238106Sdes    solaris*)
11223238106Sdes      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11224238106Sdes	ld_shlibs=no
11225238106Sdes	cat <<_LT_EOF 1>&2
11226238106Sdes
11227238106Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11228238106Sdes*** create shared libraries on Solaris systems.  Therefore, libtool
11229238106Sdes*** is disabling shared libraries support.  We urge you to upgrade GNU
11230238106Sdes*** binutils to release 2.9.1 or newer.  Another option is to modify
11231238106Sdes*** your PATH or compiler configuration so that the native linker is
11232238106Sdes*** used, and then restart.
11233238106Sdes
11234238106Sdes_LT_EOF
11235238106Sdes      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11236238106Sdes	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11237238106Sdes	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11238238106Sdes      else
11239238106Sdes	ld_shlibs=no
11240238106Sdes      fi
11241238106Sdes      ;;
11242238106Sdes
11243238106Sdes    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11244238106Sdes      case `$LD -v 2>&1` in
11245238106Sdes        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11246238106Sdes	ld_shlibs=no
11247238106Sdes	cat <<_LT_EOF 1>&2
11248238106Sdes
11249238106Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11250238106Sdes*** reliably create shared libraries on SCO systems.  Therefore, libtool
11251238106Sdes*** is disabling shared libraries support.  We urge you to upgrade GNU
11252238106Sdes*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11253238106Sdes*** your PATH or compiler configuration so that the native linker is
11254238106Sdes*** used, and then restart.
11255238106Sdes
11256238106Sdes_LT_EOF
11257238106Sdes	;;
11258238106Sdes	*)
11259238106Sdes	  # For security reasons, it is highly recommended that you always
11260238106Sdes	  # use absolute paths for naming shared libraries, and exclude the
11261238106Sdes	  # DT_RUNPATH tag from executables and libraries.  But doing so
11262238106Sdes	  # requires that you compile everything twice, which is a pain.
11263238106Sdes	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11264238106Sdes	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11265238106Sdes	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11266238106Sdes	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11267238106Sdes	  else
11268238106Sdes	    ld_shlibs=no
11269238106Sdes	  fi
11270238106Sdes	;;
11271238106Sdes      esac
11272238106Sdes      ;;
11273238106Sdes
11274238106Sdes    sunos4*)
11275238106Sdes      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11276238106Sdes      wlarc=
11277238106Sdes      hardcode_direct=yes
11278238106Sdes      hardcode_shlibpath_var=no
11279238106Sdes      ;;
11280238106Sdes
11281238106Sdes    *)
11282238106Sdes      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11283238106Sdes	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11284238106Sdes	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11285238106Sdes      else
11286238106Sdes	ld_shlibs=no
11287238106Sdes      fi
11288238106Sdes      ;;
11289238106Sdes    esac
11290238106Sdes
11291238106Sdes    if test "$ld_shlibs" = no; then
11292238106Sdes      runpath_var=
11293238106Sdes      hardcode_libdir_flag_spec=
11294238106Sdes      export_dynamic_flag_spec=
11295238106Sdes      whole_archive_flag_spec=
11296238106Sdes    fi
11297238106Sdes  else
11298238106Sdes    # PORTME fill in a description of your system's linker (not GNU ld)
11299238106Sdes    case $host_os in
11300238106Sdes    aix3*)
11301238106Sdes      allow_undefined_flag=unsupported
11302238106Sdes      always_export_symbols=yes
11303238106Sdes      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'
11304238106Sdes      # Note: this linker hardcodes the directories in LIBPATH if there
11305238106Sdes      # are no directories specified by -L.
11306238106Sdes      hardcode_minus_L=yes
11307238106Sdes      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11308238106Sdes	# Neither direct hardcoding nor static linking is supported with a
11309238106Sdes	# broken collect2.
11310238106Sdes	hardcode_direct=unsupported
11311238106Sdes      fi
11312238106Sdes      ;;
11313238106Sdes
11314238106Sdes    aix[4-9]*)
11315238106Sdes      if test "$host_cpu" = ia64; then
11316238106Sdes	# On IA64, the linker does run time linking by default, so we don't
11317238106Sdes	# have to do anything special.
11318238106Sdes	aix_use_runtimelinking=no
11319238106Sdes	exp_sym_flag='-Bexport'
11320238106Sdes	no_entry_flag=""
11321238106Sdes      else
11322238106Sdes	# If we're using GNU nm, then we don't want the "-C" option.
11323238106Sdes	# -C means demangle to AIX nm, but means don't demangle with GNU nm
11324238106Sdes	# Also, AIX nm treats weak defined symbols like other global
11325238106Sdes	# defined symbols, whereas GNU nm marks them as "W".
11326238106Sdes	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11327238106Sdes	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11328238106Sdes	else
11329238106Sdes	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11330238106Sdes	fi
11331238106Sdes	aix_use_runtimelinking=no
11332238106Sdes
11333238106Sdes	# Test if we are trying to use run time linking or normal
11334238106Sdes	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11335238106Sdes	# need to do runtime linking.
11336238106Sdes	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11337238106Sdes	  for ld_flag in $LDFLAGS; do
11338238106Sdes	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11339238106Sdes	    aix_use_runtimelinking=yes
11340238106Sdes	    break
11341238106Sdes	  fi
11342238106Sdes	  done
11343238106Sdes	  ;;
11344238106Sdes	esac
11345238106Sdes
11346238106Sdes	exp_sym_flag='-bexport'
11347238106Sdes	no_entry_flag='-bnoentry'
11348238106Sdes      fi
11349238106Sdes
11350238106Sdes      # When large executables or shared objects are built, AIX ld can
11351238106Sdes      # have problems creating the table of contents.  If linking a library
11352238106Sdes      # or program results in "error TOC overflow" add -mminimal-toc to
11353238106Sdes      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11354238106Sdes      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11355238106Sdes
11356238106Sdes      archive_cmds=''
11357238106Sdes      hardcode_direct=yes
11358238106Sdes      hardcode_direct_absolute=yes
11359238106Sdes      hardcode_libdir_separator=':'
11360238106Sdes      link_all_deplibs=yes
11361238106Sdes      file_list_spec='${wl}-f,'
11362238106Sdes
11363238106Sdes      if test "$GCC" = yes; then
11364238106Sdes	case $host_os in aix4.[012]|aix4.[012].*)
11365238106Sdes	# We only want to do this on AIX 4.2 and lower, the check
11366238106Sdes	# below for broken collect2 doesn't work under 4.3+
11367238106Sdes	  collect2name=`${CC} -print-prog-name=collect2`
11368238106Sdes	  if test -f "$collect2name" &&
11369238106Sdes	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11370238106Sdes	  then
11371238106Sdes	  # We have reworked collect2
11372238106Sdes	  :
11373238106Sdes	  else
11374238106Sdes	  # We have old collect2
11375238106Sdes	  hardcode_direct=unsupported
11376238106Sdes	  # It fails to find uninstalled libraries when the uninstalled
11377238106Sdes	  # path is not listed in the libpath.  Setting hardcode_minus_L
11378238106Sdes	  # to unsupported forces relinking
11379238106Sdes	  hardcode_minus_L=yes
11380238106Sdes	  hardcode_libdir_flag_spec='-L$libdir'
11381238106Sdes	  hardcode_libdir_separator=
11382238106Sdes	  fi
11383238106Sdes	  ;;
11384238106Sdes	esac
11385238106Sdes	shared_flag='-shared'
11386238106Sdes	if test "$aix_use_runtimelinking" = yes; then
11387238106Sdes	  shared_flag="$shared_flag "'${wl}-G'
11388238106Sdes	fi
11389238106Sdes      else
11390238106Sdes	# not using gcc
11391238106Sdes	if test "$host_cpu" = ia64; then
11392238106Sdes	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11393238106Sdes	# chokes on -Wl,-G. The following line is correct:
11394238106Sdes	  shared_flag='-G'
11395238106Sdes	else
11396238106Sdes	  if test "$aix_use_runtimelinking" = yes; then
11397238106Sdes	    shared_flag='${wl}-G'
11398238106Sdes	  else
11399238106Sdes	    shared_flag='${wl}-bM:SRE'
11400238106Sdes	  fi
11401238106Sdes	fi
11402238106Sdes      fi
11403238106Sdes
11404238106Sdes      export_dynamic_flag_spec='${wl}-bexpall'
11405238106Sdes      # It seems that -bexpall does not export symbols beginning with
11406238106Sdes      # underscore (_), so it is better to generate a list of symbols to export.
11407238106Sdes      always_export_symbols=yes
11408238106Sdes      if test "$aix_use_runtimelinking" = yes; then
11409238106Sdes	# Warning - without using the other runtime loading flags (-brtl),
11410238106Sdes	# -berok will link without error, but may produce a broken library.
11411238106Sdes	allow_undefined_flag='-berok'
11412238106Sdes        # Determine the default libpath from the value encoded in an
11413238106Sdes        # empty executable.
11414238106Sdes        if test "${lt_cv_aix_libpath+set}" = set; then
11415238106Sdes  aix_libpath=$lt_cv_aix_libpath
11416238106Sdeselse
11417238106Sdes  if ${lt_cv_aix_libpath_+:} false; then :
11418238106Sdes  $as_echo_n "(cached) " >&6
11419238106Sdeselse
11420238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421238106Sdes/* end confdefs.h.  */
11422238106Sdes
11423238106Sdesint
11424238106Sdesmain ()
11425238106Sdes{
11426238106Sdes
11427238106Sdes  ;
11428238106Sdes  return 0;
11429238106Sdes}
11430238106Sdes_ACEOF
11431238106Sdesif ac_fn_c_try_link "$LINENO"; then :
11432238106Sdes
11433238106Sdes  lt_aix_libpath_sed='
11434238106Sdes      /Import File Strings/,/^$/ {
11435238106Sdes	  /^0/ {
11436238106Sdes	      s/^0  *\([^ ]*\) *$/\1/
11437238106Sdes	      p
11438238106Sdes	  }
11439238106Sdes      }'
11440238106Sdes  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11441238106Sdes  # Check for a 64-bit object if we didn't find anything.
11442238106Sdes  if test -z "$lt_cv_aix_libpath_"; then
11443238106Sdes    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11444238106Sdes  fi
11445238106Sdesfi
11446238106Sdesrm -f core conftest.err conftest.$ac_objext \
11447238106Sdes    conftest$ac_exeext conftest.$ac_ext
11448238106Sdes  if test -z "$lt_cv_aix_libpath_"; then
11449238106Sdes    lt_cv_aix_libpath_="/usr/lib:/lib"
11450238106Sdes  fi
11451238106Sdes
11452238106Sdesfi
11453238106Sdes
11454238106Sdes  aix_libpath=$lt_cv_aix_libpath_
11455238106Sdesfi
11456238106Sdes
11457238106Sdes        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11458238106Sdes        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11459238106Sdes      else
11460238106Sdes	if test "$host_cpu" = ia64; then
11461238106Sdes	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
11462238106Sdes	  allow_undefined_flag="-z nodefs"
11463238106Sdes	  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"
11464238106Sdes	else
11465238106Sdes	 # Determine the default libpath from the value encoded in an
11466238106Sdes	 # empty executable.
11467238106Sdes	 if test "${lt_cv_aix_libpath+set}" = set; then
11468238106Sdes  aix_libpath=$lt_cv_aix_libpath
11469238106Sdeselse
11470238106Sdes  if ${lt_cv_aix_libpath_+:} false; then :
11471238106Sdes  $as_echo_n "(cached) " >&6
11472238106Sdeselse
11473238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474238106Sdes/* end confdefs.h.  */
11475238106Sdes
11476238106Sdesint
11477238106Sdesmain ()
11478238106Sdes{
11479238106Sdes
11480238106Sdes  ;
11481238106Sdes  return 0;
11482238106Sdes}
11483238106Sdes_ACEOF
11484238106Sdesif ac_fn_c_try_link "$LINENO"; then :
11485238106Sdes
11486238106Sdes  lt_aix_libpath_sed='
11487238106Sdes      /Import File Strings/,/^$/ {
11488238106Sdes	  /^0/ {
11489238106Sdes	      s/^0  *\([^ ]*\) *$/\1/
11490238106Sdes	      p
11491238106Sdes	  }
11492238106Sdes      }'
11493238106Sdes  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11494238106Sdes  # Check for a 64-bit object if we didn't find anything.
11495238106Sdes  if test -z "$lt_cv_aix_libpath_"; then
11496238106Sdes    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11497238106Sdes  fi
11498238106Sdesfi
11499238106Sdesrm -f core conftest.err conftest.$ac_objext \
11500238106Sdes    conftest$ac_exeext conftest.$ac_ext
11501238106Sdes  if test -z "$lt_cv_aix_libpath_"; then
11502238106Sdes    lt_cv_aix_libpath_="/usr/lib:/lib"
11503238106Sdes  fi
11504238106Sdes
11505238106Sdesfi
11506238106Sdes
11507238106Sdes  aix_libpath=$lt_cv_aix_libpath_
11508238106Sdesfi
11509238106Sdes
11510238106Sdes	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11511238106Sdes	  # Warning - without using the other run time loading flags,
11512238106Sdes	  # -berok will link without error, but may produce a broken library.
11513238106Sdes	  no_undefined_flag=' ${wl}-bernotok'
11514238106Sdes	  allow_undefined_flag=' ${wl}-berok'
11515238106Sdes	  if test "$with_gnu_ld" = yes; then
11516238106Sdes	    # We only use this code for GNU lds that support --whole-archive.
11517238106Sdes	    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11518238106Sdes	  else
11519238106Sdes	    # Exported symbols can be pulled into shared objects from archives
11520238106Sdes	    whole_archive_flag_spec='$convenience'
11521238106Sdes	  fi
11522238106Sdes	  archive_cmds_need_lc=yes
11523238106Sdes	  # This is similar to how AIX traditionally builds its shared libraries.
11524238106Sdes	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11525238106Sdes	fi
11526238106Sdes      fi
11527238106Sdes      ;;
11528238106Sdes
11529238106Sdes    amigaos*)
11530238106Sdes      case $host_cpu in
11531238106Sdes      powerpc)
11532238106Sdes            # see comment about AmigaOS4 .so support
11533238106Sdes            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11534238106Sdes            archive_expsym_cmds=''
11535238106Sdes        ;;
11536238106Sdes      m68k)
11537238106Sdes            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)'
11538238106Sdes            hardcode_libdir_flag_spec='-L$libdir'
11539238106Sdes            hardcode_minus_L=yes
11540238106Sdes        ;;
11541238106Sdes      esac
11542238106Sdes      ;;
11543238106Sdes
11544238106Sdes    bsdi[45]*)
11545238106Sdes      export_dynamic_flag_spec=-rdynamic
11546238106Sdes      ;;
11547238106Sdes
11548238106Sdes    cygwin* | mingw* | pw32* | cegcc*)
11549238106Sdes      # When not using gcc, we currently assume that we are using
11550238106Sdes      # Microsoft Visual C++.
11551238106Sdes      # hardcode_libdir_flag_spec is actually meaningless, as there is
11552238106Sdes      # no search path for DLLs.
11553238106Sdes      case $cc_basename in
11554238106Sdes      cl*)
11555238106Sdes	# Native MSVC
11556238106Sdes	hardcode_libdir_flag_spec=' '
11557238106Sdes	allow_undefined_flag=unsupported
11558238106Sdes	always_export_symbols=yes
11559238106Sdes	file_list_spec='@'
11560238106Sdes	# Tell ltmain to make .lib files, not .a files.
11561238106Sdes	libext=lib
11562238106Sdes	# Tell ltmain to make .dll files, not .so files.
11563238106Sdes	shrext_cmds=".dll"
11564238106Sdes	# FIXME: Setting linknames here is a bad hack.
11565238106Sdes	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
11566238106Sdes	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11567238106Sdes	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
11568238106Sdes	  else
11569238106Sdes	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
11570238106Sdes	  fi~
11571238106Sdes	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11572238106Sdes	  linknames='
11573238106Sdes	# The linker will not automatically build a static lib if we build a DLL.
11574238106Sdes	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11575238106Sdes	enable_shared_with_static_runtimes=yes
11576249141Sdes	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11577238106Sdes	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11578238106Sdes	# Don't use ranlib
11579238106Sdes	old_postinstall_cmds='chmod 644 $oldlib'
11580238106Sdes	postlink_cmds='lt_outputfile="@OUTPUT@"~
11581238106Sdes	  lt_tool_outputfile="@TOOL_OUTPUT@"~
11582238106Sdes	  case $lt_outputfile in
11583238106Sdes	    *.exe|*.EXE) ;;
11584238106Sdes	    *)
11585238106Sdes	      lt_outputfile="$lt_outputfile.exe"
11586238106Sdes	      lt_tool_outputfile="$lt_tool_outputfile.exe"
11587238106Sdes	      ;;
11588238106Sdes	  esac~
11589238106Sdes	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
11590238106Sdes	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11591238106Sdes	    $RM "$lt_outputfile.manifest";
11592238106Sdes	  fi'
11593238106Sdes	;;
11594238106Sdes      *)
11595238106Sdes	# Assume MSVC wrapper
11596238106Sdes	hardcode_libdir_flag_spec=' '
11597238106Sdes	allow_undefined_flag=unsupported
11598238106Sdes	# Tell ltmain to make .lib files, not .a files.
11599238106Sdes	libext=lib
11600238106Sdes	# Tell ltmain to make .dll files, not .so files.
11601238106Sdes	shrext_cmds=".dll"
11602238106Sdes	# FIXME: Setting linknames here is a bad hack.
11603238106Sdes	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11604238106Sdes	# The linker will automatically build a .lib file if we build a DLL.
11605238106Sdes	old_archive_from_new_cmds='true'
11606238106Sdes	# FIXME: Should let the user specify the lib program.
11607238106Sdes	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11608238106Sdes	enable_shared_with_static_runtimes=yes
11609238106Sdes	;;
11610238106Sdes      esac
11611238106Sdes      ;;
11612238106Sdes
11613238106Sdes    darwin* | rhapsody*)
11614238106Sdes
11615238106Sdes
11616238106Sdes  archive_cmds_need_lc=no
11617238106Sdes  hardcode_direct=no
11618238106Sdes  hardcode_automatic=yes
11619238106Sdes  hardcode_shlibpath_var=unsupported
11620238106Sdes  if test "$lt_cv_ld_force_load" = "yes"; then
11621238106Sdes    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\"`'
11622249141Sdes
11623238106Sdes  else
11624238106Sdes    whole_archive_flag_spec=''
11625238106Sdes  fi
11626238106Sdes  link_all_deplibs=yes
11627238106Sdes  allow_undefined_flag="$_lt_dar_allow_undefined"
11628238106Sdes  case $cc_basename in
11629238106Sdes     ifort*) _lt_dar_can_shared=yes ;;
11630238106Sdes     *) _lt_dar_can_shared=$GCC ;;
11631238106Sdes  esac
11632238106Sdes  if test "$_lt_dar_can_shared" = "yes"; then
11633238106Sdes    output_verbose_link_cmd=func_echo_all
11634238106Sdes    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
11635238106Sdes    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11636238106Sdes    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}"
11637238106Sdes    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}"
11638238106Sdes
11639238106Sdes  else
11640238106Sdes  ld_shlibs=no
11641238106Sdes  fi
11642238106Sdes
11643238106Sdes      ;;
11644238106Sdes
11645238106Sdes    dgux*)
11646238106Sdes      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11647238106Sdes      hardcode_libdir_flag_spec='-L$libdir'
11648238106Sdes      hardcode_shlibpath_var=no
11649238106Sdes      ;;
11650238106Sdes
11651238106Sdes    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11652238106Sdes    # support.  Future versions do this automatically, but an explicit c++rt0.o
11653238106Sdes    # does not break anything, and helps significantly (at the cost of a little
11654238106Sdes    # extra space).
11655238106Sdes    freebsd2.2*)
11656238106Sdes      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11657238106Sdes      hardcode_libdir_flag_spec='-R$libdir'
11658238106Sdes      hardcode_direct=yes
11659238106Sdes      hardcode_shlibpath_var=no
11660238106Sdes      ;;
11661238106Sdes
11662238106Sdes    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11663249141Sdes    freebsd2.*)
11664238106Sdes      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11665238106Sdes      hardcode_direct=yes
11666238106Sdes      hardcode_minus_L=yes
11667238106Sdes      hardcode_shlibpath_var=no
11668238106Sdes      ;;
11669238106Sdes
11670238106Sdes    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11671238106Sdes    freebsd* | dragonfly*)
11672238106Sdes      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11673238106Sdes      hardcode_libdir_flag_spec='-R$libdir'
11674238106Sdes      hardcode_direct=yes
11675238106Sdes      hardcode_shlibpath_var=no
11676238106Sdes      ;;
11677238106Sdes
11678238106Sdes    hpux9*)
11679238106Sdes      if test "$GCC" = yes; then
11680238106Sdes	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11681238106Sdes      else
11682238106Sdes	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11683238106Sdes      fi
11684238106Sdes      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11685238106Sdes      hardcode_libdir_separator=:
11686238106Sdes      hardcode_direct=yes
11687238106Sdes
11688238106Sdes      # hardcode_minus_L: Not really in the search PATH,
11689238106Sdes      # but as the default location of the library.
11690238106Sdes      hardcode_minus_L=yes
11691238106Sdes      export_dynamic_flag_spec='${wl}-E'
11692238106Sdes      ;;
11693238106Sdes
11694238106Sdes    hpux10*)
11695238106Sdes      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11696238106Sdes	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11697238106Sdes      else
11698238106Sdes	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11699238106Sdes      fi
11700238106Sdes      if test "$with_gnu_ld" = no; then
11701238106Sdes	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11702238106Sdes	hardcode_libdir_separator=:
11703238106Sdes	hardcode_direct=yes
11704238106Sdes	hardcode_direct_absolute=yes
11705238106Sdes	export_dynamic_flag_spec='${wl}-E'
11706238106Sdes	# hardcode_minus_L: Not really in the search PATH,
11707238106Sdes	# but as the default location of the library.
11708238106Sdes	hardcode_minus_L=yes
11709238106Sdes      fi
11710238106Sdes      ;;
11711238106Sdes
11712238106Sdes    hpux11*)
11713238106Sdes      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11714238106Sdes	case $host_cpu in
11715238106Sdes	hppa*64*)
11716238106Sdes	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11717238106Sdes	  ;;
11718238106Sdes	ia64*)
11719238106Sdes	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11720238106Sdes	  ;;
11721238106Sdes	*)
11722238106Sdes	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11723238106Sdes	  ;;
11724238106Sdes	esac
11725238106Sdes      else
11726238106Sdes	case $host_cpu in
11727238106Sdes	hppa*64*)
11728238106Sdes	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11729238106Sdes	  ;;
11730238106Sdes	ia64*)
11731238106Sdes	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11732238106Sdes	  ;;
11733238106Sdes	*)
11734238106Sdes
11735238106Sdes	  # Older versions of the 11.00 compiler do not understand -b yet
11736238106Sdes	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
11737238106Sdes	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
11738238106Sdes$as_echo_n "checking if $CC understands -b... " >&6; }
11739238106Sdesif ${lt_cv_prog_compiler__b+:} false; then :
11740238106Sdes  $as_echo_n "(cached) " >&6
11741238106Sdeselse
11742238106Sdes  lt_cv_prog_compiler__b=no
11743238106Sdes   save_LDFLAGS="$LDFLAGS"
11744238106Sdes   LDFLAGS="$LDFLAGS -b"
11745238106Sdes   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11746238106Sdes   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11747238106Sdes     # The linker can only warn and ignore the option if not recognized
11748238106Sdes     # So say no if there are warnings
11749238106Sdes     if test -s conftest.err; then
11750238106Sdes       # Append any errors to the config.log.
11751238106Sdes       cat conftest.err 1>&5
11752238106Sdes       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11753238106Sdes       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11754238106Sdes       if diff conftest.exp conftest.er2 >/dev/null; then
11755238106Sdes         lt_cv_prog_compiler__b=yes
11756238106Sdes       fi
11757238106Sdes     else
11758238106Sdes       lt_cv_prog_compiler__b=yes
11759238106Sdes     fi
11760238106Sdes   fi
11761238106Sdes   $RM -r conftest*
11762238106Sdes   LDFLAGS="$save_LDFLAGS"
11763238106Sdes
11764238106Sdesfi
11765238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
11766238106Sdes$as_echo "$lt_cv_prog_compiler__b" >&6; }
11767238106Sdes
11768238106Sdesif test x"$lt_cv_prog_compiler__b" = xyes; then
11769238106Sdes    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11770238106Sdeselse
11771238106Sdes    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11772238106Sdesfi
11773238106Sdes
11774238106Sdes	  ;;
11775238106Sdes	esac
11776238106Sdes      fi
11777238106Sdes      if test "$with_gnu_ld" = no; then
11778238106Sdes	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11779238106Sdes	hardcode_libdir_separator=:
11780238106Sdes
11781238106Sdes	case $host_cpu in
11782238106Sdes	hppa*64*|ia64*)
11783238106Sdes	  hardcode_direct=no
11784238106Sdes	  hardcode_shlibpath_var=no
11785238106Sdes	  ;;
11786238106Sdes	*)
11787238106Sdes	  hardcode_direct=yes
11788238106Sdes	  hardcode_direct_absolute=yes
11789238106Sdes	  export_dynamic_flag_spec='${wl}-E'
11790238106Sdes
11791238106Sdes	  # hardcode_minus_L: Not really in the search PATH,
11792238106Sdes	  # but as the default location of the library.
11793238106Sdes	  hardcode_minus_L=yes
11794238106Sdes	  ;;
11795238106Sdes	esac
11796238106Sdes      fi
11797238106Sdes      ;;
11798238106Sdes
11799238106Sdes    irix5* | irix6* | nonstopux*)
11800238106Sdes      if test "$GCC" = yes; then
11801238106Sdes	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'
11802238106Sdes	# Try to use the -exported_symbol ld option, if it does not
11803238106Sdes	# work, assume that -exports_file does not work either and
11804238106Sdes	# implicitly export all symbols.
11805238106Sdes	# This should be the same for all languages, so no per-tag cache variable.
11806238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
11807238106Sdes$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
11808238106Sdesif ${lt_cv_irix_exported_symbol+:} false; then :
11809238106Sdes  $as_echo_n "(cached) " >&6
11810238106Sdeselse
11811238106Sdes  save_LDFLAGS="$LDFLAGS"
11812238106Sdes	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
11813238106Sdes	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11814238106Sdes/* end confdefs.h.  */
11815238106Sdesint foo (void) { return 0; }
11816238106Sdes_ACEOF
11817238106Sdesif ac_fn_c_try_link "$LINENO"; then :
11818238106Sdes  lt_cv_irix_exported_symbol=yes
11819238106Sdeselse
11820238106Sdes  lt_cv_irix_exported_symbol=no
11821238106Sdesfi
11822238106Sdesrm -f core conftest.err conftest.$ac_objext \
11823238106Sdes    conftest$ac_exeext conftest.$ac_ext
11824238106Sdes           LDFLAGS="$save_LDFLAGS"
11825238106Sdesfi
11826238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
11827238106Sdes$as_echo "$lt_cv_irix_exported_symbol" >&6; }
11828238106Sdes	if test "$lt_cv_irix_exported_symbol" = yes; then
11829238106Sdes          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'
11830238106Sdes	fi
11831238106Sdes      else
11832238106Sdes	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'
11833238106Sdes	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'
11834238106Sdes      fi
11835238106Sdes      archive_cmds_need_lc='no'
11836238106Sdes      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11837238106Sdes      hardcode_libdir_separator=:
11838238106Sdes      inherit_rpath=yes
11839238106Sdes      link_all_deplibs=yes
11840238106Sdes      ;;
11841238106Sdes
11842238106Sdes    netbsd*)
11843238106Sdes      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11844238106Sdes	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11845238106Sdes      else
11846238106Sdes	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11847238106Sdes      fi
11848238106Sdes      hardcode_libdir_flag_spec='-R$libdir'
11849238106Sdes      hardcode_direct=yes
11850238106Sdes      hardcode_shlibpath_var=no
11851238106Sdes      ;;
11852238106Sdes
11853238106Sdes    newsos6)
11854238106Sdes      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11855238106Sdes      hardcode_direct=yes
11856238106Sdes      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11857238106Sdes      hardcode_libdir_separator=:
11858238106Sdes      hardcode_shlibpath_var=no
11859238106Sdes      ;;
11860238106Sdes
11861238106Sdes    *nto* | *qnx*)
11862238106Sdes      ;;
11863238106Sdes
11864238106Sdes    openbsd*)
11865238106Sdes      if test -f /usr/libexec/ld.so; then
11866238106Sdes	hardcode_direct=yes
11867238106Sdes	hardcode_shlibpath_var=no
11868238106Sdes	hardcode_direct_absolute=yes
11869238106Sdes	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11870238106Sdes	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11871238106Sdes	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11872238106Sdes	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11873238106Sdes	  export_dynamic_flag_spec='${wl}-E'
11874238106Sdes	else
11875238106Sdes	  case $host_os in
11876238106Sdes	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
11877238106Sdes	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11878238106Sdes	     hardcode_libdir_flag_spec='-R$libdir'
11879238106Sdes	     ;;
11880238106Sdes	   *)
11881238106Sdes	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11882238106Sdes	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11883238106Sdes	     ;;
11884238106Sdes	  esac
11885238106Sdes	fi
11886238106Sdes      else
11887238106Sdes	ld_shlibs=no
11888238106Sdes      fi
11889238106Sdes      ;;
11890238106Sdes
11891238106Sdes    os2*)
11892238106Sdes      hardcode_libdir_flag_spec='-L$libdir'
11893238106Sdes      hardcode_minus_L=yes
11894238106Sdes      allow_undefined_flag=unsupported
11895238106Sdes      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
11896238106Sdes      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11897238106Sdes      ;;
11898238106Sdes
11899238106Sdes    osf3*)
11900238106Sdes      if test "$GCC" = yes; then
11901238106Sdes	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11902238106Sdes	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'
11903238106Sdes      else
11904238106Sdes	allow_undefined_flag=' -expect_unresolved \*'
11905238106Sdes	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'
11906238106Sdes      fi
11907238106Sdes      archive_cmds_need_lc='no'
11908238106Sdes      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11909238106Sdes      hardcode_libdir_separator=:
11910238106Sdes      ;;
11911238106Sdes
11912238106Sdes    osf4* | osf5*)	# as osf3* with the addition of -msym flag
11913238106Sdes      if test "$GCC" = yes; then
11914238106Sdes	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11915238106Sdes	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'
11916238106Sdes	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11917238106Sdes      else
11918238106Sdes	allow_undefined_flag=' -expect_unresolved \*'
11919238106Sdes	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'
11920238106Sdes	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~
11921238106Sdes	$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'
11922238106Sdes
11923238106Sdes	# Both c and cxx compiler support -rpath directly
11924238106Sdes	hardcode_libdir_flag_spec='-rpath $libdir'
11925238106Sdes      fi
11926238106Sdes      archive_cmds_need_lc='no'
11927238106Sdes      hardcode_libdir_separator=:
11928238106Sdes      ;;
11929238106Sdes
11930238106Sdes    solaris*)
11931238106Sdes      no_undefined_flag=' -z defs'
11932238106Sdes      if test "$GCC" = yes; then
11933238106Sdes	wlarc='${wl}'
11934238106Sdes	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11935238106Sdes	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11936238106Sdes	  $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'
11937238106Sdes      else
11938238106Sdes	case `$CC -V 2>&1` in
11939238106Sdes	*"Compilers 5.0"*)
11940238106Sdes	  wlarc=''
11941238106Sdes	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11942238106Sdes	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11943238106Sdes	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11944238106Sdes	  ;;
11945238106Sdes	*)
11946238106Sdes	  wlarc='${wl}'
11947238106Sdes	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11948238106Sdes	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11949238106Sdes	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11950238106Sdes	  ;;
11951238106Sdes	esac
11952238106Sdes      fi
11953238106Sdes      hardcode_libdir_flag_spec='-R$libdir'
11954238106Sdes      hardcode_shlibpath_var=no
11955238106Sdes      case $host_os in
11956238106Sdes      solaris2.[0-5] | solaris2.[0-5].*) ;;
11957238106Sdes      *)
11958238106Sdes	# The compiler driver will combine and reorder linker options,
11959238106Sdes	# but understands `-z linker_flag'.  GCC discards it without `$wl',
11960238106Sdes	# but is careful enough not to reorder.
11961238106Sdes	# Supported since Solaris 2.6 (maybe 2.5.1?)
11962238106Sdes	if test "$GCC" = yes; then
11963238106Sdes	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
11964238106Sdes	else
11965238106Sdes	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11966238106Sdes	fi
11967238106Sdes	;;
11968238106Sdes      esac
11969238106Sdes      link_all_deplibs=yes
11970238106Sdes      ;;
11971238106Sdes
11972238106Sdes    sunos4*)
11973238106Sdes      if test "x$host_vendor" = xsequent; then
11974238106Sdes	# Use $CC to link under sequent, because it throws in some extra .o
11975238106Sdes	# files that make .init and .fini sections work.
11976238106Sdes	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11977238106Sdes      else
11978238106Sdes	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11979238106Sdes      fi
11980238106Sdes      hardcode_libdir_flag_spec='-L$libdir'
11981238106Sdes      hardcode_direct=yes
11982238106Sdes      hardcode_minus_L=yes
11983238106Sdes      hardcode_shlibpath_var=no
11984238106Sdes      ;;
11985238106Sdes
11986238106Sdes    sysv4)
11987238106Sdes      case $host_vendor in
11988238106Sdes	sni)
11989238106Sdes	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11990238106Sdes	  hardcode_direct=yes # is this really true???
11991238106Sdes	;;
11992238106Sdes	siemens)
11993238106Sdes	  ## LD is ld it makes a PLAMLIB
11994238106Sdes	  ## CC just makes a GrossModule.
11995238106Sdes	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11996238106Sdes	  reload_cmds='$CC -r -o $output$reload_objs'
11997238106Sdes	  hardcode_direct=no
11998238106Sdes        ;;
11999238106Sdes	motorola)
12000238106Sdes	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12001238106Sdes	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12002238106Sdes	;;
12003238106Sdes      esac
12004238106Sdes      runpath_var='LD_RUN_PATH'
12005238106Sdes      hardcode_shlibpath_var=no
12006238106Sdes      ;;
12007238106Sdes
12008238106Sdes    sysv4.3*)
12009238106Sdes      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12010238106Sdes      hardcode_shlibpath_var=no
12011238106Sdes      export_dynamic_flag_spec='-Bexport'
12012238106Sdes      ;;
12013238106Sdes
12014238106Sdes    sysv4*MP*)
12015238106Sdes      if test -d /usr/nec; then
12016238106Sdes	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12017238106Sdes	hardcode_shlibpath_var=no
12018238106Sdes	runpath_var=LD_RUN_PATH
12019238106Sdes	hardcode_runpath_var=yes
12020238106Sdes	ld_shlibs=yes
12021238106Sdes      fi
12022238106Sdes      ;;
12023238106Sdes
12024238106Sdes    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12025238106Sdes      no_undefined_flag='${wl}-z,text'
12026238106Sdes      archive_cmds_need_lc=no
12027238106Sdes      hardcode_shlibpath_var=no
12028238106Sdes      runpath_var='LD_RUN_PATH'
12029238106Sdes
12030238106Sdes      if test "$GCC" = yes; then
12031238106Sdes	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12032238106Sdes	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12033238106Sdes      else
12034238106Sdes	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12035238106Sdes	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12036238106Sdes      fi
12037238106Sdes      ;;
12038238106Sdes
12039238106Sdes    sysv5* | sco3.2v5* | sco5v6*)
12040238106Sdes      # Note: We can NOT use -z defs as we might desire, because we do not
12041238106Sdes      # link with -lc, and that would cause any symbols used from libc to
12042238106Sdes      # always be unresolved, which means just about no library would
12043238106Sdes      # ever link correctly.  If we're not using GNU ld we use -z text
12044238106Sdes      # though, which does catch some bad symbols but isn't as heavy-handed
12045238106Sdes      # as -z defs.
12046238106Sdes      no_undefined_flag='${wl}-z,text'
12047238106Sdes      allow_undefined_flag='${wl}-z,nodefs'
12048238106Sdes      archive_cmds_need_lc=no
12049238106Sdes      hardcode_shlibpath_var=no
12050238106Sdes      hardcode_libdir_flag_spec='${wl}-R,$libdir'
12051238106Sdes      hardcode_libdir_separator=':'
12052238106Sdes      link_all_deplibs=yes
12053238106Sdes      export_dynamic_flag_spec='${wl}-Bexport'
12054238106Sdes      runpath_var='LD_RUN_PATH'
12055238106Sdes
12056238106Sdes      if test "$GCC" = yes; then
12057238106Sdes	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12058238106Sdes	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12059238106Sdes      else
12060238106Sdes	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12061238106Sdes	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12062238106Sdes      fi
12063238106Sdes      ;;
12064238106Sdes
12065238106Sdes    uts4*)
12066238106Sdes      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12067238106Sdes      hardcode_libdir_flag_spec='-L$libdir'
12068238106Sdes      hardcode_shlibpath_var=no
12069238106Sdes      ;;
12070238106Sdes
12071238106Sdes    *)
12072238106Sdes      ld_shlibs=no
12073238106Sdes      ;;
12074238106Sdes    esac
12075238106Sdes
12076238106Sdes    if test x$host_vendor = xsni; then
12077238106Sdes      case $host in
12078238106Sdes      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12079238106Sdes	export_dynamic_flag_spec='${wl}-Blargedynsym'
12080238106Sdes	;;
12081238106Sdes      esac
12082238106Sdes    fi
12083238106Sdes  fi
12084238106Sdes
12085238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12086238106Sdes$as_echo "$ld_shlibs" >&6; }
12087238106Sdestest "$ld_shlibs" = no && can_build_shared=no
12088238106Sdes
12089238106Sdeswith_gnu_ld=$with_gnu_ld
12090238106Sdes
12091238106Sdes
12092238106Sdes
12093238106Sdes
12094238106Sdes
12095238106Sdes
12096238106Sdes
12097238106Sdes
12098238106Sdes
12099238106Sdes
12100238106Sdes
12101238106Sdes
12102238106Sdes
12103238106Sdes
12104238106Sdes
12105238106Sdes#
12106238106Sdes# Do we need to explicitly link libc?
12107238106Sdes#
12108238106Sdescase "x$archive_cmds_need_lc" in
12109238106Sdesx|xyes)
12110238106Sdes  # Assume -lc should be added
12111238106Sdes  archive_cmds_need_lc=yes
12112238106Sdes
12113238106Sdes  if test "$enable_shared" = yes && test "$GCC" = yes; then
12114238106Sdes    case $archive_cmds in
12115238106Sdes    *'~'*)
12116238106Sdes      # FIXME: we may have to deal with multi-command sequences.
12117238106Sdes      ;;
12118238106Sdes    '$CC '*)
12119238106Sdes      # Test whether the compiler implicitly links with -lc since on some
12120238106Sdes      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12121238106Sdes      # to ld, don't add -lc before -lgcc.
12122238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12123238106Sdes$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12124238106Sdesif ${lt_cv_archive_cmds_need_lc+:} false; then :
12125238106Sdes  $as_echo_n "(cached) " >&6
12126238106Sdeselse
12127238106Sdes  $RM conftest*
12128238106Sdes	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12129238106Sdes
12130238106Sdes	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12131238106Sdes  (eval $ac_compile) 2>&5
12132238106Sdes  ac_status=$?
12133238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12134238106Sdes  test $ac_status = 0; } 2>conftest.err; then
12135238106Sdes	  soname=conftest
12136238106Sdes	  lib=conftest
12137238106Sdes	  libobjs=conftest.$ac_objext
12138238106Sdes	  deplibs=
12139238106Sdes	  wl=$lt_prog_compiler_wl
12140238106Sdes	  pic_flag=$lt_prog_compiler_pic
12141238106Sdes	  compiler_flags=-v
12142238106Sdes	  linker_flags=-v
12143238106Sdes	  verstring=
12144238106Sdes	  output_objdir=.
12145238106Sdes	  libname=conftest
12146238106Sdes	  lt_save_allow_undefined_flag=$allow_undefined_flag
12147238106Sdes	  allow_undefined_flag=
12148238106Sdes	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12149238106Sdes  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12150238106Sdes  ac_status=$?
12151238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12152238106Sdes  test $ac_status = 0; }
12153238106Sdes	  then
12154238106Sdes	    lt_cv_archive_cmds_need_lc=no
12155238106Sdes	  else
12156238106Sdes	    lt_cv_archive_cmds_need_lc=yes
12157238106Sdes	  fi
12158238106Sdes	  allow_undefined_flag=$lt_save_allow_undefined_flag
12159238106Sdes	else
12160238106Sdes	  cat conftest.err 1>&5
12161238106Sdes	fi
12162238106Sdes	$RM conftest*
12163238106Sdes
12164238106Sdesfi
12165238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12166238106Sdes$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12167238106Sdes      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12168238106Sdes      ;;
12169238106Sdes    esac
12170238106Sdes  fi
12171238106Sdes  ;;
12172238106Sdesesac
12173238106Sdes
12174238106Sdes
12175238106Sdes
12176238106Sdes
12177238106Sdes
12178238106Sdes
12179238106Sdes
12180238106Sdes
12181238106Sdes
12182238106Sdes
12183238106Sdes
12184238106Sdes
12185238106Sdes
12186238106Sdes
12187238106Sdes
12188238106Sdes
12189238106Sdes
12190238106Sdes
12191238106Sdes
12192238106Sdes
12193238106Sdes
12194238106Sdes
12195238106Sdes
12196238106Sdes
12197238106Sdes
12198238106Sdes
12199238106Sdes
12200238106Sdes
12201238106Sdes
12202238106Sdes
12203238106Sdes
12204238106Sdes
12205238106Sdes
12206238106Sdes
12207238106Sdes
12208238106Sdes
12209238106Sdes
12210238106Sdes
12211238106Sdes
12212238106Sdes
12213238106Sdes
12214238106Sdes
12215238106Sdes
12216238106Sdes
12217238106Sdes
12218238106Sdes
12219238106Sdes
12220238106Sdes
12221238106Sdes
12222238106Sdes
12223238106Sdes
12224238106Sdes
12225238106Sdes
12226238106Sdes
12227238106Sdes
12228238106Sdes
12229238106Sdes
12230238106Sdes
12231238106Sdes
12232238106Sdes
12233238106Sdes
12234238106Sdes
12235238106Sdes
12236238106Sdes
12237238106Sdes
12238238106Sdes
12239238106Sdes
12240238106Sdes
12241238106Sdes
12242238106Sdes
12243238106Sdes
12244238106Sdes
12245238106Sdes
12246238106Sdes
12247238106Sdes
12248238106Sdes
12249238106Sdes
12250238106Sdes
12251238106Sdes
12252238106Sdes
12253238106Sdes
12254238106Sdes
12255238106Sdes
12256238106Sdes
12257238106Sdes
12258238106Sdes
12259238106Sdes
12260238106Sdes
12261238106Sdes
12262238106Sdes
12263238106Sdes
12264238106Sdes
12265238106Sdes
12266238106Sdes
12267238106Sdes
12268238106Sdes
12269238106Sdes
12270238106Sdes
12271238106Sdes
12272238106Sdes
12273238106Sdes
12274238106Sdes
12275238106Sdes
12276238106Sdes
12277238106Sdes
12278238106Sdes
12279238106Sdes
12280238106Sdes
12281238106Sdes
12282238106Sdes
12283238106Sdes
12284238106Sdes
12285238106Sdes
12286238106Sdes
12287238106Sdes
12288238106Sdes
12289238106Sdes
12290238106Sdes
12291238106Sdes
12292238106Sdes
12293238106Sdes
12294238106Sdes
12295238106Sdes
12296238106Sdes
12297238106Sdes
12298238106Sdes
12299238106Sdes
12300238106Sdes
12301238106Sdes
12302238106Sdes
12303238106Sdes
12304238106Sdes
12305238106Sdes
12306238106Sdes
12307238106Sdes
12308238106Sdes
12309238106Sdes
12310238106Sdes
12311238106Sdes
12312238106Sdes
12313238106Sdes
12314238106Sdes
12315238106Sdes
12316238106Sdes
12317238106Sdes
12318238106Sdes
12319238106Sdes
12320238106Sdes
12321238106Sdes
12322238106Sdes
12323238106Sdes
12324238106Sdes
12325238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12326238106Sdes$as_echo_n "checking dynamic linker characteristics... " >&6; }
12327238106Sdes
12328238106Sdesif test "$GCC" = yes; then
12329238106Sdes  case $host_os in
12330238106Sdes    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
12331238106Sdes    *) lt_awk_arg="/^libraries:/" ;;
12332238106Sdes  esac
12333238106Sdes  case $host_os in
12334238106Sdes    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
12335238106Sdes    *) lt_sed_strip_eq="s,=/,/,g" ;;
12336238106Sdes  esac
12337238106Sdes  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12338238106Sdes  case $lt_search_path_spec in
12339238106Sdes  *\;*)
12340238106Sdes    # if the path contains ";" then we assume it to be the separator
12341238106Sdes    # otherwise default to the standard path separator (i.e. ":") - it is
12342238106Sdes    # assumed that no part of a normal pathname contains ";" but that should
12343238106Sdes    # okay in the real world where ";" in dirpaths is itself problematic.
12344238106Sdes    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12345238106Sdes    ;;
12346238106Sdes  *)
12347238106Sdes    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12348238106Sdes    ;;
12349238106Sdes  esac
12350238106Sdes  # Ok, now we have the path, separated by spaces, we can step through it
12351238106Sdes  # and add multilib dir if necessary.
12352238106Sdes  lt_tmp_lt_search_path_spec=
12353238106Sdes  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12354238106Sdes  for lt_sys_path in $lt_search_path_spec; do
12355238106Sdes    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
12356238106Sdes      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
12357238106Sdes    else
12358238106Sdes      test -d "$lt_sys_path" && \
12359238106Sdes	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12360238106Sdes    fi
12361238106Sdes  done
12362238106Sdes  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12363238106SdesBEGIN {RS=" "; FS="/|\n";} {
12364238106Sdes  lt_foo="";
12365238106Sdes  lt_count=0;
12366238106Sdes  for (lt_i = NF; lt_i > 0; lt_i--) {
12367238106Sdes    if ($lt_i != "" && $lt_i != ".") {
12368238106Sdes      if ($lt_i == "..") {
12369238106Sdes        lt_count++;
12370238106Sdes      } else {
12371238106Sdes        if (lt_count == 0) {
12372238106Sdes          lt_foo="/" $lt_i lt_foo;
12373238106Sdes        } else {
12374238106Sdes          lt_count--;
12375238106Sdes        }
12376238106Sdes      }
12377238106Sdes    }
12378238106Sdes  }
12379238106Sdes  if (lt_foo != "") { lt_freq[lt_foo]++; }
12380238106Sdes  if (lt_freq[lt_foo] == 1) { print lt_foo; }
12381238106Sdes}'`
12382238106Sdes  # AWK program above erroneously prepends '/' to C:/dos/paths
12383238106Sdes  # for these hosts.
12384238106Sdes  case $host_os in
12385238106Sdes    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12386238106Sdes      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
12387238106Sdes  esac
12388238106Sdes  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12389238106Sdeselse
12390238106Sdes  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12391238106Sdesfi
12392238106Sdeslibrary_names_spec=
12393238106Sdeslibname_spec='lib$name'
12394238106Sdessoname_spec=
12395238106Sdesshrext_cmds=".so"
12396238106Sdespostinstall_cmds=
12397238106Sdespostuninstall_cmds=
12398238106Sdesfinish_cmds=
12399238106Sdesfinish_eval=
12400238106Sdesshlibpath_var=
12401238106Sdesshlibpath_overrides_runpath=unknown
12402238106Sdesversion_type=none
12403238106Sdesdynamic_linker="$host_os ld.so"
12404238106Sdessys_lib_dlsearch_path_spec="/lib /usr/lib"
12405238106Sdesneed_lib_prefix=unknown
12406238106Sdeshardcode_into_libs=no
12407238106Sdes
12408238106Sdes# when you set need_version to no, make sure it does not cause -set_version
12409238106Sdes# flags to be left without arguments
12410238106Sdesneed_version=unknown
12411238106Sdes
12412238106Sdescase $host_os in
12413238106Sdesaix3*)
12414249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12415238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12416238106Sdes  shlibpath_var=LIBPATH
12417238106Sdes
12418238106Sdes  # AIX 3 has no versioning support, so we append a major version to the name.
12419238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12420238106Sdes  ;;
12421238106Sdes
12422238106Sdesaix[4-9]*)
12423249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12424238106Sdes  need_lib_prefix=no
12425238106Sdes  need_version=no
12426238106Sdes  hardcode_into_libs=yes
12427238106Sdes  if test "$host_cpu" = ia64; then
12428238106Sdes    # AIX 5 supports IA64
12429238106Sdes    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12430238106Sdes    shlibpath_var=LD_LIBRARY_PATH
12431238106Sdes  else
12432238106Sdes    # With GCC up to 2.95.x, collect2 would create an import file
12433238106Sdes    # for dependence libraries.  The import file would start with
12434238106Sdes    # the line `#! .'.  This would cause the generated library to
12435238106Sdes    # depend on `.', always an invalid library.  This was fixed in
12436238106Sdes    # development snapshots of GCC prior to 3.0.
12437238106Sdes    case $host_os in
12438238106Sdes      aix4 | aix4.[01] | aix4.[01].*)
12439238106Sdes      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12440238106Sdes	   echo ' yes '
12441238106Sdes	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
12442238106Sdes	:
12443238106Sdes      else
12444238106Sdes	can_build_shared=no
12445238106Sdes      fi
12446238106Sdes      ;;
12447238106Sdes    esac
12448238106Sdes    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12449238106Sdes    # soname into executable. Probably we can add versioning support to
12450238106Sdes    # collect2, so additional links can be useful in future.
12451238106Sdes    if test "$aix_use_runtimelinking" = yes; then
12452238106Sdes      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12453238106Sdes      # instead of lib<name>.a to let people know that these are not
12454238106Sdes      # typical AIX shared libraries.
12455238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12456238106Sdes    else
12457238106Sdes      # We preserve .a as extension for shared libraries through AIX4.2
12458238106Sdes      # and later when we are not doing run time linking.
12459238106Sdes      library_names_spec='${libname}${release}.a $libname.a'
12460238106Sdes      soname_spec='${libname}${release}${shared_ext}$major'
12461238106Sdes    fi
12462238106Sdes    shlibpath_var=LIBPATH
12463238106Sdes  fi
12464238106Sdes  ;;
12465238106Sdes
12466238106Sdesamigaos*)
12467238106Sdes  case $host_cpu in
12468238106Sdes  powerpc)
12469238106Sdes    # Since July 2007 AmigaOS4 officially supports .so libraries.
12470238106Sdes    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12471238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12472238106Sdes    ;;
12473238106Sdes  m68k)
12474238106Sdes    library_names_spec='$libname.ixlibrary $libname.a'
12475238106Sdes    # Create ${libname}_ixlibrary.a entries in /sys/libs.
12476238106Sdes    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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'
12477238106Sdes    ;;
12478238106Sdes  esac
12479238106Sdes  ;;
12480238106Sdes
12481238106Sdesbeos*)
12482238106Sdes  library_names_spec='${libname}${shared_ext}'
12483238106Sdes  dynamic_linker="$host_os ld.so"
12484238106Sdes  shlibpath_var=LIBRARY_PATH
12485238106Sdes  ;;
12486238106Sdes
12487238106Sdesbsdi[45]*)
12488249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12489238106Sdes  need_version=no
12490238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12491238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12492238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12493238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12494238106Sdes  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12495238106Sdes  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12496238106Sdes  # the default ld.so.conf also contains /usr/contrib/lib and
12497238106Sdes  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12498238106Sdes  # libtool to hard-code these into programs
12499238106Sdes  ;;
12500238106Sdes
12501238106Sdescygwin* | mingw* | pw32* | cegcc*)
12502238106Sdes  version_type=windows
12503238106Sdes  shrext_cmds=".dll"
12504238106Sdes  need_version=no
12505238106Sdes  need_lib_prefix=no
12506238106Sdes
12507238106Sdes  case $GCC,$cc_basename in
12508238106Sdes  yes,*)
12509238106Sdes    # gcc
12510238106Sdes    library_names_spec='$libname.dll.a'
12511238106Sdes    # DLL is installed to $(libdir)/../bin by postinstall_cmds
12512238106Sdes    postinstall_cmds='base_file=`basename \${file}`~
12513238106Sdes      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12514238106Sdes      dldir=$destdir/`dirname \$dlpath`~
12515238106Sdes      test -d \$dldir || mkdir -p \$dldir~
12516238106Sdes      $install_prog $dir/$dlname \$dldir/$dlname~
12517238106Sdes      chmod a+x \$dldir/$dlname~
12518238106Sdes      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12519238106Sdes        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12520238106Sdes      fi'
12521238106Sdes    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12522238106Sdes      dlpath=$dir/\$dldll~
12523238106Sdes       $RM \$dlpath'
12524238106Sdes    shlibpath_overrides_runpath=yes
12525238106Sdes
12526238106Sdes    case $host_os in
12527238106Sdes    cygwin*)
12528238106Sdes      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12529238106Sdes      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12530238106Sdes
12531238106Sdes      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12532238106Sdes      ;;
12533238106Sdes    mingw* | cegcc*)
12534238106Sdes      # MinGW DLLs use traditional 'lib' prefix
12535238106Sdes      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12536238106Sdes      ;;
12537238106Sdes    pw32*)
12538238106Sdes      # pw32 DLLs use 'pw' prefix rather than 'lib'
12539238106Sdes      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12540238106Sdes      ;;
12541238106Sdes    esac
12542238106Sdes    dynamic_linker='Win32 ld.exe'
12543238106Sdes    ;;
12544238106Sdes
12545238106Sdes  *,cl*)
12546238106Sdes    # Native MSVC
12547238106Sdes    libname_spec='$name'
12548238106Sdes    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12549238106Sdes    library_names_spec='${libname}.dll.lib'
12550238106Sdes
12551238106Sdes    case $build_os in
12552238106Sdes    mingw*)
12553238106Sdes      sys_lib_search_path_spec=
12554238106Sdes      lt_save_ifs=$IFS
12555238106Sdes      IFS=';'
12556238106Sdes      for lt_path in $LIB
12557238106Sdes      do
12558238106Sdes        IFS=$lt_save_ifs
12559238106Sdes        # Let DOS variable expansion print the short 8.3 style file name.
12560238106Sdes        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12561238106Sdes        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12562238106Sdes      done
12563238106Sdes      IFS=$lt_save_ifs
12564238106Sdes      # Convert to MSYS style.
12565238106Sdes      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12566238106Sdes      ;;
12567238106Sdes    cygwin*)
12568238106Sdes      # Convert to unix form, then to dos form, then back to unix form
12569238106Sdes      # but this time dos style (no spaces!) so that the unix form looks
12570238106Sdes      # like /cygdrive/c/PROGRA~1:/cygdr...
12571238106Sdes      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12572238106Sdes      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12573238106Sdes      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12574238106Sdes      ;;
12575238106Sdes    *)
12576238106Sdes      sys_lib_search_path_spec="$LIB"
12577238106Sdes      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12578238106Sdes        # It is most probably a Windows format PATH.
12579238106Sdes        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12580238106Sdes      else
12581238106Sdes        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12582238106Sdes      fi
12583238106Sdes      # FIXME: find the short name or the path components, as spaces are
12584238106Sdes      # common. (e.g. "Program Files" -> "PROGRA~1")
12585238106Sdes      ;;
12586238106Sdes    esac
12587238106Sdes
12588238106Sdes    # DLL is installed to $(libdir)/../bin by postinstall_cmds
12589238106Sdes    postinstall_cmds='base_file=`basename \${file}`~
12590238106Sdes      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12591238106Sdes      dldir=$destdir/`dirname \$dlpath`~
12592238106Sdes      test -d \$dldir || mkdir -p \$dldir~
12593238106Sdes      $install_prog $dir/$dlname \$dldir/$dlname'
12594238106Sdes    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12595238106Sdes      dlpath=$dir/\$dldll~
12596238106Sdes       $RM \$dlpath'
12597238106Sdes    shlibpath_overrides_runpath=yes
12598238106Sdes    dynamic_linker='Win32 link.exe'
12599238106Sdes    ;;
12600238106Sdes
12601238106Sdes  *)
12602238106Sdes    # Assume MSVC wrapper
12603238106Sdes    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12604238106Sdes    dynamic_linker='Win32 ld.exe'
12605238106Sdes    ;;
12606238106Sdes  esac
12607238106Sdes  # FIXME: first we should search . and the directory the executable is in
12608238106Sdes  shlibpath_var=PATH
12609238106Sdes  ;;
12610238106Sdes
12611238106Sdesdarwin* | rhapsody*)
12612238106Sdes  dynamic_linker="$host_os dyld"
12613238106Sdes  version_type=darwin
12614238106Sdes  need_lib_prefix=no
12615238106Sdes  need_version=no
12616238106Sdes  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12617238106Sdes  soname_spec='${libname}${release}${major}$shared_ext'
12618238106Sdes  shlibpath_overrides_runpath=yes
12619238106Sdes  shlibpath_var=DYLD_LIBRARY_PATH
12620238106Sdes  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12621238106Sdes
12622238106Sdes  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
12623238106Sdes  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12624238106Sdes  ;;
12625238106Sdes
12626238106Sdesdgux*)
12627249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12628238106Sdes  need_lib_prefix=no
12629238106Sdes  need_version=no
12630238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12631238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12632238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12633238106Sdes  ;;
12634238106Sdes
12635238106Sdesfreebsd* | dragonfly*)
12636238106Sdes  # DragonFly does not have aout.  When/if they implement a new
12637238106Sdes  # versioning mechanism, adjust this.
12638238106Sdes  if test -x /usr/bin/objformat; then
12639238106Sdes    objformat=`/usr/bin/objformat`
12640238106Sdes  else
12641238106Sdes    case $host_os in
12642249141Sdes    freebsd[23].*) objformat=aout ;;
12643238106Sdes    *) objformat=elf ;;
12644238106Sdes    esac
12645238106Sdes  fi
12646238106Sdes  version_type=freebsd-$objformat
12647238106Sdes  case $version_type in
12648238106Sdes    freebsd-elf*)
12649238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12650238106Sdes      need_version=no
12651238106Sdes      need_lib_prefix=no
12652238106Sdes      ;;
12653238106Sdes    freebsd-*)
12654238106Sdes      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12655238106Sdes      need_version=yes
12656238106Sdes      ;;
12657238106Sdes  esac
12658238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12659238106Sdes  case $host_os in
12660249141Sdes  freebsd2.*)
12661238106Sdes    shlibpath_overrides_runpath=yes
12662238106Sdes    ;;
12663238106Sdes  freebsd3.[01]* | freebsdelf3.[01]*)
12664238106Sdes    shlibpath_overrides_runpath=yes
12665238106Sdes    hardcode_into_libs=yes
12666238106Sdes    ;;
12667238106Sdes  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12668238106Sdes  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12669238106Sdes    shlibpath_overrides_runpath=no
12670238106Sdes    hardcode_into_libs=yes
12671238106Sdes    ;;
12672238106Sdes  *) # from 4.6 on, and DragonFly
12673238106Sdes    shlibpath_overrides_runpath=yes
12674238106Sdes    hardcode_into_libs=yes
12675238106Sdes    ;;
12676238106Sdes  esac
12677238106Sdes  ;;
12678238106Sdes
12679238106Sdesgnu*)
12680249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12681238106Sdes  need_lib_prefix=no
12682238106Sdes  need_version=no
12683238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12684238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12685238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12686249141Sdes  shlibpath_overrides_runpath=no
12687238106Sdes  hardcode_into_libs=yes
12688238106Sdes  ;;
12689238106Sdes
12690238106Sdeshaiku*)
12691249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12692238106Sdes  need_lib_prefix=no
12693238106Sdes  need_version=no
12694238106Sdes  dynamic_linker="$host_os runtime_loader"
12695238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12696238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12697238106Sdes  shlibpath_var=LIBRARY_PATH
12698238106Sdes  shlibpath_overrides_runpath=yes
12699238106Sdes  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
12700238106Sdes  hardcode_into_libs=yes
12701238106Sdes  ;;
12702238106Sdes
12703238106Sdeshpux9* | hpux10* | hpux11*)
12704238106Sdes  # Give a soname corresponding to the major version so that dld.sl refuses to
12705238106Sdes  # link against other versions.
12706238106Sdes  version_type=sunos
12707238106Sdes  need_lib_prefix=no
12708238106Sdes  need_version=no
12709238106Sdes  case $host_cpu in
12710238106Sdes  ia64*)
12711238106Sdes    shrext_cmds='.so'
12712238106Sdes    hardcode_into_libs=yes
12713238106Sdes    dynamic_linker="$host_os dld.so"
12714238106Sdes    shlibpath_var=LD_LIBRARY_PATH
12715238106Sdes    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12716238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12717238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
12718238106Sdes    if test "X$HPUX_IA64_MODE" = X32; then
12719238106Sdes      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12720238106Sdes    else
12721238106Sdes      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12722238106Sdes    fi
12723238106Sdes    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12724238106Sdes    ;;
12725238106Sdes  hppa*64*)
12726238106Sdes    shrext_cmds='.sl'
12727238106Sdes    hardcode_into_libs=yes
12728238106Sdes    dynamic_linker="$host_os dld.sl"
12729238106Sdes    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12730238106Sdes    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12731238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12732238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
12733238106Sdes    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12734238106Sdes    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12735238106Sdes    ;;
12736238106Sdes  *)
12737238106Sdes    shrext_cmds='.sl'
12738238106Sdes    dynamic_linker="$host_os dld.sl"
12739238106Sdes    shlibpath_var=SHLIB_PATH
12740238106Sdes    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12741238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12742238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
12743238106Sdes    ;;
12744238106Sdes  esac
12745238106Sdes  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
12746238106Sdes  postinstall_cmds='chmod 555 $lib'
12747238106Sdes  # or fails outright, so override atomically:
12748238106Sdes  install_override_mode=555
12749238106Sdes  ;;
12750238106Sdes
12751238106Sdesinterix[3-9]*)
12752249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12753238106Sdes  need_lib_prefix=no
12754238106Sdes  need_version=no
12755238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12756238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12757238106Sdes  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12758238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12759238106Sdes  shlibpath_overrides_runpath=no
12760238106Sdes  hardcode_into_libs=yes
12761238106Sdes  ;;
12762238106Sdes
12763238106Sdesirix5* | irix6* | nonstopux*)
12764238106Sdes  case $host_os in
12765238106Sdes    nonstopux*) version_type=nonstopux ;;
12766238106Sdes    *)
12767238106Sdes	if test "$lt_cv_prog_gnu_ld" = yes; then
12768249141Sdes		version_type=linux # correct to gnu/linux during the next big refactor
12769238106Sdes	else
12770238106Sdes		version_type=irix
12771238106Sdes	fi ;;
12772238106Sdes  esac
12773238106Sdes  need_lib_prefix=no
12774238106Sdes  need_version=no
12775238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12776238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
12777238106Sdes  case $host_os in
12778238106Sdes  irix5* | nonstopux*)
12779238106Sdes    libsuff= shlibsuff=
12780238106Sdes    ;;
12781238106Sdes  *)
12782238106Sdes    case $LD in # libtool.m4 will add one of these switches to LD
12783238106Sdes    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12784238106Sdes      libsuff= shlibsuff= libmagic=32-bit;;
12785238106Sdes    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12786238106Sdes      libsuff=32 shlibsuff=N32 libmagic=N32;;
12787238106Sdes    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12788238106Sdes      libsuff=64 shlibsuff=64 libmagic=64-bit;;
12789238106Sdes    *) libsuff= shlibsuff= libmagic=never-match;;
12790238106Sdes    esac
12791238106Sdes    ;;
12792238106Sdes  esac
12793238106Sdes  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12794238106Sdes  shlibpath_overrides_runpath=no
12795238106Sdes  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12796238106Sdes  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12797238106Sdes  hardcode_into_libs=yes
12798238106Sdes  ;;
12799238106Sdes
12800238106Sdes# No shared lib support for Linux oldld, aout, or coff.
12801238106Sdeslinux*oldld* | linux*aout* | linux*coff*)
12802238106Sdes  dynamic_linker=no
12803238106Sdes  ;;
12804238106Sdes
12805249141Sdes# This must be glibc/ELF.
12806238106Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu)
12807249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12808238106Sdes  need_lib_prefix=no
12809238106Sdes  need_version=no
12810238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12811238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12812238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12813238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12814238106Sdes  shlibpath_overrides_runpath=no
12815238106Sdes
12816238106Sdes  # Some binutils ld are patched to set DT_RUNPATH
12817238106Sdes  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
12818238106Sdes  $as_echo_n "(cached) " >&6
12819238106Sdeselse
12820238106Sdes  lt_cv_shlibpath_overrides_runpath=no
12821238106Sdes    save_LDFLAGS=$LDFLAGS
12822238106Sdes    save_libdir=$libdir
12823238106Sdes    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
12824238106Sdes	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
12825238106Sdes    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12826238106Sdes/* end confdefs.h.  */
12827238106Sdes
12828238106Sdesint
12829238106Sdesmain ()
12830238106Sdes{
12831238106Sdes
12832238106Sdes  ;
12833238106Sdes  return 0;
12834238106Sdes}
12835238106Sdes_ACEOF
12836238106Sdesif ac_fn_c_try_link "$LINENO"; then :
12837238106Sdes  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
12838238106Sdes  lt_cv_shlibpath_overrides_runpath=yes
12839238106Sdesfi
12840238106Sdesfi
12841238106Sdesrm -f core conftest.err conftest.$ac_objext \
12842238106Sdes    conftest$ac_exeext conftest.$ac_ext
12843238106Sdes    LDFLAGS=$save_LDFLAGS
12844238106Sdes    libdir=$save_libdir
12845238106Sdes
12846238106Sdesfi
12847238106Sdes
12848238106Sdes  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
12849238106Sdes
12850238106Sdes  # This implies no fast_install, which is unacceptable.
12851238106Sdes  # Some rework will be needed to allow for fast_install
12852238106Sdes  # before this can be enabled.
12853238106Sdes  hardcode_into_libs=yes
12854238106Sdes
12855255840Sdes  # Add ABI-specific directories to the system library path.
12856255840Sdes  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
12857255840Sdes
12858238106Sdes  # Append ld.so.conf contents to the search path
12859238106Sdes  if test -f /etc/ld.so.conf; then
12860238106Sdes    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' ' '`
12861255840Sdes    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
12862255840Sdes
12863238106Sdes  fi
12864238106Sdes
12865238106Sdes  # We used to test for /lib/ld.so.1 and disable shared libraries on
12866238106Sdes  # powerpc, because MkLinux only supported shared libraries with the
12867238106Sdes  # GNU dynamic linker.  Since this was broken with cross compilers,
12868238106Sdes  # most powerpc-linux boxes support dynamic linking these days and
12869238106Sdes  # people can always --disable-shared, the test was removed, and we
12870238106Sdes  # assume the GNU/Linux dynamic linker is in use.
12871238106Sdes  dynamic_linker='GNU/Linux ld.so'
12872238106Sdes  ;;
12873238106Sdes
12874238106Sdesnetbsd*)
12875238106Sdes  version_type=sunos
12876238106Sdes  need_lib_prefix=no
12877238106Sdes  need_version=no
12878238106Sdes  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12879238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12880238106Sdes    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12881238106Sdes    dynamic_linker='NetBSD (a.out) ld.so'
12882238106Sdes  else
12883238106Sdes    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12884238106Sdes    soname_spec='${libname}${release}${shared_ext}$major'
12885238106Sdes    dynamic_linker='NetBSD ld.elf_so'
12886238106Sdes  fi
12887238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12888238106Sdes  shlibpath_overrides_runpath=yes
12889238106Sdes  hardcode_into_libs=yes
12890238106Sdes  ;;
12891238106Sdes
12892238106Sdesnewsos6)
12893249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12894238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12895238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12896238106Sdes  shlibpath_overrides_runpath=yes
12897238106Sdes  ;;
12898238106Sdes
12899238106Sdes*nto* | *qnx*)
12900238106Sdes  version_type=qnx
12901238106Sdes  need_lib_prefix=no
12902238106Sdes  need_version=no
12903238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12904238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12905238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12906238106Sdes  shlibpath_overrides_runpath=no
12907238106Sdes  hardcode_into_libs=yes
12908238106Sdes  dynamic_linker='ldqnx.so'
12909238106Sdes  ;;
12910238106Sdes
12911238106Sdesopenbsd*)
12912238106Sdes  version_type=sunos
12913238106Sdes  sys_lib_dlsearch_path_spec="/usr/lib"
12914238106Sdes  need_lib_prefix=no
12915238106Sdes  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
12916238106Sdes  case $host_os in
12917238106Sdes    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
12918238106Sdes    *)				need_version=no  ;;
12919238106Sdes  esac
12920238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12921238106Sdes  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12922238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12923238106Sdes  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12924238106Sdes    case $host_os in
12925238106Sdes      openbsd2.[89] | openbsd2.[89].*)
12926238106Sdes	shlibpath_overrides_runpath=no
12927238106Sdes	;;
12928238106Sdes      *)
12929238106Sdes	shlibpath_overrides_runpath=yes
12930238106Sdes	;;
12931238106Sdes      esac
12932238106Sdes  else
12933238106Sdes    shlibpath_overrides_runpath=yes
12934238106Sdes  fi
12935238106Sdes  ;;
12936238106Sdes
12937238106Sdesos2*)
12938238106Sdes  libname_spec='$name'
12939238106Sdes  shrext_cmds=".dll"
12940238106Sdes  need_lib_prefix=no
12941238106Sdes  library_names_spec='$libname${shared_ext} $libname.a'
12942238106Sdes  dynamic_linker='OS/2 ld.exe'
12943238106Sdes  shlibpath_var=LIBPATH
12944238106Sdes  ;;
12945238106Sdes
12946238106Sdesosf3* | osf4* | osf5*)
12947238106Sdes  version_type=osf
12948238106Sdes  need_lib_prefix=no
12949238106Sdes  need_version=no
12950238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12951238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12952238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12953238106Sdes  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12954238106Sdes  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12955238106Sdes  ;;
12956238106Sdes
12957238106Sdesrdos*)
12958238106Sdes  dynamic_linker=no
12959238106Sdes  ;;
12960238106Sdes
12961238106Sdessolaris*)
12962249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12963238106Sdes  need_lib_prefix=no
12964238106Sdes  need_version=no
12965238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12966238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12967238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12968238106Sdes  shlibpath_overrides_runpath=yes
12969238106Sdes  hardcode_into_libs=yes
12970238106Sdes  # ldd complains unless libraries are executable
12971238106Sdes  postinstall_cmds='chmod +x $lib'
12972238106Sdes  ;;
12973238106Sdes
12974238106Sdessunos4*)
12975238106Sdes  version_type=sunos
12976238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12977238106Sdes  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12978238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12979238106Sdes  shlibpath_overrides_runpath=yes
12980238106Sdes  if test "$with_gnu_ld" = yes; then
12981238106Sdes    need_lib_prefix=no
12982238106Sdes  fi
12983238106Sdes  need_version=yes
12984238106Sdes  ;;
12985238106Sdes
12986238106Sdessysv4 | sysv4.3*)
12987249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
12988238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12989238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
12990238106Sdes  shlibpath_var=LD_LIBRARY_PATH
12991238106Sdes  case $host_vendor in
12992238106Sdes    sni)
12993238106Sdes      shlibpath_overrides_runpath=no
12994238106Sdes      need_lib_prefix=no
12995238106Sdes      runpath_var=LD_RUN_PATH
12996238106Sdes      ;;
12997238106Sdes    siemens)
12998238106Sdes      need_lib_prefix=no
12999238106Sdes      ;;
13000238106Sdes    motorola)
13001238106Sdes      need_lib_prefix=no
13002238106Sdes      need_version=no
13003238106Sdes      shlibpath_overrides_runpath=no
13004238106Sdes      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13005238106Sdes      ;;
13006238106Sdes  esac
13007238106Sdes  ;;
13008238106Sdes
13009238106Sdessysv4*MP*)
13010238106Sdes  if test -d /usr/nec ;then
13011249141Sdes    version_type=linux # correct to gnu/linux during the next big refactor
13012238106Sdes    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
13013238106Sdes    soname_spec='$libname${shared_ext}.$major'
13014238106Sdes    shlibpath_var=LD_LIBRARY_PATH
13015238106Sdes  fi
13016238106Sdes  ;;
13017238106Sdes
13018238106Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13019238106Sdes  version_type=freebsd-elf
13020238106Sdes  need_lib_prefix=no
13021238106Sdes  need_version=no
13022238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13023238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
13024238106Sdes  shlibpath_var=LD_LIBRARY_PATH
13025238106Sdes  shlibpath_overrides_runpath=yes
13026238106Sdes  hardcode_into_libs=yes
13027238106Sdes  if test "$with_gnu_ld" = yes; then
13028238106Sdes    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13029238106Sdes  else
13030238106Sdes    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13031238106Sdes    case $host_os in
13032238106Sdes      sco3.2v5*)
13033238106Sdes        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13034238106Sdes	;;
13035238106Sdes    esac
13036238106Sdes  fi
13037238106Sdes  sys_lib_dlsearch_path_spec='/usr/lib'
13038238106Sdes  ;;
13039238106Sdes
13040238106Sdestpf*)
13041238106Sdes  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13042249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
13043238106Sdes  need_lib_prefix=no
13044238106Sdes  need_version=no
13045238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13046238106Sdes  shlibpath_var=LD_LIBRARY_PATH
13047238106Sdes  shlibpath_overrides_runpath=no
13048238106Sdes  hardcode_into_libs=yes
13049238106Sdes  ;;
13050238106Sdes
13051238106Sdesuts4*)
13052249141Sdes  version_type=linux # correct to gnu/linux during the next big refactor
13053238106Sdes  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13054238106Sdes  soname_spec='${libname}${release}${shared_ext}$major'
13055238106Sdes  shlibpath_var=LD_LIBRARY_PATH
13056238106Sdes  ;;
13057238106Sdes
13058238106Sdes*)
13059238106Sdes  dynamic_linker=no
13060238106Sdes  ;;
13061238106Sdesesac
13062238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13063238106Sdes$as_echo "$dynamic_linker" >&6; }
13064238106Sdestest "$dynamic_linker" = no && can_build_shared=no
13065238106Sdes
13066238106Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13067238106Sdesif test "$GCC" = yes; then
13068238106Sdes  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13069238106Sdesfi
13070238106Sdes
13071238106Sdesif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
13072238106Sdes  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
13073238106Sdesfi
13074238106Sdesif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
13075238106Sdes  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
13076238106Sdesfi
13077238106Sdes
13078238106Sdes
13079238106Sdes
13080238106Sdes
13081238106Sdes
13082238106Sdes
13083238106Sdes
13084238106Sdes
13085238106Sdes
13086238106Sdes
13087238106Sdes
13088238106Sdes
13089238106Sdes
13090238106Sdes
13091238106Sdes
13092238106Sdes
13093238106Sdes
13094238106Sdes
13095238106Sdes
13096238106Sdes
13097238106Sdes
13098238106Sdes
13099238106Sdes
13100238106Sdes
13101238106Sdes
13102238106Sdes
13103238106Sdes
13104238106Sdes
13105238106Sdes
13106238106Sdes
13107238106Sdes
13108238106Sdes
13109238106Sdes
13110238106Sdes
13111238106Sdes
13112238106Sdes
13113238106Sdes
13114238106Sdes
13115238106Sdes
13116238106Sdes
13117238106Sdes
13118238106Sdes
13119238106Sdes
13120238106Sdes
13121238106Sdes
13122238106Sdes
13123238106Sdes
13124238106Sdes
13125238106Sdes
13126238106Sdes
13127238106Sdes
13128238106Sdes
13129238106Sdes
13130238106Sdes
13131238106Sdes
13132238106Sdes
13133238106Sdes
13134238106Sdes
13135238106Sdes
13136238106Sdes
13137238106Sdes
13138238106Sdes
13139238106Sdes
13140238106Sdes
13141238106Sdes
13142238106Sdes
13143238106Sdes
13144238106Sdes
13145238106Sdes
13146238106Sdes
13147238106Sdes
13148238106Sdes
13149238106Sdes
13150238106Sdes
13151238106Sdes
13152238106Sdes
13153238106Sdes
13154238106Sdes
13155238106Sdes
13156238106Sdes
13157238106Sdes
13158238106Sdes
13159238106Sdes
13160238106Sdes
13161238106Sdes
13162238106Sdes
13163238106Sdes
13164238106Sdes
13165238106Sdes
13166238106Sdes
13167238106Sdes
13168238106Sdes
13169238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13170238106Sdes$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13171238106Sdeshardcode_action=
13172238106Sdesif test -n "$hardcode_libdir_flag_spec" ||
13173238106Sdes   test -n "$runpath_var" ||
13174238106Sdes   test "X$hardcode_automatic" = "Xyes" ; then
13175238106Sdes
13176238106Sdes  # We can hardcode non-existent directories.
13177238106Sdes  if test "$hardcode_direct" != no &&
13178238106Sdes     # If the only mechanism to avoid hardcoding is shlibpath_var, we
13179238106Sdes     # have to relink, otherwise we might link with an installed library
13180238106Sdes     # when we should be linking with a yet-to-be-installed one
13181238106Sdes     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
13182238106Sdes     test "$hardcode_minus_L" != no; then
13183238106Sdes    # Linking always hardcodes the temporary library directory.
13184238106Sdes    hardcode_action=relink
13185238106Sdes  else
13186238106Sdes    # We can link without hardcoding, and we can hardcode nonexisting dirs.
13187238106Sdes    hardcode_action=immediate
13188238106Sdes  fi
13189238106Sdeselse
13190238106Sdes  # We cannot hardcode anything, or else we can only hardcode existing
13191238106Sdes  # directories.
13192238106Sdes  hardcode_action=unsupported
13193238106Sdesfi
13194238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13195238106Sdes$as_echo "$hardcode_action" >&6; }
13196238106Sdes
13197238106Sdesif test "$hardcode_action" = relink ||
13198238106Sdes   test "$inherit_rpath" = yes; then
13199238106Sdes  # Fast installation is not supported
13200238106Sdes  enable_fast_install=no
13201238106Sdeselif test "$shlibpath_overrides_runpath" = yes ||
13202238106Sdes     test "$enable_shared" = no; then
13203238106Sdes  # Fast installation is not necessary
13204238106Sdes  enable_fast_install=needless
13205238106Sdesfi
13206238106Sdes
13207238106Sdes
13208238106Sdes
13209238106Sdes
13210238106Sdes
13211238106Sdes
13212238106Sdes  if test "x$enable_dlopen" != xyes; then
13213238106Sdes  enable_dlopen=unknown
13214238106Sdes  enable_dlopen_self=unknown
13215238106Sdes  enable_dlopen_self_static=unknown
13216238106Sdeselse
13217238106Sdes  lt_cv_dlopen=no
13218238106Sdes  lt_cv_dlopen_libs=
13219238106Sdes
13220238106Sdes  case $host_os in
13221238106Sdes  beos*)
13222238106Sdes    lt_cv_dlopen="load_add_on"
13223238106Sdes    lt_cv_dlopen_libs=
13224238106Sdes    lt_cv_dlopen_self=yes
13225238106Sdes    ;;
13226238106Sdes
13227238106Sdes  mingw* | pw32* | cegcc*)
13228238106Sdes    lt_cv_dlopen="LoadLibrary"
13229238106Sdes    lt_cv_dlopen_libs=
13230238106Sdes    ;;
13231238106Sdes
13232238106Sdes  cygwin*)
13233238106Sdes    lt_cv_dlopen="dlopen"
13234238106Sdes    lt_cv_dlopen_libs=
13235238106Sdes    ;;
13236238106Sdes
13237238106Sdes  darwin*)
13238238106Sdes  # if libdl is installed we need to link against it
13239238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13240238106Sdes$as_echo_n "checking for dlopen in -ldl... " >&6; }
13241238106Sdesif ${ac_cv_lib_dl_dlopen+:} false; then :
13242238106Sdes  $as_echo_n "(cached) " >&6
13243238106Sdeselse
13244238106Sdes  ac_check_lib_save_LIBS=$LIBS
13245238106SdesLIBS="-ldl  $LIBS"
13246238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247238106Sdes/* end confdefs.h.  */
13248238106Sdes
13249238106Sdes/* Override any GCC internal prototype to avoid an error.
13250238106Sdes   Use char because int might match the return type of a GCC
13251238106Sdes   builtin and then its argument prototype would still apply.  */
13252238106Sdes#ifdef __cplusplus
13253238106Sdesextern "C"
13254238106Sdes#endif
13255238106Sdeschar dlopen ();
13256238106Sdesint
13257238106Sdesmain ()
13258238106Sdes{
13259238106Sdesreturn dlopen ();
13260238106Sdes  ;
13261238106Sdes  return 0;
13262238106Sdes}
13263238106Sdes_ACEOF
13264238106Sdesif ac_fn_c_try_link "$LINENO"; then :
13265238106Sdes  ac_cv_lib_dl_dlopen=yes
13266238106Sdeselse
13267238106Sdes  ac_cv_lib_dl_dlopen=no
13268238106Sdesfi
13269238106Sdesrm -f core conftest.err conftest.$ac_objext \
13270238106Sdes    conftest$ac_exeext conftest.$ac_ext
13271238106SdesLIBS=$ac_check_lib_save_LIBS
13272238106Sdesfi
13273238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13274238106Sdes$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13275238106Sdesif test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13276238106Sdes  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13277238106Sdeselse
13278238106Sdes
13279238106Sdes    lt_cv_dlopen="dyld"
13280238106Sdes    lt_cv_dlopen_libs=
13281238106Sdes    lt_cv_dlopen_self=yes
13282238106Sdes
13283238106Sdesfi
13284238106Sdes
13285238106Sdes    ;;
13286238106Sdes
13287238106Sdes  *)
13288238106Sdes    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13289238106Sdesif test "x$ac_cv_func_shl_load" = xyes; then :
13290238106Sdes  lt_cv_dlopen="shl_load"
13291238106Sdeselse
13292238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13293238106Sdes$as_echo_n "checking for shl_load in -ldld... " >&6; }
13294238106Sdesif ${ac_cv_lib_dld_shl_load+:} false; then :
13295238106Sdes  $as_echo_n "(cached) " >&6
13296238106Sdeselse
13297238106Sdes  ac_check_lib_save_LIBS=$LIBS
13298238106SdesLIBS="-ldld  $LIBS"
13299238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300238106Sdes/* end confdefs.h.  */
13301238106Sdes
13302238106Sdes/* Override any GCC internal prototype to avoid an error.
13303238106Sdes   Use char because int might match the return type of a GCC
13304238106Sdes   builtin and then its argument prototype would still apply.  */
13305238106Sdes#ifdef __cplusplus
13306238106Sdesextern "C"
13307238106Sdes#endif
13308238106Sdeschar shl_load ();
13309238106Sdesint
13310238106Sdesmain ()
13311238106Sdes{
13312238106Sdesreturn shl_load ();
13313238106Sdes  ;
13314238106Sdes  return 0;
13315238106Sdes}
13316238106Sdes_ACEOF
13317238106Sdesif ac_fn_c_try_link "$LINENO"; then :
13318238106Sdes  ac_cv_lib_dld_shl_load=yes
13319238106Sdeselse
13320238106Sdes  ac_cv_lib_dld_shl_load=no
13321238106Sdesfi
13322238106Sdesrm -f core conftest.err conftest.$ac_objext \
13323238106Sdes    conftest$ac_exeext conftest.$ac_ext
13324238106SdesLIBS=$ac_check_lib_save_LIBS
13325238106Sdesfi
13326238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13327238106Sdes$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13328238106Sdesif test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13329238106Sdes  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
13330238106Sdeselse
13331238106Sdes  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13332238106Sdesif test "x$ac_cv_func_dlopen" = xyes; then :
13333238106Sdes  lt_cv_dlopen="dlopen"
13334238106Sdeselse
13335238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13336238106Sdes$as_echo_n "checking for dlopen in -ldl... " >&6; }
13337238106Sdesif ${ac_cv_lib_dl_dlopen+:} false; then :
13338238106Sdes  $as_echo_n "(cached) " >&6
13339238106Sdeselse
13340238106Sdes  ac_check_lib_save_LIBS=$LIBS
13341238106SdesLIBS="-ldl  $LIBS"
13342238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
13343238106Sdes/* end confdefs.h.  */
13344238106Sdes
13345238106Sdes/* Override any GCC internal prototype to avoid an error.
13346238106Sdes   Use char because int might match the return type of a GCC
13347238106Sdes   builtin and then its argument prototype would still apply.  */
13348238106Sdes#ifdef __cplusplus
13349238106Sdesextern "C"
13350238106Sdes#endif
13351238106Sdeschar dlopen ();
13352238106Sdesint
13353238106Sdesmain ()
13354238106Sdes{
13355238106Sdesreturn dlopen ();
13356238106Sdes  ;
13357238106Sdes  return 0;
13358238106Sdes}
13359238106Sdes_ACEOF
13360238106Sdesif ac_fn_c_try_link "$LINENO"; then :
13361238106Sdes  ac_cv_lib_dl_dlopen=yes
13362238106Sdeselse
13363238106Sdes  ac_cv_lib_dl_dlopen=no
13364238106Sdesfi
13365238106Sdesrm -f core conftest.err conftest.$ac_objext \
13366238106Sdes    conftest$ac_exeext conftest.$ac_ext
13367238106SdesLIBS=$ac_check_lib_save_LIBS
13368238106Sdesfi
13369238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13370238106Sdes$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13371238106Sdesif test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13372238106Sdes  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13373238106Sdeselse
13374238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13375238106Sdes$as_echo_n "checking for dlopen in -lsvld... " >&6; }
13376238106Sdesif ${ac_cv_lib_svld_dlopen+:} false; then :
13377238106Sdes  $as_echo_n "(cached) " >&6
13378238106Sdeselse
13379238106Sdes  ac_check_lib_save_LIBS=$LIBS
13380238106SdesLIBS="-lsvld  $LIBS"
13381238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382238106Sdes/* end confdefs.h.  */
13383238106Sdes
13384238106Sdes/* Override any GCC internal prototype to avoid an error.
13385238106Sdes   Use char because int might match the return type of a GCC
13386238106Sdes   builtin and then its argument prototype would still apply.  */
13387238106Sdes#ifdef __cplusplus
13388238106Sdesextern "C"
13389238106Sdes#endif
13390238106Sdeschar dlopen ();
13391238106Sdesint
13392238106Sdesmain ()
13393238106Sdes{
13394238106Sdesreturn dlopen ();
13395238106Sdes  ;
13396238106Sdes  return 0;
13397238106Sdes}
13398238106Sdes_ACEOF
13399238106Sdesif ac_fn_c_try_link "$LINENO"; then :
13400238106Sdes  ac_cv_lib_svld_dlopen=yes
13401238106Sdeselse
13402238106Sdes  ac_cv_lib_svld_dlopen=no
13403238106Sdesfi
13404238106Sdesrm -f core conftest.err conftest.$ac_objext \
13405238106Sdes    conftest$ac_exeext conftest.$ac_ext
13406238106SdesLIBS=$ac_check_lib_save_LIBS
13407238106Sdesfi
13408238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13409238106Sdes$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13410238106Sdesif test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13411238106Sdes  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13412238106Sdeselse
13413238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13414238106Sdes$as_echo_n "checking for dld_link in -ldld... " >&6; }
13415238106Sdesif ${ac_cv_lib_dld_dld_link+:} false; then :
13416238106Sdes  $as_echo_n "(cached) " >&6
13417238106Sdeselse
13418238106Sdes  ac_check_lib_save_LIBS=$LIBS
13419238106SdesLIBS="-ldld  $LIBS"
13420238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
13421238106Sdes/* end confdefs.h.  */
13422238106Sdes
13423238106Sdes/* Override any GCC internal prototype to avoid an error.
13424238106Sdes   Use char because int might match the return type of a GCC
13425238106Sdes   builtin and then its argument prototype would still apply.  */
13426238106Sdes#ifdef __cplusplus
13427238106Sdesextern "C"
13428238106Sdes#endif
13429238106Sdeschar dld_link ();
13430238106Sdesint
13431238106Sdesmain ()
13432238106Sdes{
13433238106Sdesreturn dld_link ();
13434238106Sdes  ;
13435238106Sdes  return 0;
13436238106Sdes}
13437238106Sdes_ACEOF
13438238106Sdesif ac_fn_c_try_link "$LINENO"; then :
13439238106Sdes  ac_cv_lib_dld_dld_link=yes
13440238106Sdeselse
13441238106Sdes  ac_cv_lib_dld_dld_link=no
13442238106Sdesfi
13443238106Sdesrm -f core conftest.err conftest.$ac_objext \
13444238106Sdes    conftest$ac_exeext conftest.$ac_ext
13445238106SdesLIBS=$ac_check_lib_save_LIBS
13446238106Sdesfi
13447238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13448238106Sdes$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
13449238106Sdesif test "x$ac_cv_lib_dld_dld_link" = xyes; then :
13450238106Sdes  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
13451238106Sdesfi
13452238106Sdes
13453238106Sdes
13454238106Sdesfi
13455238106Sdes
13456238106Sdes
13457238106Sdesfi
13458238106Sdes
13459238106Sdes
13460238106Sdesfi
13461238106Sdes
13462238106Sdes
13463238106Sdesfi
13464238106Sdes
13465238106Sdes
13466238106Sdesfi
13467238106Sdes
13468238106Sdes    ;;
13469238106Sdes  esac
13470238106Sdes
13471238106Sdes  if test "x$lt_cv_dlopen" != xno; then
13472238106Sdes    enable_dlopen=yes
13473238106Sdes  else
13474238106Sdes    enable_dlopen=no
13475238106Sdes  fi
13476238106Sdes
13477238106Sdes  case $lt_cv_dlopen in
13478238106Sdes  dlopen)
13479238106Sdes    save_CPPFLAGS="$CPPFLAGS"
13480238106Sdes    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13481238106Sdes
13482238106Sdes    save_LDFLAGS="$LDFLAGS"
13483238106Sdes    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13484238106Sdes
13485238106Sdes    save_LIBS="$LIBS"
13486238106Sdes    LIBS="$lt_cv_dlopen_libs $LIBS"
13487238106Sdes
13488238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13489238106Sdes$as_echo_n "checking whether a program can dlopen itself... " >&6; }
13490238106Sdesif ${lt_cv_dlopen_self+:} false; then :
13491238106Sdes  $as_echo_n "(cached) " >&6
13492238106Sdeselse
13493238106Sdes  	  if test "$cross_compiling" = yes; then :
13494238106Sdes  lt_cv_dlopen_self=cross
13495238106Sdeselse
13496238106Sdes  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13497238106Sdes  lt_status=$lt_dlunknown
13498238106Sdes  cat > conftest.$ac_ext <<_LT_EOF
13499238106Sdes#line $LINENO "configure"
13500238106Sdes#include "confdefs.h"
13501238106Sdes
13502238106Sdes#if HAVE_DLFCN_H
13503238106Sdes#include <dlfcn.h>
13504238106Sdes#endif
13505238106Sdes
13506238106Sdes#include <stdio.h>
13507238106Sdes
13508238106Sdes#ifdef RTLD_GLOBAL
13509238106Sdes#  define LT_DLGLOBAL		RTLD_GLOBAL
13510238106Sdes#else
13511238106Sdes#  ifdef DL_GLOBAL
13512238106Sdes#    define LT_DLGLOBAL		DL_GLOBAL
13513238106Sdes#  else
13514238106Sdes#    define LT_DLGLOBAL		0
13515238106Sdes#  endif
13516238106Sdes#endif
13517238106Sdes
13518238106Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13519238106Sdes   find out it does not work in some platform. */
13520238106Sdes#ifndef LT_DLLAZY_OR_NOW
13521238106Sdes#  ifdef RTLD_LAZY
13522238106Sdes#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
13523238106Sdes#  else
13524238106Sdes#    ifdef DL_LAZY
13525238106Sdes#      define LT_DLLAZY_OR_NOW		DL_LAZY
13526238106Sdes#    else
13527238106Sdes#      ifdef RTLD_NOW
13528238106Sdes#        define LT_DLLAZY_OR_NOW	RTLD_NOW
13529238106Sdes#      else
13530238106Sdes#        ifdef DL_NOW
13531238106Sdes#          define LT_DLLAZY_OR_NOW	DL_NOW
13532238106Sdes#        else
13533238106Sdes#          define LT_DLLAZY_OR_NOW	0
13534238106Sdes#        endif
13535238106Sdes#      endif
13536238106Sdes#    endif
13537238106Sdes#  endif
13538238106Sdes#endif
13539238106Sdes
13540238106Sdes/* When -fvisbility=hidden is used, assume the code has been annotated
13541238106Sdes   correspondingly for the symbols needed.  */
13542238106Sdes#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13543238106Sdesint fnord () __attribute__((visibility("default")));
13544238106Sdes#endif
13545238106Sdes
13546238106Sdesint fnord () { return 42; }
13547238106Sdesint main ()
13548238106Sdes{
13549238106Sdes  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13550238106Sdes  int status = $lt_dlunknown;
13551238106Sdes
13552238106Sdes  if (self)
13553238106Sdes    {
13554238106Sdes      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13555238106Sdes      else
13556238106Sdes        {
13557238106Sdes	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13558238106Sdes          else puts (dlerror ());
13559238106Sdes	}
13560238106Sdes      /* dlclose (self); */
13561238106Sdes    }
13562238106Sdes  else
13563238106Sdes    puts (dlerror ());
13564238106Sdes
13565238106Sdes  return status;
13566238106Sdes}
13567238106Sdes_LT_EOF
13568238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13569238106Sdes  (eval $ac_link) 2>&5
13570238106Sdes  ac_status=$?
13571238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13572238106Sdes  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13573238106Sdes    (./conftest; exit; ) >&5 2>/dev/null
13574238106Sdes    lt_status=$?
13575238106Sdes    case x$lt_status in
13576238106Sdes      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13577238106Sdes      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13578238106Sdes      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
13579238106Sdes    esac
13580238106Sdes  else :
13581238106Sdes    # compilation failed
13582238106Sdes    lt_cv_dlopen_self=no
13583238106Sdes  fi
13584238106Sdesfi
13585238106Sdesrm -fr conftest*
13586238106Sdes
13587238106Sdes
13588238106Sdesfi
13589238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
13590238106Sdes$as_echo "$lt_cv_dlopen_self" >&6; }
13591238106Sdes
13592238106Sdes    if test "x$lt_cv_dlopen_self" = xyes; then
13593238106Sdes      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
13594238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
13595238106Sdes$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
13596238106Sdesif ${lt_cv_dlopen_self_static+:} false; then :
13597238106Sdes  $as_echo_n "(cached) " >&6
13598238106Sdeselse
13599238106Sdes  	  if test "$cross_compiling" = yes; then :
13600238106Sdes  lt_cv_dlopen_self_static=cross
13601238106Sdeselse
13602238106Sdes  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13603238106Sdes  lt_status=$lt_dlunknown
13604238106Sdes  cat > conftest.$ac_ext <<_LT_EOF
13605238106Sdes#line $LINENO "configure"
13606238106Sdes#include "confdefs.h"
13607238106Sdes
13608238106Sdes#if HAVE_DLFCN_H
13609238106Sdes#include <dlfcn.h>
13610238106Sdes#endif
13611238106Sdes
13612238106Sdes#include <stdio.h>
13613238106Sdes
13614238106Sdes#ifdef RTLD_GLOBAL
13615238106Sdes#  define LT_DLGLOBAL		RTLD_GLOBAL
13616238106Sdes#else
13617238106Sdes#  ifdef DL_GLOBAL
13618238106Sdes#    define LT_DLGLOBAL		DL_GLOBAL
13619238106Sdes#  else
13620238106Sdes#    define LT_DLGLOBAL		0
13621238106Sdes#  endif
13622238106Sdes#endif
13623238106Sdes
13624238106Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13625238106Sdes   find out it does not work in some platform. */
13626238106Sdes#ifndef LT_DLLAZY_OR_NOW
13627238106Sdes#  ifdef RTLD_LAZY
13628238106Sdes#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
13629238106Sdes#  else
13630238106Sdes#    ifdef DL_LAZY
13631238106Sdes#      define LT_DLLAZY_OR_NOW		DL_LAZY
13632238106Sdes#    else
13633238106Sdes#      ifdef RTLD_NOW
13634238106Sdes#        define LT_DLLAZY_OR_NOW	RTLD_NOW
13635238106Sdes#      else
13636238106Sdes#        ifdef DL_NOW
13637238106Sdes#          define LT_DLLAZY_OR_NOW	DL_NOW
13638238106Sdes#        else
13639238106Sdes#          define LT_DLLAZY_OR_NOW	0
13640238106Sdes#        endif
13641238106Sdes#      endif
13642238106Sdes#    endif
13643238106Sdes#  endif
13644238106Sdes#endif
13645238106Sdes
13646238106Sdes/* When -fvisbility=hidden is used, assume the code has been annotated
13647238106Sdes   correspondingly for the symbols needed.  */
13648238106Sdes#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13649238106Sdesint fnord () __attribute__((visibility("default")));
13650238106Sdes#endif
13651238106Sdes
13652238106Sdesint fnord () { return 42; }
13653238106Sdesint main ()
13654238106Sdes{
13655238106Sdes  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13656238106Sdes  int status = $lt_dlunknown;
13657238106Sdes
13658238106Sdes  if (self)
13659238106Sdes    {
13660238106Sdes      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13661238106Sdes      else
13662238106Sdes        {
13663238106Sdes	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
13664238106Sdes          else puts (dlerror ());
13665238106Sdes	}
13666238106Sdes      /* dlclose (self); */
13667238106Sdes    }
13668238106Sdes  else
13669238106Sdes    puts (dlerror ());
13670238106Sdes
13671238106Sdes  return status;
13672238106Sdes}
13673238106Sdes_LT_EOF
13674238106Sdes  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13675238106Sdes  (eval $ac_link) 2>&5
13676238106Sdes  ac_status=$?
13677238106Sdes  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13678238106Sdes  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13679238106Sdes    (./conftest; exit; ) >&5 2>/dev/null
13680238106Sdes    lt_status=$?
13681238106Sdes    case x$lt_status in
13682238106Sdes      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13683238106Sdes      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13684238106Sdes      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
13685238106Sdes    esac
13686238106Sdes  else :
13687238106Sdes    # compilation failed
13688238106Sdes    lt_cv_dlopen_self_static=no
13689238106Sdes  fi
13690238106Sdesfi
13691238106Sdesrm -fr conftest*
13692238106Sdes
13693238106Sdes
13694238106Sdesfi
13695238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
13696238106Sdes$as_echo "$lt_cv_dlopen_self_static" >&6; }
13697238106Sdes    fi
13698238106Sdes
13699238106Sdes    CPPFLAGS="$save_CPPFLAGS"
13700238106Sdes    LDFLAGS="$save_LDFLAGS"
13701238106Sdes    LIBS="$save_LIBS"
13702238106Sdes    ;;
13703238106Sdes  esac
13704238106Sdes
13705238106Sdes  case $lt_cv_dlopen_self in
13706238106Sdes  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13707238106Sdes  *) enable_dlopen_self=unknown ;;
13708238106Sdes  esac
13709238106Sdes
13710238106Sdes  case $lt_cv_dlopen_self_static in
13711238106Sdes  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13712238106Sdes  *) enable_dlopen_self_static=unknown ;;
13713238106Sdes  esac
13714238106Sdesfi
13715238106Sdes
13716238106Sdes
13717238106Sdes
13718238106Sdes
13719238106Sdes
13720238106Sdes
13721238106Sdes
13722238106Sdes
13723238106Sdes
13724238106Sdes
13725238106Sdes
13726238106Sdes
13727238106Sdes
13728238106Sdes
13729238106Sdes
13730238106Sdes
13731238106Sdes
13732238106Sdesstriplib=
13733238106Sdesold_striplib=
13734238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
13735238106Sdes$as_echo_n "checking whether stripping libraries is possible... " >&6; }
13736238106Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
13737238106Sdes  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
13738238106Sdes  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
13739238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13740238106Sdes$as_echo "yes" >&6; }
13741238106Sdeselse
13742238106Sdes# FIXME - insert some real tests, host_os isn't really good enough
13743238106Sdes  case $host_os in
13744238106Sdes  darwin*)
13745238106Sdes    if test -n "$STRIP" ; then
13746238106Sdes      striplib="$STRIP -x"
13747238106Sdes      old_striplib="$STRIP -S"
13748238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13749238106Sdes$as_echo "yes" >&6; }
13750238106Sdes    else
13751238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13752238106Sdes$as_echo "no" >&6; }
13753238106Sdes    fi
13754238106Sdes    ;;
13755238106Sdes  *)
13756238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13757238106Sdes$as_echo "no" >&6; }
13758238106Sdes    ;;
13759238106Sdes  esac
13760238106Sdesfi
13761238106Sdes
13762238106Sdes
13763238106Sdes
13764238106Sdes
13765238106Sdes
13766238106Sdes
13767238106Sdes
13768238106Sdes
13769238106Sdes
13770238106Sdes
13771238106Sdes
13772238106Sdes
13773238106Sdes  # Report which library types will actually be built
13774238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
13775238106Sdes$as_echo_n "checking if libtool supports shared libraries... " >&6; }
13776238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
13777238106Sdes$as_echo "$can_build_shared" >&6; }
13778238106Sdes
13779238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
13780238106Sdes$as_echo_n "checking whether to build shared libraries... " >&6; }
13781238106Sdes  test "$can_build_shared" = "no" && enable_shared=no
13782238106Sdes
13783238106Sdes  # On AIX, shared libraries and static libraries use the same namespace, and
13784238106Sdes  # are all built from PIC.
13785238106Sdes  case $host_os in
13786238106Sdes  aix3*)
13787238106Sdes    test "$enable_shared" = yes && enable_static=no
13788238106Sdes    if test -n "$RANLIB"; then
13789238106Sdes      archive_cmds="$archive_cmds~\$RANLIB \$lib"
13790238106Sdes      postinstall_cmds='$RANLIB $lib'
13791238106Sdes    fi
13792238106Sdes    ;;
13793238106Sdes
13794238106Sdes  aix[4-9]*)
13795238106Sdes    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13796238106Sdes      test "$enable_shared" = yes && enable_static=no
13797238106Sdes    fi
13798238106Sdes    ;;
13799238106Sdes  esac
13800238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
13801238106Sdes$as_echo "$enable_shared" >&6; }
13802238106Sdes
13803238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
13804238106Sdes$as_echo_n "checking whether to build static libraries... " >&6; }
13805238106Sdes  # Make sure either enable_shared or enable_static is yes.
13806238106Sdes  test "$enable_shared" = yes || enable_static=yes
13807238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
13808238106Sdes$as_echo "$enable_static" >&6; }
13809238106Sdes
13810238106Sdes
13811238106Sdes
13812238106Sdes
13813238106Sdesfi
13814238106Sdesac_ext=c
13815238106Sdesac_cpp='$CPP $CPPFLAGS'
13816238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13817238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13818238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
13819238106Sdes
13820238106SdesCC="$lt_save_CC"
13821238106Sdes
13822238106Sdes
13823238106Sdes
13824238106Sdes
13825238106Sdes
13826238106Sdes
13827238106Sdes
13828238106Sdes
13829238106Sdes
13830238106Sdes
13831238106Sdes
13832238106Sdes
13833238106Sdes
13834249141Sdes
13835249141Sdes
13836238106Sdes        ac_config_commands="$ac_config_commands libtool"
13837238106Sdes
13838238106Sdes
13839238106Sdes
13840238106Sdes
13841238106Sdes# Only expand once:
13842238106Sdes
13843238106Sdes
13844238106Sdes
13845238106Sdes
13846238106Sdes# Checks for header files.
13847285206Sdesfor ac_header in stdarg.h stdbool.h netinet/in.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
13848238106Sdesdo :
13849238106Sdes  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13850238106Sdesac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13851238106Sdes"
13852238106Sdesif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13853238106Sdes  cat >>confdefs.h <<_ACEOF
13854238106Sdes#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13855238106Sdes_ACEOF
13856238106Sdes
13857238106Sdesfi
13858238106Sdes
13859238106Sdesdone
13860238106Sdes
13861238106Sdes
13862238106Sdes# check for types.
13863238106Sdes# Using own tests for int64* because autoconf builtin only give 32bit.
13864238106Sdesac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
13865238106Sdesif test "x$ac_cv_type_int8_t" = xyes; then :
13866238106Sdes
13867238106Sdeselse
13868238106Sdes
13869238106Sdescat >>confdefs.h <<_ACEOF
13870238106Sdes#define int8_t signed char
13871238106Sdes_ACEOF
13872238106Sdes
13873238106Sdesfi
13874238106Sdes
13875238106Sdesac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
13876238106Sdesif test "x$ac_cv_type_int16_t" = xyes; then :
13877238106Sdes
13878238106Sdeselse
13879238106Sdes
13880238106Sdescat >>confdefs.h <<_ACEOF
13881238106Sdes#define int16_t short
13882238106Sdes_ACEOF
13883238106Sdes
13884238106Sdesfi
13885238106Sdes
13886238106Sdesac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
13887238106Sdesif test "x$ac_cv_type_int32_t" = xyes; then :
13888238106Sdes
13889238106Sdeselse
13890238106Sdes
13891238106Sdescat >>confdefs.h <<_ACEOF
13892238106Sdes#define int32_t int
13893238106Sdes_ACEOF
13894238106Sdes
13895238106Sdesfi
13896238106Sdes
13897238106Sdesac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
13898238106Sdesif test "x$ac_cv_type_int64_t" = xyes; then :
13899238106Sdes
13900238106Sdeselse
13901238106Sdes
13902238106Sdescat >>confdefs.h <<_ACEOF
13903238106Sdes#define int64_t long long
13904238106Sdes_ACEOF
13905238106Sdes
13906238106Sdesfi
13907238106Sdes
13908238106Sdesac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
13909238106Sdesif test "x$ac_cv_type_uint8_t" = xyes; then :
13910238106Sdes
13911238106Sdeselse
13912238106Sdes
13913238106Sdescat >>confdefs.h <<_ACEOF
13914238106Sdes#define uint8_t unsigned char
13915238106Sdes_ACEOF
13916238106Sdes
13917238106Sdesfi
13918238106Sdes
13919238106Sdesac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
13920238106Sdesif test "x$ac_cv_type_uint16_t" = xyes; then :
13921238106Sdes
13922238106Sdeselse
13923238106Sdes
13924238106Sdescat >>confdefs.h <<_ACEOF
13925238106Sdes#define uint16_t unsigned short
13926238106Sdes_ACEOF
13927238106Sdes
13928238106Sdesfi
13929238106Sdes
13930238106Sdesac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
13931238106Sdesif test "x$ac_cv_type_uint32_t" = xyes; then :
13932238106Sdes
13933238106Sdeselse
13934238106Sdes
13935238106Sdescat >>confdefs.h <<_ACEOF
13936238106Sdes#define uint32_t unsigned int
13937238106Sdes_ACEOF
13938238106Sdes
13939238106Sdesfi
13940238106Sdes
13941238106Sdesac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
13942238106Sdesif test "x$ac_cv_type_uint64_t" = xyes; then :
13943238106Sdes
13944238106Sdeselse
13945238106Sdes
13946238106Sdescat >>confdefs.h <<_ACEOF
13947238106Sdes#define uint64_t unsigned long long
13948238106Sdes_ACEOF
13949238106Sdes
13950238106Sdesfi
13951238106Sdes
13952238106Sdesac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13953238106Sdesif test "x$ac_cv_type_size_t" = xyes; then :
13954238106Sdes
13955238106Sdeselse
13956238106Sdes
13957238106Sdescat >>confdefs.h <<_ACEOF
13958238106Sdes#define size_t unsigned int
13959238106Sdes_ACEOF
13960238106Sdes
13961238106Sdesfi
13962238106Sdes
13963238106Sdesac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
13964238106Sdesif test "x$ac_cv_type_ssize_t" = xyes; then :
13965238106Sdes
13966238106Sdeselse
13967238106Sdes
13968238106Sdescat >>confdefs.h <<_ACEOF
13969238106Sdes#define ssize_t int
13970238106Sdes_ACEOF
13971238106Sdes
13972238106Sdesfi
13973238106Sdes
13974238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13975238106Sdes$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13976238106Sdesif ${ac_cv_type_uid_t+:} false; then :
13977238106Sdes  $as_echo_n "(cached) " >&6
13978238106Sdeselse
13979238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13980238106Sdes/* end confdefs.h.  */
13981238106Sdes#include <sys/types.h>
13982238106Sdes
13983238106Sdes_ACEOF
13984238106Sdesif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13985238106Sdes  $EGREP "uid_t" >/dev/null 2>&1; then :
13986238106Sdes  ac_cv_type_uid_t=yes
13987238106Sdeselse
13988238106Sdes  ac_cv_type_uid_t=no
13989238106Sdesfi
13990238106Sdesrm -f conftest*
13991238106Sdes
13992238106Sdesfi
13993238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13994238106Sdes$as_echo "$ac_cv_type_uid_t" >&6; }
13995238106Sdesif test $ac_cv_type_uid_t = no; then
13996238106Sdes
13997238106Sdes$as_echo "#define uid_t int" >>confdefs.h
13998238106Sdes
13999238106Sdes
14000238106Sdes$as_echo "#define gid_t int" >>confdefs.h
14001238106Sdes
14002238106Sdesfi
14003238106Sdes
14004238106Sdesac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14005238106Sdesif test "x$ac_cv_type_pid_t" = xyes; then :
14006238106Sdes
14007238106Sdeselse
14008238106Sdes
14009238106Sdescat >>confdefs.h <<_ACEOF
14010238106Sdes#define pid_t int
14011238106Sdes_ACEOF
14012238106Sdes
14013238106Sdesfi
14014238106Sdes
14015238106Sdesac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14016238106Sdesif test "x$ac_cv_type_off_t" = xyes; then :
14017238106Sdes
14018238106Sdeselse
14019238106Sdes
14020238106Sdescat >>confdefs.h <<_ACEOF
14021238106Sdes#define off_t long int
14022238106Sdes_ACEOF
14023238106Sdes
14024238106Sdesfi
14025238106Sdes
14026238106Sdesac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14027238106Sdes$ac_includes_default
14028238106Sdes#ifdef HAVE_WINSOCK2_H
14029238106Sdes#  include <winsock2.h>
14030238106Sdes#endif
14031238106Sdes
14032238106Sdes"
14033238106Sdesif test "x$ac_cv_type_u_char" = xyes; then :
14034238106Sdes
14035238106Sdeselse
14036238106Sdes
14037238106Sdes$as_echo "#define u_char unsigned char" >>confdefs.h
14038238106Sdes
14039238106Sdesfi
14040238106Sdes
14041238106Sdesac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14042238106Sdes$ac_includes_default
14043238106Sdes#ifdef HAVE_SYS_RESOURCE_H
14044238106Sdes#  include <sys/resource.h>
14045238106Sdes#endif
14046238106Sdes
14047238106Sdes"
14048238106Sdesif test "x$ac_cv_type_rlim_t" = xyes; then :
14049238106Sdes
14050238106Sdeselse
14051238106Sdes
14052238106Sdes$as_echo "#define rlim_t unsigned long" >>confdefs.h
14053238106Sdes
14054238106Sdesfi
14055238106Sdes
14056238106Sdes
14057238106Sdesac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14058238106Sdes$ac_includes_default
14059238106Sdes#ifdef HAVE_SYS_SOCKET_H
14060238106Sdes#  include <sys/socket.h>
14061238106Sdes#endif
14062238106Sdes#ifdef HAVE_WS2TCPIP_H
14063238106Sdes#  include <ws2tcpip.h>
14064238106Sdes#endif
14065238106Sdes
14066238106Sdes"
14067238106Sdesif test "x$ac_cv_type_socklen_t" = xyes; then :
14068238106Sdes
14069238106Sdeselse
14070238106Sdes
14071238106Sdes$as_echo "#define socklen_t int" >>confdefs.h
14072238106Sdes
14073238106Sdesfi
14074238106Sdes
14075238106Sdes ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14076238106Sdes$ac_includes_default
14077238106Sdes#ifdef HAVE_SYS_TYPES_H
14078238106Sdes# include <sys/types.h>
14079238106Sdes#endif
14080238106Sdes#ifdef HAVE_NETINET_IN_H
14081238106Sdes# include <netinet/in.h>
14082238106Sdes#endif
14083238106Sdes
14084238106Sdes"
14085238106Sdesif test "x$ac_cv_type_in_addr_t" = xyes; then :
14086238106Sdes
14087238106Sdeselse
14088238106Sdes
14089238106Sdes$as_echo "#define in_addr_t uint32_t" >>confdefs.h
14090238106Sdes
14091238106Sdesfi
14092238106Sdes
14093238106Sdes ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14094238106Sdes$ac_includes_default
14095238106Sdes#ifdef HAVE_SYS_TYPES_H
14096238106Sdes# include <sys/types.h>
14097238106Sdes#endif
14098238106Sdes#ifdef HAVE_NETINET_IN_H
14099238106Sdes# include <netinet/in.h>
14100238106Sdes#endif
14101238106Sdes
14102238106Sdes"
14103238106Sdesif test "x$ac_cv_type_in_port_t" = xyes; then :
14104238106Sdes
14105238106Sdeselse
14106238106Sdes
14107238106Sdes$as_echo "#define in_port_t uint16_t" >>confdefs.h
14108238106Sdes
14109238106Sdesfi
14110238106Sdes
14111238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14112238106Sdes$as_echo_n "checking if memcmp compares unsigned... " >&6; }
14113238106Sdesif test "$cross_compiling" = yes; then :
14114238106Sdes   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14115238106Sdes$as_echo "cross-compile no" >&6; }
14116238106Sdes
14117238106Sdes$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14118238106Sdes
14119238106Sdes  case " $LIBOBJS " in
14120238106Sdes  *" memcmp.$ac_objext "* ) ;;
14121238106Sdes  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14122238106Sdes ;;
14123238106Sdesesac
14124238106Sdes
14125238106Sdes
14126238106Sdeselse
14127238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14128238106Sdes/* end confdefs.h.  */
14129238106Sdes
14130238106Sdes#include <stdio.h>
14131238106Sdes#include <stdlib.h>
14132238106Sdes#include <string.h>
14133238106Sdesint main(void)
14134238106Sdes{
14135238106Sdes	char a = 255, b = 0;
14136238106Sdes	if(memcmp(&a, &b, 1) < 0)
14137238106Sdes		return 1;
14138238106Sdes	return 0;
14139238106Sdes}
14140238106Sdes
14141238106Sdes_ACEOF
14142238106Sdesif ac_fn_c_try_run "$LINENO"; then :
14143238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14144238106Sdes$as_echo "yes" >&6; }
14145238106Sdeselse
14146238106Sdes   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14147238106Sdes$as_echo "no" >&6; }
14148238106Sdes
14149238106Sdes$as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14150238106Sdes
14151238106Sdes  case " $LIBOBJS " in
14152238106Sdes  *" memcmp.$ac_objext "* ) ;;
14153238106Sdes  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14154238106Sdes ;;
14155238106Sdesesac
14156238106Sdes
14157238106Sdes
14158238106Sdesfi
14159238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14160238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
14161238106Sdesfi
14162238106Sdes
14163238106Sdes
14164269257Sdes# The cast to long int works around a bug in the HP C Compiler
14165269257Sdes# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14166269257Sdes# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14167269257Sdes# This bug is HP SR number 8606223364.
14168269257Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14169269257Sdes$as_echo_n "checking size of time_t... " >&6; }
14170269257Sdesif ${ac_cv_sizeof_time_t+:} false; then :
14171269257Sdes  $as_echo_n "(cached) " >&6
14172269257Sdeselse
14173269257Sdes  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14174269257Sdes$ac_includes_default
14175269257Sdes#ifdef TIME_WITH_SYS_TIME
14176269257Sdes# include <sys/time.h>
14177269257Sdes# include <time.h>
14178269257Sdes#else
14179269257Sdes# ifdef HAVE_SYS_TIME_H
14180269257Sdes#  include <sys/time.h>
14181269257Sdes# else
14182269257Sdes#  include <time.h>
14183269257Sdes# endif
14184269257Sdes#endif
14185269257Sdes
14186269257Sdes"; then :
14187269257Sdes
14188269257Sdeselse
14189269257Sdes  if test "$ac_cv_type_time_t" = yes; then
14190269257Sdes     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14191269257Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14192269257Sdesas_fn_error 77 "cannot compute sizeof (time_t)
14193269257SdesSee \`config.log' for more details" "$LINENO" 5; }
14194269257Sdes   else
14195269257Sdes     ac_cv_sizeof_time_t=0
14196269257Sdes   fi
14197269257Sdesfi
14198269257Sdes
14199269257Sdesfi
14200269257Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14201269257Sdes$as_echo "$ac_cv_sizeof_time_t" >&6; }
14202269257Sdes
14203269257Sdes
14204269257Sdes
14205269257Sdescat >>confdefs.h <<_ACEOF
14206269257Sdes#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14207269257Sdes_ACEOF
14208269257Sdes
14209269257Sdes
14210269257Sdes
14211238106Sdes# add option to disable the evil rpath
14212238106Sdes
14213238106Sdes# Check whether --enable-rpath was given.
14214238106Sdesif test "${enable_rpath+set}" = set; then :
14215238106Sdes  enableval=$enable_rpath; enable_rpath=$enableval
14216238106Sdeselse
14217238106Sdes  enable_rpath=yes
14218238106Sdesfi
14219238106Sdes
14220238106Sdesif test "x$enable_rpath" = xno; then
14221238106Sdes		ac_config_commands="$ac_config_commands disable-rpath"
14222238106Sdes
14223238106Sdesfi
14224238106Sdes
14225238106Sdes
14226238106Sdes
14227238106Sdes# check to see if libraries are needed for these functions.
14228238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14229238106Sdes$as_echo_n "checking for library containing inet_pton... " >&6; }
14230238106Sdesif ${ac_cv_search_inet_pton+:} false; then :
14231238106Sdes  $as_echo_n "(cached) " >&6
14232238106Sdeselse
14233238106Sdes  ac_func_search_save_LIBS=$LIBS
14234238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235238106Sdes/* end confdefs.h.  */
14236238106Sdes
14237238106Sdes/* Override any GCC internal prototype to avoid an error.
14238238106Sdes   Use char because int might match the return type of a GCC
14239238106Sdes   builtin and then its argument prototype would still apply.  */
14240238106Sdes#ifdef __cplusplus
14241238106Sdesextern "C"
14242238106Sdes#endif
14243238106Sdeschar inet_pton ();
14244238106Sdesint
14245238106Sdesmain ()
14246238106Sdes{
14247238106Sdesreturn inet_pton ();
14248238106Sdes  ;
14249238106Sdes  return 0;
14250238106Sdes}
14251238106Sdes_ACEOF
14252238106Sdesfor ac_lib in '' nsl; do
14253238106Sdes  if test -z "$ac_lib"; then
14254238106Sdes    ac_res="none required"
14255238106Sdes  else
14256238106Sdes    ac_res=-l$ac_lib
14257238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14258238106Sdes  fi
14259238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
14260238106Sdes  ac_cv_search_inet_pton=$ac_res
14261238106Sdesfi
14262238106Sdesrm -f core conftest.err conftest.$ac_objext \
14263238106Sdes    conftest$ac_exeext
14264238106Sdes  if ${ac_cv_search_inet_pton+:} false; then :
14265238106Sdes  break
14266238106Sdesfi
14267238106Sdesdone
14268238106Sdesif ${ac_cv_search_inet_pton+:} false; then :
14269238106Sdes
14270238106Sdeselse
14271238106Sdes  ac_cv_search_inet_pton=no
14272238106Sdesfi
14273238106Sdesrm conftest.$ac_ext
14274238106SdesLIBS=$ac_func_search_save_LIBS
14275238106Sdesfi
14276238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14277238106Sdes$as_echo "$ac_cv_search_inet_pton" >&6; }
14278238106Sdesac_res=$ac_cv_search_inet_pton
14279238106Sdesif test "$ac_res" != no; then :
14280238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14281238106Sdes
14282238106Sdesfi
14283238106Sdes
14284238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14285238106Sdes$as_echo_n "checking for library containing socket... " >&6; }
14286238106Sdesif ${ac_cv_search_socket+:} false; then :
14287238106Sdes  $as_echo_n "(cached) " >&6
14288238106Sdeselse
14289238106Sdes  ac_func_search_save_LIBS=$LIBS
14290238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291238106Sdes/* end confdefs.h.  */
14292238106Sdes
14293238106Sdes/* Override any GCC internal prototype to avoid an error.
14294238106Sdes   Use char because int might match the return type of a GCC
14295238106Sdes   builtin and then its argument prototype would still apply.  */
14296238106Sdes#ifdef __cplusplus
14297238106Sdesextern "C"
14298238106Sdes#endif
14299238106Sdeschar socket ();
14300238106Sdesint
14301238106Sdesmain ()
14302238106Sdes{
14303238106Sdesreturn socket ();
14304238106Sdes  ;
14305238106Sdes  return 0;
14306238106Sdes}
14307238106Sdes_ACEOF
14308238106Sdesfor ac_lib in '' socket; do
14309238106Sdes  if test -z "$ac_lib"; then
14310238106Sdes    ac_res="none required"
14311238106Sdes  else
14312238106Sdes    ac_res=-l$ac_lib
14313238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14314238106Sdes  fi
14315238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
14316238106Sdes  ac_cv_search_socket=$ac_res
14317238106Sdesfi
14318238106Sdesrm -f core conftest.err conftest.$ac_objext \
14319238106Sdes    conftest$ac_exeext
14320238106Sdes  if ${ac_cv_search_socket+:} false; then :
14321238106Sdes  break
14322238106Sdesfi
14323238106Sdesdone
14324238106Sdesif ${ac_cv_search_socket+:} false; then :
14325238106Sdes
14326238106Sdeselse
14327238106Sdes  ac_cv_search_socket=no
14328238106Sdesfi
14329238106Sdesrm conftest.$ac_ext
14330238106SdesLIBS=$ac_func_search_save_LIBS
14331238106Sdesfi
14332238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14333238106Sdes$as_echo "$ac_cv_search_socket" >&6; }
14334238106Sdesac_res=$ac_cv_search_socket
14335238106Sdesif test "$ac_res" != no; then :
14336238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14337238106Sdes
14338238106Sdesfi
14339238106Sdes
14340238106Sdes
14341238106Sdes# check wether strptime also works
14342238106Sdes
14343238106Sdes# check some functions of the OS before linking libs (while still runnable).
14344238106Sdesfor ac_header in unistd.h
14345238106Sdesdo :
14346238106Sdes  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14347238106Sdesif test "x$ac_cv_header_unistd_h" = xyes; then :
14348238106Sdes  cat >>confdefs.h <<_ACEOF
14349238106Sdes#define HAVE_UNISTD_H 1
14350238106Sdes_ACEOF
14351238106Sdes
14352238106Sdesfi
14353238106Sdes
14354238106Sdesdone
14355238106Sdes
14356238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14357238106Sdes$as_echo_n "checking for working chown... " >&6; }
14358238106Sdesif ${ac_cv_func_chown_works+:} false; then :
14359238106Sdes  $as_echo_n "(cached) " >&6
14360238106Sdeselse
14361238106Sdes  if test "$cross_compiling" = yes; then :
14362238106Sdes  ac_cv_func_chown_works=no
14363238106Sdeselse
14364238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14365238106Sdes/* end confdefs.h.  */
14366238106Sdes$ac_includes_default
14367238106Sdes#include <fcntl.h>
14368238106Sdes
14369238106Sdesint
14370238106Sdesmain ()
14371238106Sdes{
14372238106Sdes  char *f = "conftest.chown";
14373238106Sdes  struct stat before, after;
14374238106Sdes
14375238106Sdes  if (creat (f, 0600) < 0)
14376238106Sdes    return 1;
14377238106Sdes  if (stat (f, &before) < 0)
14378238106Sdes    return 1;
14379238106Sdes  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14380238106Sdes    return 1;
14381238106Sdes  if (stat (f, &after) < 0)
14382238106Sdes    return 1;
14383238106Sdes  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14384238106Sdes
14385238106Sdes  ;
14386238106Sdes  return 0;
14387238106Sdes}
14388238106Sdes_ACEOF
14389238106Sdesif ac_fn_c_try_run "$LINENO"; then :
14390238106Sdes  ac_cv_func_chown_works=yes
14391238106Sdeselse
14392238106Sdes  ac_cv_func_chown_works=no
14393238106Sdesfi
14394238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14395238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
14396238106Sdesfi
14397238106Sdes
14398238106Sdesrm -f conftest.chown
14399238106Sdes
14400238106Sdesfi
14401238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14402238106Sdes$as_echo "$ac_cv_func_chown_works" >&6; }
14403238106Sdesif test $ac_cv_func_chown_works = yes; then
14404238106Sdes
14405238106Sdes$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14406238106Sdes
14407238106Sdesfi
14408238106Sdes
14409238106Sdesfor ac_header in vfork.h
14410238106Sdesdo :
14411238106Sdes  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14412238106Sdesif test "x$ac_cv_header_vfork_h" = xyes; then :
14413238106Sdes  cat >>confdefs.h <<_ACEOF
14414238106Sdes#define HAVE_VFORK_H 1
14415238106Sdes_ACEOF
14416238106Sdes
14417238106Sdesfi
14418238106Sdes
14419238106Sdesdone
14420238106Sdes
14421238106Sdesfor ac_func in fork vfork
14422238106Sdesdo :
14423238106Sdes  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14424238106Sdesac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14425238106Sdesif eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14426238106Sdes  cat >>confdefs.h <<_ACEOF
14427238106Sdes#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14428238106Sdes_ACEOF
14429238106Sdes
14430238106Sdesfi
14431238106Sdesdone
14432238106Sdes
14433238106Sdesif test "x$ac_cv_func_fork" = xyes; then
14434238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14435238106Sdes$as_echo_n "checking for working fork... " >&6; }
14436238106Sdesif ${ac_cv_func_fork_works+:} false; then :
14437238106Sdes  $as_echo_n "(cached) " >&6
14438238106Sdeselse
14439238106Sdes  if test "$cross_compiling" = yes; then :
14440238106Sdes  ac_cv_func_fork_works=cross
14441238106Sdeselse
14442238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443238106Sdes/* end confdefs.h.  */
14444238106Sdes$ac_includes_default
14445238106Sdesint
14446238106Sdesmain ()
14447238106Sdes{
14448238106Sdes
14449238106Sdes	  /* By Ruediger Kuhlmann. */
14450238106Sdes	  return fork () < 0;
14451238106Sdes
14452238106Sdes  ;
14453238106Sdes  return 0;
14454238106Sdes}
14455238106Sdes_ACEOF
14456238106Sdesif ac_fn_c_try_run "$LINENO"; then :
14457238106Sdes  ac_cv_func_fork_works=yes
14458238106Sdeselse
14459238106Sdes  ac_cv_func_fork_works=no
14460238106Sdesfi
14461238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14462238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
14463238106Sdesfi
14464238106Sdes
14465238106Sdesfi
14466238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14467238106Sdes$as_echo "$ac_cv_func_fork_works" >&6; }
14468238106Sdes
14469238106Sdeselse
14470238106Sdes  ac_cv_func_fork_works=$ac_cv_func_fork
14471238106Sdesfi
14472238106Sdesif test "x$ac_cv_func_fork_works" = xcross; then
14473238106Sdes  case $host in
14474238106Sdes    *-*-amigaos* | *-*-msdosdjgpp*)
14475238106Sdes      # Override, as these systems have only a dummy fork() stub
14476238106Sdes      ac_cv_func_fork_works=no
14477238106Sdes      ;;
14478238106Sdes    *)
14479238106Sdes      ac_cv_func_fork_works=yes
14480238106Sdes      ;;
14481238106Sdes  esac
14482238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14483238106Sdes$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14484238106Sdesfi
14485238106Sdesac_cv_func_vfork_works=$ac_cv_func_vfork
14486238106Sdesif test "x$ac_cv_func_vfork" = xyes; then
14487238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14488238106Sdes$as_echo_n "checking for working vfork... " >&6; }
14489238106Sdesif ${ac_cv_func_vfork_works+:} false; then :
14490238106Sdes  $as_echo_n "(cached) " >&6
14491238106Sdeselse
14492238106Sdes  if test "$cross_compiling" = yes; then :
14493238106Sdes  ac_cv_func_vfork_works=cross
14494238106Sdeselse
14495238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496238106Sdes/* end confdefs.h.  */
14497238106Sdes/* Thanks to Paul Eggert for this test.  */
14498238106Sdes$ac_includes_default
14499238106Sdes#include <sys/wait.h>
14500238106Sdes#ifdef HAVE_VFORK_H
14501238106Sdes# include <vfork.h>
14502238106Sdes#endif
14503238106Sdes/* On some sparc systems, changes by the child to local and incoming
14504238106Sdes   argument registers are propagated back to the parent.  The compiler
14505238106Sdes   is told about this with #include <vfork.h>, but some compilers
14506238106Sdes   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
14507238106Sdes   static variable whose address is put into a register that is
14508238106Sdes   clobbered by the vfork.  */
14509238106Sdesstatic void
14510238106Sdes#ifdef __cplusplus
14511238106Sdessparc_address_test (int arg)
14512238106Sdes# else
14513238106Sdessparc_address_test (arg) int arg;
14514238106Sdes#endif
14515238106Sdes{
14516238106Sdes  static pid_t child;
14517238106Sdes  if (!child) {
14518238106Sdes    child = vfork ();
14519238106Sdes    if (child < 0) {
14520238106Sdes      perror ("vfork");
14521238106Sdes      _exit(2);
14522238106Sdes    }
14523238106Sdes    if (!child) {
14524238106Sdes      arg = getpid();
14525238106Sdes      write(-1, "", 0);
14526238106Sdes      _exit (arg);
14527238106Sdes    }
14528238106Sdes  }
14529238106Sdes}
14530238106Sdes
14531238106Sdesint
14532238106Sdesmain ()
14533238106Sdes{
14534238106Sdes  pid_t parent = getpid ();
14535238106Sdes  pid_t child;
14536238106Sdes
14537238106Sdes  sparc_address_test (0);
14538238106Sdes
14539238106Sdes  child = vfork ();
14540238106Sdes
14541238106Sdes  if (child == 0) {
14542238106Sdes    /* Here is another test for sparc vfork register problems.  This
14543238106Sdes       test uses lots of local variables, at least as many local
14544238106Sdes       variables as main has allocated so far including compiler
14545238106Sdes       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
14546238106Sdes       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
14547238106Sdes       reuse the register of parent for one of the local variables,
14548238106Sdes       since it will think that parent can't possibly be used any more
14549238106Sdes       in this routine.  Assigning to the local variable will thus
14550238106Sdes       munge parent in the parent process.  */
14551238106Sdes    pid_t
14552238106Sdes      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14553238106Sdes      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14554238106Sdes    /* Convince the compiler that p..p7 are live; otherwise, it might
14555238106Sdes       use the same hardware register for all 8 local variables.  */
14556238106Sdes    if (p != p1 || p != p2 || p != p3 || p != p4
14557238106Sdes	|| p != p5 || p != p6 || p != p7)
14558238106Sdes      _exit(1);
14559238106Sdes
14560238106Sdes    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14561238106Sdes       from child file descriptors.  If the child closes a descriptor
14562238106Sdes       before it execs or exits, this munges the parent's descriptor
14563238106Sdes       as well.  Test for this by closing stdout in the child.  */
14564238106Sdes    _exit(close(fileno(stdout)) != 0);
14565238106Sdes  } else {
14566238106Sdes    int status;
14567238106Sdes    struct stat st;
14568238106Sdes
14569238106Sdes    while (wait(&status) != child)
14570238106Sdes      ;
14571238106Sdes    return (
14572238106Sdes	 /* Was there some problem with vforking?  */
14573238106Sdes	 child < 0
14574238106Sdes
14575238106Sdes	 /* Did the child fail?  (This shouldn't happen.)  */
14576238106Sdes	 || status
14577238106Sdes
14578238106Sdes	 /* Did the vfork/compiler bug occur?  */
14579238106Sdes	 || parent != getpid()
14580238106Sdes
14581238106Sdes	 /* Did the file descriptor bug occur?  */
14582238106Sdes	 || fstat(fileno(stdout), &st) != 0
14583238106Sdes	 );
14584238106Sdes  }
14585238106Sdes}
14586238106Sdes_ACEOF
14587238106Sdesif ac_fn_c_try_run "$LINENO"; then :
14588238106Sdes  ac_cv_func_vfork_works=yes
14589238106Sdeselse
14590238106Sdes  ac_cv_func_vfork_works=no
14591238106Sdesfi
14592238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14593238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
14594238106Sdesfi
14595238106Sdes
14596238106Sdesfi
14597238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14598238106Sdes$as_echo "$ac_cv_func_vfork_works" >&6; }
14599238106Sdes
14600238106Sdesfi;
14601238106Sdesif test "x$ac_cv_func_fork_works" = xcross; then
14602238106Sdes  ac_cv_func_vfork_works=$ac_cv_func_vfork
14603238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14604238106Sdes$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14605238106Sdesfi
14606238106Sdes
14607238106Sdesif test "x$ac_cv_func_vfork_works" = xyes; then
14608238106Sdes
14609238106Sdes$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14610238106Sdes
14611238106Sdeselse
14612238106Sdes
14613238106Sdes$as_echo "#define vfork fork" >>confdefs.h
14614238106Sdes
14615238106Sdesfi
14616238106Sdesif test "x$ac_cv_func_fork_works" = xyes; then
14617238106Sdes
14618238106Sdes$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14619238106Sdes
14620238106Sdesfi
14621238106Sdes
14622238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
14623238106Sdes$as_echo_n "checking return type of signal handlers... " >&6; }
14624238106Sdesif ${ac_cv_type_signal+:} false; then :
14625238106Sdes  $as_echo_n "(cached) " >&6
14626238106Sdeselse
14627238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628238106Sdes/* end confdefs.h.  */
14629238106Sdes#include <sys/types.h>
14630238106Sdes#include <signal.h>
14631238106Sdes
14632238106Sdesint
14633238106Sdesmain ()
14634238106Sdes{
14635238106Sdesreturn *(signal (0, 0)) (0) == 1;
14636238106Sdes  ;
14637238106Sdes  return 0;
14638238106Sdes}
14639238106Sdes_ACEOF
14640238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
14641238106Sdes  ac_cv_type_signal=int
14642238106Sdeselse
14643238106Sdes  ac_cv_type_signal=void
14644238106Sdesfi
14645238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14646238106Sdesfi
14647238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
14648238106Sdes$as_echo "$ac_cv_type_signal" >&6; }
14649238106Sdes
14650238106Sdescat >>confdefs.h <<_ACEOF
14651238106Sdes#define RETSIGTYPE $ac_cv_type_signal
14652238106Sdes_ACEOF
14653238106Sdes
14654238106Sdes
14655238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14656238106Sdes$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14657238106Sdesif ${ac_cv_sys_largefile_source+:} false; then :
14658238106Sdes  $as_echo_n "(cached) " >&6
14659238106Sdeselse
14660238106Sdes  while :; do
14661238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662238106Sdes/* end confdefs.h.  */
14663238106Sdes#include <sys/types.h> /* for off_t */
14664238106Sdes     #include <stdio.h>
14665238106Sdesint
14666238106Sdesmain ()
14667238106Sdes{
14668238106Sdesint (*fp) (FILE *, off_t, int) = fseeko;
14669238106Sdes     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14670238106Sdes  ;
14671238106Sdes  return 0;
14672238106Sdes}
14673238106Sdes_ACEOF
14674238106Sdesif ac_fn_c_try_link "$LINENO"; then :
14675238106Sdes  ac_cv_sys_largefile_source=no; break
14676238106Sdesfi
14677238106Sdesrm -f core conftest.err conftest.$ac_objext \
14678238106Sdes    conftest$ac_exeext conftest.$ac_ext
14679238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680238106Sdes/* end confdefs.h.  */
14681238106Sdes#define _LARGEFILE_SOURCE 1
14682238106Sdes#include <sys/types.h> /* for off_t */
14683238106Sdes     #include <stdio.h>
14684238106Sdesint
14685238106Sdesmain ()
14686238106Sdes{
14687238106Sdesint (*fp) (FILE *, off_t, int) = fseeko;
14688238106Sdes     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14689238106Sdes  ;
14690238106Sdes  return 0;
14691238106Sdes}
14692238106Sdes_ACEOF
14693238106Sdesif ac_fn_c_try_link "$LINENO"; then :
14694238106Sdes  ac_cv_sys_largefile_source=1; break
14695238106Sdesfi
14696238106Sdesrm -f core conftest.err conftest.$ac_objext \
14697238106Sdes    conftest$ac_exeext conftest.$ac_ext
14698238106Sdes  ac_cv_sys_largefile_source=unknown
14699238106Sdes  break
14700238106Sdesdone
14701238106Sdesfi
14702238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14703238106Sdes$as_echo "$ac_cv_sys_largefile_source" >&6; }
14704238106Sdescase $ac_cv_sys_largefile_source in #(
14705238106Sdes  no | unknown) ;;
14706238106Sdes  *)
14707238106Sdescat >>confdefs.h <<_ACEOF
14708238106Sdes#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14709238106Sdes_ACEOF
14710238106Sdes;;
14711238106Sdesesac
14712238106Sdesrm -rf conftest*
14713238106Sdes
14714238106Sdes# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14715238106Sdes# in glibc 2.1.3, but that breaks too many other things.
14716238106Sdes# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14717238106Sdesif test $ac_cv_sys_largefile_source != unknown; then
14718238106Sdes
14719238106Sdes$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14720238106Sdes
14721238106Sdesfi
14722238106Sdes
14723238106Sdes
14724238106Sdes# Check whether --enable-largefile was given.
14725238106Sdesif test "${enable_largefile+set}" = set; then :
14726238106Sdes  enableval=$enable_largefile;
14727238106Sdesfi
14728238106Sdes
14729238106Sdesif test "$enable_largefile" != no; then
14730238106Sdes
14731238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14732238106Sdes$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14733238106Sdesif ${ac_cv_sys_largefile_CC+:} false; then :
14734238106Sdes  $as_echo_n "(cached) " >&6
14735238106Sdeselse
14736238106Sdes  ac_cv_sys_largefile_CC=no
14737238106Sdes     if test "$GCC" != yes; then
14738238106Sdes       ac_save_CC=$CC
14739238106Sdes       while :; do
14740238106Sdes	 # IRIX 6.2 and later do not support large files by default,
14741238106Sdes	 # so use the C compiler's -n32 option if that helps.
14742238106Sdes	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14743238106Sdes/* end confdefs.h.  */
14744238106Sdes#include <sys/types.h>
14745238106Sdes /* Check that off_t can represent 2**63 - 1 correctly.
14746238106Sdes    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14747238106Sdes    since some C++ compilers masquerading as C compilers
14748238106Sdes    incorrectly reject 9223372036854775807.  */
14749238106Sdes#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14750238106Sdes  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14751238106Sdes		       && LARGE_OFF_T % 2147483647 == 1)
14752238106Sdes		      ? 1 : -1];
14753238106Sdesint
14754238106Sdesmain ()
14755238106Sdes{
14756238106Sdes
14757238106Sdes  ;
14758238106Sdes  return 0;
14759238106Sdes}
14760238106Sdes_ACEOF
14761238106Sdes	 if ac_fn_c_try_compile "$LINENO"; then :
14762238106Sdes  break
14763238106Sdesfi
14764238106Sdesrm -f core conftest.err conftest.$ac_objext
14765238106Sdes	 CC="$CC -n32"
14766238106Sdes	 if ac_fn_c_try_compile "$LINENO"; then :
14767238106Sdes  ac_cv_sys_largefile_CC=' -n32'; break
14768238106Sdesfi
14769238106Sdesrm -f core conftest.err conftest.$ac_objext
14770238106Sdes	 break
14771238106Sdes       done
14772238106Sdes       CC=$ac_save_CC
14773238106Sdes       rm -f conftest.$ac_ext
14774238106Sdes    fi
14775238106Sdesfi
14776238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14777238106Sdes$as_echo "$ac_cv_sys_largefile_CC" >&6; }
14778238106Sdes  if test "$ac_cv_sys_largefile_CC" != no; then
14779238106Sdes    CC=$CC$ac_cv_sys_largefile_CC
14780238106Sdes  fi
14781238106Sdes
14782238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14783238106Sdes$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14784238106Sdesif ${ac_cv_sys_file_offset_bits+:} false; then :
14785238106Sdes  $as_echo_n "(cached) " >&6
14786238106Sdeselse
14787238106Sdes  while :; do
14788238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14789238106Sdes/* end confdefs.h.  */
14790238106Sdes#include <sys/types.h>
14791238106Sdes /* Check that off_t can represent 2**63 - 1 correctly.
14792238106Sdes    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14793238106Sdes    since some C++ compilers masquerading as C compilers
14794238106Sdes    incorrectly reject 9223372036854775807.  */
14795238106Sdes#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14796238106Sdes  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14797238106Sdes		       && LARGE_OFF_T % 2147483647 == 1)
14798238106Sdes		      ? 1 : -1];
14799238106Sdesint
14800238106Sdesmain ()
14801238106Sdes{
14802238106Sdes
14803238106Sdes  ;
14804238106Sdes  return 0;
14805238106Sdes}
14806238106Sdes_ACEOF
14807238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
14808238106Sdes  ac_cv_sys_file_offset_bits=no; break
14809238106Sdesfi
14810238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14811238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14812238106Sdes/* end confdefs.h.  */
14813238106Sdes#define _FILE_OFFSET_BITS 64
14814238106Sdes#include <sys/types.h>
14815238106Sdes /* Check that off_t can represent 2**63 - 1 correctly.
14816238106Sdes    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14817238106Sdes    since some C++ compilers masquerading as C compilers
14818238106Sdes    incorrectly reject 9223372036854775807.  */
14819238106Sdes#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14820238106Sdes  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14821238106Sdes		       && LARGE_OFF_T % 2147483647 == 1)
14822238106Sdes		      ? 1 : -1];
14823238106Sdesint
14824238106Sdesmain ()
14825238106Sdes{
14826238106Sdes
14827238106Sdes  ;
14828238106Sdes  return 0;
14829238106Sdes}
14830238106Sdes_ACEOF
14831238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
14832238106Sdes  ac_cv_sys_file_offset_bits=64; break
14833238106Sdesfi
14834238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835238106Sdes  ac_cv_sys_file_offset_bits=unknown
14836238106Sdes  break
14837238106Sdesdone
14838238106Sdesfi
14839238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14840238106Sdes$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14841238106Sdescase $ac_cv_sys_file_offset_bits in #(
14842238106Sdes  no | unknown) ;;
14843238106Sdes  *)
14844238106Sdescat >>confdefs.h <<_ACEOF
14845238106Sdes#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14846238106Sdes_ACEOF
14847238106Sdes;;
14848238106Sdesesac
14849238106Sdesrm -rf conftest*
14850238106Sdes  if test $ac_cv_sys_file_offset_bits = unknown; then
14851238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14852238106Sdes$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14853238106Sdesif ${ac_cv_sys_large_files+:} false; then :
14854238106Sdes  $as_echo_n "(cached) " >&6
14855238106Sdeselse
14856238106Sdes  while :; do
14857238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14858238106Sdes/* end confdefs.h.  */
14859238106Sdes#include <sys/types.h>
14860238106Sdes /* Check that off_t can represent 2**63 - 1 correctly.
14861238106Sdes    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14862238106Sdes    since some C++ compilers masquerading as C compilers
14863238106Sdes    incorrectly reject 9223372036854775807.  */
14864238106Sdes#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14865238106Sdes  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14866238106Sdes		       && LARGE_OFF_T % 2147483647 == 1)
14867238106Sdes		      ? 1 : -1];
14868238106Sdesint
14869238106Sdesmain ()
14870238106Sdes{
14871238106Sdes
14872238106Sdes  ;
14873238106Sdes  return 0;
14874238106Sdes}
14875238106Sdes_ACEOF
14876238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
14877238106Sdes  ac_cv_sys_large_files=no; break
14878238106Sdesfi
14879238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14880238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881238106Sdes/* end confdefs.h.  */
14882238106Sdes#define _LARGE_FILES 1
14883238106Sdes#include <sys/types.h>
14884238106Sdes /* Check that off_t can represent 2**63 - 1 correctly.
14885238106Sdes    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14886238106Sdes    since some C++ compilers masquerading as C compilers
14887238106Sdes    incorrectly reject 9223372036854775807.  */
14888238106Sdes#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14889238106Sdes  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14890238106Sdes		       && LARGE_OFF_T % 2147483647 == 1)
14891238106Sdes		      ? 1 : -1];
14892238106Sdesint
14893238106Sdesmain ()
14894238106Sdes{
14895238106Sdes
14896238106Sdes  ;
14897238106Sdes  return 0;
14898238106Sdes}
14899238106Sdes_ACEOF
14900238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
14901238106Sdes  ac_cv_sys_large_files=1; break
14902238106Sdesfi
14903238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14904238106Sdes  ac_cv_sys_large_files=unknown
14905238106Sdes  break
14906238106Sdesdone
14907238106Sdesfi
14908238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14909238106Sdes$as_echo "$ac_cv_sys_large_files" >&6; }
14910238106Sdescase $ac_cv_sys_large_files in #(
14911238106Sdes  no | unknown) ;;
14912238106Sdes  *)
14913238106Sdescat >>confdefs.h <<_ACEOF
14914238106Sdes#define _LARGE_FILES $ac_cv_sys_large_files
14915238106Sdes_ACEOF
14916238106Sdes;;
14917238106Sdesesac
14918238106Sdesrm -rf conftest*
14919238106Sdes  fi
14920249141Sdes
14921249141Sdes
14922238106Sdesfi
14923238106Sdes
14924238106Sdes
14925238106Sdes
14926238106Sdes
14927238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
14928238106Sdes$as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
14929249141Sdescache=_D_LARGEFILE_SOURCE_1
14930238106Sdesif eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
14931238106Sdes  $as_echo_n "(cached) " >&6
14932238106Sdeselse
14933238106Sdes
14934238106Sdesecho '
14935238106Sdes#include <stdio.h>
14936238106Sdesint test() {
14937238106Sdes        int a = fseeko(stdin, 0, 0);
14938238106Sdes        return a;
14939238106Sdes}
14940238106Sdes' > conftest.c
14941238106Sdesecho 'void f(){}' >>conftest.c
14942238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
14943238106Sdeseval "cv_prog_cc_flag_needed_$cache=no"
14944238106Sdeselse
14945238106Sdes
14946238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
14947238106Sdeseval "cv_prog_cc_flag_needed_$cache=yes"
14948238106Sdeselse
14949238106Sdeseval "cv_prog_cc_flag_needed_$cache=fail"
14950238106Sdes#echo 'Test with flag fails too!'
14951238106Sdes#cat conftest.c
14952238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14953238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14954238106Sdes#exit 1
14955238106Sdesfi
14956238106Sdes
14957238106Sdesfi
14958238106Sdesrm -f conftest conftest.c conftest.o
14959238106Sdes
14960238106Sdesfi
14961238106Sdes
14962238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
14963238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14964238106Sdes$as_echo "yes" >&6; }
14965238106Sdes:
14966238106SdesCFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
14967238106Sdeselse
14968238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
14969238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14970238106Sdes$as_echo "no" >&6; }
14971238106Sdes#echo 'Test with flag is no!'
14972238106Sdes#cat conftest.c
14973238106Sdes#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
14974238106Sdes#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
14975238106Sdes#exit 1
14976238106Sdes:
14977238106Sdes
14978238106Sdeselse
14979238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14980238106Sdes$as_echo "failed" >&6; }
14981238106Sdes:
14982238106Sdes
14983238106Sdesfi
14984238106Sdesfi
14985238106Sdes
14986238106Sdes
14987238106Sdes
14988238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
14989238106Sdes$as_echo_n "checking if nonblocking sockets work... " >&6; }
14990238106Sdesif echo $target | grep mingw32 >/dev/null; then
14991238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
14992238106Sdes$as_echo "no (windows)" >&6; }
14993238106Sdes
14994238106Sdes$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
14995238106Sdes
14996238106Sdeselse
14997238106Sdesif test "$cross_compiling" = yes; then :
14998238106Sdes
14999238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15000238106Sdes$as_echo "crosscompile(yes)" >&6; }
15001238106Sdes
15002238106Sdeselse
15003238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004238106Sdes/* end confdefs.h.  */
15005238106Sdes
15006238106Sdes
15007238106Sdes#include <stdio.h>
15008238106Sdes#include <string.h>
15009238106Sdes#include <stdlib.h>
15010238106Sdes#include <fcntl.h>
15011238106Sdes#include <errno.h>
15012238106Sdes#ifdef HAVE_SYS_TYPES_H
15013238106Sdes#include <sys/types.h>
15014238106Sdes#endif
15015238106Sdes#ifdef HAVE_SYS_SOCKET_H
15016238106Sdes#include <sys/socket.h>
15017238106Sdes#endif
15018238106Sdes#ifdef HAVE_NETINET_IN_H
15019238106Sdes#include <netinet/in.h>
15020238106Sdes#endif
15021238106Sdes#ifdef HAVE_ARPA_INET_H
15022238106Sdes#include <arpa/inet.h>
15023238106Sdes#endif
15024238106Sdes#ifdef HAVE_UNISTD_H
15025238106Sdes#include <unistd.h>
15026238106Sdes#endif
15027238106Sdes#ifdef HAVE_TIME_H
15028238106Sdes#include <time.h>
15029238106Sdes#endif
15030238106Sdes
15031238106Sdesint main(void)
15032238106Sdes{
15033238106Sdes	int port;
15034238106Sdes	int sfd, cfd;
15035238106Sdes	int num = 10;
15036238106Sdes	int i, p;
15037238106Sdes	struct sockaddr_in a;
15038238106Sdes	/* test if select and nonblocking reads work well together */
15039238106Sdes	/* open port.
15040238106Sdes	   fork child to send 10 messages.
15041238106Sdes	   select to read.
15042238106Sdes	   then try to nonblocking read the 10 messages
15043238106Sdes	   then, nonblocking read must give EAGAIN
15044238106Sdes	*/
15045238106Sdes
15046238106Sdes	port = 12345 + (time(0)%32);
15047238106Sdes	sfd = socket(PF_INET, SOCK_DGRAM, 0);
15048238106Sdes	if(sfd == -1) {
15049238106Sdes		perror("socket");
15050238106Sdes		return 1;
15051238106Sdes	}
15052238106Sdes	memset(&a, 0, sizeof(a));
15053238106Sdes	a.sin_family = AF_INET;
15054238106Sdes	a.sin_port = htons(port);
15055238106Sdes	a.sin_addr.s_addr = inet_addr("127.0.0.1");
15056238106Sdes	if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15057238106Sdes		perror("bind");
15058238106Sdes		return 1;
15059238106Sdes	}
15060238106Sdes	if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15061238106Sdes		perror("fcntl");
15062238106Sdes		return 1;
15063238106Sdes	}
15064238106Sdes
15065238106Sdes	cfd = socket(PF_INET, SOCK_DGRAM, 0);
15066238106Sdes	if(cfd == -1) {
15067238106Sdes		perror("client socket");
15068238106Sdes		return 1;
15069238106Sdes	}
15070238106Sdes	a.sin_port = 0;
15071238106Sdes	if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15072238106Sdes		perror("client bind");
15073238106Sdes		return 1;
15074238106Sdes	}
15075238106Sdes	a.sin_port = htons(port);
15076238106Sdes
15077238106Sdes	/* no handler, causes exit in 10 seconds */
15078238106Sdes	alarm(10);
15079238106Sdes
15080238106Sdes	/* send and receive on the socket */
15081238106Sdes	if((p=fork()) == 0) {
15082238106Sdes		for(i=0; i<num; i++) {
15083238106Sdes			if(sendto(cfd, &i, sizeof(i), 0,
15084238106Sdes				(struct sockaddr*)&a, sizeof(a)) < 0) {
15085238106Sdes				perror("sendto");
15086238106Sdes				return 1;
15087238106Sdes			}
15088238106Sdes		}
15089238106Sdes	} else {
15090238106Sdes		/* parent */
15091238106Sdes		fd_set rset;
15092238106Sdes		int x;
15093238106Sdes		if(p == -1) {
15094238106Sdes			perror("fork");
15095238106Sdes			return 1;
15096238106Sdes		}
15097238106Sdes		FD_ZERO(&rset);
15098238106Sdes		FD_SET(sfd, &rset);
15099238106Sdes		if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15100238106Sdes			perror("select");
15101238106Sdes			return 1;
15102238106Sdes		}
15103238106Sdes		i = 0;
15104238106Sdes		while(i < num) {
15105238106Sdes			if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15106238106Sdes				if(errno == EAGAIN)
15107238106Sdes					continue;
15108238106Sdes				perror("recv");
15109238106Sdes				return 1;
15110238106Sdes			}
15111238106Sdes			i++;
15112238106Sdes		}
15113238106Sdes		/* now we want to get EAGAIN: nonblocking goodness */
15114238106Sdes		errno = 0;
15115238106Sdes		recv(sfd, &x, sizeof(x), 0);
15116238106Sdes		if(errno != EAGAIN) {
15117238106Sdes			perror("trying to recv again");
15118238106Sdes			return 1;
15119238106Sdes		}
15120238106Sdes		/* EAGAIN encountered */
15121238106Sdes	}
15122238106Sdes
15123238106Sdes	close(sfd);
15124238106Sdes	close(cfd);
15125238106Sdes	return 0;
15126238106Sdes}
15127238106Sdes
15128238106Sdes_ACEOF
15129238106Sdesif ac_fn_c_try_run "$LINENO"; then :
15130238106Sdes
15131238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15132238106Sdes$as_echo "yes" >&6; }
15133238106Sdes
15134238106Sdeselse
15135238106Sdes
15136238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15137238106Sdes$as_echo "no" >&6; }
15138238106Sdes
15139238106Sdes$as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15140238106Sdes
15141238106Sdes
15142238106Sdesfi
15143238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15144238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
15145238106Sdesfi
15146238106Sdes
15147238106Sdesfi
15148238106Sdes
15149238106Sdes
15150238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15151238106Sdes$as_echo_n "checking whether mkdir has one arg... " >&6; }
15152238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
15153238106Sdes/* end confdefs.h.  */
15154238106Sdes
15155238106Sdes#include <stdio.h>
15156238106Sdes#include <unistd.h>
15157238106Sdes#ifdef HAVE_WINSOCK2_H
15158238106Sdes#include <winsock2.h>
15159238106Sdes#endif
15160238106Sdes#ifdef HAVE_SYS_STAT_H
15161238106Sdes#include <sys/stat.h>
15162238106Sdes#endif
15163238106Sdes
15164238106Sdesint
15165238106Sdesmain ()
15166238106Sdes{
15167238106Sdes
15168238106Sdes	(void)mkdir("directory");
15169238106Sdes
15170238106Sdes  ;
15171238106Sdes  return 0;
15172238106Sdes}
15173238106Sdes_ACEOF
15174238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
15175238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15176238106Sdes$as_echo "yes" >&6; }
15177238106Sdes
15178238106Sdes$as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15179238106Sdes
15180238106Sdes
15181238106Sdeselse
15182238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15183238106Sdes$as_echo "no" >&6; }
15184238106Sdes
15185238106Sdesfi
15186238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15187238106Sdes
15188238106Sdesfor ac_func in strptime
15189238106Sdesdo :
15190238106Sdes  ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15191238106Sdesif test "x$ac_cv_func_strptime" = xyes; then :
15192238106Sdes  cat >>confdefs.h <<_ACEOF
15193238106Sdes#define HAVE_STRPTIME 1
15194238106Sdes_ACEOF
15195238106Sdes
15196238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15197238106Sdes$as_echo_n "checking whether strptime works... " >&6; }
15198238106Sdesif test c${cross_compiling} = cno; then
15199238106Sdesif test "$cross_compiling" = yes; then :
15200238106Sdes  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15201238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15202238106Sdesas_fn_error $? "cannot run test program while cross compiling
15203238106SdesSee \`config.log' for more details" "$LINENO" 5; }
15204238106Sdeselse
15205238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206238106Sdes/* end confdefs.h.  */
15207238106Sdes
15208285206Sdes#define _XOPEN_SOURCE 600
15209238106Sdes#include <time.h>
15210238106Sdesint main(void) { struct tm tm; char *res;
15211238106Sdesres = 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);
15212238106Sdesif (!res) return 2;
15213238106Sdesres = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15214238106Sdesif (!res) return 1; return 0; }
15215238106Sdes
15216238106Sdes_ACEOF
15217238106Sdesif ac_fn_c_try_run "$LINENO"; then :
15218238106Sdes  eval "ac_cv_c_strptime_works=yes"
15219238106Sdeselse
15220238106Sdes  eval "ac_cv_c_strptime_works=no"
15221238106Sdesfi
15222238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15223238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
15224238106Sdesfi
15225238106Sdes
15226238106Sdeselse
15227238106Sdeseval "ac_cv_c_strptime_works=maybe"
15228238106Sdesfi
15229238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15230238106Sdes$as_echo "$ac_cv_c_strptime_works" >&6; }
15231238106Sdesif test $ac_cv_c_strptime_works = no; then
15232238106Sdescase " $LIBOBJS " in
15233238106Sdes  *" strptime.$ac_objext "* ) ;;
15234238106Sdes  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15235238106Sdes ;;
15236238106Sdesesac
15237238106Sdes
15238238106Sdeselse
15239238106Sdes
15240238106Sdescat >>confdefs.h <<_ACEOF
15241238106Sdes#define STRPTIME_WORKS 1
15242238106Sdes_ACEOF
15243238106Sdes
15244238106Sdesfi
15245238106Sdes
15246238106Sdeselse
15247238106Sdes  case " $LIBOBJS " in
15248238106Sdes  *" strptime.$ac_objext "* ) ;;
15249238106Sdes  *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15250238106Sdes ;;
15251238106Sdesesac
15252238106Sdes
15253238106Sdesfi
15254238106Sdesdone
15255238106Sdes
15256238106Sdes
15257238106Sdes# set memory allocation checking if requested
15258238106Sdes# Check whether --enable-alloc-checks was given.
15259238106Sdesif test "${enable_alloc_checks+set}" = set; then :
15260238106Sdes  enableval=$enable_alloc_checks;
15261238106Sdesfi
15262238106Sdes
15263238106Sdes# Check whether --enable-alloc-lite was given.
15264238106Sdesif test "${enable_alloc_lite+set}" = set; then :
15265238106Sdes  enableval=$enable_alloc_lite;
15266238106Sdesfi
15267238106Sdes
15268238106Sdes# Check whether --enable-alloc-nonregional was given.
15269238106Sdesif test "${enable_alloc_nonregional+set}" = set; then :
15270238106Sdes  enableval=$enable_alloc_nonregional;
15271238106Sdesfi
15272238106Sdes
15273238106Sdesif test x_$enable_alloc_nonregional = x_yes; then
15274238106Sdes
15275238106Sdes$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15276238106Sdes
15277238106Sdesfi
15278238106Sdesif test x_$enable_alloc_checks = x_yes; then
15279238106Sdes
15280238106Sdes$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15281238106Sdes
15282238106Sdeselse
15283238106Sdes	if test x_$enable_alloc_lite = x_yes; then
15284238106Sdes
15285238106Sdes$as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15286238106Sdes
15287238106Sdes	else
15288238106Sdes
15289238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15290238106Sdes$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15291238106Sdes	if test "$cross_compiling" = yes; then :
15292238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15293238106Sdes$as_echo "no (crosscompile)" >&6; }
15294238106Sdes	case " $LIBOBJS " in
15295238106Sdes  *" malloc.$ac_objext "* ) ;;
15296238106Sdes  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15297238106Sdes ;;
15298238106Sdesesac
15299238106Sdes
15300238106Sdes
15301238106Sdescat >>confdefs.h <<_ACEOF
15302238106Sdes#define malloc rpl_malloc_unbound
15303238106Sdes_ACEOF
15304238106Sdes
15305238106Sdeselse
15306238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307238106Sdes/* end confdefs.h.  */
15308238106Sdes#if defined STDC_HEADERS || defined HAVE_STDLIB_H
15309238106Sdes#include <stdlib.h>
15310238106Sdes#else
15311238106Sdeschar *malloc ();
15312238106Sdes#endif
15313238106Sdes
15314238106Sdesint
15315238106Sdesmain ()
15316238106Sdes{
15317238106Sdes if(malloc(0) != 0) return 1;
15318238106Sdes  ;
15319238106Sdes  return 0;
15320238106Sdes}
15321238106Sdes
15322238106Sdes_ACEOF
15323238106Sdesif ac_fn_c_try_run "$LINENO"; then :
15324238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15325238106Sdes$as_echo "no" >&6; }
15326238106Sdes	case " $LIBOBJS " in
15327238106Sdes  *" malloc.$ac_objext "* ) ;;
15328238106Sdes  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15329238106Sdes ;;
15330238106Sdesesac
15331238106Sdes
15332238106Sdes
15333238106Sdescat >>confdefs.h <<_ACEOF
15334238106Sdes#define malloc rpl_malloc_unbound
15335238106Sdes_ACEOF
15336238106Sdes
15337238106Sdeselse
15338238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15339238106Sdes$as_echo "yes" >&6; }
15340238106Sdes
15341238106Sdes$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15342238106Sdes
15343238106Sdesfi
15344238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
15346238106Sdesfi
15347238106Sdes
15348238106Sdes
15349238106Sdes	fi
15350238106Sdesfi
15351238106Sdes
15352238106Sdes# check windows threads (we use them, not pthreads, on windows).
15353238106Sdesif test "$on_mingw" = "yes"; then
15354238106Sdes# check windows threads
15355238106Sdes	for ac_header in windows.h
15356238106Sdesdo :
15357238106Sdes  ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15358238106Sdes"
15359238106Sdesif test "x$ac_cv_header_windows_h" = xyes; then :
15360238106Sdes  cat >>confdefs.h <<_ACEOF
15361238106Sdes#define HAVE_WINDOWS_H 1
15362238106Sdes_ACEOF
15363238106Sdes
15364238106Sdesfi
15365238106Sdes
15366238106Sdesdone
15367238106Sdes
15368238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15369238106Sdes$as_echo_n "checking for CreateThread... " >&6; }
15370238106Sdes	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371238106Sdes/* end confdefs.h.  */
15372238106Sdes
15373238106Sdes#ifdef HAVE_WINDOWS_H
15374238106Sdes#include <windows.h>
15375238106Sdes#endif
15376238106Sdes
15377238106Sdesint
15378238106Sdesmain ()
15379238106Sdes{
15380238106Sdes
15381238106Sdes	HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15382238106Sdes
15383238106Sdes  ;
15384238106Sdes  return 0;
15385238106Sdes}
15386238106Sdes_ACEOF
15387238106Sdesif ac_fn_c_try_compile "$LINENO"; then :
15388238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15389238106Sdes$as_echo "yes" >&6; }
15390238106Sdes
15391238106Sdes$as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15392238106Sdes
15393238106Sdes
15394238106Sdeselse
15395238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396238106Sdes$as_echo "no" >&6; }
15397238106Sdes
15398238106Sdesfi
15399238106Sdesrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15400238106Sdes
15401238106Sdeselse
15402238106Sdes# not on mingw, check thread libraries.
15403238106Sdes
15404238106Sdes# check for thread library.
15405238106Sdes# check this first, so that the pthread lib does not get linked in via
15406238106Sdes# libssl or libpython, and thus distorts the tests, and we end up using
15407238106Sdes# the non-threadsafe C libraries.
15408238106Sdes
15409238106Sdes# Check whether --with-pthreads was given.
15410238106Sdesif test "${with_pthreads+set}" = set; then :
15411238106Sdes  withval=$with_pthreads;
15412238106Sdeselse
15413238106Sdes   withval="yes"
15414238106Sdesfi
15415238106Sdes
15416238106Sdesub_have_pthreads=no
15417238106Sdesif test x_$withval != x_no; then
15418238106Sdes
15419238106Sdes
15420238106Sdesac_ext=c
15421238106Sdesac_cpp='$CPP $CPPFLAGS'
15422238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15423238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15424238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
15425238106Sdes
15426269257Sdesax_pthread_ok=no
15427238106Sdes
15428238106Sdes# We used to check for pthread.h first, but this fails if pthread.h
15429238106Sdes# requires special compiler flags (e.g. on True64 or Sequent).
15430238106Sdes# It gets checked for in the link test anyway.
15431238106Sdes
15432238106Sdes# First of all, check if the user has set any of the PTHREAD_LIBS,
15433238106Sdes# etcetera environment variables, and if threads linking works using
15434238106Sdes# them:
15435238106Sdesif test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15436238106Sdes        save_CFLAGS="$CFLAGS"
15437238106Sdes        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15438238106Sdes        save_LIBS="$LIBS"
15439238106Sdes        LIBS="$PTHREAD_LIBS $LIBS"
15440238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15441238106Sdes$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
15442238106Sdes        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15443238106Sdes/* end confdefs.h.  */
15444238106Sdes
15445238106Sdes/* Override any GCC internal prototype to avoid an error.
15446238106Sdes   Use char because int might match the return type of a GCC
15447238106Sdes   builtin and then its argument prototype would still apply.  */
15448238106Sdes#ifdef __cplusplus
15449238106Sdesextern "C"
15450238106Sdes#endif
15451238106Sdeschar pthread_join ();
15452238106Sdesint
15453238106Sdesmain ()
15454238106Sdes{
15455238106Sdesreturn pthread_join ();
15456238106Sdes  ;
15457238106Sdes  return 0;
15458238106Sdes}
15459238106Sdes_ACEOF
15460238106Sdesif ac_fn_c_try_link "$LINENO"; then :
15461269257Sdes  ax_pthread_ok=yes
15462238106Sdesfi
15463238106Sdesrm -f core conftest.err conftest.$ac_objext \
15464238106Sdes    conftest$ac_exeext conftest.$ac_ext
15465269257Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15466269257Sdes$as_echo "$ax_pthread_ok" >&6; }
15467269257Sdes        if test x"$ax_pthread_ok" = xno; then
15468238106Sdes                PTHREAD_LIBS=""
15469238106Sdes                PTHREAD_CFLAGS=""
15470238106Sdes        fi
15471238106Sdes        LIBS="$save_LIBS"
15472238106Sdes        CFLAGS="$save_CFLAGS"
15473238106Sdesfi
15474238106Sdes
15475238106Sdes# We must check for the threads library under a number of different
15476238106Sdes# names; the ordering is very important because some systems
15477238106Sdes# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15478238106Sdes# libraries is broken (non-POSIX).
15479238106Sdes
15480238106Sdes# Create a list of thread flags to try.  Items starting with a "-" are
15481238106Sdes# C compiler flags, and other items are library names, except for "none"
15482238106Sdes# which indicates that we try without any flags at all, and "pthread-config"
15483238106Sdes# which is a program returning the flags for the Pth emulation library.
15484238106Sdes
15485269257Sdesax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
15486238106Sdes
15487238106Sdes# The ordering *is* (sometimes) important.  Some notes on the
15488238106Sdes# individual items follow:
15489238106Sdes
15490238106Sdes# pthreads: AIX (must check this before -lpthread)
15491238106Sdes# none: in case threads are in libc; should be tried before -Kthread and
15492238106Sdes#       other compiler flags to prevent continual compiler warnings
15493238106Sdes# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15494238106Sdes# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15495238106Sdes# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15496238106Sdes# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15497238106Sdes# -pthreads: Solaris/gcc
15498238106Sdes# -mthreads: Mingw32/gcc, Lynx/gcc
15499238106Sdes# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15500238106Sdes#      doesn't hurt to check since this sometimes defines pthreads too;
15501238106Sdes#      also defines -D_REENTRANT)
15502238106Sdes#      ... -mt is also the pthreads flag for HP/aCC
15503238106Sdes# pthread: Linux, etcetera
15504238106Sdes# --thread-safe: KAI C++
15505238106Sdes# pthread-config: use pthread-config program (for GNU Pth library)
15506238106Sdes
15507269257Sdescase ${host_os} in
15508269257Sdes        solaris*)
15509238106Sdes
15510238106Sdes        # On Solaris (at least, for some versions), libc contains stubbed
15511238106Sdes        # (non-functional) versions of the pthreads routines, so link-based
15512238106Sdes        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
15513238106Sdes        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
15514238106Sdes        # a function called by this macro, so we could check for that, but
15515238106Sdes        # who knows whether they'll stub that too in a future libc.)  So,
15516238106Sdes        # we'll just look for -pthreads and -lpthread first:
15517238106Sdes
15518269257Sdes        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
15519238106Sdes        ;;
15520269257Sdes
15521269257Sdes        darwin*)
15522269257Sdes        ax_pthread_flags="-pthread $ax_pthread_flags"
15523269257Sdes        ;;
15524238106Sdesesac
15525238106Sdes
15526269257Sdesif test x"$ax_pthread_ok" = xno; then
15527269257Sdesfor flag in $ax_pthread_flags; do
15528238106Sdes
15529238106Sdes        case $flag in
15530238106Sdes                none)
15531238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
15532238106Sdes$as_echo_n "checking whether pthreads work without any flags... " >&6; }
15533238106Sdes                ;;
15534238106Sdes
15535238106Sdes                -*)
15536238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
15537238106Sdes$as_echo_n "checking whether pthreads work with $flag... " >&6; }
15538238106Sdes                PTHREAD_CFLAGS="$flag"
15539238106Sdes                ;;
15540238106Sdes
15541269257Sdes                pthread-config)
15542269257Sdes                # Extract the first word of "pthread-config", so it can be a program name with args.
15543238106Sdesset dummy pthread-config; ac_word=$2
15544238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15545238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
15546269257Sdesif ${ac_cv_prog_ax_pthread_config+:} false; then :
15547238106Sdes  $as_echo_n "(cached) " >&6
15548238106Sdeselse
15549269257Sdes  if test -n "$ax_pthread_config"; then
15550269257Sdes  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
15551238106Sdeselse
15552238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15553238106Sdesfor as_dir in $PATH
15554238106Sdesdo
15555238106Sdes  IFS=$as_save_IFS
15556238106Sdes  test -z "$as_dir" && as_dir=.
15557238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
15558249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15559269257Sdes    ac_cv_prog_ax_pthread_config="yes"
15560238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15561238106Sdes    break 2
15562238106Sdes  fi
15563238106Sdesdone
15564238106Sdes  done
15565238106SdesIFS=$as_save_IFS
15566238106Sdes
15567269257Sdes  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
15568238106Sdesfi
15569238106Sdesfi
15570269257Sdesax_pthread_config=$ac_cv_prog_ax_pthread_config
15571269257Sdesif test -n "$ax_pthread_config"; then
15572269257Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
15573269257Sdes$as_echo "$ax_pthread_config" >&6; }
15574238106Sdeselse
15575238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15576238106Sdes$as_echo "no" >&6; }
15577238106Sdesfi
15578238106Sdes
15579238106Sdes
15580269257Sdes                if test x"$ax_pthread_config" = xno; then continue; fi
15581269257Sdes                PTHREAD_CFLAGS="`pthread-config --cflags`"
15582269257Sdes                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
15583269257Sdes                ;;
15584238106Sdes
15585238106Sdes                *)
15586238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
15587238106Sdes$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
15588238106Sdes                PTHREAD_LIBS="-l$flag"
15589238106Sdes                ;;
15590238106Sdes        esac
15591238106Sdes
15592238106Sdes        save_LIBS="$LIBS"
15593238106Sdes        save_CFLAGS="$CFLAGS"
15594238106Sdes        LIBS="$PTHREAD_LIBS $LIBS"
15595238106Sdes        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15596238106Sdes
15597238106Sdes        # Check for various functions.  We must include pthread.h,
15598238106Sdes        # since some functions may be macros.  (On the Sequent, we
15599238106Sdes        # need a special flag -Kthread to make this header compile.)
15600238106Sdes        # We check for pthread_join because it is in -lpthread on IRIX
15601238106Sdes        # while pthread_create is in libc.  We check for pthread_attr_init
15602238106Sdes        # due to DEC craziness with -lpthreads.  We check for
15603238106Sdes        # pthread_cleanup_push because it is one of the few pthread
15604238106Sdes        # functions on Solaris that doesn't have a non-functional libc stub.
15605238106Sdes        # We try pthread_create on general principles.
15606238106Sdes        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607238106Sdes/* end confdefs.h.  */
15608238106Sdes#include <pthread.h>
15609269257Sdes                        static void routine(void *a) { *((int*)a) = 0; }
15610269257Sdes                        static void *start_routine(void *a) { return a; }
15611238106Sdesint
15612238106Sdesmain ()
15613238106Sdes{
15614269257Sdespthread_t th; pthread_attr_t attr;
15615269257Sdes                        pthread_create(&th, 0, start_routine, 0);
15616269257Sdes                        pthread_join(th, 0);
15617269257Sdes                        pthread_attr_init(&attr);
15618269257Sdes                        pthread_cleanup_push(routine, 0);
15619269257Sdes                        pthread_cleanup_pop(0) /* ; */
15620238106Sdes  ;
15621238106Sdes  return 0;
15622238106Sdes}
15623238106Sdes_ACEOF
15624238106Sdesif ac_fn_c_try_link "$LINENO"; then :
15625269257Sdes  ax_pthread_ok=yes
15626238106Sdesfi
15627238106Sdesrm -f core conftest.err conftest.$ac_objext \
15628238106Sdes    conftest$ac_exeext conftest.$ac_ext
15629238106Sdes
15630238106Sdes        LIBS="$save_LIBS"
15631238106Sdes        CFLAGS="$save_CFLAGS"
15632238106Sdes
15633269257Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
15634269257Sdes$as_echo "$ax_pthread_ok" >&6; }
15635269257Sdes        if test "x$ax_pthread_ok" = xyes; then
15636238106Sdes                break;
15637238106Sdes        fi
15638238106Sdes
15639238106Sdes        PTHREAD_LIBS=""
15640238106Sdes        PTHREAD_CFLAGS=""
15641238106Sdesdone
15642238106Sdesfi
15643238106Sdes
15644238106Sdes# Various other checks:
15645269257Sdesif test "x$ax_pthread_ok" = xyes; then
15646238106Sdes        save_LIBS="$LIBS"
15647238106Sdes        LIBS="$PTHREAD_LIBS $LIBS"
15648238106Sdes        save_CFLAGS="$CFLAGS"
15649238106Sdes        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15650238106Sdes
15651238106Sdes        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
15652269257Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
15653238106Sdes$as_echo_n "checking for joinable pthread attribute... " >&6; }
15654269257Sdes        attr_name=unknown
15655269257Sdes        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
15656269257Sdes            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15657238106Sdes/* end confdefs.h.  */
15658238106Sdes#include <pthread.h>
15659238106Sdesint
15660238106Sdesmain ()
15661238106Sdes{
15662269257Sdesint attr = $attr; return attr /* ; */
15663238106Sdes  ;
15664238106Sdes  return 0;
15665238106Sdes}
15666238106Sdes_ACEOF
15667238106Sdesif ac_fn_c_try_link "$LINENO"; then :
15668238106Sdes  attr_name=$attr; break
15669238106Sdesfi
15670238106Sdesrm -f core conftest.err conftest.$ac_objext \
15671238106Sdes    conftest$ac_exeext conftest.$ac_ext
15672269257Sdes        done
15673238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
15674238106Sdes$as_echo "$attr_name" >&6; }
15675238106Sdes        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
15676238106Sdes
15677238106Sdescat >>confdefs.h <<_ACEOF
15678238106Sdes#define PTHREAD_CREATE_JOINABLE $attr_name
15679238106Sdes_ACEOF
15680238106Sdes
15681238106Sdes        fi
15682238106Sdes
15683238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
15684238106Sdes$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
15685238106Sdes        flag=no
15686269257Sdes        case ${host_os} in
15687269257Sdes            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
15688269257Sdes            osf* | hpux*) flag="-D_REENTRANT";;
15689269257Sdes            solaris*)
15690269257Sdes            if test "$GCC" = "yes"; then
15691269257Sdes                flag="-D_REENTRANT"
15692269257Sdes            else
15693269257Sdes                flag="-mt -D_REENTRANT"
15694269257Sdes            fi
15695269257Sdes            ;;
15696238106Sdes        esac
15697238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
15698238106Sdes$as_echo "${flag}" >&6; }
15699238106Sdes        if test "x$flag" != xno; then
15700238106Sdes            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
15701238106Sdes        fi
15702238106Sdes
15703269257Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
15704269257Sdes$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
15705269257Sdesif ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
15706269257Sdes  $as_echo_n "(cached) " >&6
15707269257Sdeselse
15708269257Sdes
15709269257Sdes                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710269257Sdes/* end confdefs.h.  */
15711269257Sdes
15712269257Sdes                    #include <pthread.h>
15713269257Sdesint
15714269257Sdesmain ()
15715269257Sdes{
15716269257Sdesint i = PTHREAD_PRIO_INHERIT;
15717269257Sdes  ;
15718269257Sdes  return 0;
15719269257Sdes}
15720269257Sdes_ACEOF
15721269257Sdesif ac_fn_c_try_link "$LINENO"; then :
15722269257Sdes  ax_cv_PTHREAD_PRIO_INHERIT=yes
15723269257Sdeselse
15724269257Sdes  ax_cv_PTHREAD_PRIO_INHERIT=no
15725269257Sdesfi
15726269257Sdesrm -f core conftest.err conftest.$ac_objext \
15727269257Sdes    conftest$ac_exeext conftest.$ac_ext
15728269257Sdes
15729269257Sdesfi
15730269257Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
15731269257Sdes$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
15732269257Sdes        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
15733269257Sdes
15734269257Sdes$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
15735269257Sdes
15736269257Sdesfi
15737269257Sdes
15738238106Sdes        LIBS="$save_LIBS"
15739238106Sdes        CFLAGS="$save_CFLAGS"
15740238106Sdes
15741269257Sdes        # More AIX lossage: compile with *_r variant
15742269257Sdes        if test "x$GCC" != xyes; then
15743269257Sdes            case $host_os in
15744269257Sdes                aix*)
15745269257Sdes                case "x/$CC" in #(
15746269257Sdes  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
15747269257Sdes    #handle absolute path differently from PATH based program lookup
15748269257Sdes                   case "x$CC" in #(
15749269257Sdes  x/*) :
15750269257Sdes    if as_fn_executable_p ${CC}_r; then :
15751269257Sdes  PTHREAD_CC="${CC}_r"
15752269257Sdesfi ;; #(
15753269257Sdes  *) :
15754269257Sdes    for ac_prog in ${CC}_r
15755238106Sdesdo
15756238106Sdes  # Extract the first word of "$ac_prog", so it can be a program name with args.
15757238106Sdesset dummy $ac_prog; ac_word=$2
15758238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15759238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
15760238106Sdesif ${ac_cv_prog_PTHREAD_CC+:} false; then :
15761238106Sdes  $as_echo_n "(cached) " >&6
15762238106Sdeselse
15763238106Sdes  if test -n "$PTHREAD_CC"; then
15764238106Sdes  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
15765238106Sdeselse
15766238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15767238106Sdesfor as_dir in $PATH
15768238106Sdesdo
15769238106Sdes  IFS=$as_save_IFS
15770238106Sdes  test -z "$as_dir" && as_dir=.
15771238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
15772249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15773238106Sdes    ac_cv_prog_PTHREAD_CC="$ac_prog"
15774238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15775238106Sdes    break 2
15776238106Sdes  fi
15777238106Sdesdone
15778238106Sdes  done
15779238106SdesIFS=$as_save_IFS
15780238106Sdes
15781238106Sdesfi
15782238106Sdesfi
15783238106SdesPTHREAD_CC=$ac_cv_prog_PTHREAD_CC
15784238106Sdesif test -n "$PTHREAD_CC"; then
15785238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
15786238106Sdes$as_echo "$PTHREAD_CC" >&6; }
15787238106Sdeselse
15788238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15789238106Sdes$as_echo "no" >&6; }
15790238106Sdesfi
15791238106Sdes
15792238106Sdes
15793238106Sdes  test -n "$PTHREAD_CC" && break
15794238106Sdesdone
15795269257Sdestest -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15796269257Sdes ;;
15797269257Sdesesac ;; #(
15798269257Sdes  *) :
15799269257Sdes     ;;
15800269257Sdesesac
15801269257Sdes                ;;
15802269257Sdes            esac
15803269257Sdes        fi
15804238106Sdesfi
15805238106Sdes
15806269257Sdestest -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
15807238106Sdes
15808238106Sdes
15809238106Sdes
15810238106Sdes
15811269257Sdes
15812238106Sdes# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15813269257Sdesif test x"$ax_pthread_ok" = xyes; then
15814238106Sdes
15815238106Sdes
15816238106Sdes$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
15817238106Sdes
15818238106Sdes		LIBS="$PTHREAD_LIBS $LIBS"
15819238106Sdes		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15820238106Sdes		CC="$PTHREAD_CC"
15821238106Sdes		ub_have_pthreads=yes
15822238106Sdes		ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
15823238106Sdes"
15824238106Sdesif test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
15825238106Sdes
15826238106Sdescat >>confdefs.h <<_ACEOF
15827238106Sdes#define HAVE_PTHREAD_SPINLOCK_T 1
15828238106Sdes_ACEOF
15829238106Sdes
15830238106Sdes
15831238106Sdesfi
15832238106Sdesac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
15833238106Sdes"
15834238106Sdesif test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
15835238106Sdes
15836238106Sdescat >>confdefs.h <<_ACEOF
15837238106Sdes#define HAVE_PTHREAD_RWLOCK_T 1
15838238106Sdes_ACEOF
15839238106Sdes
15840238106Sdes
15841238106Sdesfi
15842238106Sdes
15843238106Sdes
15844238106Sdes        :
15845238106Sdeselse
15846269257Sdes        ax_pthread_ok=no
15847238106Sdes
15848238106Sdesfi
15849238106Sdesac_ext=c
15850238106Sdesac_cpp='$CPP $CPPFLAGS'
15851238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15852238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15853238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
15854238106Sdes
15855238106Sdes
15856238106Sdesfi
15857238106Sdes
15858238106Sdes# check solaris thread library
15859238106Sdes
15860238106Sdes# Check whether --with-solaris-threads was given.
15861238106Sdesif test "${with_solaris_threads+set}" = set; then :
15862238106Sdes  withval=$with_solaris_threads;
15863238106Sdeselse
15864238106Sdes   withval="no"
15865238106Sdesfi
15866238106Sdes
15867238106Sdesub_have_sol_threads=no
15868238106Sdesif test x_$withval != x_no; then
15869238106Sdes	if test x_$ub_have_pthreads != x_no; then
15870238106Sdes	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
15871238106Sdes$as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
15872238106Sdes	else
15873238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
15874238106Sdes$as_echo_n "checking for library containing thr_create... " >&6; }
15875238106Sdesif ${ac_cv_search_thr_create+:} false; then :
15876238106Sdes  $as_echo_n "(cached) " >&6
15877238106Sdeselse
15878238106Sdes  ac_func_search_save_LIBS=$LIBS
15879238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880238106Sdes/* end confdefs.h.  */
15881238106Sdes
15882238106Sdes/* Override any GCC internal prototype to avoid an error.
15883238106Sdes   Use char because int might match the return type of a GCC
15884238106Sdes   builtin and then its argument prototype would still apply.  */
15885238106Sdes#ifdef __cplusplus
15886238106Sdesextern "C"
15887238106Sdes#endif
15888238106Sdeschar thr_create ();
15889238106Sdesint
15890238106Sdesmain ()
15891238106Sdes{
15892238106Sdesreturn thr_create ();
15893238106Sdes  ;
15894238106Sdes  return 0;
15895238106Sdes}
15896238106Sdes_ACEOF
15897238106Sdesfor ac_lib in '' thread; do
15898238106Sdes  if test -z "$ac_lib"; then
15899238106Sdes    ac_res="none required"
15900238106Sdes  else
15901238106Sdes    ac_res=-l$ac_lib
15902238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15903238106Sdes  fi
15904238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
15905238106Sdes  ac_cv_search_thr_create=$ac_res
15906238106Sdesfi
15907238106Sdesrm -f core conftest.err conftest.$ac_objext \
15908238106Sdes    conftest$ac_exeext
15909238106Sdes  if ${ac_cv_search_thr_create+:} false; then :
15910238106Sdes  break
15911238106Sdesfi
15912238106Sdesdone
15913238106Sdesif ${ac_cv_search_thr_create+:} false; then :
15914238106Sdes
15915238106Sdeselse
15916238106Sdes  ac_cv_search_thr_create=no
15917238106Sdesfi
15918238106Sdesrm conftest.$ac_ext
15919238106SdesLIBS=$ac_func_search_save_LIBS
15920238106Sdesfi
15921238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
15922238106Sdes$as_echo "$ac_cv_search_thr_create" >&6; }
15923238106Sdesac_res=$ac_cv_search_thr_create
15924238106Sdesif test "$ac_res" != no; then :
15925238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15926238106Sdes
15927238106Sdes
15928238106Sdes$as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
15929238106Sdes
15930238106Sdes
15931238106Sdes
15932238106Sdes
15933238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
15934238106Sdes$as_echo_n "checking whether $CC supports -mt... " >&6; }
15935238106Sdescache=`echo mt | sed 'y%.=/+-%___p_%'`
15936238106Sdesif eval \${cv_prog_cc_flag_$cache+:} false; then :
15937238106Sdes  $as_echo_n "(cached) " >&6
15938238106Sdeselse
15939238106Sdes
15940269257Sdesecho 'void f(void){}' >conftest.c
15941238106Sdesif test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
15942238106Sdeseval "cv_prog_cc_flag_$cache=yes"
15943238106Sdeselse
15944238106Sdeseval "cv_prog_cc_flag_$cache=no"
15945238106Sdesfi
15946238106Sdesrm -f conftest conftest.o conftest.c
15947238106Sdes
15948238106Sdesfi
15949238106Sdes
15950238106Sdesif eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
15951238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15952238106Sdes$as_echo "yes" >&6; }
15953238106Sdes:
15954238106SdesCFLAGS="$CFLAGS -mt"
15955238106Sdeselse
15956238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15957238106Sdes$as_echo "no" >&6; }
15958238106Sdes:
15959238106SdesCFLAGS="$CFLAGS -D_REENTRANT"
15960238106Sdesfi
15961238106Sdes
15962238106Sdes		ub_have_sol_threads=yes
15963238106Sdes
15964238106Sdeselse
15965238106Sdes
15966238106Sdes		as_fn_error $? "no solaris threads found." "$LINENO" 5
15967238106Sdes
15968238106Sdesfi
15969238106Sdes
15970238106Sdes	fi
15971238106Sdesfi
15972238106Sdes
15973238106Sdesfi # end of non-mingw check of thread libraries
15974238106Sdes
15975238106Sdes# Check for PyUnbound
15976238106Sdes
15977238106Sdes# Check whether --with-pyunbound was given.
15978238106Sdesif test "${with_pyunbound+set}" = set; then :
15979238106Sdes  withval=$with_pyunbound;
15980238106Sdeselse
15981238106Sdes   withval="no"
15982238106Sdesfi
15983238106Sdes
15984238106Sdes
15985238106Sdesub_test_python=no
15986238106Sdesub_with_pyunbound=no
15987238106Sdesif test x_$withval != x_no; then
15988238106Sdes   ub_with_pyunbound=yes
15989238106Sdes   ub_test_python=yes
15990238106Sdesfi
15991238106Sdes
15992238106Sdes# Check for Python module
15993238106Sdes
15994238106Sdes# Check whether --with-pythonmodule was given.
15995238106Sdesif test "${with_pythonmodule+set}" = set; then :
15996238106Sdes  withval=$with_pythonmodule;
15997238106Sdeselse
15998238106Sdes   withval="no"
15999238106Sdesfi
16000238106Sdes
16001238106Sdes
16002238106Sdesub_with_pythonmod=no
16003238106Sdesif test x_$withval != x_no; then
16004238106Sdes   ub_with_pythonmod=yes
16005238106Sdes   ub_test_python=yes
16006238106Sdesfi
16007238106Sdes
16008238106Sdes# Check for Python & SWIG only on PyUnbound or PyModule
16009238106Sdesif test x_$ub_test_python != x_no; then
16010238106Sdes
16011238106Sdes   # Check for Python
16012238106Sdes   ub_have_python=no
16013238106Sdes   ac_save_LIBS="$LIBS"
16014238106Sdes        #
16015238106Sdes        # Allow the use of a (user set) custom python version
16016238106Sdes        #
16017238106Sdes
16018238106Sdes
16019238106Sdes        # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16020238106Sdesset dummy python$PYTHON_VERSION; ac_word=$2
16021238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16022238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
16023238106Sdesif ${ac_cv_path_PYTHON+:} false; then :
16024238106Sdes  $as_echo_n "(cached) " >&6
16025238106Sdeselse
16026238106Sdes  case $PYTHON in
16027238106Sdes  [\\/]* | ?:[\\/]*)
16028238106Sdes  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16029238106Sdes  ;;
16030238106Sdes  *)
16031238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16032238106Sdesfor as_dir in $PATH
16033238106Sdesdo
16034238106Sdes  IFS=$as_save_IFS
16035238106Sdes  test -z "$as_dir" && as_dir=.
16036238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
16037249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16038238106Sdes    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16039238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16040238106Sdes    break 2
16041238106Sdes  fi
16042238106Sdesdone
16043238106Sdes  done
16044238106SdesIFS=$as_save_IFS
16045238106Sdes
16046238106Sdes  ;;
16047238106Sdesesac
16048238106Sdesfi
16049238106SdesPYTHON=$ac_cv_path_PYTHON
16050238106Sdesif test -n "$PYTHON"; then
16051238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16052238106Sdes$as_echo "$PYTHON" >&6; }
16053238106Sdeselse
16054238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16055238106Sdes$as_echo "no" >&6; }
16056238106Sdesfi
16057238106Sdes
16058238106Sdes
16059238106Sdes        if test -z "$PYTHON"; then
16060238106Sdes           as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16061238106Sdes           PYTHON_VERSION=""
16062238106Sdes        fi
16063238106Sdes
16064238106Sdes        if test -z "$PYTHON_VERSION"; then
16065285206Sdes		PYTHON_VERSION=`$PYTHON -c "import sys; \
16066285206Sdes			print(sys.version.split()[0])"`
16067238106Sdes	fi
16068238106Sdes
16069238106Sdes        #
16070238106Sdes        # Check if you have distutils, else fail
16071238106Sdes        #
16072238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16073238106Sdes$as_echo_n "checking for the distutils Python package... " >&6; }
16074238106Sdes        ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
16075238106Sdes        if test -z "$ac_distutils_result"; then
16076238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16077238106Sdes$as_echo "yes" >&6; }
16078238106Sdes        else
16079238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16080238106Sdes$as_echo "no" >&6; }
16081238106Sdes                as_fn_error $? "cannot import Python module \"distutils\".
16082238106SdesPlease check your Python installation. The error was:
16083238106Sdes$ac_distutils_result" "$LINENO" 5
16084238106Sdes                PYTHON_VERSION=""
16085238106Sdes        fi
16086238106Sdes
16087238106Sdes        #
16088238106Sdes        # Check for Python include path
16089238106Sdes        #
16090238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16091238106Sdes$as_echo_n "checking for Python include path... " >&6; }
16092238106Sdes        if test -z "$PYTHON_CPPFLAGS"; then
16093238106Sdes                python_path=`$PYTHON -c "import distutils.sysconfig; \
16094285206Sdes                        print(distutils.sysconfig.get_python_inc());"`
16095238106Sdes                if test -n "${python_path}"; then
16096238106Sdes                        python_path="-I$python_path"
16097238106Sdes                fi
16098238106Sdes                PYTHON_CPPFLAGS=$python_path
16099238106Sdes        fi
16100238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16101238106Sdes$as_echo "$PYTHON_CPPFLAGS" >&6; }
16102238106Sdes
16103238106Sdes
16104238106Sdes        #
16105238106Sdes        # Check for Python library path
16106238106Sdes        #
16107238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16108238106Sdes$as_echo_n "checking for Python library path... " >&6; }
16109238106Sdes        if test -z "$PYTHON_LDFLAGS"; then
16110238106Sdes                PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16111285206Sdes                        print(get_config_var('BLDLIBRARY'));"`
16112238106Sdes        fi
16113238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16114238106Sdes$as_echo "$PYTHON_LDFLAGS" >&6; }
16115238106Sdes
16116238106Sdes
16117238106Sdes        #
16118238106Sdes        # Check for site packages
16119238106Sdes        #
16120238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16121238106Sdes$as_echo_n "checking for Python site-packages path... " >&6; }
16122238106Sdes        if test -z "$PYTHON_SITE_PKG"; then
16123238106Sdes                PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16124285206Sdes                        print(distutils.sysconfig.get_python_lib(1,0));"`
16125238106Sdes        fi
16126238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16127238106Sdes$as_echo "$PYTHON_SITE_PKG" >&6; }
16128238106Sdes
16129238106Sdes
16130238106Sdes        #
16131238106Sdes        # final check to see if everything compiles alright
16132238106Sdes        #
16133238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16134238106Sdes$as_echo_n "checking consistency of all components of python development environment... " >&6; }
16135238106Sdes        ac_ext=c
16136238106Sdesac_cpp='$CPP $CPPFLAGS'
16137238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16138238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16139238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
16140238106Sdes
16141238106Sdes        # save current global flags
16142249141Sdes        ac_save_LIBS="$LIBS"
16143249141Sdes        ac_save_CPPFLAGS="$CPPFLAGS"
16144249141Sdes
16145249141Sdes        LIBS="$LIBS $PYTHON_LDFLAGS"
16146249141Sdes        CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16147238106Sdes        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148238106Sdes/* end confdefs.h.  */
16149238106Sdes
16150238106Sdes                #include <Python.h>
16151238106Sdes
16152238106Sdesint
16153238106Sdesmain ()
16154238106Sdes{
16155238106Sdes
16156238106Sdes                Py_Initialize();
16157238106Sdes
16158238106Sdes  ;
16159238106Sdes  return 0;
16160238106Sdes}
16161238106Sdes_ACEOF
16162238106Sdesif ac_fn_c_try_link "$LINENO"; then :
16163238106Sdes  pythonexists=yes
16164238106Sdeselse
16165238106Sdes  pythonexists=no
16166238106Sdesfi
16167238106Sdesrm -f core conftest.err conftest.$ac_objext \
16168238106Sdes    conftest$ac_exeext conftest.$ac_ext
16169238106Sdes
16170238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16171238106Sdes$as_echo "$pythonexists" >&6; }
16172238106Sdes
16173238106Sdes        if test ! "$pythonexists" = "yes"; then
16174238106Sdes           as_fn_error $? "
16175238106Sdes  Could not link test program to Python. Maybe the main Python library has been
16176238106Sdes  installed in some non-standard library path. If so, pass it to configure,
16177238106Sdes  via the LDFLAGS environment variable.
16178238106Sdes  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16179238106Sdes  ============================================================================
16180238106Sdes   ERROR!
16181238106Sdes   You probably have to install the development version of the Python package
16182238106Sdes   for your distribution.  The exact name of this package varies among them.
16183238106Sdes  ============================================================================
16184238106Sdes           " "$LINENO" 5
16185238106Sdes          PYTHON_VERSION=""
16186238106Sdes        fi
16187238106Sdes        ac_ext=c
16188238106Sdesac_cpp='$CPP $CPPFLAGS'
16189238106Sdesac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16190238106Sdesac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16191238106Sdesac_compiler_gnu=$ac_cv_c_compiler_gnu
16192238106Sdes
16193238106Sdes        # turn back to default flags
16194238106Sdes        CPPFLAGS="$ac_save_CPPFLAGS"
16195238106Sdes        LIBS="$ac_save_LIBS"
16196238106Sdes
16197238106Sdes        #
16198238106Sdes        # all done!
16199238106Sdes        #
16200238106Sdes
16201238106Sdes   if test ! -z "$PYTHON_VERSION"; then
16202285206Sdes	if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16203238106Sdes		as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16204238106Sdes	fi
16205238106Sdes
16206291767Sdes      PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16207291767Sdes
16208238106Sdes      # Have Python
16209238106Sdes
16210238106Sdes$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16211238106Sdes
16212238106Sdes      LIBS="$PYTHON_LDFLAGS $LIBS"
16213238106Sdes      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16214238106Sdes      ub_have_python=yes
16215238106Sdes
16216238106Sdes      # Check for SWIG
16217238106Sdes      ub_have_swig=no
16218238106Sdes
16219238106Sdes        # Extract the first word of "swig", so it can be a program name with args.
16220238106Sdesset dummy swig; ac_word=$2
16221238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16222238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
16223238106Sdesif ${ac_cv_path_SWIG+:} false; then :
16224238106Sdes  $as_echo_n "(cached) " >&6
16225238106Sdeselse
16226238106Sdes  case $SWIG in
16227238106Sdes  [\\/]* | ?:[\\/]*)
16228238106Sdes  ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16229238106Sdes  ;;
16230238106Sdes  *)
16231238106Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16232238106Sdesfor as_dir in $PATH
16233238106Sdesdo
16234238106Sdes  IFS=$as_save_IFS
16235238106Sdes  test -z "$as_dir" && as_dir=.
16236238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
16237249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16238238106Sdes    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16239238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16240238106Sdes    break 2
16241238106Sdes  fi
16242238106Sdesdone
16243238106Sdes  done
16244238106SdesIFS=$as_save_IFS
16245238106Sdes
16246238106Sdes  ;;
16247238106Sdesesac
16248238106Sdesfi
16249238106SdesSWIG=$ac_cv_path_SWIG
16250238106Sdesif test -n "$SWIG"; then
16251238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16252238106Sdes$as_echo "$SWIG" >&6; }
16253238106Sdeselse
16254238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16255238106Sdes$as_echo "no" >&6; }
16256238106Sdesfi
16257238106Sdes
16258238106Sdes
16259238106Sdes        if test -z "$SWIG" ; then
16260238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16261238106Sdes$as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16262238106Sdes                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16263238106Sdes        elif test -n "" ; then
16264238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16265238106Sdes$as_echo_n "checking for SWIG version... " >&6; }
16266238106Sdes                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'`
16267238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16268238106Sdes$as_echo "$swig_version" >&6; }
16269238106Sdes                if test -n "$swig_version" ; then
16270238106Sdes                        # Calculate the required version number components
16271238106Sdes                        required=
16272238106Sdes                        required_major=`echo $required | sed 's/[^0-9].*//'`
16273238106Sdes                        if test -z "$required_major" ; then
16274238106Sdes                                required_major=0
16275238106Sdes                        fi
16276238106Sdes                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16277238106Sdes                        required_minor=`echo $required | sed 's/[^0-9].*//'`
16278238106Sdes                        if test -z "$required_minor" ; then
16279238106Sdes                                required_minor=0
16280238106Sdes                        fi
16281238106Sdes                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16282238106Sdes                        required_patch=`echo $required | sed 's/[^0-9].*//'`
16283238106Sdes                        if test -z "$required_patch" ; then
16284238106Sdes                                required_patch=0
16285238106Sdes                        fi
16286238106Sdes                        # Calculate the available version number components
16287238106Sdes                        available=$swig_version
16288238106Sdes                        available_major=`echo $available | sed 's/[^0-9].*//'`
16289238106Sdes                        if test -z "$available_major" ; then
16290238106Sdes                                available_major=0
16291238106Sdes                        fi
16292238106Sdes                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16293238106Sdes                        available_minor=`echo $available | sed 's/[^0-9].*//'`
16294238106Sdes                        if test -z "$available_minor" ; then
16295238106Sdes                                available_minor=0
16296238106Sdes                        fi
16297238106Sdes                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16298238106Sdes                        available_patch=`echo $available | sed 's/[^0-9].*//'`
16299238106Sdes                        if test -z "$available_patch" ; then
16300238106Sdes                                available_patch=0
16301238106Sdes                        fi
16302238106Sdes                        if test $available_major -ne $required_major \
16303238106Sdes                                -o $available_minor -ne $required_minor \
16304238106Sdes                                -o $available_patch -lt $required_patch ; then
16305238106Sdes                                { $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
16306238106Sdes$as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
16307238106Sdes                                SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16308238106Sdes                        else
16309238106Sdes                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16310238106Sdes$as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16311238106Sdes                                SWIG_LIB=`$SWIG -swiglib`
16312238106Sdes                                { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16313238106Sdes$as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16314238106Sdes                        fi
16315238106Sdes                else
16316238106Sdes                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16317238106Sdes$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16318238106Sdes                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16319238106Sdes                fi
16320238106Sdes        fi
16321238106Sdes
16322238106Sdes
16323238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16324238106Sdes$as_echo_n "checking SWIG... " >&6; }
16325238106Sdes      if test ! -x "$SWIG"; then
16326238106Sdes         as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
16327238106Sdes      else
16328238106Sdes
16329238106Sdes$as_echo "#define HAVE_SWIG 1" >>confdefs.h
16330238106Sdes
16331238106Sdes         swig="$SWIG"
16332238106Sdes
16333238106Sdes         { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
16334238106Sdes$as_echo "present" >&6; }
16335238106Sdes
16336238106Sdes         # If have Python & SWIG
16337238106Sdes         # Declare PythonMod
16338238106Sdes         if test x_$ub_with_pythonmod != x_no; then
16339238106Sdes
16340238106Sdes$as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
16341238106Sdes
16342238106Sdes            WITH_PYTHONMODULE=yes
16343238106Sdes
16344238106Sdes	    PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
16345238106Sdes
16346238106Sdes	    PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
16347238106Sdes
16348238106Sdes	    PYTHONMOD_INSTALL=pythonmod-install
16349238106Sdes
16350238106Sdes	    PYTHONMOD_UNINSTALL=pythonmod-uninstall
16351238106Sdes
16352238106Sdes         fi
16353238106Sdes
16354238106Sdes         # Declare PyUnbound
16355238106Sdes         if test x_$ub_with_pyunbound != x_no; then
16356238106Sdes
16357238106Sdes$as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
16358238106Sdes
16359238106Sdes            WITH_PYUNBOUND=yes
16360238106Sdes
16361238106Sdes	    PYUNBOUND_OBJ="libunbound_wrap.lo"
16362238106Sdes
16363238106Sdes	    PYUNBOUND_TARGET="_unbound.la"
16364238106Sdes
16365238106Sdes	    PYUNBOUND_INSTALL=pyunbound-install
16366238106Sdes
16367238106Sdes	    PYUNBOUND_UNINSTALL=pyunbound-uninstall
16368238106Sdes
16369238106Sdes         fi
16370238106Sdes      fi
16371238106Sdes   else
16372238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
16373238106Sdes$as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
16374238106Sdes      ub_with_pyunbound=no
16375238106Sdes      ub_with_pythonmod=no
16376238106Sdes   fi
16377238106Sdesfi
16378238106Sdes
16379238106Sdesif test "`uname`" = "NetBSD"; then
16380238106Sdes	NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
16381238106Sdes
16382238106Sdesfi
16383238106SdesCONFIG_DATE=`date +%Y%m%d`
16384238106Sdes
16385238106Sdes
16386238106Sdes# Checks for libraries.
16387238106Sdes
16388249141Sdes# libnss
16389249141SdesUSE_NSS="no"
16390238106Sdes
16391249141Sdes# Check whether --with-nss was given.
16392249141Sdesif test "${with_nss+set}" = set; then :
16393249141Sdes  withval=$with_nss;
16394249141Sdes	USE_NSS="yes"
16395249141Sdes
16396249141Sdes$as_echo "#define HAVE_NSS 1" >>confdefs.h
16397249141Sdes
16398249141Sdes	if test "$withval" != "" -a "$withval" != "yes"; then
16399249141Sdes		CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
16400249141Sdes		LDFLAGS="$LDFLAGS -L$withval/lib"
16401249141Sdes
16402249141Sdes	if test "x$enable_rpath" = xyes; then
16403249141Sdes		if echo "$withval/lib" | grep "^/" >/dev/null; then
16404249141Sdes			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16405249141Sdes		fi
16406249141Sdes	fi
16407249141Sdes
16408249141Sdes		CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
16409249141Sdes	else
16410249141Sdes		CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
16411249141Sdes		CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
16412249141Sdes	fi
16413249141Sdes        LIBS="$LIBS -lnss3 -lnspr4"
16414294190Sdes	SSLLIB=""
16415249141Sdes
16416249141Sdes
16417249141Sdesfi
16418249141Sdes
16419249141Sdes
16420294190Sdes# libnettle
16421294190SdesUSE_NETTLE="no"
16422294190Sdes
16423294190Sdes# Check whether --with-nettle was given.
16424294190Sdesif test "${with_nettle+set}" = set; then :
16425294190Sdes  withval=$with_nettle;
16426294190Sdes	USE_NETTLE="yes"
16427294190Sdes
16428294190Sdes$as_echo "#define HAVE_NETTLE 1" >>confdefs.h
16429294190Sdes
16430294190Sdes	if test "$withval" != "" -a "$withval" != "yes"; then
16431294190Sdes		CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
16432294190Sdes		LDFLAGS="$LDFLAGS -L$withval/lib"
16433294190Sdes
16434294190Sdes	if test "x$enable_rpath" = xyes; then
16435294190Sdes		if echo "$withval/lib" | grep "^/" >/dev/null; then
16436294190Sdes			RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
16437294190Sdes		fi
16438294190Sdes	fi
16439294190Sdes
16440294190Sdes	else
16441294190Sdes		CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
16442294190Sdes	fi
16443294190Sdes        LIBS="$LIBS -lhogweed -lnettle -lgmp"
16444294190Sdes	SSLLIB=""
16445294190Sdes
16446294190Sdes
16447294190Sdesfi
16448294190Sdes
16449294190Sdes
16450249141Sdes# openssl
16451294190Sdesif test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
16452249141Sdes
16453249141Sdes
16454238106Sdes# Check whether --with-ssl was given.
16455238106Sdesif test "${with_ssl+set}" = set; then :
16456238106Sdes  withval=$with_ssl;
16457238106Sdes
16458238106Sdeselse
16459238106Sdes
16460238106Sdes            withval="yes"
16461238106Sdes
16462238106Sdesfi
16463238106Sdes
16464238106Sdes    if test x_$withval = x_no; then
16465238106Sdes	as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
16466238106Sdes    fi
16467238106Sdes
16468238106Sdes    withval=$withval
16469238106Sdes    if test x_$withval != x_no; then
16470238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
16471238106Sdes$as_echo_n "checking for SSL... " >&6; }
16472238106Sdes        if test x_$withval = x_ -o x_$withval = x_yes; then
16473238106Sdes            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
16474238106Sdes        fi
16475238106Sdes        for dir in $withval; do
16476238106Sdes            ssldir="$dir"
16477238106Sdes            if test -f "$dir/include/openssl/ssl.h"; then
16478238106Sdes                found_ssl="yes"
16479238106Sdes
16480238106Sdescat >>confdefs.h <<_ACEOF
16481238106Sdes#define HAVE_SSL /**/
16482238106Sdes_ACEOF
16483238106Sdes
16484238106Sdes                                if test "$ssldir" != "/usr"; then
16485238106Sdes                        CPPFLAGS="$CPPFLAGS -I$ssldir/include"
16486238106Sdes                        LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
16487238106Sdes                fi
16488238106Sdes                break;
16489238106Sdes            fi
16490238106Sdes        done
16491238106Sdes        if test x_$found_ssl != x_yes; then
16492238106Sdes            as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
16493238106Sdes        else
16494238106Sdes            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
16495238106Sdes$as_echo "found in $ssldir" >&6; }
16496238106Sdes            HAVE_SSL=yes
16497238106Sdes                        if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
16498238106Sdes                LDFLAGS="$LDFLAGS -L$ssldir/lib"
16499238106Sdes                LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
16500238106Sdes
16501238106Sdes	if test "x$enable_rpath" = xyes; then
16502238106Sdes		if echo "$ssldir/lib" | grep "^/" >/dev/null; then
16503238106Sdes			RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
16504238106Sdes		fi
16505238106Sdes	fi
16506238106Sdes
16507238106Sdes            fi
16508238106Sdes
16509238106Sdes            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_init in -lcrypto" >&5
16510238106Sdes$as_echo_n "checking for HMAC_CTX_init in -lcrypto... " >&6; }
16511238106Sdes            LIBS="$LIBS -lcrypto"
16512238106Sdes            LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
16513238106Sdes            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514238106Sdes/* end confdefs.h.  */
16515238106Sdes
16516238106Sdesint
16517238106Sdesmain ()
16518238106Sdes{
16519238106Sdes
16520238106Sdes                int HMAC_CTX_init(void);
16521238106Sdes                (void)HMAC_CTX_init();
16522238106Sdes
16523238106Sdes  ;
16524238106Sdes  return 0;
16525238106Sdes}
16526238106Sdes_ACEOF
16527238106Sdesif ac_fn_c_try_link "$LINENO"; then :
16528238106Sdes
16529238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16530238106Sdes$as_echo "yes" >&6; }
16531238106Sdes
16532238106Sdes$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16533238106Sdes
16534238106Sdes
16535238106Sdeselse
16536238106Sdes
16537238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16538238106Sdes$as_echo "no" >&6; }
16539238106Sdes                # check if -lwsock32 or -lgdi32 are needed.
16540238106Sdes                BAKLIBS="$LIBS"
16541238106Sdes                BAKSSLLIBS="$LIBSSL_LIBS"
16542238106Sdes                LIBS="$LIBS -lgdi32"
16543238106Sdes                LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
16544238106Sdes                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
16545238106Sdes$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
16546238106Sdes                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16547238106Sdes/* end confdefs.h.  */
16548238106Sdes
16549238106Sdesint
16550238106Sdesmain ()
16551238106Sdes{
16552238106Sdes
16553238106Sdes                    int HMAC_CTX_init(void);
16554238106Sdes                    (void)HMAC_CTX_init();
16555238106Sdes
16556238106Sdes  ;
16557238106Sdes  return 0;
16558238106Sdes}
16559238106Sdes_ACEOF
16560238106Sdesif ac_fn_c_try_link "$LINENO"; then :
16561238106Sdes
16562238106Sdes
16563238106Sdes$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16564238106Sdes
16565238106Sdes                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16566238106Sdes$as_echo "yes" >&6; }
16567238106Sdes
16568238106Sdeselse
16569238106Sdes
16570238106Sdes                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16571238106Sdes$as_echo "no" >&6; }
16572238106Sdes                    LIBS="$BAKLIBS"
16573238106Sdes                    LIBSSL_LIBS="$BAKSSLLIBS"
16574238106Sdes                    LIBS="$LIBS -ldl"
16575238106Sdes                    LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
16576238106Sdes                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
16577238106Sdes$as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
16578238106Sdes                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579238106Sdes/* end confdefs.h.  */
16580238106Sdes
16581238106Sdesint
16582238106Sdesmain ()
16583238106Sdes{
16584238106Sdes
16585238106Sdes                        int HMAC_CTX_init(void);
16586238106Sdes                        (void)HMAC_CTX_init();
16587238106Sdes
16588238106Sdes  ;
16589238106Sdes  return 0;
16590238106Sdes}
16591238106Sdes_ACEOF
16592238106Sdesif ac_fn_c_try_link "$LINENO"; then :
16593238106Sdes
16594238106Sdes
16595238106Sdes$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
16596238106Sdes
16597238106Sdes                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16598238106Sdes$as_echo "yes" >&6; }
16599238106Sdes
16600238106Sdeselse
16601238106Sdes
16602238106Sdes                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16603238106Sdes$as_echo "no" >&6; }
16604238106Sdes                    as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
16605238106Sdes
16606238106Sdesfi
16607238106Sdesrm -f core conftest.err conftest.$ac_objext \
16608238106Sdes    conftest$ac_exeext conftest.$ac_ext
16609238106Sdes
16610238106Sdesfi
16611238106Sdesrm -f core conftest.err conftest.$ac_objext \
16612238106Sdes    conftest$ac_exeext conftest.$ac_ext
16613238106Sdes
16614238106Sdesfi
16615238106Sdesrm -f core conftest.err conftest.$ac_objext \
16616238106Sdes    conftest$ac_exeext conftest.$ac_ext
16617238106Sdes        fi
16618238106Sdes
16619238106Sdes
16620238106Sdes    fi
16621238106Sdesfor ac_header in openssl/ssl.h
16622238106Sdesdo :
16623238106Sdes  ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
16624238106Sdes"
16625238106Sdesif test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
16626238106Sdes  cat >>confdefs.h <<_ACEOF
16627238106Sdes#define HAVE_OPENSSL_SSL_H 1
16628238106Sdes_ACEOF
16629238106Sdes
16630238106Sdesfi
16631238106Sdes
16632238106Sdesdone
16633238106Sdes
16634238106Sdesfor ac_header in openssl/err.h
16635238106Sdesdo :
16636238106Sdes  ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
16637238106Sdes"
16638238106Sdesif test "x$ac_cv_header_openssl_err_h" = xyes; then :
16639238106Sdes  cat >>confdefs.h <<_ACEOF
16640238106Sdes#define HAVE_OPENSSL_ERR_H 1
16641238106Sdes_ACEOF
16642238106Sdes
16643238106Sdesfi
16644238106Sdes
16645238106Sdesdone
16646238106Sdes
16647238106Sdesfor ac_header in openssl/rand.h
16648238106Sdesdo :
16649238106Sdes  ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
16650238106Sdes"
16651238106Sdesif test "x$ac_cv_header_openssl_rand_h" = xyes; then :
16652238106Sdes  cat >>confdefs.h <<_ACEOF
16653238106Sdes#define HAVE_OPENSSL_RAND_H 1
16654238106Sdes_ACEOF
16655238106Sdes
16656238106Sdesfi
16657238106Sdes
16658238106Sdesdone
16659238106Sdes
16660238106Sdes
16661238106Sdes
16662238106Sdes
16663238106Sdes# check if libssl needs libdl
16664238106SdesBAKLIBS="$LIBS"
16665238106SdesLIBS="-lssl $LIBS"
16666238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
16667238106Sdes$as_echo_n "checking if libssl needs libdl... " >&6; }
16668238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669238106Sdes/* end confdefs.h.  */
16670238106Sdes
16671238106Sdes/* Override any GCC internal prototype to avoid an error.
16672238106Sdes   Use char because int might match the return type of a GCC
16673238106Sdes   builtin and then its argument prototype would still apply.  */
16674238106Sdes#ifdef __cplusplus
16675238106Sdesextern "C"
16676238106Sdes#endif
16677238106Sdeschar SSL_CTX_new ();
16678238106Sdesint
16679238106Sdesmain ()
16680238106Sdes{
16681238106Sdesreturn SSL_CTX_new ();
16682238106Sdes  ;
16683238106Sdes  return 0;
16684238106Sdes}
16685238106Sdes_ACEOF
16686238106Sdesif ac_fn_c_try_link "$LINENO"; then :
16687238106Sdes
16688238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16689238106Sdes$as_echo "no" >&6; }
16690238106Sdes	LIBS="$BAKLIBS"
16691238106Sdes
16692238106Sdeselse
16693238106Sdes
16694238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16695238106Sdes$as_echo "yes" >&6; }
16696238106Sdes	LIBS="$BAKLIBS"
16697238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16698238106Sdes$as_echo_n "checking for library containing dlopen... " >&6; }
16699238106Sdesif ${ac_cv_search_dlopen+:} false; then :
16700238106Sdes  $as_echo_n "(cached) " >&6
16701238106Sdeselse
16702238106Sdes  ac_func_search_save_LIBS=$LIBS
16703238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
16704238106Sdes/* end confdefs.h.  */
16705238106Sdes
16706238106Sdes/* Override any GCC internal prototype to avoid an error.
16707238106Sdes   Use char because int might match the return type of a GCC
16708238106Sdes   builtin and then its argument prototype would still apply.  */
16709238106Sdes#ifdef __cplusplus
16710238106Sdesextern "C"
16711238106Sdes#endif
16712238106Sdeschar dlopen ();
16713238106Sdesint
16714238106Sdesmain ()
16715238106Sdes{
16716238106Sdesreturn dlopen ();
16717238106Sdes  ;
16718238106Sdes  return 0;
16719238106Sdes}
16720238106Sdes_ACEOF
16721238106Sdesfor ac_lib in '' dl; do
16722238106Sdes  if test -z "$ac_lib"; then
16723238106Sdes    ac_res="none required"
16724238106Sdes  else
16725238106Sdes    ac_res=-l$ac_lib
16726238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16727238106Sdes  fi
16728238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
16729238106Sdes  ac_cv_search_dlopen=$ac_res
16730238106Sdesfi
16731238106Sdesrm -f core conftest.err conftest.$ac_objext \
16732238106Sdes    conftest$ac_exeext
16733238106Sdes  if ${ac_cv_search_dlopen+:} false; then :
16734238106Sdes  break
16735238106Sdesfi
16736238106Sdesdone
16737238106Sdesif ${ac_cv_search_dlopen+:} false; then :
16738238106Sdes
16739238106Sdeselse
16740238106Sdes  ac_cv_search_dlopen=no
16741238106Sdesfi
16742238106Sdesrm conftest.$ac_ext
16743238106SdesLIBS=$ac_func_search_save_LIBS
16744238106Sdesfi
16745238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16746238106Sdes$as_echo "$ac_cv_search_dlopen" >&6; }
16747238106Sdesac_res=$ac_cv_search_dlopen
16748238106Sdesif test "$ac_res" != no; then :
16749238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16750238106Sdes
16751238106Sdesfi
16752238106Sdes
16753238106Sdes
16754238106Sdesfi
16755238106Sdesrm -f core conftest.err conftest.$ac_objext \
16756238106Sdes    conftest$ac_exeext conftest.$ac_ext
16757294190SdesSSLLIB="-lssl"
16758285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
16759285206Sdes$as_echo_n "checking for LibreSSL... " >&6; }
16760291767Sdesif grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
16761285206Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16762285206Sdes$as_echo "yes" >&6; }
16763285206Sdes
16764285206Sdes$as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
16765285206Sdes
16766285206Sdes	# libressl provides these compat functions, but they may also be
16767285206Sdes	# declared by the OS in libc.  See if they have been declared.
16768285206Sdes	ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16769285206Sdesif test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16770285206Sdes  ac_have_decl=1
16771285206Sdeselse
16772285206Sdes  ac_have_decl=0
16773285206Sdesfi
16774285206Sdes
16775285206Sdescat >>confdefs.h <<_ACEOF
16776285206Sdes#define HAVE_DECL_STRLCPY $ac_have_decl
16777285206Sdes_ACEOF
16778285206Sdesac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16779285206Sdesif test "x$ac_cv_have_decl_strlcat" = xyes; then :
16780285206Sdes  ac_have_decl=1
16781285206Sdeselse
16782285206Sdes  ac_have_decl=0
16783285206Sdesfi
16784285206Sdes
16785285206Sdescat >>confdefs.h <<_ACEOF
16786285206Sdes#define HAVE_DECL_STRLCAT $ac_have_decl
16787285206Sdes_ACEOF
16788285206Sdesac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
16789285206Sdesif test "x$ac_cv_have_decl_arc4random" = xyes; then :
16790285206Sdes  ac_have_decl=1
16791285206Sdeselse
16792285206Sdes  ac_have_decl=0
16793285206Sdesfi
16794285206Sdes
16795285206Sdescat >>confdefs.h <<_ACEOF
16796285206Sdes#define HAVE_DECL_ARC4RANDOM $ac_have_decl
16797285206Sdes_ACEOF
16798285206Sdesac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
16799285206Sdesif test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
16800285206Sdes  ac_have_decl=1
16801285206Sdeselse
16802285206Sdes  ac_have_decl=0
16803285206Sdesfi
16804285206Sdes
16805285206Sdescat >>confdefs.h <<_ACEOF
16806285206Sdes#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
16807285206Sdes_ACEOF
16808291767Sdesac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
16809291767Sdesif test "x$ac_cv_have_decl_reallocarray" = xyes; then :
16810291767Sdes  ac_have_decl=1
16811291767Sdeselse
16812291767Sdes  ac_have_decl=0
16813291767Sdesfi
16814285206Sdes
16815291767Sdescat >>confdefs.h <<_ACEOF
16816291767Sdes#define HAVE_DECL_REALLOCARRAY $ac_have_decl
16817291767Sdes_ACEOF
16818291767Sdes
16819285206Sdeselse
16820285206Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16821285206Sdes$as_echo "no" >&6; }
16822285206Sdesfi
16823238106Sdesfor ac_header in openssl/conf.h
16824238106Sdesdo :
16825238106Sdes  ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default
16826238106Sdes"
16827238106Sdesif test "x$ac_cv_header_openssl_conf_h" = xyes; then :
16828238106Sdes  cat >>confdefs.h <<_ACEOF
16829238106Sdes#define HAVE_OPENSSL_CONF_H 1
16830238106Sdes_ACEOF
16831238106Sdes
16832238106Sdesfi
16833238106Sdes
16834238106Sdesdone
16835238106Sdes
16836238106Sdesfor ac_header in openssl/engine.h
16837238106Sdesdo :
16838238106Sdes  ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default
16839238106Sdes"
16840238106Sdesif test "x$ac_cv_header_openssl_engine_h" = xyes; then :
16841238106Sdes  cat >>confdefs.h <<_ACEOF
16842238106Sdes#define HAVE_OPENSSL_ENGINE_H 1
16843238106Sdes_ACEOF
16844238106Sdes
16845238106Sdesfi
16846238106Sdes
16847238106Sdesdone
16848238106Sdes
16849249141Sdesfor ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode
16850238106Sdesdo :
16851238106Sdes  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16852238106Sdesac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16853238106Sdesif eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16854238106Sdes  cat >>confdefs.h <<_ACEOF
16855238106Sdes#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16856238106Sdes_ACEOF
16857238106Sdes
16858238106Sdesfi
16859238106Sdesdone
16860238106Sdes
16861238106Sdesac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
16862238106Sdes$ac_includes_default
16863238106Sdes#ifdef HAVE_OPENSSL_ERR_H
16864238106Sdes#include <openssl/err.h>
16865238106Sdes#endif
16866238106Sdes
16867238106Sdes#ifdef HAVE_OPENSSL_RAND_H
16868238106Sdes#include <openssl/rand.h>
16869238106Sdes#endif
16870238106Sdes
16871238106Sdes#ifdef HAVE_OPENSSL_CONF_H
16872238106Sdes#include <openssl/conf.h>
16873238106Sdes#endif
16874238106Sdes
16875238106Sdes#ifdef HAVE_OPENSSL_ENGINE_H
16876238106Sdes#include <openssl/engine.h>
16877238106Sdes#endif
16878238106Sdes#include <openssl/ssl.h>
16879238106Sdes#include <openssl/evp.h>
16880238106Sdes
16881238106Sdes"
16882238106Sdesif test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
16883238106Sdes  ac_have_decl=1
16884238106Sdeselse
16885238106Sdes  ac_have_decl=0
16886238106Sdesfi
16887238106Sdes
16888238106Sdescat >>confdefs.h <<_ACEOF
16889238106Sdes#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
16890238106Sdes_ACEOF
16891238106Sdesac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
16892238106Sdes$ac_includes_default
16893238106Sdes#ifdef HAVE_OPENSSL_ERR_H
16894238106Sdes#include <openssl/err.h>
16895238106Sdes#endif
16896238106Sdes
16897238106Sdes#ifdef HAVE_OPENSSL_RAND_H
16898238106Sdes#include <openssl/rand.h>
16899238106Sdes#endif
16900238106Sdes
16901238106Sdes#ifdef HAVE_OPENSSL_CONF_H
16902238106Sdes#include <openssl/conf.h>
16903238106Sdes#endif
16904238106Sdes
16905238106Sdes#ifdef HAVE_OPENSSL_ENGINE_H
16906238106Sdes#include <openssl/engine.h>
16907238106Sdes#endif
16908238106Sdes#include <openssl/ssl.h>
16909238106Sdes#include <openssl/evp.h>
16910238106Sdes
16911238106Sdes"
16912238106Sdesif test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
16913238106Sdes  ac_have_decl=1
16914238106Sdeselse
16915238106Sdes  ac_have_decl=0
16916238106Sdesfi
16917238106Sdes
16918238106Sdescat >>confdefs.h <<_ACEOF
16919238106Sdes#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
16920238106Sdes_ACEOF
16921291767Sdesac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
16922291767Sdes$ac_includes_default
16923291767Sdes#ifdef HAVE_OPENSSL_ERR_H
16924291767Sdes#include <openssl/err.h>
16925291767Sdes#endif
16926238106Sdes
16927291767Sdes#ifdef HAVE_OPENSSL_RAND_H
16928291767Sdes#include <openssl/rand.h>
16929291767Sdes#endif
16930291767Sdes
16931291767Sdes#ifdef HAVE_OPENSSL_CONF_H
16932291767Sdes#include <openssl/conf.h>
16933291767Sdes#endif
16934291767Sdes
16935291767Sdes#ifdef HAVE_OPENSSL_ENGINE_H
16936291767Sdes#include <openssl/engine.h>
16937291767Sdes#endif
16938291767Sdes#include <openssl/ssl.h>
16939291767Sdes#include <openssl/evp.h>
16940291767Sdes
16941291767Sdes"
16942291767Sdesif test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
16943291767Sdes  ac_have_decl=1
16944291767Sdeselse
16945291767Sdes  ac_have_decl=0
16946249141Sdesfi
16947238106Sdes
16948291767Sdescat >>confdefs.h <<_ACEOF
16949291767Sdes#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
16950291767Sdes_ACEOF
16951249141Sdes
16952291767Sdesfi
16953291767Sdes
16954291767Sdes
16955294190Sdes
16956238106Sdes# Check whether --enable-sha2 was given.
16957238106Sdesif test "${enable_sha2+set}" = set; then :
16958238106Sdes  enableval=$enable_sha2;
16959238106Sdesfi
16960238106Sdes
16961238106Sdescase "$enable_sha2" in
16962238106Sdes	no)
16963238106Sdes	;;
16964238106Sdes	yes|*)
16965238106Sdes
16966238106Sdes$as_echo "#define USE_SHA2 1" >>confdefs.h
16967238106Sdes
16968238106Sdes	;;
16969238106Sdesesac
16970238106Sdes
16971238106Sdes# check wether gost also works
16972238106Sdes
16973238106Sdes# Check whether --enable-gost was given.
16974238106Sdesif test "${enable_gost+set}" = set; then :
16975238106Sdes  enableval=$enable_gost;
16976238106Sdesfi
16977238106Sdes
16978238106Sdesuse_gost="no"
16979294190Sdesif test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
16980238106Sdescase "$enable_gost" in
16981238106Sdes	no)
16982238106Sdes	;;
16983238106Sdes	*)
16984238106Sdes	ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
16985238106Sdesif test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
16986238106Sdes  :
16987238106Sdeselse
16988238106Sdes  as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
16989238106Sdesfi
16990238106Sdes
16991249141Sdes	ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
16992238106Sdesif test "x$ac_cv_func_EC_KEY_new" = xyes; then :
16993238106Sdes
16994238106Sdeselse
16995238106Sdes  as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
16996238106Sdesfi
16997238106Sdes
16998238106Sdes
16999238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17000238106Sdes$as_echo_n "checking if GOST works... " >&6; }
17001238106Sdesif test c${cross_compiling} = cno; then
17002238106SdesBAKCFLAGS="$CFLAGS"
17003238106Sdesif test -n "$ssldir"; then
17004238106Sdes	CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17005238106Sdesfi
17006238106Sdesif test "$cross_compiling" = yes; then :
17007238106Sdes  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17008238106Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17009238106Sdesas_fn_error $? "cannot run test program while cross compiling
17010238106SdesSee \`config.log' for more details" "$LINENO" 5; }
17011238106Sdeselse
17012238106Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17013238106Sdes/* end confdefs.h.  */
17014238106Sdes
17015238106Sdes#include <string.h>
17016238106Sdes#include <openssl/ssl.h>
17017238106Sdes#include <openssl/evp.h>
17018238106Sdes#include <openssl/engine.h>
17019238106Sdes#include <openssl/conf.h>
17020269257Sdes/* routine to load gost (from sldns) */
17021238106Sdesint load_gost_id(void)
17022238106Sdes{
17023238106Sdes	static int gost_id = 0;
17024238106Sdes	const EVP_PKEY_ASN1_METHOD* meth;
17025238106Sdes	ENGINE* e;
17026238106Sdes
17027238106Sdes	if(gost_id) return gost_id;
17028238106Sdes
17029238106Sdes	/* see if configuration loaded gost implementation from other engine*/
17030238106Sdes	meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
17031238106Sdes	if(meth) {
17032238106Sdes		EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17033238106Sdes		return gost_id;
17034238106Sdes	}
17035238106Sdes
17036238106Sdes	/* see if engine can be loaded already */
17037238106Sdes	e = ENGINE_by_id("gost");
17038238106Sdes	if(!e) {
17039238106Sdes		/* load it ourself, in case statically linked */
17040238106Sdes		ENGINE_load_builtin_engines();
17041238106Sdes		ENGINE_load_dynamic();
17042238106Sdes		e = ENGINE_by_id("gost");
17043238106Sdes	}
17044238106Sdes	if(!e) {
17045238106Sdes		/* no gost engine in openssl */
17046238106Sdes		return 0;
17047238106Sdes	}
17048238106Sdes	if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
17049238106Sdes		ENGINE_finish(e);
17050238106Sdes		ENGINE_free(e);
17051238106Sdes		return 0;
17052238106Sdes	}
17053238106Sdes
17054238106Sdes	meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17055238106Sdes	if(!meth) {
17056238106Sdes		/* algo not found */
17057238106Sdes		ENGINE_finish(e);
17058238106Sdes		ENGINE_free(e);
17059238106Sdes		return 0;
17060238106Sdes	}
17061238106Sdes	EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17062238106Sdes	return gost_id;
17063238106Sdes}
17064238106Sdesint main(void) {
17065238106Sdes	EVP_MD_CTX* ctx;
17066238106Sdes	const EVP_MD* md;
17067238106Sdes	unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17068238106Sdes	const char* str = "Hello world";
17069238106Sdes	const unsigned char check[] = {
17070238106Sdes		0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17071238106Sdes		0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17072238106Sdes		0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17073238106Sdes		0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17074238106Sdes	};
17075238106Sdes	OPENSSL_config(NULL);
17076238106Sdes	(void)load_gost_id();
17077238106Sdes	md = EVP_get_digestbyname("md_gost94");
17078238106Sdes	if(!md) return 1;
17079238106Sdes	memset(digest, 0, sizeof(digest));
17080238106Sdes	ctx = EVP_MD_CTX_create();
17081238106Sdes	if(!ctx) return 2;
17082238106Sdes	if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17083238106Sdes	if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17084238106Sdes	if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17085238106Sdes	/* uncomment to see the hash calculated.
17086238106Sdes		{int i;
17087238106Sdes		for(i=0; i<32; i++)
17088238106Sdes			printf(" %2.2x", (int)digest[i]);
17089238106Sdes		printf("\n");}
17090238106Sdes	*/
17091238106Sdes	if(memcmp(digest, check, sizeof(check)) != 0)
17092238106Sdes		return 6;
17093238106Sdes	return 0;
17094238106Sdes}
17095238106Sdes
17096238106Sdes_ACEOF
17097238106Sdesif ac_fn_c_try_run "$LINENO"; then :
17098238106Sdes  eval "ac_cv_c_gost_works=yes"
17099238106Sdeselse
17100238106Sdes  eval "ac_cv_c_gost_works=no"
17101238106Sdesfi
17102238106Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17103238106Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
17104238106Sdesfi
17105238106Sdes
17106238106SdesCFLAGS="$BAKCFLAGS"
17107238106Sdeselse
17108238106Sdeseval "ac_cv_c_gost_works=maybe"
17109238106Sdesfi
17110238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17111238106Sdes$as_echo "$ac_cv_c_gost_works" >&6; }
17112238106Sdes
17113249141Sdes	if test "$ac_cv_c_gost_works" != no; then
17114238106Sdes		use_gost="yes"
17115238106Sdes
17116238106Sdes$as_echo "#define USE_GOST 1" >>confdefs.h
17117238106Sdes
17118238106Sdes	fi
17119238106Sdes	;;
17120238106Sdesesac
17121249141Sdesfi
17122238106Sdes# Check whether --enable-ecdsa was given.
17123238106Sdesif test "${enable_ecdsa+set}" = set; then :
17124238106Sdes  enableval=$enable_ecdsa;
17125238106Sdesfi
17126238106Sdes
17127238106Sdesuse_ecdsa="no"
17128238106Sdescase "$enable_ecdsa" in
17129238106Sdes    no)
17130238106Sdes      ;;
17131238106Sdes    *)
17132294190Sdes      if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17133249141Sdes	      ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17134238106Sdesif test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17135238106Sdes
17136238106Sdeselse
17137238106Sdes  as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17138238106Sdesfi
17139238106Sdes
17140249141Sdes	      ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17141238106Sdesif test "x$ac_cv_func_SHA384_Init" = xyes; then :
17142238106Sdes
17143238106Sdeselse
17144238106Sdes  as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17145238106Sdesfi
17146238106Sdes
17147249141Sdes	      ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17148238106Sdes#include <openssl/evp.h>
17149238106Sdes
17150238106Sdes"
17151238106Sdesif test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
17152238106Sdes  ac_have_decl=1
17153238106Sdeselse
17154238106Sdes  ac_have_decl=0
17155238106Sdesfi
17156238106Sdes
17157238106Sdescat >>confdefs.h <<_ACEOF
17158238106Sdes#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
17159238106Sdes_ACEOF
17160238106Sdesif test $ac_have_decl = 1; then :
17161238106Sdes
17162238106Sdeselse
17163238106Sdes  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17164238106Sdesfi
17165238106Sdesac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17166238106Sdes#include <openssl/evp.h>
17167238106Sdes
17168238106Sdes"
17169238106Sdesif test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17170238106Sdes  ac_have_decl=1
17171238106Sdeselse
17172238106Sdes  ac_have_decl=0
17173238106Sdesfi
17174238106Sdes
17175238106Sdescat >>confdefs.h <<_ACEOF
17176238106Sdes#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17177238106Sdes_ACEOF
17178238106Sdesif test $ac_have_decl = 1; then :
17179238106Sdes
17180238106Sdeselse
17181238106Sdes  as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17182238106Sdesfi
17183238106Sdes
17184249141Sdes	      # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17185249141Sdes	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17186238106Sdes$as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17187285206Sdes	      if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17188285206Sdes		if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17189285206Sdes		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17190238106Sdes$as_echo "no" >&6; }
17191238106Sdes
17192238106Sdescat >>confdefs.h <<_ACEOF
17193238106Sdes#define USE_ECDSA_EVP_WORKAROUND 1
17194238106Sdes_ACEOF
17195238106Sdes
17196285206Sdes		else
17197285206Sdes		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17198285206Sdes$as_echo "yes" >&6; }
17199285206Sdes		fi
17200249141Sdes	      else
17201285206Sdes		# not OpenSSL, thus likely LibreSSL, which supports it
17202249141Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17203238106Sdes$as_echo "yes" >&6; }
17204249141Sdes	      fi
17205238106Sdes      fi
17206238106Sdes      # we now know we have ECDSA and the required curves.
17207238106Sdes
17208238106Sdescat >>confdefs.h <<_ACEOF
17209238106Sdes#define USE_ECDSA 1
17210238106Sdes_ACEOF
17211238106Sdes
17212238106Sdes      use_ecdsa="yes"
17213238106Sdes      ;;
17214238106Sdesesac
17215238106Sdes
17216269257Sdes# Check whether --enable-event-api was given.
17217269257Sdesif test "${enable_event_api+set}" = set; then :
17218269257Sdes  enableval=$enable_event_api;
17219269257Sdesfi
17220269257Sdes
17221269257Sdesuse_unbound_event="no"
17222269257Sdescase "$enable_event_api" in
17223269257Sdes    yes)
17224269257Sdes      use_unbound_event="yes"
17225269257Sdes      ;;
17226269257Sdes    *)
17227269257Sdes      ;;
17228269257Sdesesac
17229269257Sdes
17230238106Sdes# check for libevent
17231238106Sdes
17232238106Sdes# Check whether --with-libevent was given.
17233238106Sdesif test "${with_libevent+set}" = set; then :
17234238106Sdes  withval=$with_libevent;
17235238106Sdeselse
17236238106Sdes   withval="no"
17237238106Sdesfi
17238238106Sdes
17239238106Sdesif test x_$withval = x_yes -o x_$withval != x_no; then
17240238106Sdes        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
17241238106Sdes$as_echo_n "checking for libevent... " >&6; }
17242238106Sdes        if test x_$withval = x_ -o x_$withval = x_yes; then
17243238106Sdes            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17244238106Sdes        fi
17245238106Sdes        for dir in $withval; do
17246238106Sdes            thedir="$dir"
17247269257Sdes            if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
17248238106Sdes                found_libevent="yes"
17249238106Sdes				if test "$thedir" != "/usr"; then
17250238106Sdes                    CPPFLAGS="$CPPFLAGS -I$thedir/include"
17251238106Sdes		fi
17252238106Sdes                break;
17253238106Sdes            fi
17254238106Sdes        done
17255238106Sdes        if test x_$found_libevent != x_yes; then
17256238106Sdes		if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
17257238106Sdes			# libevent source directory
17258238106Sdes            		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17259238106Sdes$as_echo "found in $thedir" >&6; }
17260238106Sdes                	CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
17261238106Sdes			BAK_LDFLAGS_SET="1"
17262238106Sdes			BAK_LDFLAGS="$LDFLAGS"
17263238106Sdes			# remove evdns from linking
17264238106Sdes			mkdir build >/dev/null 2>&1
17265238106Sdes			mkdir build/libevent >/dev/null 2>&1
17266238106Sdes			mkdir build/libevent/.libs >/dev/null 2>&1
17267238106Sdes			ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17268238106Sdes			ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
17269238106Sdes			ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
17270238106Sdes			cp $ev_files_o build/libevent
17271238106Sdes			cp $ev_files_lo build/libevent
17272238106Sdes			cp $ev_files_libso build/libevent/.libs
17273238106Sdes            		LATE_LDFLAGS="build/libevent/*.lo -lm"
17274238106Sdes			LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
17275238106Sdes		else
17276238106Sdes            		as_fn_error $? "Cannot find the libevent library in $withval
17277238106SdesYou can restart ./configure --with-libevent=no to use a builtin alternative.
17278238106SdesPlease note that this alternative is not as capable as libevent when using
17279238106Sdeslarge outgoing port ranges.  " "$LINENO" 5
17280238106Sdes		fi
17281238106Sdes        else
17282238106Sdes            { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
17283238106Sdes$as_echo "found in $thedir" >&6; }
17284269257Sdes	    	    if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
17285269257Sdes		    LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
17286238106Sdes
17287238106Sdes	if test "x$enable_rpath" = xyes; then
17288269257Sdes		if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
17289269257Sdes			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
17290269257Sdes		fi
17291269257Sdes	fi
17292269257Sdes
17293269257Sdes	    else
17294269257Sdes		    		    if test "$thedir" != "/usr" -a "$thedir" != ""; then
17295269257Sdes			LDFLAGS="$LDFLAGS -L$thedir/lib"
17296269257Sdes
17297269257Sdes	if test "x$enable_rpath" = xyes; then
17298238106Sdes		if echo "$thedir/lib" | grep "^/" >/dev/null; then
17299238106Sdes			RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
17300238106Sdes		fi
17301238106Sdes	fi
17302238106Sdes
17303269257Sdes		    fi
17304238106Sdes	    fi
17305238106Sdes        fi
17306238106Sdes	# check for library used by libevent after 1.3c
17307238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17308238106Sdes$as_echo_n "checking for library containing clock_gettime... " >&6; }
17309238106Sdesif ${ac_cv_search_clock_gettime+:} false; then :
17310238106Sdes  $as_echo_n "(cached) " >&6
17311238106Sdeselse
17312238106Sdes  ac_func_search_save_LIBS=$LIBS
17313238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17314238106Sdes/* end confdefs.h.  */
17315238106Sdes
17316238106Sdes/* Override any GCC internal prototype to avoid an error.
17317238106Sdes   Use char because int might match the return type of a GCC
17318238106Sdes   builtin and then its argument prototype would still apply.  */
17319238106Sdes#ifdef __cplusplus
17320238106Sdesextern "C"
17321238106Sdes#endif
17322238106Sdeschar clock_gettime ();
17323238106Sdesint
17324238106Sdesmain ()
17325238106Sdes{
17326238106Sdesreturn clock_gettime ();
17327238106Sdes  ;
17328238106Sdes  return 0;
17329238106Sdes}
17330238106Sdes_ACEOF
17331238106Sdesfor ac_lib in '' rt; do
17332238106Sdes  if test -z "$ac_lib"; then
17333238106Sdes    ac_res="none required"
17334238106Sdes  else
17335238106Sdes    ac_res=-l$ac_lib
17336238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17337238106Sdes  fi
17338238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
17339238106Sdes  ac_cv_search_clock_gettime=$ac_res
17340238106Sdesfi
17341238106Sdesrm -f core conftest.err conftest.$ac_objext \
17342238106Sdes    conftest$ac_exeext
17343238106Sdes  if ${ac_cv_search_clock_gettime+:} false; then :
17344238106Sdes  break
17345238106Sdesfi
17346238106Sdesdone
17347238106Sdesif ${ac_cv_search_clock_gettime+:} false; then :
17348238106Sdes
17349238106Sdeselse
17350238106Sdes  ac_cv_search_clock_gettime=no
17351238106Sdesfi
17352238106Sdesrm conftest.$ac_ext
17353238106SdesLIBS=$ac_func_search_save_LIBS
17354238106Sdesfi
17355238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17356238106Sdes$as_echo "$ac_cv_search_clock_gettime" >&6; }
17357238106Sdesac_res=$ac_cv_search_clock_gettime
17358238106Sdesif test "$ac_res" != no; then :
17359238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17360238106Sdes
17361238106Sdesfi
17362238106Sdes
17363238106Sdes
17364238106Sdes	# is the event.h header libev or libevent?
17365238106Sdes	for ac_header in event.h
17366238106Sdesdo :
17367238106Sdes  ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
17368238106Sdes"
17369238106Sdesif test "x$ac_cv_header_event_h" = xyes; then :
17370238106Sdes  cat >>confdefs.h <<_ACEOF
17371238106Sdes#define HAVE_EVENT_H 1
17372238106Sdes_ACEOF
17373238106Sdes
17374238106Sdesfi
17375238106Sdes
17376238106Sdesdone
17377238106Sdes
17378238106Sdes	ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
17379238106Sdes#include <event.h>
17380238106Sdes
17381238106Sdes"
17382238106Sdesif test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
17383238106Sdes
17384238106Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17385238106Sdes$as_echo_n "checking for library containing event_set... " >&6; }
17386238106Sdesif ${ac_cv_search_event_set+:} false; then :
17387238106Sdes  $as_echo_n "(cached) " >&6
17388238106Sdeselse
17389238106Sdes  ac_func_search_save_LIBS=$LIBS
17390238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17391238106Sdes/* end confdefs.h.  */
17392238106Sdes
17393238106Sdes/* Override any GCC internal prototype to avoid an error.
17394238106Sdes   Use char because int might match the return type of a GCC
17395238106Sdes   builtin and then its argument prototype would still apply.  */
17396238106Sdes#ifdef __cplusplus
17397238106Sdesextern "C"
17398238106Sdes#endif
17399238106Sdeschar event_set ();
17400238106Sdesint
17401238106Sdesmain ()
17402238106Sdes{
17403238106Sdesreturn event_set ();
17404238106Sdes  ;
17405238106Sdes  return 0;
17406238106Sdes}
17407238106Sdes_ACEOF
17408238106Sdesfor ac_lib in '' ev; do
17409238106Sdes  if test -z "$ac_lib"; then
17410238106Sdes    ac_res="none required"
17411238106Sdes  else
17412238106Sdes    ac_res=-l$ac_lib
17413238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17414238106Sdes  fi
17415238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
17416238106Sdes  ac_cv_search_event_set=$ac_res
17417238106Sdesfi
17418238106Sdesrm -f core conftest.err conftest.$ac_objext \
17419238106Sdes    conftest$ac_exeext
17420238106Sdes  if ${ac_cv_search_event_set+:} false; then :
17421238106Sdes  break
17422238106Sdesfi
17423238106Sdesdone
17424238106Sdesif ${ac_cv_search_event_set+:} false; then :
17425238106Sdes
17426238106Sdeselse
17427238106Sdes  ac_cv_search_event_set=no
17428238106Sdesfi
17429238106Sdesrm conftest.$ac_ext
17430238106SdesLIBS=$ac_func_search_save_LIBS
17431238106Sdesfi
17432238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17433238106Sdes$as_echo "$ac_cv_search_event_set" >&6; }
17434238106Sdesac_res=$ac_cv_search_event_set
17435238106Sdesif test "$ac_res" != no; then :
17436238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17437238106Sdes
17438238106Sdesfi
17439238106Sdes
17440238106Sdes
17441238106Sdeselse
17442238106Sdes
17443238106Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
17444238106Sdes$as_echo_n "checking for library containing event_set... " >&6; }
17445238106Sdesif ${ac_cv_search_event_set+:} false; then :
17446238106Sdes  $as_echo_n "(cached) " >&6
17447238106Sdeselse
17448238106Sdes  ac_func_search_save_LIBS=$LIBS
17449238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17450238106Sdes/* end confdefs.h.  */
17451238106Sdes
17452238106Sdes/* Override any GCC internal prototype to avoid an error.
17453238106Sdes   Use char because int might match the return type of a GCC
17454238106Sdes   builtin and then its argument prototype would still apply.  */
17455238106Sdes#ifdef __cplusplus
17456238106Sdesextern "C"
17457238106Sdes#endif
17458238106Sdeschar event_set ();
17459238106Sdesint
17460238106Sdesmain ()
17461238106Sdes{
17462238106Sdesreturn event_set ();
17463238106Sdes  ;
17464238106Sdes  return 0;
17465238106Sdes}
17466238106Sdes_ACEOF
17467238106Sdesfor ac_lib in '' event; do
17468238106Sdes  if test -z "$ac_lib"; then
17469238106Sdes    ac_res="none required"
17470238106Sdes  else
17471238106Sdes    ac_res=-l$ac_lib
17472238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17473238106Sdes  fi
17474238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
17475238106Sdes  ac_cv_search_event_set=$ac_res
17476238106Sdesfi
17477238106Sdesrm -f core conftest.err conftest.$ac_objext \
17478238106Sdes    conftest$ac_exeext
17479238106Sdes  if ${ac_cv_search_event_set+:} false; then :
17480238106Sdes  break
17481238106Sdesfi
17482238106Sdesdone
17483238106Sdesif ${ac_cv_search_event_set+:} false; then :
17484238106Sdes
17485238106Sdeselse
17486238106Sdes  ac_cv_search_event_set=no
17487238106Sdesfi
17488238106Sdesrm conftest.$ac_ext
17489238106SdesLIBS=$ac_func_search_save_LIBS
17490238106Sdesfi
17491238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
17492238106Sdes$as_echo "$ac_cv_search_event_set" >&6; }
17493238106Sdesac_res=$ac_cv_search_event_set
17494238106Sdesif test "$ac_res" != no; then :
17495238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17496238106Sdes
17497238106Sdesfi
17498238106Sdes
17499238106Sdes
17500238106Sdesfi
17501238106Sdes
17502238106Sdes	for ac_func in event_base_free
17503238106Sdesdo :
17504238106Sdes  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
17505238106Sdesif test "x$ac_cv_func_event_base_free" = xyes; then :
17506238106Sdes  cat >>confdefs.h <<_ACEOF
17507238106Sdes#define HAVE_EVENT_BASE_FREE 1
17508238106Sdes_ACEOF
17509238106Sdes
17510238106Sdesfi
17511238106Sdesdone
17512238106Sdes # only in libevent 1.2 and later
17513238106Sdes	for ac_func in event_base_once
17514238106Sdesdo :
17515238106Sdes  ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
17516238106Sdesif test "x$ac_cv_func_event_base_once" = xyes; then :
17517238106Sdes  cat >>confdefs.h <<_ACEOF
17518238106Sdes#define HAVE_EVENT_BASE_ONCE 1
17519238106Sdes_ACEOF
17520238106Sdes
17521238106Sdesfi
17522238106Sdesdone
17523238106Sdes # only in libevent 1.4.1 and later
17524238106Sdes	for ac_func in event_base_new
17525238106Sdesdo :
17526238106Sdes  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
17527238106Sdesif test "x$ac_cv_func_event_base_new" = xyes; then :
17528238106Sdes  cat >>confdefs.h <<_ACEOF
17529238106Sdes#define HAVE_EVENT_BASE_NEW 1
17530238106Sdes_ACEOF
17531238106Sdes
17532238106Sdesfi
17533238106Sdesdone
17534238106Sdes # only in libevent 1.4.1 and later
17535238106Sdes	for ac_func in event_base_get_method
17536238106Sdesdo :
17537238106Sdes  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
17538238106Sdesif test "x$ac_cv_func_event_base_get_method" = xyes; then :
17539238106Sdes  cat >>confdefs.h <<_ACEOF
17540238106Sdes#define HAVE_EVENT_BASE_GET_METHOD 1
17541238106Sdes_ACEOF
17542238106Sdes
17543238106Sdesfi
17544238106Sdesdone
17545238106Sdes # only in libevent 1.4.3 and later
17546238106Sdes	for ac_func in ev_loop
17547238106Sdesdo :
17548238106Sdes  ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
17549238106Sdesif test "x$ac_cv_func_ev_loop" = xyes; then :
17550238106Sdes  cat >>confdefs.h <<_ACEOF
17551238106Sdes#define HAVE_EV_LOOP 1
17552238106Sdes_ACEOF
17553238106Sdes
17554238106Sdesfi
17555238106Sdesdone
17556238106Sdes # only in libev. (tested on 3.51)
17557238106Sdes	for ac_func in ev_default_loop
17558238106Sdesdo :
17559238106Sdes  ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
17560238106Sdesif test "x$ac_cv_func_ev_default_loop" = xyes; then :
17561238106Sdes  cat >>confdefs.h <<_ACEOF
17562238106Sdes#define HAVE_EV_DEFAULT_LOOP 1
17563238106Sdes_ACEOF
17564238106Sdes
17565238106Sdesfi
17566238106Sdesdone
17567238106Sdes # only in libev. (tested on 4.00)
17568238106Sdes	if test -n "$BAK_LDFLAGS_SET"; then
17569238106Sdes		LDFLAGS="$BAK_LDFLAGS"
17570238106Sdes	fi
17571269257Sdes        if test "$use_unbound_event" = "yes"; then
17572269257Sdes		UNBOUND_EVENT_INSTALL=unbound-event-install
17573269257Sdes
17574269257Sdes		UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
17575269257Sdes
17576269257Sdes	fi
17577238106Sdeselse
17578238106Sdes
17579238106Sdes$as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
17580238106Sdes
17581238106Sdesfi
17582238106Sdes
17583238106Sdes# check for libexpat
17584238106Sdes
17585238106Sdes# Check whether --with-libexpat was given.
17586238106Sdesif test "${with_libexpat+set}" = set; then :
17587238106Sdes  withval=$with_libexpat;
17588238106Sdeselse
17589238106Sdes   withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
17590238106Sdesfi
17591238106Sdes
17592238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
17593238106Sdes$as_echo_n "checking for libexpat... " >&6; }
17594238106Sdesfound_libexpat="no"
17595238106Sdesfor dir in $withval ; do
17596238106Sdes            if test -f "$dir/include/expat.h"; then
17597238106Sdes		found_libexpat="yes"
17598238106Sdes				if test "$dir" != "/usr"; then
17599238106Sdes                    CPPFLAGS="$CPPFLAGS -I$dir/include"
17600238106Sdes		    LDFLAGS="$LDFLAGS -L$dir/lib"
17601238106Sdes		fi
17602238106Sdes            	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
17603238106Sdes$as_echo "found in $dir" >&6; }
17604238106Sdes                break;
17605238106Sdes            fi
17606238106Sdesdone
17607238106Sdesif test x_$found_libexpat != x_yes; then
17608238106Sdes	as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
17609238106Sdesfi
17610238106Sdesfor ac_header in expat.h
17611238106Sdesdo :
17612238106Sdes  ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
17613238106Sdes"
17614238106Sdesif test "x$ac_cv_header_expat_h" = xyes; then :
17615238106Sdes  cat >>confdefs.h <<_ACEOF
17616238106Sdes#define HAVE_EXPAT_H 1
17617238106Sdes_ACEOF
17618238106Sdes
17619238106Sdesfi
17620238106Sdes
17621238106Sdesdone
17622238106Sdes
17623294190Sdesac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
17624294190Sdes#include <expat.h>
17625238106Sdes
17626294190Sdes"
17627294190Sdesif test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
17628294190Sdes  ac_have_decl=1
17629294190Sdeselse
17630294190Sdes  ac_have_decl=0
17631294190Sdesfi
17632294190Sdes
17633294190Sdescat >>confdefs.h <<_ACEOF
17634294190Sdes#define HAVE_DECL_XML_STOPPARSER $ac_have_decl
17635294190Sdes_ACEOF
17636294190Sdes
17637294190Sdes
17638238106Sdes# set static linking if requested
17639238106Sdes
17640238106Sdesstaticexe=""
17641238106Sdes# Check whether --enable-static-exe was given.
17642238106Sdesif test "${enable_static_exe+set}" = set; then :
17643238106Sdes  enableval=$enable_static_exe;
17644238106Sdesfi
17645238106Sdes
17646238106Sdesif test x_$enable_static_exe = x_yes; then
17647238106Sdes	staticexe="-static"
17648238106Sdes	if test "$on_mingw" = yes; then
17649238106Sdes		staticexe="-all-static"
17650238106Sdes		# for static crosscompile, include gdi32 and zlib here.
17651238106Sdes		if test "`uname`" = "Linux"; then
17652238106Sdes			LIBS="$LIBS -lgdi32 -lz"
17653238106Sdes		fi
17654238106Sdes	fi
17655238106Sdesfi
17656238106Sdes
17657238106Sdes# set lock checking if requested
17658238106Sdes# Check whether --enable-lock_checks was given.
17659238106Sdesif test "${enable_lock_checks+set}" = set; then :
17660238106Sdes  enableval=$enable_lock_checks;
17661238106Sdesfi
17662238106Sdes
17663238106Sdesif test x_$enable_lock_checks = x_yes; then
17664238106Sdes
17665238106Sdes$as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
17666238106Sdes
17667238106Sdes	CHECKLOCK_OBJ="checklocks.lo"
17668238106Sdes
17669238106Sdesfi
17670238106Sdes
17671238106Sdes
17672238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
17673238106Sdes$as_echo_n "checking for getaddrinfo... " >&6; }
17674238106Sdesac_cv_func_getaddrinfo=no
17675238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17676238106Sdes/* end confdefs.h.  */
17677238106Sdes
17678238106Sdes#ifdef __cplusplus
17679238106Sdesextern "C"
17680238106Sdes{
17681238106Sdes#endif
17682238106Sdeschar* getaddrinfo();
17683238106Sdeschar* (*f) () = getaddrinfo;
17684238106Sdes#ifdef __cplusplus
17685238106Sdes}
17686238106Sdes#endif
17687238106Sdesint main() {
17688238106Sdes        ;
17689238106Sdes        return 0;
17690238106Sdes}
17691238106Sdes
17692238106Sdes_ACEOF
17693238106Sdesif ac_fn_c_try_link "$LINENO"; then :
17694238106Sdes  ac_cv_func_getaddrinfo="yes"
17695238106Sdesif test "$ac_cv_header_windows_h" = "yes"; then
17696238106Sdes
17697238106Sdes$as_echo "#define USE_WINSOCK 1" >>confdefs.h
17698238106Sdes
17699238106Sdes	USE_WINSOCK="1"
17700238106Sdes	LIBS="$LIBS -lws2_32"
17701238106Sdesfi
17702238106Sdes
17703238106Sdeselse
17704238106Sdes  ORIGLIBS="$LIBS"
17705238106SdesLIBS="$LIBS -lws2_32"
17706238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17707238106Sdes/* end confdefs.h.  */
17708238106Sdes
17709238106Sdes#ifdef HAVE_WS2TCPIP_H
17710238106Sdes#include <ws2tcpip.h>
17711238106Sdes#endif
17712238106Sdes
17713238106Sdesint
17714238106Sdesmain ()
17715238106Sdes{
17716238106Sdes
17717238106Sdes        (void)getaddrinfo(NULL, NULL, NULL, NULL);
17718238106Sdes
17719238106Sdes
17720238106Sdes  ;
17721238106Sdes  return 0;
17722238106Sdes}
17723238106Sdes_ACEOF
17724238106Sdesif ac_fn_c_try_link "$LINENO"; then :
17725238106Sdes
17726238106Sdesac_cv_func_getaddrinfo="yes"
17727238106Sdes
17728238106Sdes$as_echo "#define USE_WINSOCK 1" >>confdefs.h
17729238106Sdes
17730238106SdesUSE_WINSOCK="1"
17731238106Sdes
17732238106Sdeselse
17733238106Sdes
17734238106Sdesac_cv_func_getaddrinfo="no"
17735238106SdesLIBS="$ORIGLIBS"
17736238106Sdes
17737238106Sdesfi
17738238106Sdesrm -f core conftest.err conftest.$ac_objext \
17739238106Sdes    conftest$ac_exeext conftest.$ac_ext
17740238106Sdes
17741238106Sdesfi
17742238106Sdesrm -f core conftest.err conftest.$ac_objext \
17743238106Sdes    conftest$ac_exeext conftest.$ac_ext
17744238106Sdes
17745238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
17746238106Sdes$as_echo "$ac_cv_func_getaddrinfo" >&6; }
17747238106Sdesif test $ac_cv_func_getaddrinfo = yes; then
17748238106Sdes
17749238106Sdes$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
17750238106Sdes
17751238106Sdesfi
17752238106Sdes
17753238106Sdesif test "$USE_WINSOCK" = 1; then
17754238106Sdes
17755238106Sdes$as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
17756238106Sdes
17757238106Sdes	for ac_header in iphlpapi.h
17758238106Sdesdo :
17759238106Sdes  ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
17760238106Sdes#include <windows.h>
17761238106Sdes
17762238106Sdes"
17763238106Sdesif test "x$ac_cv_header_iphlpapi_h" = xyes; then :
17764238106Sdes  cat >>confdefs.h <<_ACEOF
17765238106Sdes#define HAVE_IPHLPAPI_H 1
17766238106Sdes_ACEOF
17767238106Sdes
17768238106Sdesfi
17769238106Sdes
17770238106Sdesdone
17771238106Sdes
17772238106Sdes	if test -n "$ac_tool_prefix"; then
17773238106Sdes  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
17774238106Sdesset dummy ${ac_tool_prefix}windres; ac_word=$2
17775238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17776238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
17777238106Sdesif ${ac_cv_prog_WINDRES+:} false; then :
17778238106Sdes  $as_echo_n "(cached) " >&6
17779238106Sdeselse
17780238106Sdes  if test -n "$WINDRES"; then
17781238106Sdes  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
17782238106Sdeselse
17783238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17784238106Sdesfor as_dir in $PATH
17785238106Sdesdo
17786238106Sdes  IFS=$as_save_IFS
17787238106Sdes  test -z "$as_dir" && as_dir=.
17788238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
17789249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17790238106Sdes    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
17791238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17792238106Sdes    break 2
17793238106Sdes  fi
17794238106Sdesdone
17795238106Sdes  done
17796238106SdesIFS=$as_save_IFS
17797238106Sdes
17798238106Sdesfi
17799238106Sdesfi
17800238106SdesWINDRES=$ac_cv_prog_WINDRES
17801238106Sdesif test -n "$WINDRES"; then
17802238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
17803238106Sdes$as_echo "$WINDRES" >&6; }
17804238106Sdeselse
17805238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17806238106Sdes$as_echo "no" >&6; }
17807238106Sdesfi
17808238106Sdes
17809238106Sdes
17810238106Sdesfi
17811238106Sdesif test -z "$ac_cv_prog_WINDRES"; then
17812238106Sdes  ac_ct_WINDRES=$WINDRES
17813238106Sdes  # Extract the first word of "windres", so it can be a program name with args.
17814238106Sdesset dummy windres; ac_word=$2
17815238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17816238106Sdes$as_echo_n "checking for $ac_word... " >&6; }
17817238106Sdesif ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
17818238106Sdes  $as_echo_n "(cached) " >&6
17819238106Sdeselse
17820238106Sdes  if test -n "$ac_ct_WINDRES"; then
17821238106Sdes  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
17822238106Sdeselse
17823238106Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17824238106Sdesfor as_dir in $PATH
17825238106Sdesdo
17826238106Sdes  IFS=$as_save_IFS
17827238106Sdes  test -z "$as_dir" && as_dir=.
17828238106Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
17829249141Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17830238106Sdes    ac_cv_prog_ac_ct_WINDRES="windres"
17831238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17832238106Sdes    break 2
17833238106Sdes  fi
17834238106Sdesdone
17835238106Sdes  done
17836238106SdesIFS=$as_save_IFS
17837238106Sdes
17838238106Sdesfi
17839238106Sdesfi
17840238106Sdesac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
17841238106Sdesif test -n "$ac_ct_WINDRES"; then
17842238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
17843238106Sdes$as_echo "$ac_ct_WINDRES" >&6; }
17844238106Sdeselse
17845238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17846238106Sdes$as_echo "no" >&6; }
17847238106Sdesfi
17848238106Sdes
17849238106Sdes  if test "x$ac_ct_WINDRES" = x; then
17850238106Sdes    WINDRES=""
17851238106Sdes  else
17852238106Sdes    case $cross_compiling:$ac_tool_warned in
17853238106Sdesyes:)
17854238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17855238106Sdes$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17856238106Sdesac_tool_warned=yes ;;
17857238106Sdesesac
17858238106Sdes    WINDRES=$ac_ct_WINDRES
17859238106Sdes  fi
17860238106Sdeselse
17861238106Sdes  WINDRES="$ac_cv_prog_WINDRES"
17862238106Sdesfi
17863238106Sdes
17864238106Sdes	LIBS="$LIBS -liphlpapi"
17865238106Sdes	WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
17866238106Sdes
17867238106Sdes	WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
17868238106Sdes
17869238106Sdes	WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
17870238106Sdes
17871238106Sdes	WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
17872238106Sdes
17873238106Sdes	WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
17874238106Sdes
17875238106Sdes	WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
17876238106Sdes
17877238106Sdes	WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
17878238106Sdes
17879238106Sdes	WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
17880238106Sdes
17881238106Sdesfi
17882238106Sdesif test $ac_cv_func_getaddrinfo = no; then
17883238106Sdes	case " $LIBOBJS " in
17884238106Sdes  *" fake-rfc2553.$ac_objext "* ) ;;
17885238106Sdes  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
17886238106Sdes ;;
17887238106Sdesesac
17888238106Sdes
17889238106Sdesfi
17890238106Sdes# check after getaddrinfo for its libraries
17891238106Sdes
17892238106Sdes# check ioctlsocket
17893238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
17894238106Sdes$as_echo_n "checking for ioctlsocket... " >&6; }
17895238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
17896238106Sdes/* end confdefs.h.  */
17897238106Sdes
17898238106Sdes#ifdef HAVE_WINSOCK2_H
17899238106Sdes#include <winsock2.h>
17900238106Sdes#endif
17901238106Sdes
17902238106Sdesint
17903238106Sdesmain ()
17904238106Sdes{
17905238106Sdes
17906238106Sdes	(void)ioctlsocket(0, 0, NULL);
17907238106Sdes
17908238106Sdes  ;
17909238106Sdes  return 0;
17910238106Sdes}
17911238106Sdes_ACEOF
17912238106Sdesif ac_fn_c_try_link "$LINENO"; then :
17913238106Sdes
17914238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17915238106Sdes$as_echo "yes" >&6; }
17916238106Sdes
17917238106Sdes$as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
17918238106Sdes
17919238106Sdes
17920238106Sdeselse
17921238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17922238106Sdes$as_echo "no" >&6; }
17923238106Sdesfi
17924238106Sdesrm -f core conftest.err conftest.$ac_objext \
17925238106Sdes    conftest$ac_exeext conftest.$ac_ext
17926238106Sdes
17927238106Sdes
17928238106Sdes# see if daemon(3) exists, and if it is deprecated.
17929238106Sdesfor ac_func in daemon
17930238106Sdesdo :
17931238106Sdes  ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
17932238106Sdesif test "x$ac_cv_func_daemon" = xyes; then :
17933238106Sdes  cat >>confdefs.h <<_ACEOF
17934238106Sdes#define HAVE_DAEMON 1
17935238106Sdes_ACEOF
17936238106Sdes
17937238106Sdesfi
17938238106Sdesdone
17939238106Sdes
17940238106Sdesif test $ac_cv_func_daemon = yes; then
17941238106Sdes
17942238106Sdes
17943238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
17944238106Sdes$as_echo_n "checking if daemon is deprecated... " >&6; }
17945238106Sdescache=`echo daemon | sed 'y%.=/+-%___p_%'`
17946238106Sdesif eval \${cv_cc_deprecated_$cache+:} false; then :
17947238106Sdes  $as_echo_n "(cached) " >&6
17948238106Sdeselse
17949238106Sdes
17950238106Sdesecho '
17951238106Sdes#include <stdlib.h>
17952238106Sdes' >conftest.c
17953238106Sdesecho 'void f(){ (void)daemon(0, 0); }' >>conftest.c
17954238106Sdesif test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
17955238106Sdeseval "cv_cc_deprecated_$cache=no"
17956238106Sdeselse
17957238106Sdeseval "cv_cc_deprecated_$cache=yes"
17958238106Sdesfi
17959238106Sdesrm -f conftest conftest.o conftest.c
17960238106Sdes
17961238106Sdesfi
17962238106Sdes
17963238106Sdesif eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
17964238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17965238106Sdes$as_echo "yes" >&6; }
17966238106Sdes
17967238106Sdescat >>confdefs.h <<_ACEOF
17968238106Sdes#define DEPRECATED_DAEMON 1
17969238106Sdes_ACEOF
17970238106Sdes
17971238106Sdes:
17972238106Sdes
17973238106Sdeselse
17974238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17975238106Sdes$as_echo "no" >&6; }
17976238106Sdes:
17977238106Sdes
17978238106Sdesfi
17979238106Sdes
17980238106Sdesfi
17981238106Sdes
17982285206Sdesac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
17983285206Sdes$ac_includes_default
17984285206Sdes#ifdef HAVE_SYS_UN_H
17985285206Sdes#include <sys/un.h>
17986285206Sdes#endif
17987285206Sdes
17988285206Sdes"
17989285206Sdesif test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
17990285206Sdes
17991285206Sdescat >>confdefs.h <<_ACEOF
17992285206Sdes#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
17993285206Sdes_ACEOF
17994285206Sdes
17995285206Sdes
17996285206Sdesfi
17997285206Sdes
17998238106Sdesac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
17999238106Sdes$ac_includes_default
18000238106Sdes#if HAVE_SYS_PARAM_H
18001238106Sdes#include <sys/param.h>
18002238106Sdes#endif
18003238106Sdes
18004238106Sdes#ifdef HAVE_SYS_SOCKET_H
18005238106Sdes#include <sys/socket.h>
18006238106Sdes#endif
18007238106Sdes
18008238106Sdes#ifdef HAVE_SYS_UIO_H
18009238106Sdes#include <sys/uio.h>
18010238106Sdes#endif
18011238106Sdes
18012238106Sdes#ifdef HAVE_NETINET_IN_H
18013238106Sdes#include <netinet/in.h>
18014238106Sdes#endif
18015238106Sdes
18016238106Sdes#ifdef HAVE_ARPA_INET_H
18017238106Sdes#include <arpa/inet.h>
18018238106Sdes#endif
18019238106Sdes
18020238106Sdes#ifdef HAVE_WINSOCK2_H
18021238106Sdes#include <winsock2.h>
18022238106Sdes#endif
18023238106Sdes
18024238106Sdes#ifdef HAVE_WS2TCPIP_H
18025238106Sdes#include <ws2tcpip.h>
18026238106Sdes#endif
18027238106Sdes
18028238106Sdes"
18029238106Sdesif test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
18030238106Sdes
18031238106Sdescat >>confdefs.h <<_ACEOF
18032238106Sdes#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
18033238106Sdes_ACEOF
18034238106Sdes
18035238106Sdes
18036238106Sdesfi
18037238106Sdes
18038238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
18039238106Sdes$as_echo_n "checking for library containing setusercontext... " >&6; }
18040238106Sdesif ${ac_cv_search_setusercontext+:} false; then :
18041238106Sdes  $as_echo_n "(cached) " >&6
18042238106Sdeselse
18043238106Sdes  ac_func_search_save_LIBS=$LIBS
18044238106Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
18045238106Sdes/* end confdefs.h.  */
18046238106Sdes
18047238106Sdes/* Override any GCC internal prototype to avoid an error.
18048238106Sdes   Use char because int might match the return type of a GCC
18049238106Sdes   builtin and then its argument prototype would still apply.  */
18050238106Sdes#ifdef __cplusplus
18051238106Sdesextern "C"
18052238106Sdes#endif
18053238106Sdeschar setusercontext ();
18054238106Sdesint
18055238106Sdesmain ()
18056238106Sdes{
18057238106Sdesreturn setusercontext ();
18058238106Sdes  ;
18059238106Sdes  return 0;
18060238106Sdes}
18061238106Sdes_ACEOF
18062238106Sdesfor ac_lib in '' util; do
18063238106Sdes  if test -z "$ac_lib"; then
18064238106Sdes    ac_res="none required"
18065238106Sdes  else
18066238106Sdes    ac_res=-l$ac_lib
18067238106Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18068238106Sdes  fi
18069238106Sdes  if ac_fn_c_try_link "$LINENO"; then :
18070238106Sdes  ac_cv_search_setusercontext=$ac_res
18071238106Sdesfi
18072238106Sdesrm -f core conftest.err conftest.$ac_objext \
18073238106Sdes    conftest$ac_exeext
18074238106Sdes  if ${ac_cv_search_setusercontext+:} false; then :
18075238106Sdes  break
18076238106Sdesfi
18077238106Sdesdone
18078238106Sdesif ${ac_cv_search_setusercontext+:} false; then :
18079238106Sdes
18080238106Sdeselse
18081238106Sdes  ac_cv_search_setusercontext=no
18082238106Sdesfi
18083238106Sdesrm conftest.$ac_ext
18084238106SdesLIBS=$ac_func_search_save_LIBS
18085238106Sdesfi
18086238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
18087238106Sdes$as_echo "$ac_cv_search_setusercontext" >&6; }
18088238106Sdesac_res=$ac_cv_search_setusercontext
18089238106Sdesif test "$ac_res" != no; then :
18090238106Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18091238106Sdes
18092238106Sdesfi
18093238106Sdes
18094294190Sdesfor ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync
18095238106Sdesdo :
18096238106Sdes  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18097238106Sdesac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18098238106Sdesif eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18099238106Sdes  cat >>confdefs.h <<_ACEOF
18100238106Sdes#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18101238106Sdes_ACEOF
18102238106Sdes
18103238106Sdesfi
18104238106Sdesdone
18105238106Sdes
18106238106Sdesfor ac_func in setresuid
18107238106Sdesdo :
18108238106Sdes  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
18109238106Sdesif test "x$ac_cv_func_setresuid" = xyes; then :
18110238106Sdes  cat >>confdefs.h <<_ACEOF
18111238106Sdes#define HAVE_SETRESUID 1
18112238106Sdes_ACEOF
18113238106Sdes
18114238106Sdeselse
18115238106Sdes  for ac_func in setreuid
18116238106Sdesdo :
18117238106Sdes  ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
18118238106Sdesif test "x$ac_cv_func_setreuid" = xyes; then :
18119238106Sdes  cat >>confdefs.h <<_ACEOF
18120238106Sdes#define HAVE_SETREUID 1
18121238106Sdes_ACEOF
18122238106Sdes
18123238106Sdesfi
18124238106Sdesdone
18125238106Sdes
18126238106Sdesfi
18127238106Sdesdone
18128238106Sdes
18129238106Sdesfor ac_func in setresgid
18130238106Sdesdo :
18131238106Sdes  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
18132238106Sdesif test "x$ac_cv_func_setresgid" = xyes; then :
18133238106Sdes  cat >>confdefs.h <<_ACEOF
18134238106Sdes#define HAVE_SETRESGID 1
18135238106Sdes_ACEOF
18136238106Sdes
18137238106Sdeselse
18138238106Sdes  for ac_func in setregid
18139238106Sdesdo :
18140238106Sdes  ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
18141238106Sdesif test "x$ac_cv_func_setregid" = xyes; then :
18142238106Sdes  cat >>confdefs.h <<_ACEOF
18143238106Sdes#define HAVE_SETREGID 1
18144238106Sdes_ACEOF
18145238106Sdes
18146238106Sdesfi
18147238106Sdesdone
18148238106Sdes
18149238106Sdesfi
18150238106Sdesdone
18151238106Sdes
18152238106Sdes
18153238106Sdes# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
18154238106Sdesif echo $build_os | grep darwin8 > /dev/null; then
18155238106Sdes
18156238106Sdes$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
18157238106Sdes
18158238106Sdesfi
18159238106Sdesac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
18160238106Sdesif test "x$ac_cv_func_inet_aton" = xyes; then :
18161238106Sdes  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
18162238106Sdes
18163238106Sdeselse
18164238106Sdes  case " $LIBOBJS " in
18165238106Sdes  *" inet_aton.$ac_objext "* ) ;;
18166238106Sdes  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
18167238106Sdes ;;
18168238106Sdesesac
18169238106Sdes
18170238106Sdesfi
18171238106Sdes
18172238106Sdes
18173238106Sdesac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
18174238106Sdesif test "x$ac_cv_func_inet_pton" = xyes; then :
18175238106Sdes  $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
18176238106Sdes
18177238106Sdeselse
18178238106Sdes  case " $LIBOBJS " in
18179238106Sdes  *" inet_pton.$ac_objext "* ) ;;
18180238106Sdes  *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
18181238106Sdes ;;
18182238106Sdesesac
18183238106Sdes
18184238106Sdesfi
18185238106Sdes
18186238106Sdes
18187238106Sdesac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
18188238106Sdesif test "x$ac_cv_func_inet_ntop" = xyes; then :
18189238106Sdes  $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
18190238106Sdes
18191238106Sdeselse
18192238106Sdes  case " $LIBOBJS " in
18193238106Sdes  *" inet_ntop.$ac_objext "* ) ;;
18194238106Sdes  *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
18195238106Sdes ;;
18196238106Sdesesac
18197238106Sdes
18198238106Sdesfi
18199238106Sdes
18200238106Sdes
18201238106Sdesac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18202238106Sdesif test "x$ac_cv_func_snprintf" = xyes; then :
18203238106Sdes  $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
18204238106Sdes
18205238106Sdeselse
18206238106Sdes  case " $LIBOBJS " in
18207238106Sdes  *" snprintf.$ac_objext "* ) ;;
18208238106Sdes  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18209238106Sdes ;;
18210238106Sdesesac
18211238106Sdes
18212238106Sdesfi
18213238106Sdes
18214238106Sdes
18215294190Sdes# test if snprintf return the proper length
18216294190Sdesif test "x$ac_cv_func_snprintf" = xyes; then
18217294190Sdes    if test c${cross_compiling} = cno; then
18218294190Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
18219294190Sdes$as_echo_n "checking for correct snprintf return value... " >&6; }
18220294190Sdes	if test "$cross_compiling" = yes; then :
18221294190Sdes  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18222294190Sdes$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18223294190Sdesas_fn_error $? "cannot run test program while cross compiling
18224294190SdesSee \`config.log' for more details" "$LINENO" 5; }
18225294190Sdeselse
18226294190Sdes  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18227294190Sdes/* end confdefs.h.  */
18228294190Sdes$ac_includes_default
18229294190Sdes
18230294190Sdesint main(void) { return !(snprintf(NULL, 0, "test") == 4); }
18231294190Sdes
18232294190Sdes_ACEOF
18233294190Sdesif ac_fn_c_try_run "$LINENO"; then :
18234294190Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18235294190Sdes$as_echo "yes" >&6; }
18236294190Sdeselse
18237294190Sdes
18238294190Sdes		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18239294190Sdes$as_echo "no" >&6; }
18240294190Sdes
18241294190Sdes$as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
18242294190Sdes
18243294190Sdes		case " $LIBOBJS " in
18244294190Sdes  *" snprintf.$ac_objext "* ) ;;
18245294190Sdes  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
18246294190Sdes ;;
18247294190Sdesesac
18248294190Sdes
18249294190Sdes
18250294190Sdesfi
18251294190Sdesrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18252294190Sdes  conftest.$ac_objext conftest.beam conftest.$ac_ext
18253294190Sdesfi
18254294190Sdes
18255294190Sdes    fi
18256294190Sdesfi
18257269257Sdesac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18258269257Sdesif test "x$ac_cv_func_strlcat" = xyes; then :
18259269257Sdes  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
18260269257Sdes
18261269257Sdeselse
18262269257Sdes  case " $LIBOBJS " in
18263269257Sdes  *" strlcat.$ac_objext "* ) ;;
18264269257Sdes  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
18265269257Sdes ;;
18266269257Sdesesac
18267269257Sdes
18268269257Sdesfi
18269269257Sdes
18270269257Sdes
18271238106Sdesac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18272238106Sdesif test "x$ac_cv_func_strlcpy" = xyes; then :
18273238106Sdes  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
18274238106Sdes
18275238106Sdeselse
18276238106Sdes  case " $LIBOBJS " in
18277238106Sdes  *" strlcpy.$ac_objext "* ) ;;
18278238106Sdes  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
18279238106Sdes ;;
18280238106Sdesesac
18281238106Sdes
18282238106Sdesfi
18283238106Sdes
18284238106Sdes
18285238106Sdesac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
18286238106Sdesif test "x$ac_cv_func_memmove" = xyes; then :
18287238106Sdes  $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
18288238106Sdes
18289238106Sdeselse
18290238106Sdes  case " $LIBOBJS " in
18291238106Sdes  *" memmove.$ac_objext "* ) ;;
18292238106Sdes  *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
18293238106Sdes ;;
18294238106Sdesesac
18295238106Sdes
18296238106Sdesfi
18297238106Sdes
18298238106Sdes
18299238106Sdesac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
18300238106Sdesif test "x$ac_cv_func_gmtime_r" = xyes; then :
18301238106Sdes  $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
18302238106Sdes
18303238106Sdeselse
18304238106Sdes  case " $LIBOBJS " in
18305238106Sdes  *" gmtime_r.$ac_objext "* ) ;;
18306238106Sdes  *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
18307238106Sdes ;;
18308238106Sdesesac
18309238106Sdes
18310238106Sdesfi
18311238106Sdes
18312238106Sdes
18313294190Sdesac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
18314294190Sdesif test "x$ac_cv_func_isblank" = xyes; then :
18315294190Sdes  $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
18316294190Sdes
18317294190Sdeselse
18318294190Sdes  case " $LIBOBJS " in
18319294190Sdes  *" isblank.$ac_objext "* ) ;;
18320294190Sdes  *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
18321294190Sdes ;;
18322294190Sdesesac
18323294190Sdes
18324294190Sdesfi
18325294190Sdes
18326294190Sdes
18327285206SdesLIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
18328285206Sdes
18329291767Sdesac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
18330291767Sdesif test "x$ac_cv_func_reallocarray" = xyes; then :
18331291767Sdes  $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
18332291767Sdes
18333291767Sdeselse
18334291767Sdes  case " $LIBOBJS " in
18335291767Sdes  *" reallocarray.$ac_objext "* ) ;;
18336291767Sdes  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
18337291767Sdes ;;
18338291767Sdesesac
18339291767Sdes
18340291767Sdesfi
18341291767Sdes
18342291767Sdes
18343285206Sdesif test "$USE_NSS" = "no"; then
18344285206Sdes	ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
18345285206Sdesif test "x$ac_cv_func_arc4random" = xyes; then :
18346285206Sdes  $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
18347285206Sdes
18348285206Sdeselse
18349285206Sdes  case " $LIBOBJS " in
18350285206Sdes  *" arc4random.$ac_objext "* ) ;;
18351285206Sdes  *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
18352285206Sdes ;;
18353285206Sdesesac
18354285206Sdes
18355285206Sdesfi
18356285206Sdes
18357285206Sdes
18358285206Sdes	ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
18359285206Sdesif test "x$ac_cv_func_arc4random_uniform" = xyes; then :
18360285206Sdes  $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
18361285206Sdes
18362285206Sdeselse
18363285206Sdes  case " $LIBOBJS " in
18364285206Sdes  *" arc4random_uniform.$ac_objext "* ) ;;
18365285206Sdes  *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
18366285206Sdes ;;
18367285206Sdesesac
18368285206Sdes
18369285206Sdesfi
18370285206Sdes
18371285206Sdes
18372285206Sdes	if test "$ac_cv_func_arc4random" = "no"; then
18373285206Sdes		case " $LIBOBJS " in
18374285206Sdes  *" explicit_bzero.$ac_objext "* ) ;;
18375285206Sdes  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
18376285206Sdes ;;
18377285206Sdesesac
18378285206Sdes
18379285206Sdes		case " $LIBOBJS " in
18380285206Sdes  *" arc4_lock.$ac_objext "* ) ;;
18381285206Sdes  *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
18382285206Sdes ;;
18383285206Sdesesac
18384285206Sdes
18385285206Sdes		for ac_func in getentropy
18386285206Sdesdo :
18387285206Sdes  ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
18388285206Sdesif test "x$ac_cv_func_getentropy" = xyes; then :
18389285206Sdes  cat >>confdefs.h <<_ACEOF
18390285206Sdes#define HAVE_GETENTROPY 1
18391285206Sdes_ACEOF
18392285206Sdes
18393285206Sdeselse
18394285206Sdes
18395285206Sdes		    if test "$USE_WINSOCK" = 1; then
18396285206Sdes			case " $LIBOBJS " in
18397285206Sdes  *" getentropy_win.$ac_objext "* ) ;;
18398285206Sdes  *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
18399285206Sdes ;;
18400285206Sdesesac
18401285206Sdes
18402285206Sdes		    else
18403285206Sdes			case `uname` in
18404285206Sdes			Darwin)
18405285206Sdes				case " $LIBOBJS " in
18406285206Sdes  *" getentropy_osx.$ac_objext "* ) ;;
18407285206Sdes  *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
18408285206Sdes ;;
18409285206Sdesesac
18410285206Sdes
18411285206Sdes			;;
18412285206Sdes			SunOS)
18413285206Sdes				case " $LIBOBJS " in
18414285206Sdes  *" getentropy_solaris.$ac_objext "* ) ;;
18415285206Sdes  *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
18416285206Sdes ;;
18417285206Sdesesac
18418285206Sdes
18419285206Sdes				for ac_header in sys/sha2.h
18420285206Sdesdo :
18421285206Sdes  ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
18422285206Sdes"
18423285206Sdesif test "x$ac_cv_header_sys_sha2_h" = xyes; then :
18424285206Sdes  cat >>confdefs.h <<_ACEOF
18425285206Sdes#define HAVE_SYS_SHA2_H 1
18426285206Sdes_ACEOF
18427285206Sdes
18428285206Sdeselse
18429285206Sdes
18430285206Sdes					for ac_func in SHA512_Update
18431285206Sdesdo :
18432285206Sdes  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18433285206Sdesif test "x$ac_cv_func_SHA512_Update" = xyes; then :
18434285206Sdes  cat >>confdefs.h <<_ACEOF
18435285206Sdes#define HAVE_SHA512_UPDATE 1
18436285206Sdes_ACEOF
18437285206Sdes
18438285206Sdeselse
18439285206Sdes
18440285206Sdes						case " $LIBOBJS " in
18441285206Sdes  *" sha512.$ac_objext "* ) ;;
18442285206Sdes  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18443285206Sdes ;;
18444285206Sdesesac
18445285206Sdes
18446285206Sdes
18447285206Sdesfi
18448285206Sdesdone
18449285206Sdes
18450285206Sdes
18451285206Sdesfi
18452285206Sdes
18453285206Sdesdone
18454285206Sdes
18455285206Sdes				if test "$ac_cv_header_sys_sha2_h" = "yes"; then
18456285206Sdes					# this lib needed for sha2 on solaris
18457285206Sdes					LIBS="$LIBS -lmd"
18458285206Sdes				fi
18459285206Sdes				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18460285206Sdes$as_echo_n "checking for library containing clock_gettime... " >&6; }
18461285206Sdesif ${ac_cv_search_clock_gettime+:} false; then :
18462285206Sdes  $as_echo_n "(cached) " >&6
18463285206Sdeselse
18464285206Sdes  ac_func_search_save_LIBS=$LIBS
18465285206Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
18466285206Sdes/* end confdefs.h.  */
18467285206Sdes
18468285206Sdes/* Override any GCC internal prototype to avoid an error.
18469285206Sdes   Use char because int might match the return type of a GCC
18470285206Sdes   builtin and then its argument prototype would still apply.  */
18471285206Sdes#ifdef __cplusplus
18472285206Sdesextern "C"
18473285206Sdes#endif
18474285206Sdeschar clock_gettime ();
18475285206Sdesint
18476285206Sdesmain ()
18477285206Sdes{
18478285206Sdesreturn clock_gettime ();
18479285206Sdes  ;
18480285206Sdes  return 0;
18481285206Sdes}
18482285206Sdes_ACEOF
18483285206Sdesfor ac_lib in '' rt; do
18484285206Sdes  if test -z "$ac_lib"; then
18485285206Sdes    ac_res="none required"
18486285206Sdes  else
18487285206Sdes    ac_res=-l$ac_lib
18488285206Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18489285206Sdes  fi
18490285206Sdes  if ac_fn_c_try_link "$LINENO"; then :
18491285206Sdes  ac_cv_search_clock_gettime=$ac_res
18492285206Sdesfi
18493285206Sdesrm -f core conftest.err conftest.$ac_objext \
18494285206Sdes    conftest$ac_exeext
18495285206Sdes  if ${ac_cv_search_clock_gettime+:} false; then :
18496285206Sdes  break
18497285206Sdesfi
18498285206Sdesdone
18499285206Sdesif ${ac_cv_search_clock_gettime+:} false; then :
18500285206Sdes
18501285206Sdeselse
18502285206Sdes  ac_cv_search_clock_gettime=no
18503285206Sdesfi
18504285206Sdesrm conftest.$ac_ext
18505285206SdesLIBS=$ac_func_search_save_LIBS
18506285206Sdesfi
18507285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18508285206Sdes$as_echo "$ac_cv_search_clock_gettime" >&6; }
18509285206Sdesac_res=$ac_cv_search_clock_gettime
18510285206Sdesif test "$ac_res" != no; then :
18511285206Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18512285206Sdes
18513285206Sdesfi
18514285206Sdes
18515285206Sdes			;;
18516285206Sdes			Linux|*)
18517285206Sdes				case " $LIBOBJS " in
18518285206Sdes  *" getentropy_linux.$ac_objext "* ) ;;
18519285206Sdes  *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
18520285206Sdes ;;
18521285206Sdesesac
18522285206Sdes
18523285206Sdes				for ac_func in SHA512_Update
18524285206Sdesdo :
18525285206Sdes  ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
18526285206Sdesif test "x$ac_cv_func_SHA512_Update" = xyes; then :
18527285206Sdes  cat >>confdefs.h <<_ACEOF
18528285206Sdes#define HAVE_SHA512_UPDATE 1
18529285206Sdes_ACEOF
18530285206Sdes
18531285206Sdeselse
18532285206Sdes
18533285206Sdes
18534285206Sdes$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
18535285206Sdes
18536285206Sdes					case " $LIBOBJS " in
18537285206Sdes  *" sha512.$ac_objext "* ) ;;
18538285206Sdes  *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
18539285206Sdes ;;
18540285206Sdesesac
18541285206Sdes
18542285206Sdes
18543285206Sdesfi
18544285206Sdesdone
18545285206Sdes
18546285206Sdes				for ac_header in sys/sysctl.h
18547285206Sdesdo :
18548285206Sdes  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
18549285206Sdes"
18550285206Sdesif test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
18551285206Sdes  cat >>confdefs.h <<_ACEOF
18552285206Sdes#define HAVE_SYS_SYSCTL_H 1
18553285206Sdes_ACEOF
18554285206Sdes
18555285206Sdesfi
18556285206Sdes
18557285206Sdesdone
18558285206Sdes
18559285206Sdes				for ac_func in getauxval
18560285206Sdesdo :
18561285206Sdes  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
18562285206Sdesif test "x$ac_cv_func_getauxval" = xyes; then :
18563285206Sdes  cat >>confdefs.h <<_ACEOF
18564285206Sdes#define HAVE_GETAUXVAL 1
18565285206Sdes_ACEOF
18566285206Sdes
18567285206Sdesfi
18568285206Sdesdone
18569285206Sdes
18570285206Sdes				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18571285206Sdes$as_echo_n "checking for library containing clock_gettime... " >&6; }
18572285206Sdesif ${ac_cv_search_clock_gettime+:} false; then :
18573285206Sdes  $as_echo_n "(cached) " >&6
18574285206Sdeselse
18575285206Sdes  ac_func_search_save_LIBS=$LIBS
18576285206Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
18577285206Sdes/* end confdefs.h.  */
18578285206Sdes
18579285206Sdes/* Override any GCC internal prototype to avoid an error.
18580285206Sdes   Use char because int might match the return type of a GCC
18581285206Sdes   builtin and then its argument prototype would still apply.  */
18582285206Sdes#ifdef __cplusplus
18583285206Sdesextern "C"
18584285206Sdes#endif
18585285206Sdeschar clock_gettime ();
18586285206Sdesint
18587285206Sdesmain ()
18588285206Sdes{
18589285206Sdesreturn clock_gettime ();
18590285206Sdes  ;
18591285206Sdes  return 0;
18592285206Sdes}
18593285206Sdes_ACEOF
18594285206Sdesfor ac_lib in '' rt; do
18595285206Sdes  if test -z "$ac_lib"; then
18596285206Sdes    ac_res="none required"
18597285206Sdes  else
18598285206Sdes    ac_res=-l$ac_lib
18599285206Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18600285206Sdes  fi
18601285206Sdes  if ac_fn_c_try_link "$LINENO"; then :
18602285206Sdes  ac_cv_search_clock_gettime=$ac_res
18603285206Sdesfi
18604285206Sdesrm -f core conftest.err conftest.$ac_objext \
18605285206Sdes    conftest$ac_exeext
18606285206Sdes  if ${ac_cv_search_clock_gettime+:} false; then :
18607285206Sdes  break
18608285206Sdesfi
18609285206Sdesdone
18610285206Sdesif ${ac_cv_search_clock_gettime+:} false; then :
18611285206Sdes
18612285206Sdeselse
18613285206Sdes  ac_cv_search_clock_gettime=no
18614285206Sdesfi
18615285206Sdesrm conftest.$ac_ext
18616285206SdesLIBS=$ac_func_search_save_LIBS
18617285206Sdesfi
18618285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18619285206Sdes$as_echo "$ac_cv_search_clock_gettime" >&6; }
18620285206Sdesac_res=$ac_cv_search_clock_gettime
18621285206Sdesif test "$ac_res" != no; then :
18622285206Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18623285206Sdes
18624285206Sdesfi
18625285206Sdes
18626285206Sdes			;;
18627285206Sdes			esac
18628285206Sdes		    fi
18629285206Sdes
18630285206Sdesfi
18631285206Sdesdone
18632285206Sdes
18633285206Sdes	fi
18634285206Sdesfi
18635238106SdesLIBOBJ_WITHOUT_CTIME="$LIBOBJS"
18636238106Sdes
18637238106Sdesac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
18638238106Sdesif test "x$ac_cv_func_ctime_r" = xyes; then :
18639238106Sdes  $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
18640238106Sdes
18641238106Sdeselse
18642238106Sdes  case " $LIBOBJS " in
18643238106Sdes  *" ctime_r.$ac_objext "* ) ;;
18644238106Sdes  *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
18645238106Sdes ;;
18646238106Sdesesac
18647238106Sdes
18648238106Sdesfi
18649238106Sdes
18650238106Sdes
18651238106Sdes
18652238106Sdes# Check whether --enable-allsymbols was given.
18653238106Sdesif test "${enable_allsymbols+set}" = set; then :
18654238106Sdes  enableval=$enable_allsymbols;
18655238106Sdesfi
18656238106Sdes
18657238106Sdescase "$enable_allsymbols" in
18658238106Sdes	yes)
18659238106Sdes	COMMON_OBJ_ALL_SYMBOLS=""
18660238106Sdes	UBSYMS=""
18661238106Sdes	EXTRALINK="-L. -L.libs -lunbound"
18662238106Sdes
18663238106Sdes$as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
18664238106Sdes
18665238106Sdes	;;
18666238106Sdes	no|*)
18667238106Sdes	COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
18668238106Sdes	UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
18669238106Sdes	EXTRALINK=""
18670238106Sdes	;;
18671238106Sdesesac
18672238106Sdes
18673238106Sdes
18674238106Sdes
18675238106Sdesif test x_$enable_lock_checks = x_yes; then
18676238106Sdes	UBSYMS="-export-symbols clubsyms.def"
18677238106Sdes	cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
18678238106Sdes	echo lock_protect >> clubsyms.def
18679238106Sdes	echo lock_unprotect >> clubsyms.def
18680238106Sdes	echo lock_get_mem >> clubsyms.def
18681238106Sdes	echo checklock_start >> clubsyms.def
18682238106Sdes	echo checklock_stop >> clubsyms.def
18683238106Sdes	echo checklock_lock >> clubsyms.def
18684238106Sdes	echo checklock_unlock >> clubsyms.def
18685238106Sdes	echo checklock_init >> clubsyms.def
18686238106Sdes	echo checklock_thrcreate >> clubsyms.def
18687238106Sdes	echo checklock_thrjoin >> clubsyms.def
18688238106Sdesfi
18689238106Sdes
18690285206Sdes# check for dnstap if requested
18691285206Sdes
18692285206Sdes  # Check whether --enable-dnstap was given.
18693285206Sdesif test "${enable_dnstap+set}" = set; then :
18694285206Sdes  enableval=$enable_dnstap; opt_dnstap=$enableval
18695285206Sdeselse
18696285206Sdes  opt_dnstap=no
18697285206Sdesfi
18698285206Sdes
18699285206Sdes
18700285206Sdes
18701285206Sdes# Check whether --with-dnstap-socket-path was given.
18702285206Sdesif test "${with_dnstap_socket_path+set}" = set; then :
18703285206Sdes  withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
18704285206Sdeselse
18705285206Sdes  opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
18706285206Sdesfi
18707285206Sdes
18708285206Sdes
18709285206Sdes  if test "x$opt_dnstap" != "xno"; then
18710285206Sdes    # Extract the first word of "protoc-c", so it can be a program name with args.
18711285206Sdesset dummy protoc-c; ac_word=$2
18712285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18713285206Sdes$as_echo_n "checking for $ac_word... " >&6; }
18714285206Sdesif ${ac_cv_path_PROTOC_C+:} false; then :
18715285206Sdes  $as_echo_n "(cached) " >&6
18716285206Sdeselse
18717285206Sdes  case $PROTOC_C in
18718285206Sdes  [\\/]* | ?:[\\/]*)
18719285206Sdes  ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
18720285206Sdes  ;;
18721285206Sdes  *)
18722285206Sdes  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18723285206Sdesfor as_dir in $PATH
18724285206Sdesdo
18725285206Sdes  IFS=$as_save_IFS
18726285206Sdes  test -z "$as_dir" && as_dir=.
18727285206Sdes    for ac_exec_ext in '' $ac_executable_extensions; do
18728285206Sdes  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18729285206Sdes    ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
18730285206Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18731285206Sdes    break 2
18732285206Sdes  fi
18733285206Sdesdone
18734285206Sdes  done
18735285206SdesIFS=$as_save_IFS
18736285206Sdes
18737285206Sdes  ;;
18738285206Sdesesac
18739285206Sdesfi
18740285206SdesPROTOC_C=$ac_cv_path_PROTOC_C
18741285206Sdesif test -n "$PROTOC_C"; then
18742285206Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
18743285206Sdes$as_echo "$PROTOC_C" >&6; }
18744285206Sdeselse
18745285206Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18746285206Sdes$as_echo "no" >&6; }
18747285206Sdesfi
18748285206Sdes
18749285206Sdes
18750285206Sdes    if test -z "$PROTOC_C"; then
18751285206Sdes      as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
18752285206Sdes    fi
18753285206Sdes
18754285206Sdes# Check whether --with-protobuf-c was given.
18755285206Sdesif test "${with_protobuf_c+set}" = set; then :
18756285206Sdes  withval=$with_protobuf_c;
18757285206Sdes	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18758285206Sdes	  if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
18759285206Sdes	    CFLAGS="$CFLAGS -I$withval/include/google"
18760285206Sdes	  else
18761285206Sdes	    CFLAGS="$CFLAGS -I$withval/include"
18762285206Sdes	  fi
18763285206Sdes	  LDFLAGS="$LDFLAGS -L$withval/lib"
18764285206Sdes
18765285206Sdeselse
18766285206Sdes
18767285206Sdes	  # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18768285206Sdes	  if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
18769285206Sdes	    CFLAGS="$CFLAGS -I/usr/include/google"
18770285206Sdes	  else
18771285206Sdes	    if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
18772285206Sdes	      CFLAGS="$CFLAGS -I/usr/local/include/google"
18773285206Sdes	      LDFLAGS="$LDFLAGS -L/usr/local/lib"
18774285206Sdes	    fi
18775285206Sdes	  fi
18776285206Sdes
18777285206Sdesfi
18778285206Sdes
18779285206Sdes
18780285206Sdes# Check whether --with-libfstrm was given.
18781285206Sdesif test "${with_libfstrm+set}" = set; then :
18782285206Sdes  withval=$with_libfstrm;
18783285206Sdes	CFLAGS="$CFLAGS -I$withval/include"
18784285206Sdes	LDFLAGS="$LDFLAGS -L$withval/lib"
18785285206Sdes
18786285206Sdesfi
18787285206Sdes
18788285206Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
18789285206Sdes$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
18790285206Sdesif ${ac_cv_search_fstrm_iothr_init+:} false; then :
18791285206Sdes  $as_echo_n "(cached) " >&6
18792285206Sdeselse
18793285206Sdes  ac_func_search_save_LIBS=$LIBS
18794285206Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
18795285206Sdes/* end confdefs.h.  */
18796285206Sdes
18797285206Sdes/* Override any GCC internal prototype to avoid an error.
18798285206Sdes   Use char because int might match the return type of a GCC
18799285206Sdes   builtin and then its argument prototype would still apply.  */
18800285206Sdes#ifdef __cplusplus
18801285206Sdesextern "C"
18802285206Sdes#endif
18803285206Sdeschar fstrm_iothr_init ();
18804285206Sdesint
18805285206Sdesmain ()
18806285206Sdes{
18807285206Sdesreturn fstrm_iothr_init ();
18808285206Sdes  ;
18809285206Sdes  return 0;
18810285206Sdes}
18811285206Sdes_ACEOF
18812285206Sdesfor ac_lib in '' fstrm; do
18813285206Sdes  if test -z "$ac_lib"; then
18814285206Sdes    ac_res="none required"
18815285206Sdes  else
18816285206Sdes    ac_res=-l$ac_lib
18817285206Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18818285206Sdes  fi
18819285206Sdes  if ac_fn_c_try_link "$LINENO"; then :
18820285206Sdes  ac_cv_search_fstrm_iothr_init=$ac_res
18821285206Sdesfi
18822285206Sdesrm -f core conftest.err conftest.$ac_objext \
18823285206Sdes    conftest$ac_exeext
18824285206Sdes  if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18825285206Sdes  break
18826285206Sdesfi
18827285206Sdesdone
18828285206Sdesif ${ac_cv_search_fstrm_iothr_init+:} false; then :
18829285206Sdes
18830285206Sdeselse
18831285206Sdes  ac_cv_search_fstrm_iothr_init=no
18832285206Sdesfi
18833285206Sdesrm conftest.$ac_ext
18834285206SdesLIBS=$ac_func_search_save_LIBS
18835285206Sdesfi
18836285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
18837285206Sdes$as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
18838285206Sdesac_res=$ac_cv_search_fstrm_iothr_init
18839285206Sdesif test "$ac_res" != no; then :
18840285206Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18841285206Sdes
18842285206Sdeselse
18843285206Sdes  as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
18844285206Sdesfi
18845285206Sdes
18846285206Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
18847285206Sdes$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
18848285206Sdesif ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18849285206Sdes  $as_echo_n "(cached) " >&6
18850285206Sdeselse
18851285206Sdes  ac_func_search_save_LIBS=$LIBS
18852285206Sdescat confdefs.h - <<_ACEOF >conftest.$ac_ext
18853285206Sdes/* end confdefs.h.  */
18854285206Sdes
18855285206Sdes/* Override any GCC internal prototype to avoid an error.
18856285206Sdes   Use char because int might match the return type of a GCC
18857285206Sdes   builtin and then its argument prototype would still apply.  */
18858285206Sdes#ifdef __cplusplus
18859285206Sdesextern "C"
18860285206Sdes#endif
18861285206Sdeschar protobuf_c_message_pack ();
18862285206Sdesint
18863285206Sdesmain ()
18864285206Sdes{
18865285206Sdesreturn protobuf_c_message_pack ();
18866285206Sdes  ;
18867285206Sdes  return 0;
18868285206Sdes}
18869285206Sdes_ACEOF
18870285206Sdesfor ac_lib in '' protobuf-c; do
18871285206Sdes  if test -z "$ac_lib"; then
18872285206Sdes    ac_res="none required"
18873285206Sdes  else
18874285206Sdes    ac_res=-l$ac_lib
18875285206Sdes    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18876285206Sdes  fi
18877285206Sdes  if ac_fn_c_try_link "$LINENO"; then :
18878285206Sdes  ac_cv_search_protobuf_c_message_pack=$ac_res
18879285206Sdesfi
18880285206Sdesrm -f core conftest.err conftest.$ac_objext \
18881285206Sdes    conftest$ac_exeext
18882285206Sdes  if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18883285206Sdes  break
18884285206Sdesfi
18885285206Sdesdone
18886285206Sdesif ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18887285206Sdes
18888285206Sdeselse
18889285206Sdes  ac_cv_search_protobuf_c_message_pack=no
18890285206Sdesfi
18891285206Sdesrm conftest.$ac_ext
18892285206SdesLIBS=$ac_func_search_save_LIBS
18893285206Sdesfi
18894285206Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
18895285206Sdes$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
18896285206Sdesac_res=$ac_cv_search_protobuf_c_message_pack
18897285206Sdesif test "$ac_res" != no; then :
18898285206Sdes  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18899285206Sdes
18900285206Sdeselse
18901285206Sdes  as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
18902285206Sdesfi
18903285206Sdes
18904285206Sdes
18905285206Sdes
18906285206Sdes$as_echo "#define USE_DNSTAP 1" >>confdefs.h
18907285206Sdes
18908285206Sdes        ENABLE_DNSTAP=1
18909285206Sdes
18910285206Sdes
18911285206Sdes
18912285206Sdes        hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
18913285206Sdes
18914285206Sdes
18915285206Sdescat >>confdefs.h <<_ACEOF
18916285206Sdes#define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
18917285206Sdes_ACEOF
18918285206Sdes
18919285206Sdes
18920285206Sdes        DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
18921285206Sdes
18922285206Sdes        DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
18923285206Sdes
18924285206Sdes
18925285206Sdes  else
18926285206Sdes
18927285206Sdes        ENABLE_DNSTAP=0
18928285206Sdes
18929285206Sdes
18930285206Sdes
18931285206Sdes  fi
18932285206Sdes
18933285206Sdes
18934238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
18935238106Sdes$as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
18936238106Sdes# on openBSD, the implicit rule make $< work.
18937238106Sdes# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
18938238106Sdes# gmake works.
18939238106Sdescat >conftest.make <<EOF
18940238106Sdesall:	conftest.lo
18941238106Sdes
18942238106Sdesconftest.lo foo.lo bla.lo:
18943238106Sdes	if test -f "\$<"; then touch \$@; fi
18944238106Sdes
18945238106Sdes.SUFFIXES: .lo
18946238106Sdes.c.lo:
18947238106Sdes	if test -f "\$<"; then touch \$@; fi
18948238106Sdes
18949238106Sdesconftest.lo:        conftest.dir/conftest.c
18950238106SdesEOF
18951238106Sdesmkdir conftest.dir
18952238106Sdestouch conftest.dir/conftest.c
18953238106Sdesrm -f conftest.lo conftest.c
18954238106Sdes${MAKE:-make} -f conftest.make >/dev/null
18955238106Sdesrm -f conftest.make conftest.c conftest.dir/conftest.c
18956238106Sdesrm -rf conftest.dir
18957238106Sdesif test ! -f conftest.lo; then
18958238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18959238106Sdes$as_echo "no" >&6; }
18960238106Sdes	SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
18961238106Sdes	SOURCEFILE='`cat .source`'
18962238106Sdeselse
18963238106Sdes	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18964238106Sdes$as_echo "yes" >&6; }
18965238106Sdes	SOURCEDETERMINE=':'
18966238106Sdes	SOURCEFILE='$<'
18967238106Sdesfi
18968238106Sdesrm -f conftest.lo
18969238106Sdes
18970238106Sdes
18971238106Sdes
18972249141Sdes# see if we want to build the library or everything
18973249141SdesALLTARGET="alltargets"
18974269257SdesINSTALLTARGET="install-all"
18975249141Sdes
18976249141Sdes# Check whether --with-libunbound-only was given.
18977249141Sdesif test "${with_libunbound_only+set}" = set; then :
18978249141Sdes  withval=$with_libunbound_only;
18979249141Sdes	if test "$withval" = "yes"; then
18980249141Sdes		ALLTARGET="lib"
18981269257Sdes		INSTALLTARGET="install-lib"
18982249141Sdes	fi
18983249141Sdes
18984249141Sdesfi
18985249141Sdes
18986249141Sdes
18987249141Sdes
18988238106Sdes
18989238106Sdes
18990238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
18991238106Sdes$as_echo "$as_me: Stripping extension flags..." >&6;}
18992238106Sdes
18993238106Sdes  if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
18994238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
18995238106Sdes
18996238106Sdes$as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
18997238106Sdes
18998238106Sdes  fi
18999238106Sdes
19000238106Sdes
19001238106Sdes  if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
19002238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
19003238106Sdes
19004238106Sdes$as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
19005238106Sdes
19006238106Sdes  fi
19007238106Sdes
19008238106Sdes
19009238106Sdes  if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
19010238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
19011238106Sdes
19012238106Sdes$as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
19013238106Sdes
19014238106Sdes  fi
19015238106Sdes
19016238106Sdes
19017238106Sdes  if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
19018238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
19019238106Sdes
19020238106Sdes$as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
19021238106Sdes
19022238106Sdes  fi
19023238106Sdes
19024238106Sdes
19025238106Sdes  if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
19026238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
19027238106Sdes
19028238106Sdes$as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
19029238106Sdes
19030238106Sdes  fi
19031238106Sdes
19032238106Sdes
19033238106Sdes  if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
19034238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
19035238106Sdes
19036238106Sdes$as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
19037238106Sdes
19038238106Sdes  fi
19039238106Sdes
19040238106Sdes
19041238106Sdes  if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
19042238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
19043238106Sdes
19044238106Sdes$as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
19045238106Sdes
19046238106Sdes  fi
19047238106Sdes
19048238106Sdes
19049238106Sdes  if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
19050238106Sdes    CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
19051238106Sdes
19052238106Sdes$as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
19053238106Sdes
19054238106Sdes  fi
19055238106Sdes
19056238106Sdes
19057238106SdesLDFLAGS="$LATE_LDFLAGS $LDFLAGS"
19058238106Sdes
19059238106Sdes
19060238106Sdescat >>confdefs.h <<_ACEOF
19061238106Sdes#define MAXSYSLOGMSGLEN 10240
19062238106Sdes_ACEOF
19063238106Sdes
19064238106Sdes
19065238106Sdes
19066238106Sdes
19067294190Sdesversion=1.5.7
19068238106Sdes
19069285206Sdesdate=`date +'%b %e, %Y'`
19070285206Sdes
19071285206Sdes
19072285206Sdesac_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"
19073285206Sdes
19074238106Sdesac_config_headers="$ac_config_headers config.h"
19075238106Sdes
19076238106Sdescat >confcache <<\_ACEOF
19077238106Sdes# This file is a shell script that caches the results of configure
19078238106Sdes# tests run on this system so they can be shared between configure
19079238106Sdes# scripts and configure runs, see configure's option --config-cache.
19080238106Sdes# It is not useful on other systems.  If it contains results you don't
19081238106Sdes# want to keep, you may remove or edit it.
19082238106Sdes#
19083238106Sdes# config.status only pays attention to the cache file if you give it
19084238106Sdes# the --recheck option to rerun configure.
19085238106Sdes#
19086238106Sdes# `ac_cv_env_foo' variables (set or unset) will be overridden when
19087238106Sdes# loading this file, other *unset* `ac_cv_foo' will be assigned the
19088238106Sdes# following values.
19089238106Sdes
19090238106Sdes_ACEOF
19091238106Sdes
19092238106Sdes# The following way of writing the cache mishandles newlines in values,
19093238106Sdes# but we know of no workaround that is simple, portable, and efficient.
19094238106Sdes# So, we kill variables containing newlines.
19095238106Sdes# Ultrix sh set writes to stderr and can't be redirected directly,
19096238106Sdes# and sets the high bit in the cache file unless we assign to the vars.
19097238106Sdes(
19098238106Sdes  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19099238106Sdes    eval ac_val=\$$ac_var
19100238106Sdes    case $ac_val in #(
19101238106Sdes    *${as_nl}*)
19102238106Sdes      case $ac_var in #(
19103238106Sdes      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19104238106Sdes$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19105238106Sdes      esac
19106238106Sdes      case $ac_var in #(
19107238106Sdes      _ | IFS | as_nl) ;; #(
19108238106Sdes      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19109238106Sdes      *) { eval $ac_var=; unset $ac_var;} ;;
19110238106Sdes      esac ;;
19111238106Sdes    esac
19112238106Sdes  done
19113238106Sdes
19114238106Sdes  (set) 2>&1 |
19115238106Sdes    case $as_nl`(ac_space=' '; set) 2>&1` in #(
19116238106Sdes    *${as_nl}ac_space=\ *)
19117238106Sdes      # `set' does not quote correctly, so add quotes: double-quote
19118238106Sdes      # substitution turns \\\\ into \\, and sed turns \\ into \.
19119238106Sdes      sed -n \
19120238106Sdes	"s/'/'\\\\''/g;
19121238106Sdes	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19122238106Sdes      ;; #(
19123238106Sdes    *)
19124238106Sdes      # `set' quotes correctly as required by POSIX, so do not add quotes.
19125238106Sdes      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19126238106Sdes      ;;
19127238106Sdes    esac |
19128238106Sdes    sort
19129238106Sdes) |
19130238106Sdes  sed '
19131238106Sdes     /^ac_cv_env_/b end
19132238106Sdes     t clear
19133238106Sdes     :clear
19134238106Sdes     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19135238106Sdes     t end
19136238106Sdes     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19137238106Sdes     :end' >>confcache
19138238106Sdesif diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19139238106Sdes  if test -w "$cache_file"; then
19140238106Sdes    if test "x$cache_file" != "x/dev/null"; then
19141238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19142238106Sdes$as_echo "$as_me: updating cache $cache_file" >&6;}
19143238106Sdes      if test ! -f "$cache_file" || test -h "$cache_file"; then
19144238106Sdes	cat confcache >"$cache_file"
19145238106Sdes      else
19146238106Sdes        case $cache_file in #(
19147238106Sdes        */* | ?:*)
19148238106Sdes	  mv -f confcache "$cache_file"$$ &&
19149238106Sdes	  mv -f "$cache_file"$$ "$cache_file" ;; #(
19150238106Sdes        *)
19151238106Sdes	  mv -f confcache "$cache_file" ;;
19152238106Sdes	esac
19153238106Sdes      fi
19154238106Sdes    fi
19155238106Sdes  else
19156238106Sdes    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19157238106Sdes$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19158238106Sdes  fi
19159238106Sdesfi
19160238106Sdesrm -f confcache
19161238106Sdes
19162238106Sdestest "x$prefix" = xNONE && prefix=$ac_default_prefix
19163238106Sdes# Let make expand exec_prefix.
19164238106Sdestest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19165238106Sdes
19166238106SdesDEFS=-DHAVE_CONFIG_H
19167238106Sdes
19168238106Sdesac_libobjs=
19169238106Sdesac_ltlibobjs=
19170238106SdesU=
19171238106Sdesfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19172238106Sdes  # 1. Remove the extension, and $U if already installed.
19173238106Sdes  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19174238106Sdes  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19175238106Sdes  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19176238106Sdes  #    will be set to the directory where LIBOBJS objects are built.
19177238106Sdes  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19178238106Sdes  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19179238106Sdesdone
19180238106SdesLIBOBJS=$ac_libobjs
19181238106Sdes
19182238106SdesLTLIBOBJS=$ac_ltlibobjs
19183238106Sdes
19184238106Sdes
19185238106Sdes
19186238106Sdes: "${CONFIG_STATUS=./config.status}"
19187238106Sdesac_write_fail=0
19188238106Sdesac_clean_files_save=$ac_clean_files
19189238106Sdesac_clean_files="$ac_clean_files $CONFIG_STATUS"
19190238106Sdes{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19191238106Sdes$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19192238106Sdesas_write_fail=0
19193238106Sdescat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19194238106Sdes#! $SHELL
19195238106Sdes# Generated by $as_me.
19196238106Sdes# Run this file to recreate the current configuration.
19197238106Sdes# Compiler output produced by configure, useful for debugging
19198238106Sdes# configure, is in config.log if it exists.
19199238106Sdes
19200238106Sdesdebug=false
19201238106Sdesac_cs_recheck=false
19202238106Sdesac_cs_silent=false
19203238106Sdes
19204238106SdesSHELL=\${CONFIG_SHELL-$SHELL}
19205238106Sdesexport SHELL
19206238106Sdes_ASEOF
19207238106Sdescat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19208238106Sdes## -------------------- ##
19209238106Sdes## M4sh Initialization. ##
19210238106Sdes## -------------------- ##
19211238106Sdes
19212238106Sdes# Be more Bourne compatible
19213238106SdesDUALCASE=1; export DUALCASE # for MKS sh
19214238106Sdesif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19215238106Sdes  emulate sh
19216238106Sdes  NULLCMD=:
19217238106Sdes  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19218238106Sdes  # is contrary to our usage.  Disable this feature.
19219238106Sdes  alias -g '${1+"$@"}'='"$@"'
19220238106Sdes  setopt NO_GLOB_SUBST
19221238106Sdeselse
19222238106Sdes  case `(set -o) 2>/dev/null` in #(
19223238106Sdes  *posix*) :
19224238106Sdes    set -o posix ;; #(
19225238106Sdes  *) :
19226238106Sdes     ;;
19227238106Sdesesac
19228238106Sdesfi
19229238106Sdes
19230238106Sdes
19231238106Sdesas_nl='
19232238106Sdes'
19233238106Sdesexport as_nl
19234238106Sdes# Printing a long string crashes Solaris 7 /usr/bin/printf.
19235238106Sdesas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19236238106Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19237238106Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19238238106Sdes# Prefer a ksh shell builtin over an external printf program on Solaris,
19239238106Sdes# but without wasting forks for bash or zsh.
19240238106Sdesif test -z "$BASH_VERSION$ZSH_VERSION" \
19241238106Sdes    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19242238106Sdes  as_echo='print -r --'
19243238106Sdes  as_echo_n='print -rn --'
19244238106Sdeselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19245238106Sdes  as_echo='printf %s\n'
19246238106Sdes  as_echo_n='printf %s'
19247238106Sdeselse
19248238106Sdes  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19249238106Sdes    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19250238106Sdes    as_echo_n='/usr/ucb/echo -n'
19251238106Sdes  else
19252238106Sdes    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19253238106Sdes    as_echo_n_body='eval
19254238106Sdes      arg=$1;
19255238106Sdes      case $arg in #(
19256238106Sdes      *"$as_nl"*)
19257238106Sdes	expr "X$arg" : "X\\(.*\\)$as_nl";
19258238106Sdes	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19259238106Sdes      esac;
19260238106Sdes      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19261238106Sdes    '
19262238106Sdes    export as_echo_n_body
19263238106Sdes    as_echo_n='sh -c $as_echo_n_body as_echo'
19264238106Sdes  fi
19265238106Sdes  export as_echo_body
19266238106Sdes  as_echo='sh -c $as_echo_body as_echo'
19267238106Sdesfi
19268238106Sdes
19269238106Sdes# The user is always right.
19270238106Sdesif test "${PATH_SEPARATOR+set}" != set; then
19271238106Sdes  PATH_SEPARATOR=:
19272238106Sdes  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19273238106Sdes    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19274238106Sdes      PATH_SEPARATOR=';'
19275238106Sdes  }
19276238106Sdesfi
19277238106Sdes
19278238106Sdes
19279238106Sdes# IFS
19280238106Sdes# We need space, tab and new line, in precisely that order.  Quoting is
19281238106Sdes# there to prevent editors from complaining about space-tab.
19282238106Sdes# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19283238106Sdes# splitting by setting IFS to empty value.)
19284238106SdesIFS=" ""	$as_nl"
19285238106Sdes
19286238106Sdes# Find who we are.  Look in the path if we contain no directory separator.
19287238106Sdesas_myself=
19288238106Sdescase $0 in #((
19289238106Sdes  *[\\/]* ) as_myself=$0 ;;
19290238106Sdes  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291238106Sdesfor as_dir in $PATH
19292238106Sdesdo
19293238106Sdes  IFS=$as_save_IFS
19294238106Sdes  test -z "$as_dir" && as_dir=.
19295238106Sdes    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19296238106Sdes  done
19297238106SdesIFS=$as_save_IFS
19298238106Sdes
19299238106Sdes     ;;
19300238106Sdesesac
19301238106Sdes# We did not find ourselves, most probably we were run as `sh COMMAND'
19302238106Sdes# in which case we are not to be found in the path.
19303238106Sdesif test "x$as_myself" = x; then
19304238106Sdes  as_myself=$0
19305238106Sdesfi
19306238106Sdesif test ! -f "$as_myself"; then
19307238106Sdes  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19308238106Sdes  exit 1
19309238106Sdesfi
19310238106Sdes
19311238106Sdes# Unset variables that we do not need and which cause bugs (e.g. in
19312238106Sdes# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19313238106Sdes# suppresses any "Segmentation fault" message there.  '((' could
19314238106Sdes# trigger a bug in pdksh 5.2.14.
19315238106Sdesfor as_var in BASH_ENV ENV MAIL MAILPATH
19316238106Sdesdo eval test x\${$as_var+set} = xset \
19317238106Sdes  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19318238106Sdesdone
19319238106SdesPS1='$ '
19320238106SdesPS2='> '
19321238106SdesPS4='+ '
19322238106Sdes
19323238106Sdes# NLS nuisances.
19324238106SdesLC_ALL=C
19325238106Sdesexport LC_ALL
19326238106SdesLANGUAGE=C
19327238106Sdesexport LANGUAGE
19328238106Sdes
19329238106Sdes# CDPATH.
19330238106Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19331238106Sdes
19332238106Sdes
19333238106Sdes# as_fn_error STATUS ERROR [LINENO LOG_FD]
19334238106Sdes# ----------------------------------------
19335238106Sdes# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19336238106Sdes# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19337238106Sdes# script with STATUS, using 1 if that was 0.
19338238106Sdesas_fn_error ()
19339238106Sdes{
19340238106Sdes  as_status=$1; test $as_status -eq 0 && as_status=1
19341238106Sdes  if test "$4"; then
19342238106Sdes    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19343238106Sdes    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19344238106Sdes  fi
19345238106Sdes  $as_echo "$as_me: error: $2" >&2
19346238106Sdes  as_fn_exit $as_status
19347238106Sdes} # as_fn_error
19348238106Sdes
19349238106Sdes
19350238106Sdes# as_fn_set_status STATUS
19351238106Sdes# -----------------------
19352238106Sdes# Set $? to STATUS, without forking.
19353238106Sdesas_fn_set_status ()
19354238106Sdes{
19355238106Sdes  return $1
19356238106Sdes} # as_fn_set_status
19357238106Sdes
19358238106Sdes# as_fn_exit STATUS
19359238106Sdes# -----------------
19360238106Sdes# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19361238106Sdesas_fn_exit ()
19362238106Sdes{
19363238106Sdes  set +e
19364238106Sdes  as_fn_set_status $1
19365238106Sdes  exit $1
19366238106Sdes} # as_fn_exit
19367238106Sdes
19368238106Sdes# as_fn_unset VAR
19369238106Sdes# ---------------
19370238106Sdes# Portably unset VAR.
19371238106Sdesas_fn_unset ()
19372238106Sdes{
19373238106Sdes  { eval $1=; unset $1;}
19374238106Sdes}
19375238106Sdesas_unset=as_fn_unset
19376238106Sdes# as_fn_append VAR VALUE
19377238106Sdes# ----------------------
19378238106Sdes# Append the text in VALUE to the end of the definition contained in VAR. Take
19379238106Sdes# advantage of any shell optimizations that allow amortized linear growth over
19380238106Sdes# repeated appends, instead of the typical quadratic growth present in naive
19381238106Sdes# implementations.
19382238106Sdesif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19383238106Sdes  eval 'as_fn_append ()
19384238106Sdes  {
19385238106Sdes    eval $1+=\$2
19386238106Sdes  }'
19387238106Sdeselse
19388238106Sdes  as_fn_append ()
19389238106Sdes  {
19390238106Sdes    eval $1=\$$1\$2
19391238106Sdes  }
19392238106Sdesfi # as_fn_append
19393238106Sdes
19394238106Sdes# as_fn_arith ARG...
19395238106Sdes# ------------------
19396238106Sdes# Perform arithmetic evaluation on the ARGs, and store the result in the
19397238106Sdes# global $as_val. Take advantage of shells that can avoid forks. The arguments
19398238106Sdes# must be portable across $(()) and expr.
19399238106Sdesif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19400238106Sdes  eval 'as_fn_arith ()
19401238106Sdes  {
19402238106Sdes    as_val=$(( $* ))
19403238106Sdes  }'
19404238106Sdeselse
19405238106Sdes  as_fn_arith ()
19406238106Sdes  {
19407238106Sdes    as_val=`expr "$@" || test $? -eq 1`
19408238106Sdes  }
19409238106Sdesfi # as_fn_arith
19410238106Sdes
19411238106Sdes
19412238106Sdesif expr a : '\(a\)' >/dev/null 2>&1 &&
19413238106Sdes   test "X`expr 00001 : '.*\(...\)'`" = X001; then
19414238106Sdes  as_expr=expr
19415238106Sdeselse
19416238106Sdes  as_expr=false
19417238106Sdesfi
19418238106Sdes
19419238106Sdesif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19420238106Sdes  as_basename=basename
19421238106Sdeselse
19422238106Sdes  as_basename=false
19423238106Sdesfi
19424238106Sdes
19425238106Sdesif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19426238106Sdes  as_dirname=dirname
19427238106Sdeselse
19428238106Sdes  as_dirname=false
19429238106Sdesfi
19430238106Sdes
19431238106Sdesas_me=`$as_basename -- "$0" ||
19432238106Sdes$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19433238106Sdes	 X"$0" : 'X\(//\)$' \| \
19434238106Sdes	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19435238106Sdes$as_echo X/"$0" |
19436238106Sdes    sed '/^.*\/\([^/][^/]*\)\/*$/{
19437238106Sdes	    s//\1/
19438238106Sdes	    q
19439238106Sdes	  }
19440238106Sdes	  /^X\/\(\/\/\)$/{
19441238106Sdes	    s//\1/
19442238106Sdes	    q
19443238106Sdes	  }
19444238106Sdes	  /^X\/\(\/\).*/{
19445238106Sdes	    s//\1/
19446238106Sdes	    q
19447238106Sdes	  }
19448238106Sdes	  s/.*/./; q'`
19449238106Sdes
19450238106Sdes# Avoid depending upon Character Ranges.
19451238106Sdesas_cr_letters='abcdefghijklmnopqrstuvwxyz'
19452238106Sdesas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19453238106Sdesas_cr_Letters=$as_cr_letters$as_cr_LETTERS
19454238106Sdesas_cr_digits='0123456789'
19455238106Sdesas_cr_alnum=$as_cr_Letters$as_cr_digits
19456238106Sdes
19457238106SdesECHO_C= ECHO_N= ECHO_T=
19458238106Sdescase `echo -n x` in #(((((
19459238106Sdes-n*)
19460238106Sdes  case `echo 'xy\c'` in
19461238106Sdes  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
19462238106Sdes  xy)  ECHO_C='\c';;
19463238106Sdes  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19464238106Sdes       ECHO_T='	';;
19465238106Sdes  esac;;
19466238106Sdes*)
19467238106Sdes  ECHO_N='-n';;
19468238106Sdesesac
19469238106Sdes
19470238106Sdesrm -f conf$$ conf$$.exe conf$$.file
19471238106Sdesif test -d conf$$.dir; then
19472238106Sdes  rm -f conf$$.dir/conf$$.file
19473238106Sdeselse
19474238106Sdes  rm -f conf$$.dir
19475238106Sdes  mkdir conf$$.dir 2>/dev/null
19476238106Sdesfi
19477238106Sdesif (echo >conf$$.file) 2>/dev/null; then
19478238106Sdes  if ln -s conf$$.file conf$$ 2>/dev/null; then
19479238106Sdes    as_ln_s='ln -s'
19480238106Sdes    # ... but there are two gotchas:
19481238106Sdes    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19482238106Sdes    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19483249141Sdes    # In both cases, we have to default to `cp -pR'.
19484238106Sdes    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19485249141Sdes      as_ln_s='cp -pR'
19486238106Sdes  elif ln conf$$.file conf$$ 2>/dev/null; then
19487238106Sdes    as_ln_s=ln
19488238106Sdes  else
19489249141Sdes    as_ln_s='cp -pR'
19490238106Sdes  fi
19491238106Sdeselse
19492249141Sdes  as_ln_s='cp -pR'
19493238106Sdesfi
19494238106Sdesrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19495238106Sdesrmdir conf$$.dir 2>/dev/null
19496238106Sdes
19497238106Sdes
19498238106Sdes# as_fn_mkdir_p
19499238106Sdes# -------------
19500238106Sdes# Create "$as_dir" as a directory, including parents if necessary.
19501238106Sdesas_fn_mkdir_p ()
19502238106Sdes{
19503238106Sdes
19504238106Sdes  case $as_dir in #(
19505238106Sdes  -*) as_dir=./$as_dir;;
19506238106Sdes  esac
19507238106Sdes  test -d "$as_dir" || eval $as_mkdir_p || {
19508238106Sdes    as_dirs=
19509238106Sdes    while :; do
19510238106Sdes      case $as_dir in #(
19511238106Sdes      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19512238106Sdes      *) as_qdir=$as_dir;;
19513238106Sdes      esac
19514238106Sdes      as_dirs="'$as_qdir' $as_dirs"
19515238106Sdes      as_dir=`$as_dirname -- "$as_dir" ||
19516238106Sdes$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19517238106Sdes	 X"$as_dir" : 'X\(//\)[^/]' \| \
19518238106Sdes	 X"$as_dir" : 'X\(//\)$' \| \
19519238106Sdes	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19520238106Sdes$as_echo X"$as_dir" |
19521238106Sdes    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19522238106Sdes	    s//\1/
19523238106Sdes	    q
19524238106Sdes	  }
19525238106Sdes	  /^X\(\/\/\)[^/].*/{
19526238106Sdes	    s//\1/
19527238106Sdes	    q
19528238106Sdes	  }
19529238106Sdes	  /^X\(\/\/\)$/{
19530238106Sdes	    s//\1/
19531238106Sdes	    q
19532238106Sdes	  }
19533238106Sdes	  /^X\(\/\).*/{
19534238106Sdes	    s//\1/
19535238106Sdes	    q
19536238106Sdes	  }
19537238106Sdes	  s/.*/./; q'`
19538238106Sdes      test -d "$as_dir" && break
19539238106Sdes    done
19540238106Sdes    test -z "$as_dirs" || eval "mkdir $as_dirs"
19541238106Sdes  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19542238106Sdes
19543238106Sdes
19544238106Sdes} # as_fn_mkdir_p
19545238106Sdesif mkdir -p . 2>/dev/null; then
19546238106Sdes  as_mkdir_p='mkdir -p "$as_dir"'
19547238106Sdeselse
19548238106Sdes  test -d ./-p && rmdir ./-p
19549238106Sdes  as_mkdir_p=false
19550238106Sdesfi
19551238106Sdes
19552238106Sdes
19553249141Sdes# as_fn_executable_p FILE
19554249141Sdes# -----------------------
19555249141Sdes# Test if FILE is an executable regular file.
19556249141Sdesas_fn_executable_p ()
19557249141Sdes{
19558249141Sdes  test -f "$1" && test -x "$1"
19559249141Sdes} # as_fn_executable_p
19560249141Sdesas_test_x='test -x'
19561249141Sdesas_executable_p=as_fn_executable_p
19562249141Sdes
19563238106Sdes# Sed expression to map a string onto a valid CPP name.
19564238106Sdesas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19565238106Sdes
19566238106Sdes# Sed expression to map a string onto a valid variable name.
19567238106Sdesas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19568238106Sdes
19569238106Sdes
19570238106Sdesexec 6>&1
19571238106Sdes## ----------------------------------- ##
19572238106Sdes## Main body of $CONFIG_STATUS script. ##
19573238106Sdes## ----------------------------------- ##
19574238106Sdes_ASEOF
19575238106Sdestest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19576238106Sdes
19577238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19578238106Sdes# Save the log message, to keep $0 and so on meaningful, and to
19579238106Sdes# report actual input values of CONFIG_FILES etc. instead of their
19580238106Sdes# values after options handling.
19581238106Sdesac_log="
19582294190SdesThis file was extended by unbound $as_me 1.5.7, which was
19583249141Sdesgenerated by GNU Autoconf 2.69.  Invocation command line was
19584238106Sdes
19585238106Sdes  CONFIG_FILES    = $CONFIG_FILES
19586238106Sdes  CONFIG_HEADERS  = $CONFIG_HEADERS
19587238106Sdes  CONFIG_LINKS    = $CONFIG_LINKS
19588238106Sdes  CONFIG_COMMANDS = $CONFIG_COMMANDS
19589238106Sdes  $ $0 $@
19590238106Sdes
19591238106Sdeson `(hostname || uname -n) 2>/dev/null | sed 1q`
19592238106Sdes"
19593238106Sdes
19594238106Sdes_ACEOF
19595238106Sdes
19596238106Sdescase $ac_config_files in *"
19597238106Sdes"*) set x $ac_config_files; shift; ac_config_files=$*;;
19598238106Sdesesac
19599238106Sdes
19600238106Sdescase $ac_config_headers in *"
19601238106Sdes"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19602238106Sdesesac
19603238106Sdes
19604238106Sdes
19605238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19606238106Sdes# Files that config.status was made for.
19607238106Sdesconfig_files="$ac_config_files"
19608238106Sdesconfig_headers="$ac_config_headers"
19609238106Sdesconfig_commands="$ac_config_commands"
19610238106Sdes
19611238106Sdes_ACEOF
19612238106Sdes
19613238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19614238106Sdesac_cs_usage="\
19615238106Sdes\`$as_me' instantiates files and other configuration actions
19616238106Sdesfrom templates according to the current configuration.  Unless the files
19617238106Sdesand actions are specified as TAGs, all are instantiated by default.
19618238106Sdes
19619238106SdesUsage: $0 [OPTION]... [TAG]...
19620238106Sdes
19621238106Sdes  -h, --help       print this help, then exit
19622238106Sdes  -V, --version    print version number and configuration settings, then exit
19623238106Sdes      --config     print configuration, then exit
19624238106Sdes  -q, --quiet, --silent
19625238106Sdes                   do not print progress messages
19626238106Sdes  -d, --debug      don't remove temporary files
19627238106Sdes      --recheck    update $as_me by reconfiguring in the same conditions
19628238106Sdes      --file=FILE[:TEMPLATE]
19629238106Sdes                   instantiate the configuration file FILE
19630238106Sdes      --header=FILE[:TEMPLATE]
19631238106Sdes                   instantiate the configuration header FILE
19632238106Sdes
19633238106SdesConfiguration files:
19634238106Sdes$config_files
19635238106Sdes
19636238106SdesConfiguration headers:
19637238106Sdes$config_headers
19638238106Sdes
19639238106SdesConfiguration commands:
19640238106Sdes$config_commands
19641238106Sdes
19642238106SdesReport bugs to <unbound-bugs@nlnetlabs.nl>."
19643238106Sdes
19644238106Sdes_ACEOF
19645238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19646238106Sdesac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19647238106Sdesac_cs_version="\\
19648294190Sdesunbound config.status 1.5.7
19649249141Sdesconfigured by $0, generated by GNU Autoconf 2.69,
19650238106Sdes  with options \\"\$ac_cs_config\\"
19651238106Sdes
19652249141SdesCopyright (C) 2012 Free Software Foundation, Inc.
19653238106SdesThis config.status script is free software; the Free Software Foundation
19654238106Sdesgives unlimited permission to copy, distribute and modify it."
19655238106Sdes
19656238106Sdesac_pwd='$ac_pwd'
19657238106Sdessrcdir='$srcdir'
19658238106SdesAWK='$AWK'
19659238106Sdestest -n "\$AWK" || AWK=awk
19660238106Sdes_ACEOF
19661238106Sdes
19662238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19663238106Sdes# The default lists apply if the user does not specify any file.
19664238106Sdesac_need_defaults=:
19665238106Sdeswhile test $# != 0
19666238106Sdesdo
19667238106Sdes  case $1 in
19668238106Sdes  --*=?*)
19669238106Sdes    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19670238106Sdes    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19671238106Sdes    ac_shift=:
19672238106Sdes    ;;
19673238106Sdes  --*=)
19674238106Sdes    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19675238106Sdes    ac_optarg=
19676238106Sdes    ac_shift=:
19677238106Sdes    ;;
19678238106Sdes  *)
19679238106Sdes    ac_option=$1
19680238106Sdes    ac_optarg=$2
19681238106Sdes    ac_shift=shift
19682238106Sdes    ;;
19683238106Sdes  esac
19684238106Sdes
19685238106Sdes  case $ac_option in
19686238106Sdes  # Handling of the options.
19687238106Sdes  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19688238106Sdes    ac_cs_recheck=: ;;
19689238106Sdes  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19690238106Sdes    $as_echo "$ac_cs_version"; exit ;;
19691238106Sdes  --config | --confi | --conf | --con | --co | --c )
19692238106Sdes    $as_echo "$ac_cs_config"; exit ;;
19693238106Sdes  --debug | --debu | --deb | --de | --d | -d )
19694238106Sdes    debug=: ;;
19695238106Sdes  --file | --fil | --fi | --f )
19696238106Sdes    $ac_shift
19697238106Sdes    case $ac_optarg in
19698238106Sdes    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19699238106Sdes    '') as_fn_error $? "missing file argument" ;;
19700238106Sdes    esac
19701238106Sdes    as_fn_append CONFIG_FILES " '$ac_optarg'"
19702238106Sdes    ac_need_defaults=false;;
19703238106Sdes  --header | --heade | --head | --hea )
19704238106Sdes    $ac_shift
19705238106Sdes    case $ac_optarg in
19706238106Sdes    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19707238106Sdes    esac
19708238106Sdes    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19709238106Sdes    ac_need_defaults=false;;
19710238106Sdes  --he | --h)
19711238106Sdes    # Conflict between --help and --header
19712238106Sdes    as_fn_error $? "ambiguous option: \`$1'
19713238106SdesTry \`$0 --help' for more information.";;
19714238106Sdes  --help | --hel | -h )
19715238106Sdes    $as_echo "$ac_cs_usage"; exit ;;
19716238106Sdes  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19717238106Sdes  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19718238106Sdes    ac_cs_silent=: ;;
19719238106Sdes
19720238106Sdes  # This is an error.
19721238106Sdes  -*) as_fn_error $? "unrecognized option: \`$1'
19722238106SdesTry \`$0 --help' for more information." ;;
19723238106Sdes
19724238106Sdes  *) as_fn_append ac_config_targets " $1"
19725238106Sdes     ac_need_defaults=false ;;
19726238106Sdes
19727238106Sdes  esac
19728238106Sdes  shift
19729238106Sdesdone
19730238106Sdes
19731238106Sdesac_configure_extra_args=
19732238106Sdes
19733238106Sdesif $ac_cs_silent; then
19734238106Sdes  exec 6>/dev/null
19735238106Sdes  ac_configure_extra_args="$ac_configure_extra_args --silent"
19736238106Sdesfi
19737238106Sdes
19738238106Sdes_ACEOF
19739238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19740238106Sdesif \$ac_cs_recheck; then
19741249141Sdes  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19742238106Sdes  shift
19743238106Sdes  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19744238106Sdes  CONFIG_SHELL='$SHELL'
19745238106Sdes  export CONFIG_SHELL
19746238106Sdes  exec "\$@"
19747238106Sdesfi
19748238106Sdes
19749238106Sdes_ACEOF
19750238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19751238106Sdesexec 5>>config.log
19752238106Sdes{
19753238106Sdes  echo
19754238106Sdes  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19755238106Sdes## Running $as_me. ##
19756238106Sdes_ASBOX
19757238106Sdes  $as_echo "$ac_log"
19758238106Sdes} >&5
19759238106Sdes
19760238106Sdes_ACEOF
19761238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19762238106Sdes#
19763238106Sdes# INIT-COMMANDS
19764238106Sdes#
19765238106Sdes
19766238106Sdes
19767238106Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout
19768238106Sdes# if CDPATH is set.
19769238106Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19770238106Sdes
19771238106Sdessed_quote_subst='$sed_quote_subst'
19772238106Sdesdouble_quote_subst='$double_quote_subst'
19773238106Sdesdelay_variable_subst='$delay_variable_subst'
19774238106Sdesmacro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
19775238106Sdesmacro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
19776238106Sdesenable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
19777238106Sdesenable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
19778238106Sdespic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
19779238106Sdesenable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
19780238106SdesSHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
19781238106SdesECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
19782249141SdesPATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
19783238106Sdeshost_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
19784238106Sdeshost='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
19785238106Sdeshost_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
19786238106Sdesbuild_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
19787238106Sdesbuild='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
19788238106Sdesbuild_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
19789238106SdesSED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
19790238106SdesXsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
19791238106SdesGREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
19792238106SdesEGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
19793238106SdesFGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
19794238106SdesLD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
19795238106SdesNM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
19796238106SdesLN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
19797238106Sdesmax_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
19798238106Sdesac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
19799238106Sdesexeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
19800238106Sdeslt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
19801238106Sdeslt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
19802238106Sdeslt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
19803238106Sdeslt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
19804238106Sdeslt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
19805238106Sdesreload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
19806238106Sdesreload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
19807238106SdesOBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
19808238106Sdesdeplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
19809238106Sdesfile_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
19810238106Sdesfile_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
19811238106Sdeswant_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
19812238106SdesDLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
19813238106Sdessharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
19814238106SdesAR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
19815238106SdesAR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
19816238106Sdesarchiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
19817238106SdesSTRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
19818238106SdesRANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
19819238106Sdesold_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19820238106Sdesold_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19821238106Sdesold_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
19822238106Sdeslock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
19823238106SdesCC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
19824238106SdesCFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
19825238106Sdescompiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
19826238106SdesGCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
19827238106Sdeslt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
19828238106Sdeslt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
19829238106Sdeslt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
19830238106Sdeslt_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"`'
19831238106Sdesnm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
19832238106Sdeslt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
19833238106Sdesobjdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
19834238106SdesMAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
19835238106Sdeslt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
19836238106Sdeslt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
19837238106Sdeslt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
19838238106Sdeslt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
19839238106Sdeslt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
19840238106Sdesneed_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
19841238106SdesMANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
19842238106SdesDSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
19843238106SdesNMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
19844238106SdesLIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
19845238106SdesOTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
19846238106SdesOTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
19847238106Sdeslibext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
19848238106Sdesshrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
19849238106Sdesextract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19850238106Sdesarchive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
19851238106Sdesenable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
19852238106Sdesexport_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
19853238106Sdeswhole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
19854238106Sdescompiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
19855238106Sdesold_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
19856238106Sdesold_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
19857238106Sdesarchive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
19858238106Sdesarchive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19859238106Sdesmodule_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
19860238106Sdesmodule_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
19861238106Sdeswith_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
19862238106Sdesallow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
19863238106Sdesno_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
19864238106Sdeshardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
19865238106Sdeshardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
19866238106Sdeshardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
19867238106Sdeshardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
19868238106Sdeshardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
19869238106Sdeshardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
19870238106Sdeshardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
19871238106Sdesinherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
19872238106Sdeslink_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
19873238106Sdesalways_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
19874238106Sdesexport_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
19875238106Sdesexclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
19876238106Sdesinclude_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
19877238106Sdesprelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
19878238106Sdespostlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
19879238106Sdesfile_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
19880238106Sdesvariables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
19881238106Sdesneed_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
19882238106Sdesneed_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
19883238106Sdesversion_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
19884238106Sdesrunpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
19885238106Sdesshlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
19886238106Sdesshlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
19887238106Sdeslibname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
19888238106Sdeslibrary_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
19889238106Sdessoname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
19890238106Sdesinstall_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
19891238106Sdespostinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
19892238106Sdespostuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
19893238106Sdesfinish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
19894238106Sdesfinish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
19895238106Sdeshardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
19896238106Sdessys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
19897238106Sdessys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
19898238106Sdeshardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
19899238106Sdesenable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
19900238106Sdesenable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
19901238106Sdesenable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
19902238106Sdesold_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
19903238106Sdesstriplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
19904238106Sdes
19905238106SdesLTCC='$LTCC'
19906238106SdesLTCFLAGS='$LTCFLAGS'
19907238106Sdescompiler='$compiler_DEFAULT'
19908238106Sdes
19909238106Sdes# A function that is used when there is no print builtin or printf.
19910238106Sdesfunc_fallback_echo ()
19911238106Sdes{
19912238106Sdes  eval 'cat <<_LTECHO_EOF
19913238106Sdes\$1
19914238106Sdes_LTECHO_EOF'
19915238106Sdes}
19916238106Sdes
19917238106Sdes# Quote evaled strings.
19918238106Sdesfor var in SHELL \
19919238106SdesECHO \
19920249141SdesPATH_SEPARATOR \
19921238106SdesSED \
19922238106SdesGREP \
19923238106SdesEGREP \
19924238106SdesFGREP \
19925238106SdesLD \
19926238106SdesNM \
19927238106SdesLN_S \
19928238106Sdeslt_SP2NL \
19929238106Sdeslt_NL2SP \
19930238106Sdesreload_flag \
19931238106SdesOBJDUMP \
19932238106Sdesdeplibs_check_method \
19933238106Sdesfile_magic_cmd \
19934238106Sdesfile_magic_glob \
19935238106Sdeswant_nocaseglob \
19936238106SdesDLLTOOL \
19937238106Sdessharedlib_from_linklib_cmd \
19938238106SdesAR \
19939238106SdesAR_FLAGS \
19940238106Sdesarchiver_list_spec \
19941238106SdesSTRIP \
19942238106SdesRANLIB \
19943238106SdesCC \
19944238106SdesCFLAGS \
19945238106Sdescompiler \
19946238106Sdeslt_cv_sys_global_symbol_pipe \
19947238106Sdeslt_cv_sys_global_symbol_to_cdecl \
19948238106Sdeslt_cv_sys_global_symbol_to_c_name_address \
19949238106Sdeslt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
19950238106Sdesnm_file_list_spec \
19951238106Sdeslt_prog_compiler_no_builtin_flag \
19952238106Sdeslt_prog_compiler_pic \
19953238106Sdeslt_prog_compiler_wl \
19954238106Sdeslt_prog_compiler_static \
19955238106Sdeslt_cv_prog_compiler_c_o \
19956238106Sdesneed_locks \
19957238106SdesMANIFEST_TOOL \
19958238106SdesDSYMUTIL \
19959238106SdesNMEDIT \
19960238106SdesLIPO \
19961238106SdesOTOOL \
19962238106SdesOTOOL64 \
19963238106Sdesshrext_cmds \
19964238106Sdesexport_dynamic_flag_spec \
19965238106Sdeswhole_archive_flag_spec \
19966238106Sdescompiler_needs_object \
19967238106Sdeswith_gnu_ld \
19968238106Sdesallow_undefined_flag \
19969238106Sdesno_undefined_flag \
19970238106Sdeshardcode_libdir_flag_spec \
19971238106Sdeshardcode_libdir_separator \
19972238106Sdesexclude_expsyms \
19973238106Sdesinclude_expsyms \
19974238106Sdesfile_list_spec \
19975238106Sdesvariables_saved_for_relink \
19976238106Sdeslibname_spec \
19977238106Sdeslibrary_names_spec \
19978238106Sdessoname_spec \
19979238106Sdesinstall_override_mode \
19980238106Sdesfinish_eval \
19981238106Sdesold_striplib \
19982238106Sdesstriplib; do
19983238106Sdes    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19984238106Sdes    *[\\\\\\\`\\"\\\$]*)
19985238106Sdes      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
19986238106Sdes      ;;
19987238106Sdes    *)
19988238106Sdes      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19989238106Sdes      ;;
19990238106Sdes    esac
19991238106Sdesdone
19992238106Sdes
19993238106Sdes# Double-quote double-evaled strings.
19994238106Sdesfor var in reload_cmds \
19995238106Sdesold_postinstall_cmds \
19996238106Sdesold_postuninstall_cmds \
19997238106Sdesold_archive_cmds \
19998238106Sdesextract_expsyms_cmds \
19999238106Sdesold_archive_from_new_cmds \
20000238106Sdesold_archive_from_expsyms_cmds \
20001238106Sdesarchive_cmds \
20002238106Sdesarchive_expsym_cmds \
20003238106Sdesmodule_cmds \
20004238106Sdesmodule_expsym_cmds \
20005238106Sdesexport_symbols_cmds \
20006238106Sdesprelink_cmds \
20007238106Sdespostlink_cmds \
20008238106Sdespostinstall_cmds \
20009238106Sdespostuninstall_cmds \
20010238106Sdesfinish_cmds \
20011238106Sdessys_lib_search_path_spec \
20012238106Sdessys_lib_dlsearch_path_spec; do
20013238106Sdes    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
20014238106Sdes    *[\\\\\\\`\\"\\\$]*)
20015238106Sdes      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
20016238106Sdes      ;;
20017238106Sdes    *)
20018238106Sdes      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
20019238106Sdes      ;;
20020238106Sdes    esac
20021238106Sdesdone
20022238106Sdes
20023238106Sdesac_aux_dir='$ac_aux_dir'
20024238106Sdesxsi_shell='$xsi_shell'
20025238106Sdeslt_shell_append='$lt_shell_append'
20026238106Sdes
20027238106Sdes# See if we are running on zsh, and set the options which allow our
20028238106Sdes# commands through without removal of \ escapes INIT.
20029238106Sdesif test -n "\${ZSH_VERSION+set}" ; then
20030238106Sdes   setopt NO_GLOB_SUBST
20031238106Sdesfi
20032238106Sdes
20033238106Sdes
20034238106Sdes    PACKAGE='$PACKAGE'
20035238106Sdes    VERSION='$VERSION'
20036238106Sdes    TIMESTAMP='$TIMESTAMP'
20037238106Sdes    RM='$RM'
20038238106Sdes    ofile='$ofile'
20039238106Sdes
20040238106Sdes
20041238106Sdes
20042238106Sdes
20043238106Sdes_ACEOF
20044238106Sdes
20045238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20046238106Sdes
20047238106Sdes# Handling of arguments.
20048238106Sdesfor ac_config_target in $ac_config_targets
20049238106Sdesdo
20050238106Sdes  case $ac_config_target in
20051238106Sdes    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
20052238106Sdes    "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
20053238106Sdes    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20054238106Sdes    "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
20055238106Sdes    "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
20056238106Sdes    "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
20057238106Sdes    "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
20058238106Sdes    "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
20059238106Sdes    "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
20060238106Sdes    "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
20061285206Sdes    "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
20062255593Sdes    "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
20063285206Sdes    "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
20064238106Sdes    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20065238106Sdes
20066238106Sdes  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20067238106Sdes  esac
20068238106Sdesdone
20069238106Sdes
20070238106Sdes
20071238106Sdes# If the user did not use the arguments to specify the items to instantiate,
20072238106Sdes# then the envvar interface is used.  Set only those that are not.
20073238106Sdes# We use the long form for the default assignment because of an extremely
20074238106Sdes# bizarre bug on SunOS 4.1.3.
20075238106Sdesif $ac_need_defaults; then
20076238106Sdes  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20077238106Sdes  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20078238106Sdes  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20079238106Sdesfi
20080238106Sdes
20081238106Sdes# Have a temporary directory for convenience.  Make it in the build tree
20082238106Sdes# simply because there is no reason against having it here, and in addition,
20083238106Sdes# creating and moving files from /tmp can sometimes cause problems.
20084238106Sdes# Hook for its removal unless debugging.
20085238106Sdes# Note that there is a small window in which the directory will not be cleaned:
20086238106Sdes# after its creation but before its name has been assigned to `$tmp'.
20087238106Sdes$debug ||
20088238106Sdes{
20089238106Sdes  tmp= ac_tmp=
20090238106Sdes  trap 'exit_status=$?
20091238106Sdes  : "${ac_tmp:=$tmp}"
20092238106Sdes  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20093238106Sdes' 0
20094238106Sdes  trap 'as_fn_exit 1' 1 2 13 15
20095238106Sdes}
20096238106Sdes# Create a (secure) tmp directory for tmp files.
20097238106Sdes
20098238106Sdes{
20099238106Sdes  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20100238106Sdes  test -d "$tmp"
20101238106Sdes}  ||
20102238106Sdes{
20103238106Sdes  tmp=./conf$$-$RANDOM
20104238106Sdes  (umask 077 && mkdir "$tmp")
20105238106Sdes} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20106238106Sdesac_tmp=$tmp
20107238106Sdes
20108238106Sdes# Set up the scripts for CONFIG_FILES section.
20109238106Sdes# No need to generate them if there are no CONFIG_FILES.
20110238106Sdes# This happens for instance with `./config.status config.h'.
20111238106Sdesif test -n "$CONFIG_FILES"; then
20112238106Sdes
20113238106Sdes
20114238106Sdesac_cr=`echo X | tr X '\015'`
20115238106Sdes# On cygwin, bash can eat \r inside `` if the user requested igncr.
20116238106Sdes# But we know of no other shell where ac_cr would be empty at this
20117238106Sdes# point, so we can use a bashism as a fallback.
20118238106Sdesif test "x$ac_cr" = x; then
20119238106Sdes  eval ac_cr=\$\'\\r\'
20120238106Sdesfi
20121238106Sdesac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20122238106Sdesif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20123238106Sdes  ac_cs_awk_cr='\\r'
20124238106Sdeselse
20125238106Sdes  ac_cs_awk_cr=$ac_cr
20126238106Sdesfi
20127238106Sdes
20128238106Sdesecho 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20129238106Sdes_ACEOF
20130238106Sdes
20131238106Sdes
20132238106Sdes{
20133238106Sdes  echo "cat >conf$$subs.awk <<_ACEOF" &&
20134238106Sdes  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20135238106Sdes  echo "_ACEOF"
20136238106Sdes} >conf$$subs.sh ||
20137238106Sdes  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20138238106Sdesac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20139238106Sdesac_delim='%!_!# '
20140238106Sdesfor ac_last_try in false false false false false :; do
20141238106Sdes  . ./conf$$subs.sh ||
20142238106Sdes    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20143238106Sdes
20144238106Sdes  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20145238106Sdes  if test $ac_delim_n = $ac_delim_num; then
20146238106Sdes    break
20147238106Sdes  elif $ac_last_try; then
20148238106Sdes    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20149238106Sdes  else
20150238106Sdes    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20151238106Sdes  fi
20152238106Sdesdone
20153238106Sdesrm -f conf$$subs.sh
20154238106Sdes
20155238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20156238106Sdescat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20157238106Sdes_ACEOF
20158238106Sdessed -n '
20159238106Sdesh
20160238106Sdess/^/S["/; s/!.*/"]=/
20161238106Sdesp
20162238106Sdesg
20163238106Sdess/^[^!]*!//
20164238106Sdes:repl
20165238106Sdest repl
20166238106Sdess/'"$ac_delim"'$//
20167238106Sdest delim
20168238106Sdes:nl
20169238106Sdesh
20170238106Sdess/\(.\{148\}\)..*/\1/
20171238106Sdest more1
20172238106Sdess/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20173238106Sdesp
20174238106Sdesn
20175238106Sdesb repl
20176238106Sdes:more1
20177238106Sdess/["\\]/\\&/g; s/^/"/; s/$/"\\/
20178238106Sdesp
20179238106Sdesg
20180238106Sdess/.\{148\}//
20181238106Sdest nl
20182238106Sdes:delim
20183238106Sdesh
20184238106Sdess/\(.\{148\}\)..*/\1/
20185238106Sdest more2
20186238106Sdess/["\\]/\\&/g; s/^/"/; s/$/"/
20187238106Sdesp
20188238106Sdesb
20189238106Sdes:more2
20190238106Sdess/["\\]/\\&/g; s/^/"/; s/$/"\\/
20191238106Sdesp
20192238106Sdesg
20193238106Sdess/.\{148\}//
20194238106Sdest delim
20195238106Sdes' <conf$$subs.awk | sed '
20196238106Sdes/^[^""]/{
20197238106Sdes  N
20198238106Sdes  s/\n//
20199238106Sdes}
20200238106Sdes' >>$CONFIG_STATUS || ac_write_fail=1
20201238106Sdesrm -f conf$$subs.awk
20202238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20203238106Sdes_ACAWK
20204238106Sdescat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20205238106Sdes  for (key in S) S_is_set[key] = 1
20206238106Sdes  FS = ""
20207238106Sdes
20208238106Sdes}
20209238106Sdes{
20210238106Sdes  line = $ 0
20211238106Sdes  nfields = split(line, field, "@")
20212238106Sdes  substed = 0
20213238106Sdes  len = length(field[1])
20214238106Sdes  for (i = 2; i < nfields; i++) {
20215238106Sdes    key = field[i]
20216238106Sdes    keylen = length(key)
20217238106Sdes    if (S_is_set[key]) {
20218238106Sdes      value = S[key]
20219238106Sdes      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20220238106Sdes      len += length(value) + length(field[++i])
20221238106Sdes      substed = 1
20222238106Sdes    } else
20223238106Sdes      len += 1 + keylen
20224238106Sdes  }
20225238106Sdes
20226238106Sdes  print line
20227238106Sdes}
20228238106Sdes
20229238106Sdes_ACAWK
20230238106Sdes_ACEOF
20231238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20232238106Sdesif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20233238106Sdes  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20234238106Sdeselse
20235238106Sdes  cat
20236238106Sdesfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20237238106Sdes  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20238238106Sdes_ACEOF
20239238106Sdes
20240238106Sdes# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20241238106Sdes# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20242238106Sdes# trailing colons and then remove the whole line if VPATH becomes empty
20243238106Sdes# (actually we leave an empty line to preserve line numbers).
20244238106Sdesif test "x$srcdir" = x.; then
20245238106Sdes  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
20246238106Sdesh
20247238106Sdess///
20248238106Sdess/^/:/
20249238106Sdess/[	 ]*$/:/
20250238106Sdess/:\$(srcdir):/:/g
20251238106Sdess/:\${srcdir}:/:/g
20252238106Sdess/:@srcdir@:/:/g
20253238106Sdess/^:*//
20254238106Sdess/:*$//
20255238106Sdesx
20256238106Sdess/\(=[	 ]*\).*/\1/
20257238106SdesG
20258238106Sdess/\n//
20259238106Sdess/^[^=]*=[	 ]*$//
20260238106Sdes}'
20261238106Sdesfi
20262238106Sdes
20263238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20264238106Sdesfi # test -n "$CONFIG_FILES"
20265238106Sdes
20266238106Sdes# Set up the scripts for CONFIG_HEADERS section.
20267238106Sdes# No need to generate them if there are no CONFIG_HEADERS.
20268238106Sdes# This happens for instance with `./config.status Makefile'.
20269238106Sdesif test -n "$CONFIG_HEADERS"; then
20270238106Sdescat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20271238106SdesBEGIN {
20272238106Sdes_ACEOF
20273238106Sdes
20274238106Sdes# Transform confdefs.h into an awk script `defines.awk', embedded as
20275238106Sdes# here-document in config.status, that substitutes the proper values into
20276238106Sdes# config.h.in to produce config.h.
20277238106Sdes
20278238106Sdes# Create a delimiter string that does not exist in confdefs.h, to ease
20279238106Sdes# handling of long lines.
20280238106Sdesac_delim='%!_!# '
20281238106Sdesfor ac_last_try in false false :; do
20282238106Sdes  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20283238106Sdes  if test -z "$ac_tt"; then
20284238106Sdes    break
20285238106Sdes  elif $ac_last_try; then
20286238106Sdes    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20287238106Sdes  else
20288238106Sdes    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20289238106Sdes  fi
20290238106Sdesdone
20291238106Sdes
20292238106Sdes# For the awk script, D is an array of macro values keyed by name,
20293238106Sdes# likewise P contains macro parameters if any.  Preserve backslash
20294238106Sdes# newline sequences.
20295238106Sdes
20296238106Sdesac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20297238106Sdessed -n '
20298238106Sdess/.\{148\}/&'"$ac_delim"'/g
20299238106Sdest rset
20300238106Sdes:rset
20301238106Sdess/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20302238106Sdest def
20303238106Sdesd
20304238106Sdes:def
20305238106Sdess/\\$//
20306238106Sdest bsnl
20307238106Sdess/["\\]/\\&/g
20308238106Sdess/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20309238106SdesD["\1"]=" \3"/p
20310238106Sdess/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20311238106Sdesd
20312238106Sdes:bsnl
20313238106Sdess/["\\]/\\&/g
20314238106Sdess/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20315238106SdesD["\1"]=" \3\\\\\\n"\\/p
20316238106Sdest cont
20317238106Sdess/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20318238106Sdest cont
20319238106Sdesd
20320238106Sdes:cont
20321238106Sdesn
20322238106Sdess/.\{148\}/&'"$ac_delim"'/g
20323238106Sdest clear
20324238106Sdes:clear
20325238106Sdess/\\$//
20326238106Sdest bsnlc
20327238106Sdess/["\\]/\\&/g; s/^/"/; s/$/"/p
20328238106Sdesd
20329238106Sdes:bsnlc
20330238106Sdess/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20331238106Sdesb cont
20332238106Sdes' <confdefs.h | sed '
20333238106Sdess/'"$ac_delim"'/"\\\
20334238106Sdes"/g' >>$CONFIG_STATUS || ac_write_fail=1
20335238106Sdes
20336238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20337238106Sdes  for (key in D) D_is_set[key] = 1
20338238106Sdes  FS = ""
20339238106Sdes}
20340238106Sdes/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20341238106Sdes  line = \$ 0
20342238106Sdes  split(line, arg, " ")
20343238106Sdes  if (arg[1] == "#") {
20344238106Sdes    defundef = arg[2]
20345238106Sdes    mac1 = arg[3]
20346238106Sdes  } else {
20347238106Sdes    defundef = substr(arg[1], 2)
20348238106Sdes    mac1 = arg[2]
20349238106Sdes  }
20350238106Sdes  split(mac1, mac2, "(") #)
20351238106Sdes  macro = mac2[1]
20352238106Sdes  prefix = substr(line, 1, index(line, defundef) - 1)
20353238106Sdes  if (D_is_set[macro]) {
20354238106Sdes    # Preserve the white space surrounding the "#".
20355238106Sdes    print prefix "define", macro P[macro] D[macro]
20356238106Sdes    next
20357238106Sdes  } else {
20358238106Sdes    # Replace #undef with comments.  This is necessary, for example,
20359238106Sdes    # in the case of _POSIX_SOURCE, which is predefined and required
20360238106Sdes    # on some systems where configure will not decide to define it.
20361238106Sdes    if (defundef == "undef") {
20362238106Sdes      print "/*", prefix defundef, macro, "*/"
20363238106Sdes      next
20364238106Sdes    }
20365238106Sdes  }
20366238106Sdes}
20367238106Sdes{ print }
20368238106Sdes_ACAWK
20369238106Sdes_ACEOF
20370238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20371238106Sdes  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20372238106Sdesfi # test -n "$CONFIG_HEADERS"
20373238106Sdes
20374238106Sdes
20375238106Sdeseval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
20376238106Sdesshift
20377238106Sdesfor ac_tag
20378238106Sdesdo
20379238106Sdes  case $ac_tag in
20380238106Sdes  :[FHLC]) ac_mode=$ac_tag; continue;;
20381238106Sdes  esac
20382238106Sdes  case $ac_mode$ac_tag in
20383238106Sdes  :[FHL]*:*);;
20384238106Sdes  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20385238106Sdes  :[FH]-) ac_tag=-:-;;
20386238106Sdes  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20387238106Sdes  esac
20388238106Sdes  ac_save_IFS=$IFS
20389238106Sdes  IFS=:
20390238106Sdes  set x $ac_tag
20391238106Sdes  IFS=$ac_save_IFS
20392238106Sdes  shift
20393238106Sdes  ac_file=$1
20394238106Sdes  shift
20395238106Sdes
20396238106Sdes  case $ac_mode in
20397238106Sdes  :L) ac_source=$1;;
20398238106Sdes  :[FH])
20399238106Sdes    ac_file_inputs=
20400238106Sdes    for ac_f
20401238106Sdes    do
20402238106Sdes      case $ac_f in
20403238106Sdes      -) ac_f="$ac_tmp/stdin";;
20404238106Sdes      *) # Look for the file first in the build tree, then in the source tree
20405238106Sdes	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20406238106Sdes	 # because $ac_f cannot contain `:'.
20407238106Sdes	 test -f "$ac_f" ||
20408238106Sdes	   case $ac_f in
20409238106Sdes	   [\\/$]*) false;;
20410238106Sdes	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20411238106Sdes	   esac ||
20412238106Sdes	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20413238106Sdes      esac
20414238106Sdes      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20415238106Sdes      as_fn_append ac_file_inputs " '$ac_f'"
20416238106Sdes    done
20417238106Sdes
20418238106Sdes    # Let's still pretend it is `configure' which instantiates (i.e., don't
20419238106Sdes    # use $as_me), people would be surprised to read:
20420238106Sdes    #    /* config.h.  Generated by config.status.  */
20421238106Sdes    configure_input='Generated from '`
20422238106Sdes	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20423238106Sdes	`' by configure.'
20424238106Sdes    if test x"$ac_file" != x-; then
20425238106Sdes      configure_input="$ac_file.  $configure_input"
20426238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20427238106Sdes$as_echo "$as_me: creating $ac_file" >&6;}
20428238106Sdes    fi
20429238106Sdes    # Neutralize special characters interpreted by sed in replacement strings.
20430238106Sdes    case $configure_input in #(
20431238106Sdes    *\&* | *\|* | *\\* )
20432238106Sdes       ac_sed_conf_input=`$as_echo "$configure_input" |
20433238106Sdes       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20434238106Sdes    *) ac_sed_conf_input=$configure_input;;
20435238106Sdes    esac
20436238106Sdes
20437238106Sdes    case $ac_tag in
20438238106Sdes    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20439238106Sdes      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20440238106Sdes    esac
20441238106Sdes    ;;
20442238106Sdes  esac
20443238106Sdes
20444238106Sdes  ac_dir=`$as_dirname -- "$ac_file" ||
20445238106Sdes$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20446238106Sdes	 X"$ac_file" : 'X\(//\)[^/]' \| \
20447238106Sdes	 X"$ac_file" : 'X\(//\)$' \| \
20448238106Sdes	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20449238106Sdes$as_echo X"$ac_file" |
20450238106Sdes    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20451238106Sdes	    s//\1/
20452238106Sdes	    q
20453238106Sdes	  }
20454238106Sdes	  /^X\(\/\/\)[^/].*/{
20455238106Sdes	    s//\1/
20456238106Sdes	    q
20457238106Sdes	  }
20458238106Sdes	  /^X\(\/\/\)$/{
20459238106Sdes	    s//\1/
20460238106Sdes	    q
20461238106Sdes	  }
20462238106Sdes	  /^X\(\/\).*/{
20463238106Sdes	    s//\1/
20464238106Sdes	    q
20465238106Sdes	  }
20466238106Sdes	  s/.*/./; q'`
20467238106Sdes  as_dir="$ac_dir"; as_fn_mkdir_p
20468238106Sdes  ac_builddir=.
20469238106Sdes
20470238106Sdescase "$ac_dir" in
20471238106Sdes.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20472238106Sdes*)
20473238106Sdes  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20474238106Sdes  # A ".." for each directory in $ac_dir_suffix.
20475238106Sdes  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20476238106Sdes  case $ac_top_builddir_sub in
20477238106Sdes  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20478238106Sdes  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20479238106Sdes  esac ;;
20480238106Sdesesac
20481238106Sdesac_abs_top_builddir=$ac_pwd
20482238106Sdesac_abs_builddir=$ac_pwd$ac_dir_suffix
20483238106Sdes# for backward compatibility:
20484238106Sdesac_top_builddir=$ac_top_build_prefix
20485238106Sdes
20486238106Sdescase $srcdir in
20487238106Sdes  .)  # We are building in place.
20488238106Sdes    ac_srcdir=.
20489238106Sdes    ac_top_srcdir=$ac_top_builddir_sub
20490238106Sdes    ac_abs_top_srcdir=$ac_pwd ;;
20491238106Sdes  [\\/]* | ?:[\\/]* )  # Absolute name.
20492238106Sdes    ac_srcdir=$srcdir$ac_dir_suffix;
20493238106Sdes    ac_top_srcdir=$srcdir
20494238106Sdes    ac_abs_top_srcdir=$srcdir ;;
20495238106Sdes  *) # Relative name.
20496238106Sdes    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20497238106Sdes    ac_top_srcdir=$ac_top_build_prefix$srcdir
20498238106Sdes    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20499238106Sdesesac
20500238106Sdesac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20501238106Sdes
20502238106Sdes
20503238106Sdes  case $ac_mode in
20504238106Sdes  :F)
20505238106Sdes  #
20506238106Sdes  # CONFIG_FILE
20507238106Sdes  #
20508238106Sdes
20509238106Sdes_ACEOF
20510238106Sdes
20511238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20512238106Sdes# If the template does not know about datarootdir, expand it.
20513238106Sdes# FIXME: This hack should be removed a few years after 2.60.
20514238106Sdesac_datarootdir_hack=; ac_datarootdir_seen=
20515238106Sdesac_sed_dataroot='
20516238106Sdes/datarootdir/ {
20517238106Sdes  p
20518238106Sdes  q
20519238106Sdes}
20520238106Sdes/@datadir@/p
20521238106Sdes/@docdir@/p
20522238106Sdes/@infodir@/p
20523238106Sdes/@localedir@/p
20524238106Sdes/@mandir@/p'
20525238106Sdescase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20526238106Sdes*datarootdir*) ac_datarootdir_seen=yes;;
20527238106Sdes*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20528238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20529238106Sdes$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20530238106Sdes_ACEOF
20531238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20532238106Sdes  ac_datarootdir_hack='
20533238106Sdes  s&@datadir@&$datadir&g
20534238106Sdes  s&@docdir@&$docdir&g
20535238106Sdes  s&@infodir@&$infodir&g
20536238106Sdes  s&@localedir@&$localedir&g
20537238106Sdes  s&@mandir@&$mandir&g
20538238106Sdes  s&\\\${datarootdir}&$datarootdir&g' ;;
20539238106Sdesesac
20540238106Sdes_ACEOF
20541238106Sdes
20542238106Sdes# Neutralize VPATH when `$srcdir' = `.'.
20543238106Sdes# Shell code in configure.ac might set extrasub.
20544238106Sdes# FIXME: do we really want to maintain this feature?
20545238106Sdescat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20546238106Sdesac_sed_extra="$ac_vpsub
20547238106Sdes$extrasub
20548238106Sdes_ACEOF
20549238106Sdescat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20550238106Sdes:t
20551238106Sdes/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20552238106Sdess|@configure_input@|$ac_sed_conf_input|;t t
20553238106Sdess&@top_builddir@&$ac_top_builddir_sub&;t t
20554238106Sdess&@top_build_prefix@&$ac_top_build_prefix&;t t
20555238106Sdess&@srcdir@&$ac_srcdir&;t t
20556238106Sdess&@abs_srcdir@&$ac_abs_srcdir&;t t
20557238106Sdess&@top_srcdir@&$ac_top_srcdir&;t t
20558238106Sdess&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20559238106Sdess&@builddir@&$ac_builddir&;t t
20560238106Sdess&@abs_builddir@&$ac_abs_builddir&;t t
20561238106Sdess&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20562238106Sdes$ac_datarootdir_hack
20563238106Sdes"
20564238106Sdeseval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20565238106Sdes  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20566238106Sdes
20567238106Sdestest -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20568238106Sdes  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20569238106Sdes  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
20570238106Sdes      "$ac_tmp/out"`; test -z "$ac_out"; } &&
20571238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20572238106Sdeswhich seems to be undefined.  Please make sure it is defined" >&5
20573238106Sdes$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20574238106Sdeswhich seems to be undefined.  Please make sure it is defined" >&2;}
20575238106Sdes
20576238106Sdes  rm -f "$ac_tmp/stdin"
20577238106Sdes  case $ac_file in
20578238106Sdes  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20579238106Sdes  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20580238106Sdes  esac \
20581238106Sdes  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20582238106Sdes ;;
20583238106Sdes  :H)
20584238106Sdes  #
20585238106Sdes  # CONFIG_HEADER
20586238106Sdes  #
20587238106Sdes  if test x"$ac_file" != x-; then
20588238106Sdes    {
20589238106Sdes      $as_echo "/* $configure_input  */" \
20590238106Sdes      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20591238106Sdes    } >"$ac_tmp/config.h" \
20592238106Sdes      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20593238106Sdes    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20594238106Sdes      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20595238106Sdes$as_echo "$as_me: $ac_file is unchanged" >&6;}
20596238106Sdes    else
20597238106Sdes      rm -f "$ac_file"
20598238106Sdes      mv "$ac_tmp/config.h" "$ac_file" \
20599238106Sdes	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
20600238106Sdes    fi
20601238106Sdes  else
20602238106Sdes    $as_echo "/* $configure_input  */" \
20603238106Sdes      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20604238106Sdes      || as_fn_error $? "could not create -" "$LINENO" 5
20605238106Sdes  fi
20606238106Sdes ;;
20607238106Sdes
20608238106Sdes  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20609238106Sdes$as_echo "$as_me: executing $ac_file commands" >&6;}
20610238106Sdes ;;
20611238106Sdes  esac
20612238106Sdes
20613238106Sdes
20614238106Sdes  case $ac_file$ac_mode in
20615238106Sdes    "libtool":C)
20616238106Sdes
20617238106Sdes    # See if we are running on zsh, and set the options which allow our
20618238106Sdes    # commands through without removal of \ escapes.
20619238106Sdes    if test -n "${ZSH_VERSION+set}" ; then
20620238106Sdes      setopt NO_GLOB_SUBST
20621238106Sdes    fi
20622238106Sdes
20623238106Sdes    cfgfile="${ofile}T"
20624238106Sdes    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
20625238106Sdes    $RM "$cfgfile"
20626238106Sdes
20627238106Sdes    cat <<_LT_EOF >> "$cfgfile"
20628238106Sdes#! $SHELL
20629238106Sdes
20630238106Sdes# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
20631238106Sdes# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
20632238106Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
20633238106Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh.
20634238106Sdes#
20635238106Sdes#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
20636249141Sdes#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
20637249141Sdes#                 Foundation, Inc.
20638238106Sdes#   Written by Gordon Matzigkeit, 1996
20639238106Sdes#
20640238106Sdes#   This file is part of GNU Libtool.
20641238106Sdes#
20642238106Sdes# GNU Libtool is free software; you can redistribute it and/or
20643238106Sdes# modify it under the terms of the GNU General Public License as
20644238106Sdes# published by the Free Software Foundation; either version 2 of
20645238106Sdes# the License, or (at your option) any later version.
20646238106Sdes#
20647238106Sdes# As a special exception to the GNU General Public License,
20648238106Sdes# if you distribute this file as part of a program or library that
20649238106Sdes# is built using GNU Libtool, you may include this file under the
20650238106Sdes# same distribution terms that you use for the rest of that program.
20651238106Sdes#
20652238106Sdes# GNU Libtool is distributed in the hope that it will be useful,
20653238106Sdes# but WITHOUT ANY WARRANTY; without even the implied warranty of
20654238106Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20655238106Sdes# GNU General Public License for more details.
20656238106Sdes#
20657238106Sdes# You should have received a copy of the GNU General Public License
20658238106Sdes# along with GNU Libtool; see the file COPYING.  If not, a copy
20659238106Sdes# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
20660238106Sdes# obtained by writing to the Free Software Foundation, Inc.,
20661238106Sdes# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20662238106Sdes
20663238106Sdes
20664238106Sdes# The names of the tagged configurations supported by this script.
20665238106Sdesavailable_tags=""
20666238106Sdes
20667238106Sdes# ### BEGIN LIBTOOL CONFIG
20668238106Sdes
20669238106Sdes# Which release of libtool.m4 was used?
20670238106Sdesmacro_version=$macro_version
20671238106Sdesmacro_revision=$macro_revision
20672238106Sdes
20673238106Sdes# Whether or not to build shared libraries.
20674238106Sdesbuild_libtool_libs=$enable_shared
20675238106Sdes
20676238106Sdes# Whether or not to build static libraries.
20677238106Sdesbuild_old_libs=$enable_static
20678238106Sdes
20679238106Sdes# What type of objects to build.
20680238106Sdespic_mode=$pic_mode
20681238106Sdes
20682238106Sdes# Whether or not to optimize for fast installation.
20683238106Sdesfast_install=$enable_fast_install
20684238106Sdes
20685238106Sdes# Shell to use when invoking shell scripts.
20686238106SdesSHELL=$lt_SHELL
20687238106Sdes
20688238106Sdes# An echo program that protects backslashes.
20689238106SdesECHO=$lt_ECHO
20690238106Sdes
20691249141Sdes# The PATH separator for the build system.
20692249141SdesPATH_SEPARATOR=$lt_PATH_SEPARATOR
20693249141Sdes
20694238106Sdes# The host system.
20695238106Sdeshost_alias=$host_alias
20696238106Sdeshost=$host
20697238106Sdeshost_os=$host_os
20698238106Sdes
20699238106Sdes# The build system.
20700238106Sdesbuild_alias=$build_alias
20701238106Sdesbuild=$build
20702238106Sdesbuild_os=$build_os
20703238106Sdes
20704238106Sdes# A sed program that does not truncate output.
20705238106SdesSED=$lt_SED
20706238106Sdes
20707238106Sdes# Sed that helps us avoid accidentally triggering echo(1) options like -n.
20708238106SdesXsed="\$SED -e 1s/^X//"
20709238106Sdes
20710238106Sdes# A grep program that handles long lines.
20711238106SdesGREP=$lt_GREP
20712238106Sdes
20713238106Sdes# An ERE matcher.
20714238106SdesEGREP=$lt_EGREP
20715238106Sdes
20716238106Sdes# A literal string matcher.
20717238106SdesFGREP=$lt_FGREP
20718238106Sdes
20719238106Sdes# A BSD- or MS-compatible name lister.
20720238106SdesNM=$lt_NM
20721238106Sdes
20722238106Sdes# Whether we need soft or hard links.
20723238106SdesLN_S=$lt_LN_S
20724238106Sdes
20725238106Sdes# What is the maximum length of a command?
20726238106Sdesmax_cmd_len=$max_cmd_len
20727238106Sdes
20728238106Sdes# Object file suffix (normally "o").
20729238106Sdesobjext=$ac_objext
20730238106Sdes
20731238106Sdes# Executable file suffix (normally "").
20732238106Sdesexeext=$exeext
20733238106Sdes
20734238106Sdes# whether the shell understands "unset".
20735238106Sdeslt_unset=$lt_unset
20736238106Sdes
20737238106Sdes# turn spaces into newlines.
20738238106SdesSP2NL=$lt_lt_SP2NL
20739238106Sdes
20740238106Sdes# turn newlines into spaces.
20741238106SdesNL2SP=$lt_lt_NL2SP
20742238106Sdes
20743238106Sdes# convert \$build file names to \$host format.
20744238106Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd
20745238106Sdes
20746238106Sdes# convert \$build files to toolchain format.
20747238106Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd
20748238106Sdes
20749238106Sdes# An object symbol dumper.
20750238106SdesOBJDUMP=$lt_OBJDUMP
20751238106Sdes
20752238106Sdes# Method to check whether dependent libraries are shared objects.
20753238106Sdesdeplibs_check_method=$lt_deplibs_check_method
20754238106Sdes
20755238106Sdes# Command to use when deplibs_check_method = "file_magic".
20756238106Sdesfile_magic_cmd=$lt_file_magic_cmd
20757238106Sdes
20758238106Sdes# How to find potential files when deplibs_check_method = "file_magic".
20759238106Sdesfile_magic_glob=$lt_file_magic_glob
20760238106Sdes
20761238106Sdes# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
20762238106Sdeswant_nocaseglob=$lt_want_nocaseglob
20763238106Sdes
20764238106Sdes# DLL creation program.
20765238106SdesDLLTOOL=$lt_DLLTOOL
20766238106Sdes
20767238106Sdes# Command to associate shared and link libraries.
20768238106Sdessharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
20769238106Sdes
20770238106Sdes# The archiver.
20771238106SdesAR=$lt_AR
20772238106Sdes
20773238106Sdes# Flags to create an archive.
20774238106SdesAR_FLAGS=$lt_AR_FLAGS
20775238106Sdes
20776238106Sdes# How to feed a file listing to the archiver.
20777238106Sdesarchiver_list_spec=$lt_archiver_list_spec
20778238106Sdes
20779238106Sdes# A symbol stripping program.
20780238106SdesSTRIP=$lt_STRIP
20781238106Sdes
20782238106Sdes# Commands used to install an old-style archive.
20783238106SdesRANLIB=$lt_RANLIB
20784238106Sdesold_postinstall_cmds=$lt_old_postinstall_cmds
20785238106Sdesold_postuninstall_cmds=$lt_old_postuninstall_cmds
20786238106Sdes
20787238106Sdes# Whether to use a lock for old archive extraction.
20788238106Sdeslock_old_archive_extraction=$lock_old_archive_extraction
20789238106Sdes
20790238106Sdes# A C compiler.
20791238106SdesLTCC=$lt_CC
20792238106Sdes
20793238106Sdes# LTCC compiler flags.
20794238106SdesLTCFLAGS=$lt_CFLAGS
20795238106Sdes
20796238106Sdes# Take the output of nm and produce a listing of raw symbols and C names.
20797238106Sdesglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
20798238106Sdes
20799238106Sdes# Transform the output of nm in a proper C declaration.
20800238106Sdesglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
20801238106Sdes
20802238106Sdes# Transform the output of nm in a C name address pair.
20803238106Sdesglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
20804238106Sdes
20805238106Sdes# Transform the output of nm in a C name address pair when lib prefix is needed.
20806238106Sdesglobal_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
20807238106Sdes
20808238106Sdes# Specify filename containing input files for \$NM.
20809238106Sdesnm_file_list_spec=$lt_nm_file_list_spec
20810238106Sdes
20811238106Sdes# The root where to search for dependent libraries,and in which our libraries should be installed.
20812238106Sdeslt_sysroot=$lt_sysroot
20813238106Sdes
20814238106Sdes# The name of the directory that contains temporary libtool files.
20815238106Sdesobjdir=$objdir
20816238106Sdes
20817238106Sdes# Used to examine libraries when file_magic_cmd begins with "file".
20818238106SdesMAGIC_CMD=$MAGIC_CMD
20819238106Sdes
20820238106Sdes# Must we lock files when doing compilation?
20821238106Sdesneed_locks=$lt_need_locks
20822238106Sdes
20823238106Sdes# Manifest tool.
20824238106SdesMANIFEST_TOOL=$lt_MANIFEST_TOOL
20825238106Sdes
20826238106Sdes# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
20827238106SdesDSYMUTIL=$lt_DSYMUTIL
20828238106Sdes
20829238106Sdes# Tool to change global to local symbols on Mac OS X.
20830238106SdesNMEDIT=$lt_NMEDIT
20831238106Sdes
20832238106Sdes# Tool to manipulate fat objects and archives on Mac OS X.
20833238106SdesLIPO=$lt_LIPO
20834238106Sdes
20835238106Sdes# ldd/readelf like tool for Mach-O binaries on Mac OS X.
20836238106SdesOTOOL=$lt_OTOOL
20837238106Sdes
20838238106Sdes# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
20839238106SdesOTOOL64=$lt_OTOOL64
20840238106Sdes
20841238106Sdes# Old archive suffix (normally "a").
20842238106Sdeslibext=$libext
20843238106Sdes
20844238106Sdes# Shared library suffix (normally ".so").
20845238106Sdesshrext_cmds=$lt_shrext_cmds
20846238106Sdes
20847238106Sdes# The commands to extract the exported symbol list from a shared archive.
20848238106Sdesextract_expsyms_cmds=$lt_extract_expsyms_cmds
20849238106Sdes
20850238106Sdes# Variables whose values should be saved in libtool wrapper scripts and
20851238106Sdes# restored at link time.
20852238106Sdesvariables_saved_for_relink=$lt_variables_saved_for_relink
20853238106Sdes
20854238106Sdes# Do we need the "lib" prefix for modules?
20855238106Sdesneed_lib_prefix=$need_lib_prefix
20856238106Sdes
20857238106Sdes# Do we need a version for libraries?
20858238106Sdesneed_version=$need_version
20859238106Sdes
20860238106Sdes# Library versioning type.
20861238106Sdesversion_type=$version_type
20862238106Sdes
20863238106Sdes# Shared library runtime path variable.
20864238106Sdesrunpath_var=$runpath_var
20865238106Sdes
20866238106Sdes# Shared library path variable.
20867238106Sdesshlibpath_var=$shlibpath_var
20868238106Sdes
20869238106Sdes# Is shlibpath searched before the hard-coded library search path?
20870238106Sdesshlibpath_overrides_runpath=$shlibpath_overrides_runpath
20871238106Sdes
20872238106Sdes# Format of library name prefix.
20873238106Sdeslibname_spec=$lt_libname_spec
20874238106Sdes
20875238106Sdes# List of archive names.  First name is the real one, the rest are links.
20876238106Sdes# The last name is the one that the linker finds with -lNAME
20877238106Sdeslibrary_names_spec=$lt_library_names_spec
20878238106Sdes
20879238106Sdes# The coded name of the library, if different from the real name.
20880238106Sdessoname_spec=$lt_soname_spec
20881238106Sdes
20882238106Sdes# Permission mode override for installation of shared libraries.
20883238106Sdesinstall_override_mode=$lt_install_override_mode
20884238106Sdes
20885238106Sdes# Command to use after installation of a shared archive.
20886238106Sdespostinstall_cmds=$lt_postinstall_cmds
20887238106Sdes
20888238106Sdes# Command to use after uninstallation of a shared archive.
20889238106Sdespostuninstall_cmds=$lt_postuninstall_cmds
20890238106Sdes
20891238106Sdes# Commands used to finish a libtool library installation in a directory.
20892238106Sdesfinish_cmds=$lt_finish_cmds
20893238106Sdes
20894238106Sdes# As "finish_cmds", except a single script fragment to be evaled but
20895238106Sdes# not shown.
20896238106Sdesfinish_eval=$lt_finish_eval
20897238106Sdes
20898238106Sdes# Whether we should hardcode library paths into libraries.
20899238106Sdeshardcode_into_libs=$hardcode_into_libs
20900238106Sdes
20901238106Sdes# Compile-time system search path for libraries.
20902238106Sdessys_lib_search_path_spec=$lt_sys_lib_search_path_spec
20903238106Sdes
20904238106Sdes# Run-time system search path for libraries.
20905238106Sdessys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
20906238106Sdes
20907238106Sdes# Whether dlopen is supported.
20908238106Sdesdlopen_support=$enable_dlopen
20909238106Sdes
20910238106Sdes# Whether dlopen of programs is supported.
20911238106Sdesdlopen_self=$enable_dlopen_self
20912238106Sdes
20913238106Sdes# Whether dlopen of statically linked programs is supported.
20914238106Sdesdlopen_self_static=$enable_dlopen_self_static
20915238106Sdes
20916238106Sdes# Commands to strip libraries.
20917238106Sdesold_striplib=$lt_old_striplib
20918238106Sdesstriplib=$lt_striplib
20919238106Sdes
20920238106Sdes
20921238106Sdes# The linker used to build libraries.
20922238106SdesLD=$lt_LD
20923238106Sdes
20924238106Sdes# How to create reloadable object files.
20925238106Sdesreload_flag=$lt_reload_flag
20926238106Sdesreload_cmds=$lt_reload_cmds
20927238106Sdes
20928238106Sdes# Commands used to build an old-style archive.
20929238106Sdesold_archive_cmds=$lt_old_archive_cmds
20930238106Sdes
20931238106Sdes# A language specific compiler.
20932238106SdesCC=$lt_compiler
20933238106Sdes
20934238106Sdes# Is the compiler the GNU compiler?
20935238106Sdeswith_gcc=$GCC
20936238106Sdes
20937238106Sdes# Compiler flag to turn off builtin functions.
20938238106Sdesno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
20939238106Sdes
20940238106Sdes# Additional compiler flags for building library objects.
20941238106Sdespic_flag=$lt_lt_prog_compiler_pic
20942238106Sdes
20943238106Sdes# How to pass a linker flag through the compiler.
20944238106Sdeswl=$lt_lt_prog_compiler_wl
20945238106Sdes
20946238106Sdes# Compiler flag to prevent dynamic linking.
20947238106Sdeslink_static_flag=$lt_lt_prog_compiler_static
20948238106Sdes
20949238106Sdes# Does compiler simultaneously support -c and -o options?
20950238106Sdescompiler_c_o=$lt_lt_cv_prog_compiler_c_o
20951238106Sdes
20952238106Sdes# Whether or not to add -lc for building shared libraries.
20953238106Sdesbuild_libtool_need_lc=$archive_cmds_need_lc
20954238106Sdes
20955238106Sdes# Whether or not to disallow shared libs when runtime libs are static.
20956238106Sdesallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
20957238106Sdes
20958238106Sdes# Compiler flag to allow reflexive dlopens.
20959238106Sdesexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec
20960238106Sdes
20961238106Sdes# Compiler flag to generate shared objects directly from archives.
20962238106Sdeswhole_archive_flag_spec=$lt_whole_archive_flag_spec
20963238106Sdes
20964238106Sdes# Whether the compiler copes with passing no objects directly.
20965238106Sdescompiler_needs_object=$lt_compiler_needs_object
20966238106Sdes
20967238106Sdes# Create an old-style archive from a shared archive.
20968238106Sdesold_archive_from_new_cmds=$lt_old_archive_from_new_cmds
20969238106Sdes
20970238106Sdes# Create a temporary old-style archive to link instead of a shared archive.
20971238106Sdesold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
20972238106Sdes
20973238106Sdes# Commands used to build a shared archive.
20974238106Sdesarchive_cmds=$lt_archive_cmds
20975238106Sdesarchive_expsym_cmds=$lt_archive_expsym_cmds
20976238106Sdes
20977238106Sdes# Commands used to build a loadable module if different from building
20978238106Sdes# a shared archive.
20979238106Sdesmodule_cmds=$lt_module_cmds
20980238106Sdesmodule_expsym_cmds=$lt_module_expsym_cmds
20981238106Sdes
20982238106Sdes# Whether we are building with GNU ld or not.
20983238106Sdeswith_gnu_ld=$lt_with_gnu_ld
20984238106Sdes
20985238106Sdes# Flag that allows shared libraries with undefined symbols to be built.
20986238106Sdesallow_undefined_flag=$lt_allow_undefined_flag
20987238106Sdes
20988238106Sdes# Flag that enforces no undefined symbols.
20989238106Sdesno_undefined_flag=$lt_no_undefined_flag
20990238106Sdes
20991238106Sdes# Flag to hardcode \$libdir into a binary during linking.
20992238106Sdes# This must work even if \$libdir does not exist
20993238106Sdeshardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
20994238106Sdes
20995238106Sdes# Whether we need a single "-rpath" flag with a separated argument.
20996238106Sdeshardcode_libdir_separator=$lt_hardcode_libdir_separator
20997238106Sdes
20998238106Sdes# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
20999238106Sdes# DIR into the resulting binary.
21000238106Sdeshardcode_direct=$hardcode_direct
21001238106Sdes
21002238106Sdes# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
21003238106Sdes# DIR into the resulting binary and the resulting library dependency is
21004238106Sdes# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
21005238106Sdes# library is relocated.
21006238106Sdeshardcode_direct_absolute=$hardcode_direct_absolute
21007238106Sdes
21008238106Sdes# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
21009238106Sdes# into the resulting binary.
21010238106Sdeshardcode_minus_L=$hardcode_minus_L
21011238106Sdes
21012238106Sdes# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
21013238106Sdes# into the resulting binary.
21014238106Sdeshardcode_shlibpath_var=$hardcode_shlibpath_var
21015238106Sdes
21016238106Sdes# Set to "yes" if building a shared library automatically hardcodes DIR
21017238106Sdes# into the library and all subsequent libraries and executables linked
21018238106Sdes# against it.
21019238106Sdeshardcode_automatic=$hardcode_automatic
21020238106Sdes
21021238106Sdes# Set to yes if linker adds runtime paths of dependent libraries
21022238106Sdes# to runtime path list.
21023238106Sdesinherit_rpath=$inherit_rpath
21024238106Sdes
21025238106Sdes# Whether libtool must link a program against all its dependency libraries.
21026238106Sdeslink_all_deplibs=$link_all_deplibs
21027238106Sdes
21028238106Sdes# Set to "yes" if exported symbols are required.
21029238106Sdesalways_export_symbols=$always_export_symbols
21030238106Sdes
21031238106Sdes# The commands to list exported symbols.
21032238106Sdesexport_symbols_cmds=$lt_export_symbols_cmds
21033238106Sdes
21034238106Sdes# Symbols that should not be listed in the preloaded symbols.
21035238106Sdesexclude_expsyms=$lt_exclude_expsyms
21036238106Sdes
21037238106Sdes# Symbols that must always be exported.
21038238106Sdesinclude_expsyms=$lt_include_expsyms
21039238106Sdes
21040238106Sdes# Commands necessary for linking programs (against libraries) with templates.
21041238106Sdesprelink_cmds=$lt_prelink_cmds
21042238106Sdes
21043238106Sdes# Commands necessary for finishing linking programs.
21044238106Sdespostlink_cmds=$lt_postlink_cmds
21045238106Sdes
21046238106Sdes# Specify filename containing input files.
21047238106Sdesfile_list_spec=$lt_file_list_spec
21048238106Sdes
21049238106Sdes# How to hardcode a shared library path into an executable.
21050238106Sdeshardcode_action=$hardcode_action
21051238106Sdes
21052238106Sdes# ### END LIBTOOL CONFIG
21053238106Sdes
21054238106Sdes_LT_EOF
21055238106Sdes
21056238106Sdes  case $host_os in
21057238106Sdes  aix3*)
21058238106Sdes    cat <<\_LT_EOF >> "$cfgfile"
21059238106Sdes# AIX sometimes has problems with the GCC collect2 program.  For some
21060238106Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems
21061238106Sdes# vanish in a puff of smoke.
21062238106Sdesif test "X${COLLECT_NAMES+set}" != Xset; then
21063238106Sdes  COLLECT_NAMES=
21064238106Sdes  export COLLECT_NAMES
21065238106Sdesfi
21066238106Sdes_LT_EOF
21067238106Sdes    ;;
21068238106Sdes  esac
21069238106Sdes
21070238106Sdes
21071238106Sdesltmain="$ac_aux_dir/ltmain.sh"
21072238106Sdes
21073238106Sdes
21074238106Sdes  # We use sed instead of cat because bash on DJGPP gets confused if
21075238106Sdes  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
21076238106Sdes  # text mode, it properly converts lines to CR/LF.  This bash problem
21077238106Sdes  # is reportedly fixed, but why not run on old versions too?
21078238106Sdes  sed '$q' "$ltmain" >> "$cfgfile" \
21079238106Sdes     || (rm -f "$cfgfile"; exit 1)
21080238106Sdes
21081238106Sdes  if test x"$xsi_shell" = xyes; then
21082238106Sdes  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
21083238106Sdesfunc_dirname ()\
21084238106Sdes{\
21085238106Sdes\    case ${1} in\
21086238106Sdes\      */*) func_dirname_result="${1%/*}${2}" ;;\
21087238106Sdes\      *  ) func_dirname_result="${3}" ;;\
21088238106Sdes\    esac\
21089238106Sdes} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
21090238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21091238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21092238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21093238106Sdes
21094238106Sdes
21095238106Sdes  sed -e '/^func_basename ()$/,/^} # func_basename /c\
21096238106Sdesfunc_basename ()\
21097238106Sdes{\
21098238106Sdes\    func_basename_result="${1##*/}"\
21099238106Sdes} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
21100238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21101238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21102238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21103238106Sdes
21104238106Sdes
21105238106Sdes  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
21106238106Sdesfunc_dirname_and_basename ()\
21107238106Sdes{\
21108238106Sdes\    case ${1} in\
21109238106Sdes\      */*) func_dirname_result="${1%/*}${2}" ;;\
21110238106Sdes\      *  ) func_dirname_result="${3}" ;;\
21111238106Sdes\    esac\
21112238106Sdes\    func_basename_result="${1##*/}"\
21113238106Sdes} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
21114238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21115238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21116238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21117238106Sdes
21118238106Sdes
21119238106Sdes  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
21120238106Sdesfunc_stripname ()\
21121238106Sdes{\
21122238106Sdes\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
21123238106Sdes\    # positional parameters, so assign one to ordinary parameter first.\
21124238106Sdes\    func_stripname_result=${3}\
21125238106Sdes\    func_stripname_result=${func_stripname_result#"${1}"}\
21126238106Sdes\    func_stripname_result=${func_stripname_result%"${2}"}\
21127238106Sdes} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
21128238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21129238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21130238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21131238106Sdes
21132238106Sdes
21133238106Sdes  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
21134238106Sdesfunc_split_long_opt ()\
21135238106Sdes{\
21136238106Sdes\    func_split_long_opt_name=${1%%=*}\
21137238106Sdes\    func_split_long_opt_arg=${1#*=}\
21138238106Sdes} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
21139238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21140238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21141238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21142238106Sdes
21143238106Sdes
21144238106Sdes  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
21145238106Sdesfunc_split_short_opt ()\
21146238106Sdes{\
21147238106Sdes\    func_split_short_opt_arg=${1#??}\
21148238106Sdes\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
21149238106Sdes} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
21150238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21151238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21152238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21153238106Sdes
21154238106Sdes
21155238106Sdes  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
21156238106Sdesfunc_lo2o ()\
21157238106Sdes{\
21158238106Sdes\    case ${1} in\
21159238106Sdes\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
21160238106Sdes\      *)    func_lo2o_result=${1} ;;\
21161238106Sdes\    esac\
21162238106Sdes} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
21163238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21164238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21165238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21166238106Sdes
21167238106Sdes
21168238106Sdes  sed -e '/^func_xform ()$/,/^} # func_xform /c\
21169238106Sdesfunc_xform ()\
21170238106Sdes{\
21171238106Sdes    func_xform_result=${1%.*}.lo\
21172238106Sdes} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
21173238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21174238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21175238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21176238106Sdes
21177238106Sdes
21178238106Sdes  sed -e '/^func_arith ()$/,/^} # func_arith /c\
21179238106Sdesfunc_arith ()\
21180238106Sdes{\
21181238106Sdes    func_arith_result=$(( $* ))\
21182238106Sdes} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
21183238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21184238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21185238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21186238106Sdes
21187238106Sdes
21188238106Sdes  sed -e '/^func_len ()$/,/^} # func_len /c\
21189238106Sdesfunc_len ()\
21190238106Sdes{\
21191238106Sdes    func_len_result=${#1}\
21192238106Sdes} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
21193238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21194238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21195238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21196238106Sdes
21197238106Sdesfi
21198238106Sdes
21199238106Sdesif test x"$lt_shell_append" = xyes; then
21200238106Sdes  sed -e '/^func_append ()$/,/^} # func_append /c\
21201238106Sdesfunc_append ()\
21202238106Sdes{\
21203238106Sdes    eval "${1}+=\\${2}"\
21204238106Sdes} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
21205238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21206238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21207238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21208238106Sdes
21209238106Sdes
21210238106Sdes  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
21211238106Sdesfunc_append_quoted ()\
21212238106Sdes{\
21213238106Sdes\    func_quote_for_eval "${2}"\
21214238106Sdes\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
21215238106Sdes} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
21216238106Sdes  && mv -f "$cfgfile.tmp" "$cfgfile" \
21217238106Sdes    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21218238106Sdestest 0 -eq $? || _lt_function_replace_fail=:
21219238106Sdes
21220238106Sdes
21221238106Sdes  # Save a `func_append' function call where possible by direct use of '+='
21222238106Sdes  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
21223238106Sdes    && mv -f "$cfgfile.tmp" "$cfgfile" \
21224238106Sdes      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21225238106Sdes  test 0 -eq $? || _lt_function_replace_fail=:
21226238106Sdeselse
21227238106Sdes  # Save a `func_append' function call even when '+=' is not available
21228238106Sdes  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
21229238106Sdes    && mv -f "$cfgfile.tmp" "$cfgfile" \
21230238106Sdes      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
21231238106Sdes  test 0 -eq $? || _lt_function_replace_fail=:
21232238106Sdesfi
21233238106Sdes
21234238106Sdesif test x"$_lt_function_replace_fail" = x":"; then
21235238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
21236238106Sdes$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
21237238106Sdesfi
21238238106Sdes
21239238106Sdes
21240238106Sdes   mv -f "$cfgfile" "$ofile" ||
21241238106Sdes    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
21242238106Sdes  chmod +x "$ofile"
21243238106Sdes
21244238106Sdes ;;
21245238106Sdes    "disable-rpath":C)
21246238106Sdes	sed < libtool > libtool-2 \
21247238106Sdes	's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
21248238106Sdes	mv libtool-2 libtool
21249238106Sdes	chmod 755 libtool
21250238106Sdes	libtool="./libtool"
21251238106Sdes	 ;;
21252238106Sdes
21253238106Sdes  esac
21254238106Sdesdone # for ac_tag
21255238106Sdes
21256238106Sdes
21257238106Sdesas_fn_exit 0
21258238106Sdes_ACEOF
21259238106Sdesac_clean_files=$ac_clean_files_save
21260238106Sdes
21261238106Sdestest $ac_write_fail = 0 ||
21262238106Sdes  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21263238106Sdes
21264238106Sdes
21265238106Sdes# configure is writing to config.log, and then calls config.status.
21266238106Sdes# config.status does its own redirection, appending to config.log.
21267238106Sdes# Unfortunately, on DOS this fails, as config.log is still kept open
21268238106Sdes# by configure, so config.status won't be able to write to it; its
21269238106Sdes# output is simply discarded.  So we exec the FD to /dev/null,
21270238106Sdes# effectively closing config.log, so it can be properly (re)opened and
21271238106Sdes# appended to by config.status.  When coming back to configure, we
21272238106Sdes# need to make the FD available again.
21273238106Sdesif test "$no_create" != yes; then
21274238106Sdes  ac_cs_success=:
21275238106Sdes  ac_config_status_args=
21276238106Sdes  test "$silent" = yes &&
21277238106Sdes    ac_config_status_args="$ac_config_status_args --quiet"
21278238106Sdes  exec 5>/dev/null
21279238106Sdes  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21280238106Sdes  exec 5>>config.log
21281238106Sdes  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21282238106Sdes  # would make configure fail if this is the last instruction.
21283238106Sdes  $ac_cs_success || as_fn_exit 1
21284238106Sdesfi
21285238106Sdesif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21286238106Sdes  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21287238106Sdes$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21288238106Sdesfi
21289238106Sdes
21290