]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
b686ecb5
JM
199test \$(( 1 + 1 )) = 2 || exit 1
200
201 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
202 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
203 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
205 PATH=/empty FPATH=/empty; export PATH FPATH
206 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
207 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
81ecdfbb
RW
208 if (eval "$as_required") 2>/dev/null; then :
209 as_have_required=yes
210else
211 as_have_required=no
212fi
213 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 219do
81ecdfbb
RW
220 IFS=$as_save_IFS
221 test -z "$as_dir" && as_dir=.
222 as_found=:
223 case $as_dir in #(
224 /*)
225 for as_base in sh bash ksh sh5; do
226 # Try only shells that exist, to save several forks.
227 as_shell=$as_dir/$as_base
228 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230 CONFIG_SHELL=$as_shell as_have_required=yes
231 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232 break 2
233fi
234fi
235 done;;
236 esac
237 as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241 CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
247 export CONFIG_SHELL
248 # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256 *v*x* | *x*v* ) as_opts=-vx ;;
257 *v* ) as_opts=-v ;;
258 *x* ) as_opts=-x ;;
259 * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
81ecdfbb
RW
266fi
267
268 if test x$as_have_required = xno; then :
269 $as_echo "$0: This script requires a shell more modern than all"
270 $as_echo "$0: the shells that I found on your system."
271 if test x${ZSH_VERSION+set} = xset ; then
272 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 274 else
81ecdfbb
RW
275 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
276$0: including any error possibly output before this
277$0: message. Then install a modern shell, or manually run
278$0: the script under such a shell if you do have one."
bec39cab 279 fi
81ecdfbb
RW
280 exit 1
281fi
282fi
283fi
284SHELL=${CONFIG_SHELL-/bin/sh}
285export SHELL
286# Unset more variables known to interfere with behavior of common tools.
287CLICOLOR_FORCE= GREP_OPTIONS=
288unset CLICOLOR_FORCE GREP_OPTIONS
289
290## --------------------- ##
291## M4sh Shell Functions. ##
292## --------------------- ##
293# as_fn_unset VAR
294# ---------------
295# Portably unset VAR.
296as_fn_unset ()
297{
298 { eval $1=; unset $1;}
299}
300as_unset=as_fn_unset
301
302# as_fn_set_status STATUS
303# -----------------------
304# Set $? to STATUS, without forking.
305as_fn_set_status ()
306{
307 return $1
308} # as_fn_set_status
bec39cab 309
81ecdfbb
RW
310# as_fn_exit STATUS
311# -----------------
312# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
313as_fn_exit ()
314{
315 set +e
316 as_fn_set_status $1
317 exit $1
318} # as_fn_exit
319
320# as_fn_mkdir_p
321# -------------
322# Create "$as_dir" as a directory, including parents if necessary.
323as_fn_mkdir_p ()
324{
325
326 case $as_dir in #(
327 -*) as_dir=./$as_dir;;
328 esac
329 test -d "$as_dir" || eval $as_mkdir_p || {
330 as_dirs=
331 while :; do
332 case $as_dir in #(
333 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
334 *) as_qdir=$as_dir;;
335 esac
336 as_dirs="'$as_qdir' $as_dirs"
337 as_dir=`$as_dirname -- "$as_dir" ||
338$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
339 X"$as_dir" : 'X\(//\)[^/]' \| \
340 X"$as_dir" : 'X\(//\)$' \| \
341 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
342$as_echo X"$as_dir" |
343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)[^/].*/{
348 s//\1/
349 q
350 }
351 /^X\(\/\/\)$/{
352 s//\1/
353 q
354 }
355 /^X\(\/\).*/{
356 s//\1/
357 q
358 }
359 s/.*/./; q'`
360 test -d "$as_dir" && break
361 done
362 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 363 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
364
365
366} # as_fn_mkdir_p
d0ac1c44
SM
367
368# as_fn_executable_p FILE
369# -----------------------
370# Test if FILE is an executable regular file.
371as_fn_executable_p ()
372{
373 test -f "$1" && test -x "$1"
374} # as_fn_executable_p
81ecdfbb
RW
375# as_fn_append VAR VALUE
376# ----------------------
377# Append the text in VALUE to the end of the definition contained in VAR. Take
378# advantage of any shell optimizations that allow amortized linear growth over
379# repeated appends, instead of the typical quadratic growth present in naive
380# implementations.
381if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
382 eval 'as_fn_append ()
383 {
384 eval $1+=\$2
385 }'
386else
387 as_fn_append ()
388 {
389 eval $1=\$$1\$2
390 }
391fi # as_fn_append
392
393# as_fn_arith ARG...
394# ------------------
395# Perform arithmetic evaluation on the ARGs, and store the result in the
396# global $as_val. Take advantage of shells that can avoid forks. The arguments
397# must be portable across $(()) and expr.
398if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
399 eval 'as_fn_arith ()
400 {
401 as_val=$(( $* ))
402 }'
403else
404 as_fn_arith ()
405 {
406 as_val=`expr "$@" || test $? -eq 1`
407 }
408fi # as_fn_arith
409
410
d0ac1c44
SM
411# as_fn_error STATUS ERROR [LINENO LOG_FD]
412# ----------------------------------------
81ecdfbb
RW
413# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
414# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 415# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
416as_fn_error ()
417{
d0ac1c44
SM
418 as_status=$1; test $as_status -eq 0 && as_status=1
419 if test "$4"; then
420 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
421 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 422 fi
d0ac1c44 423 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
424 as_fn_exit $as_status
425} # as_fn_error
426
427if expr a : '\(a\)' >/dev/null 2>&1 &&
428 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
429 as_expr=expr
430else
431 as_expr=false
432fi
433
81ecdfbb 434if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
435 as_basename=basename
436else
437 as_basename=false
438fi
439
81ecdfbb
RW
440if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441 as_dirname=dirname
442else
443 as_dirname=false
444fi
bec39cab 445
81ecdfbb 446as_me=`$as_basename -- "$0" ||
bec39cab
AC
447$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
448 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
449 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
450$as_echo X/"$0" |
451 sed '/^.*\/\([^/][^/]*\)\/*$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\/\)$/{
456 s//\1/
457 q
458 }
459 /^X\/\(\/\).*/{
460 s//\1/
461 q
462 }
463 s/.*/./; q'`
bec39cab 464
b4e70030
JB
465# Avoid depending upon Character Ranges.
466as_cr_letters='abcdefghijklmnopqrstuvwxyz'
467as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
468as_cr_Letters=$as_cr_letters$as_cr_LETTERS
469as_cr_digits='0123456789'
470as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 471
bec39cab 472
81ecdfbb
RW
473 as_lineno_1=$LINENO as_lineno_1a=$LINENO
474 as_lineno_2=$LINENO as_lineno_2a=$LINENO
475 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
476 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
477 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
478 sed -n '
479 p
480 /[$]LINENO/=
481 ' <$as_myself |
bec39cab 482 sed '
81ecdfbb
RW
483 s/[$]LINENO.*/&-/
484 t lineno
485 b
486 :lineno
bec39cab 487 N
81ecdfbb
RW
488 :loop
489 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 490 t loop
81ecdfbb 491 s/-\n.*//
bec39cab 492 ' >$as_me.lineno &&
81ecdfbb
RW
493 chmod +x "$as_me.lineno" ||
494 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 495
d0ac1c44
SM
496 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
497 # already done that, so ensure we don't try to do so again and fall
498 # in an infinite loop. This has already happened in practice.
499 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
500 # Don't try to exec as it changes $[0], causing all sort of problems
501 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
502 # original and so on. Autoconf is especially sensitive to this).
503 . "./$as_me.lineno"
bec39cab
AC
504 # Exit status is that of the last command.
505 exit
506}
507
81ecdfbb
RW
508ECHO_C= ECHO_N= ECHO_T=
509case `echo -n x` in #(((((
510-n*)
511 case `echo 'xy\c'` in
512 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
513 xy) ECHO_C='\c';;
514 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
515 ECHO_T=' ';;
516 esac;;
517*)
518 ECHO_N='-n';;
bec39cab
AC
519esac
520
81ecdfbb
RW
521rm -f conf$$ conf$$.exe conf$$.file
522if test -d conf$$.dir; then
523 rm -f conf$$.dir/conf$$.file
bec39cab 524else
81ecdfbb
RW
525 rm -f conf$$.dir
526 mkdir conf$$.dir 2>/dev/null
bec39cab 527fi
81ecdfbb
RW
528if (echo >conf$$.file) 2>/dev/null; then
529 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 530 as_ln_s='ln -s'
81ecdfbb
RW
531 # ... but there are two gotchas:
532 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
533 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 534 # In both cases, we have to default to `cp -pR'.
81ecdfbb 535 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 536 as_ln_s='cp -pR'
81ecdfbb
RW
537 elif ln conf$$.file conf$$ 2>/dev/null; then
538 as_ln_s=ln
539 else
d0ac1c44 540 as_ln_s='cp -pR'
b4e70030 541 fi
bec39cab 542else
d0ac1c44 543 as_ln_s='cp -pR'
bec39cab 544fi
81ecdfbb
RW
545rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
546rmdir conf$$.dir 2>/dev/null
bec39cab
AC
547
548if mkdir -p . 2>/dev/null; then
81ecdfbb 549 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
550else
551 test -d ./-p && rmdir ./-p
552 as_mkdir_p=false
553fi
554
d0ac1c44
SM
555as_test_x='test -x'
556as_executable_p=as_fn_executable_p
bec39cab
AC
557
558# Sed expression to map a string onto a valid CPP name.
559as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
560
561# Sed expression to map a string onto a valid variable name.
562as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
563
b686ecb5
JM
564SHELL=${CONFIG_SHELL-/bin/sh}
565
bec39cab 566
d0ac1c44
SM
567test -n "$DJDIR" || exec 7<&0 </dev/null
568exec 6>&1
c906108c 569
bec39cab 570# Name of the host.
d0ac1c44 571# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
572# so uname gets run too.
573ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
574
bec39cab
AC
575#
576# Initializations.
577#
c906108c 578ac_default_prefix=/usr/local
81ecdfbb 579ac_clean_files=
bec39cab 580ac_config_libobj_dir=.
81ecdfbb 581LIBOBJS=
bec39cab
AC
582cross_compiling=no
583subdirs=
584MFLAGS=
585MAKEFLAGS=
b4e70030 586
bec39cab
AC
587# Identity of this package.
588PACKAGE_NAME=
589PACKAGE_TARNAME=
590PACKAGE_VERSION=
591PACKAGE_STRING=
592PACKAGE_BUGREPORT=
81ecdfbb 593PACKAGE_URL=
bec39cab
AC
594
595ac_unique_file="main.c"
596# Factoring default headers for most tests.
597ac_includes_default="\
598#include <stdio.h>
81ecdfbb 599#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
600# include <sys/types.h>
601#endif
81ecdfbb 602#ifdef HAVE_SYS_STAT_H
bec39cab
AC
603# include <sys/stat.h>
604#endif
81ecdfbb 605#ifdef STDC_HEADERS
bec39cab
AC
606# include <stdlib.h>
607# include <stddef.h>
608#else
81ecdfbb 609# ifdef HAVE_STDLIB_H
bec39cab
AC
610# include <stdlib.h>
611# endif
612#endif
81ecdfbb
RW
613#ifdef HAVE_STRING_H
614# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
615# include <memory.h>
616# endif
617# include <string.h>
618#endif
81ecdfbb 619#ifdef HAVE_STRINGS_H
bec39cab
AC
620# include <strings.h>
621#endif
81ecdfbb 622#ifdef HAVE_INTTYPES_H
bec39cab 623# include <inttypes.h>
bec39cab 624#endif
81ecdfbb
RW
625#ifdef HAVE_STDINT_H
626# include <stdint.h>
627#endif
628#ifdef HAVE_UNISTD_H
bec39cab
AC
629# include <unistd.h>
630#endif"
631
d5835df2 632ac_header_list=
862776f2 633gt_needs=
f99d1d37 634enable_option_checking=no
c971b7fa 635ac_subst_vars='LTLIBOBJS
81ecdfbb 636LIBOBJS
b292c783
JK
637GCORE_TRANSFORM_NAME
638GDB_TRANSFORM_NAME
e3487908 639XSLTPROC
a0a461e5 640NM_H
81ecdfbb 641GDB_NM_FILE
1776e3e5
NA
642CTF_DEPS
643LIBCTF
393fd4c3
YQ
644LTLIBBABELTRACE
645LIBBABELTRACE
646HAVE_LIBBABELTRACE
abbbd4a3
AB
647LIBBACKTRACE_LIB
648LIBBACKTRACE_INC
21ea5acd
SDJ
649HAVE_NATIVE_GCORE_HOST
650NAT_GENERATED_FILES
651XM_CLIBS
652MH_CFLAGS
653LOADLIBES
654NAT_CDEPS
655NATDEPFILES
656NAT_FILE
81ecdfbb
RW
657target_subdir
658CONFIG_UNINSTALL
659CONFIG_INSTALL
660CONFIG_CLEAN
661CONFIG_ALL
662CONFIG_SRCS
663CONFIG_DEPS
664CONFIG_OBS
665PROFILE_CFLAGS
666ENABLE_CFLAGS
667SIM_OBS
668SIM
669XMKMF
670GDBTK_SRC_DIR
671GDBTK_CFLAGS
672GDBTKLIBS
673X_LIBS
674X_LDFLAGS
675X_CFLAGS
676TK_XINCLUDES
677TK_DEPS
678TK_LIBRARY
679TK_INCLUDE
680TK_STUB_LIB_SPEC
681TK_STUB_LIB_FLAG
682TK_STUB_LIB_FILE
683TK_LIB_SPEC
684TK_LIB_FLAG
685TK_LIB_FILE
686TK_SRC_DIR
687TK_BIN_DIR
688TK_VERSION
689TCL_DEPS
690TCL_LIBRARY
691TCL_INCLUDE
692TCL_STUB_LIB_SPEC
693TCL_STUB_LIB_FLAG
694TCL_STUB_LIB_FILE
695TCL_LIB_SPEC
696TCL_LIB_FLAG
697TCL_LIB_FILE
698TCL_SRC_DIR
699TCL_BIN_DIR
700TCL_PATCH_LEVEL
701TCL_VERSION
702WIN32LDAPP
b2ceabe8 703WIN32LIBS
81ecdfbb
RW
704GUI_CFLAGS_X
705LIBGUI
608e2dbb
TT
706LTLIBLZMA
707LIBLZMA
708HAVE_LIBLZMA
81ecdfbb
RW
709SER_HARDWIRE
710WERROR_CFLAGS
711WARN_CFLAGS
ed2a2229 712SYSTEM_GDBINIT_DIR
81ecdfbb 713SYSTEM_GDBINIT
81ecdfbb
RW
714TARGET_SYSTEM_ROOT
715CONFIG_LDFLAGS
f6528abd 716RDYNAMIC
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
99118062
AP
732GMPINC
733GMPLIBS
81ecdfbb
RW
734LTLIBEXPAT
735LIBEXPAT
736HAVE_LIBEXPAT
b8e0a31c 737JIT_READER_DIR
f997c383 738TARGET_PTR
14d0e681 739READLINE_DOC_SOURCE_INCLUDES
39037522 740READLINE_TEXI_INCFLAG
81ecdfbb
RW
741READLINE_CFLAGS
742READLINE_DEPS
743READLINE
2cac01e3
FS
744ZSTD_LIBS
745ZSTD_CFLAGS
711a72d3
L
746zlibinc
747zlibdir
81ecdfbb
RW
748MIG
749WINDRES
750DLLTOOL
81ecdfbb
RW
751YFLAGS
752YACC
81ecdfbb
RW
753REPORT_BUGS_TEXI
754REPORT_BUGS_TO
755PKGVERSION
44cee4fd 756CODESIGN_CERT
f6720b1c
AM
757DEBUGINFOD_LIBS
758DEBUGINFOD_CFLAGS
b292c783 759HAVE_NATIVE_GCORE_TARGET
81ecdfbb 760TARGET_OBS
18b4d073
SM
761AMD_DBGAPI_LIBS
762AMD_DBGAPI_CFLAGS
fb2ded33 763HAVE_GSTACK
a100a945 764subdirs
81ecdfbb
RW
765GDB_DATADIR
766DEBUGDIR
5048e516
JK
767MAKEINFO_EXTRA_FLAGS
768MAKEINFOFLAGS
769MAKEINFO
81ecdfbb 770PACKAGE
81ecdfbb
RW
771CATOBJEXT
772GENCAT
773INSTOBJEXT
774DATADIRNAME
775CATALOGS
81ecdfbb 776INCINTL
56f39033 777LIBINTL_DEP
862776f2
AA
778POSUB
779LTLIBINTL
81ecdfbb 780LIBINTL
862776f2
AA
781INTLLIBS
782LTLIBICONV
783LIBICONV
784INTL_MACOSX_LIBS
785MSGMERGE
786XGETTEXT
787GMSGFMT
788MSGFMT
81ecdfbb 789USE_NLS
862776f2
AA
790MKINSTALLDIRS
791INSTALL_DATA
792INSTALL_SCRIPT
793INSTALL_PROGRAM
794SET_MAKE
18b4d073
SM
795PKG_CONFIG_LIBDIR
796PKG_CONFIG_PATH
797PKG_CONFIG
81ecdfbb
RW
798CCDEPMODE
799DEPDIR
800am__leading_dot
d5835df2
TV
801LTLIBXXHASH
802LIBXXHASH
803HAVE_LIBXXHASH
804LTLIBIPT
805LIBIPT
806HAVE_LIBIPT
807PTHREAD_CFLAGS
808PTHREAD_LIBS
809PTHREAD_CC
810ax_pthread_config
811ALLOCA
0bcda685 812CXX_DIALECT
f74dc267 813HAVE_CXX17
b686ecb5
JM
814CXXCPP
815OTOOL64
816OTOOL
817LIPO
818NMEDIT
819DSYMUTIL
820AWK
821RANLIB
822AR
823OBJDUMP
824LN_S
825NM
826ac_ct_DUMPBIN
827DUMPBIN
828LD
829FGREP
830SED
831LIBTOOL
b316465f 832target_noncanonical
4869db5e
RM
833INSTALL_STRIP_PROGRAM
834STRIP
835install_sh
c8693053 836LARGEFILE_CPPFLAGS
81ecdfbb
RW
837target_os
838target_vendor
839target_cpu
840target
841host_os
842host_vendor
843host_cpu
844host
845build_os
846build_vendor
847build_cpu
848build
c971b7fa
PA
849EGREP
850GREP
851CPP
3bc3d82a
PA
852ac_ct_CXX
853CXXFLAGS
854CXX
81ecdfbb
RW
855OBJEXT
856EXEEXT
857ac_ct_CC
858CPPFLAGS
859LDFLAGS
860CFLAGS
861CC
862MAINT
863MAINTAINER_MODE_FALSE
864MAINTAINER_MODE_TRUE
865target_alias
866host_alias
867build_alias
868LIBS
869ECHO_T
870ECHO_N
871ECHO_C
872DEFS
873mandir
874localedir
875libdir
876psdir
877pdfdir
878dvidir
879htmldir
880infodir
881docdir
882oldincludedir
883includedir
884localstatedir
885sharedstatedir
886sysconfdir
887datadir
888datarootdir
889libexecdir
890sbindir
891bindir
892program_transform_name
893prefix
894exec_prefix
895PACKAGE_URL
896PACKAGE_BUGREPORT
897PACKAGE_STRING
898PACKAGE_VERSION
899PACKAGE_TARNAME
900PACKAGE_NAME
901PATH_SEPARATOR
902SHELL'
2b351b19 903ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
904ac_user_opts='
905enable_option_checking
906enable_maintainer_mode
da2f07f1
JK
907enable_plugins
908enable_largefile
b686ecb5
JM
909enable_shared
910enable_static
911with_pic
912enable_fast_install
913with_gnu_ld
914enable_libtool_lock
d5835df2
TV
915enable_threading
916with_intel_pt
862776f2 917enable_rpath
d5835df2
TV
918with_libipt_prefix
919with_libipt_type
920with_xxhash
921with_libxxhash_prefix
922with_libxxhash_type
923enable_nls
862776f2
AA
924with_libiconv_prefix
925with_libiconv_type
926with_libintl_prefix
927with_libintl_type
81ecdfbb 928with_separate_debug_dir
740ce350 929with_additional_debug_dirs
81ecdfbb
RW
930with_gdb_datadir
931with_relocated_sources
7349ff92 932with_auto_load_dir
bccbefd2 933with_auto_load_safe_path
81ecdfbb 934enable_targets
5cbfbe42 935enable_gdb_mdebug_support
4b42385c 936enable_gdb_dwarf_support
18b4d073 937with_amd_dbgapi
81ecdfbb
RW
938enable_tui
939enable_gdbtk
0d79cdc4 940with_debuginfod
05e7c244 941with_libunwind_ia64
81ecdfbb
RW
942with_curses
943enable_profiling
44cee4fd 944enable_codesign
81ecdfbb
RW
945with_pkgversion
946with_bugurl
711a72d3 947with_system_zlib
2cac01e3 948with_zstd
478aac75 949with_iconv_bin
81ecdfbb 950with_system_readline
b8e0a31c 951with_jit_reader_dir
81ecdfbb 952with_expat
81ecdfbb 953with_libexpat_prefix
9f1528a1 954with_libexpat_type
81ecdfbb 955with_python
d13c7322 956with_python_libdir
ed3ef339 957with_guile
c4375bc5 958enable_gdb_compile
189b8c2e 959enable_source_highlight
81ecdfbb
RW
960with_sysroot
961with_system_gdbinit
ed2a2229 962with_system_gdbinit_dir
81ecdfbb
RW
963enable_werror
964enable_build_warnings
965enable_gdb_build_warnings
f35d5ade 966enable_ubsan
608e2dbb
TT
967with_lzma
968with_liblzma_prefix
9f1528a1 969with_liblzma_type
81ecdfbb
RW
970with_tcl
971with_tk
972with_x
973enable_sim
abbbd4a3 974enable_libbacktrace
393fd4c3
YQ
975with_babeltrace
976with_libbabeltrace_prefix
9f1528a1 977with_libbabeltrace_type
1776e3e5 978enable_libctf
8ecfd7bd 979enable_unit_tests
81ecdfbb
RW
980'
981 ac_precious_vars='build_alias
982host_alias
983target_alias
984CC
985CFLAGS
986LDFLAGS
987LIBS
988CPPFLAGS
3bc3d82a
PA
989CXX
990CXXFLAGS
991CCC
81ecdfbb 992CPP
b686ecb5 993CXXCPP
f6720b1c
AM
994PKG_CONFIG
995PKG_CONFIG_PATH
996PKG_CONFIG_LIBDIR
18b4d073
SM
997MAKEINFO
998MAKEINFOFLAGS
999AMD_DBGAPI_CFLAGS
1000AMD_DBGAPI_LIBS
f6720b1c
AM
1001DEBUGINFOD_CFLAGS
1002DEBUGINFOD_LIBS
81ecdfbb
RW
1003YACC
1004YFLAGS
2cac01e3
FS
1005ZSTD_CFLAGS
1006ZSTD_LIBS
99118062
AP
1007GMPLIBS
1008GMPINC
81ecdfbb 1009XMKMF'
a100a945
SM
1010ac_subdirs_all='testsuite
1011gdbtk'
c906108c
SS
1012
1013# Initialize some variables set by options.
bec39cab
AC
1014ac_init_help=
1015ac_init_version=false
81ecdfbb
RW
1016ac_unrecognized_opts=
1017ac_unrecognized_sep=
c906108c
SS
1018# The variables have the same names as the options, with
1019# dashes changed to underlines.
bec39cab 1020cache_file=/dev/null
c906108c 1021exec_prefix=NONE
c906108c 1022no_create=
c906108c
SS
1023no_recursion=
1024prefix=NONE
1025program_prefix=NONE
1026program_suffix=NONE
1027program_transform_name=s,x,x,
1028silent=
1029site=
1030srcdir=
c906108c
SS
1031verbose=
1032x_includes=NONE
1033x_libraries=NONE
bec39cab
AC
1034
1035# Installation directory options.
1036# These are left unexpanded so users can "make install exec_prefix=/foo"
1037# and all the variables that are supposed to be based on exec_prefix
1038# by default will actually change.
1039# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 1040# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
1041bindir='${exec_prefix}/bin'
1042sbindir='${exec_prefix}/sbin'
1043libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
1044datarootdir='${prefix}/share'
1045datadir='${datarootdir}'
c906108c
SS
1046sysconfdir='${prefix}/etc'
1047sharedstatedir='${prefix}/com'
1048localstatedir='${prefix}/var'
c906108c
SS
1049includedir='${prefix}/include'
1050oldincludedir='/usr/include'
81ecdfbb
RW
1051docdir='${datarootdir}/doc/${PACKAGE}'
1052infodir='${datarootdir}/info'
1053htmldir='${docdir}'
1054dvidir='${docdir}'
1055pdfdir='${docdir}'
1056psdir='${docdir}'
1057libdir='${exec_prefix}/lib'
1058localedir='${datarootdir}/locale'
1059mandir='${datarootdir}/man'
c906108c 1060
c906108c 1061ac_prev=
81ecdfbb 1062ac_dashdash=
c906108c
SS
1063for ac_option
1064do
c906108c
SS
1065 # If the previous option needs an argument, assign it.
1066 if test -n "$ac_prev"; then
81ecdfbb 1067 eval $ac_prev=\$ac_option
c906108c
SS
1068 ac_prev=
1069 continue
1070 fi
1071
81ecdfbb 1072 case $ac_option in
d0ac1c44
SM
1073 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1074 *=) ac_optarg= ;;
1075 *) ac_optarg=yes ;;
81ecdfbb 1076 esac
c906108c
SS
1077
1078 # Accept the important Cygnus configure options, so we can diagnose typos.
1079
81ecdfbb
RW
1080 case $ac_dashdash$ac_option in
1081 --)
1082 ac_dashdash=yes ;;
c906108c
SS
1083
1084 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1085 ac_prev=bindir ;;
1086 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1087 bindir=$ac_optarg ;;
c906108c
SS
1088
1089 -build | --build | --buil | --bui | --bu)
bec39cab 1090 ac_prev=build_alias ;;
c906108c 1091 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1092 build_alias=$ac_optarg ;;
c906108c
SS
1093
1094 -cache-file | --cache-file | --cache-fil | --cache-fi \
1095 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1096 ac_prev=cache_file ;;
1097 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1098 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1099 cache_file=$ac_optarg ;;
1100
1101 --config-cache | -C)
1102 cache_file=config.cache ;;
c906108c 1103
81ecdfbb 1104 -datadir | --datadir | --datadi | --datad)
c906108c 1105 ac_prev=datadir ;;
81ecdfbb 1106 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1107 datadir=$ac_optarg ;;
c906108c 1108
81ecdfbb
RW
1109 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1110 | --dataroo | --dataro | --datar)
1111 ac_prev=datarootdir ;;
1112 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1113 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1114 datarootdir=$ac_optarg ;;
1115
c906108c 1116 -disable-* | --disable-*)
81ecdfbb 1117 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1118 # Reject names that are not valid shell variable names.
81ecdfbb 1119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1120 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"enable_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval enable_$ac_useropt=no ;;
1131
1132 -docdir | --docdir | --docdi | --doc | --do)
1133 ac_prev=docdir ;;
1134 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1135 docdir=$ac_optarg ;;
1136
1137 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1138 ac_prev=dvidir ;;
1139 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1140 dvidir=$ac_optarg ;;
c906108c
SS
1141
1142 -enable-* | --enable-*)
81ecdfbb 1143 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1144 # Reject names that are not valid shell variable names.
81ecdfbb 1145 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1146 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1147 ac_useropt_orig=$ac_useropt
1148 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1149 case $ac_user_opts in
1150 *"
1151"enable_$ac_useropt"
1152"*) ;;
1153 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1154 ac_unrecognized_sep=', ';;
b4e70030 1155 esac
81ecdfbb 1156 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1157
1158 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1159 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1160 | --exec | --exe | --ex)
1161 ac_prev=exec_prefix ;;
1162 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1163 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1164 | --exec=* | --exe=* | --ex=*)
bec39cab 1165 exec_prefix=$ac_optarg ;;
c906108c
SS
1166
1167 -gas | --gas | --ga | --g)
1168 # Obsolete; use --with-gas.
1169 with_gas=yes ;;
1170
bec39cab
AC
1171 -help | --help | --hel | --he | -h)
1172 ac_init_help=long ;;
1173 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1174 ac_init_help=recursive ;;
1175 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1176 ac_init_help=short ;;
c906108c
SS
1177
1178 -host | --host | --hos | --ho)
bec39cab 1179 ac_prev=host_alias ;;
c906108c 1180 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1181 host_alias=$ac_optarg ;;
c906108c 1182
81ecdfbb
RW
1183 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1184 ac_prev=htmldir ;;
1185 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1186 | --ht=*)
1187 htmldir=$ac_optarg ;;
1188
c906108c
SS
1189 -includedir | --includedir | --includedi | --included | --include \
1190 | --includ | --inclu | --incl | --inc)
1191 ac_prev=includedir ;;
1192 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1193 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1194 includedir=$ac_optarg ;;
c906108c
SS
1195
1196 -infodir | --infodir | --infodi | --infod | --info | --inf)
1197 ac_prev=infodir ;;
1198 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1199 infodir=$ac_optarg ;;
c906108c
SS
1200
1201 -libdir | --libdir | --libdi | --libd)
1202 ac_prev=libdir ;;
1203 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1204 libdir=$ac_optarg ;;
c906108c
SS
1205
1206 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1207 | --libexe | --libex | --libe)
1208 ac_prev=libexecdir ;;
1209 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1210 | --libexe=* | --libex=* | --libe=*)
bec39cab 1211 libexecdir=$ac_optarg ;;
c906108c 1212
81ecdfbb
RW
1213 -localedir | --localedir | --localedi | --localed | --locale)
1214 ac_prev=localedir ;;
1215 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1216 localedir=$ac_optarg ;;
1217
c906108c 1218 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1219 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1220 ac_prev=localstatedir ;;
1221 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1222 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1223 localstatedir=$ac_optarg ;;
c906108c
SS
1224
1225 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1226 ac_prev=mandir ;;
1227 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1228 mandir=$ac_optarg ;;
c906108c
SS
1229
1230 -nfp | --nfp | --nf)
1231 # Obsolete; use --without-fp.
1232 with_fp=no ;;
1233
1234 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1235 | --no-cr | --no-c | -n)
c906108c
SS
1236 no_create=yes ;;
1237
1238 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1239 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1240 no_recursion=yes ;;
1241
1242 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1243 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1244 | --oldin | --oldi | --old | --ol | --o)
1245 ac_prev=oldincludedir ;;
1246 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1247 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1248 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1249 oldincludedir=$ac_optarg ;;
c906108c
SS
1250
1251 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1252 ac_prev=prefix ;;
1253 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1254 prefix=$ac_optarg ;;
c906108c
SS
1255
1256 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1257 | --program-pre | --program-pr | --program-p)
1258 ac_prev=program_prefix ;;
1259 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1260 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1261 program_prefix=$ac_optarg ;;
c906108c
SS
1262
1263 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1264 | --program-suf | --program-su | --program-s)
1265 ac_prev=program_suffix ;;
1266 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1267 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1268 program_suffix=$ac_optarg ;;
c906108c
SS
1269
1270 -program-transform-name | --program-transform-name \
1271 | --program-transform-nam | --program-transform-na \
1272 | --program-transform-n | --program-transform- \
1273 | --program-transform | --program-transfor \
1274 | --program-transfo | --program-transf \
1275 | --program-trans | --program-tran \
1276 | --progr-tra | --program-tr | --program-t)
1277 ac_prev=program_transform_name ;;
1278 -program-transform-name=* | --program-transform-name=* \
1279 | --program-transform-nam=* | --program-transform-na=* \
1280 | --program-transform-n=* | --program-transform-=* \
1281 | --program-transform=* | --program-transfor=* \
1282 | --program-transfo=* | --program-transf=* \
1283 | --program-trans=* | --program-tran=* \
1284 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1285 program_transform_name=$ac_optarg ;;
c906108c 1286
81ecdfbb
RW
1287 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1288 ac_prev=pdfdir ;;
1289 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1290 pdfdir=$ac_optarg ;;
1291
1292 -psdir | --psdir | --psdi | --psd | --ps)
1293 ac_prev=psdir ;;
1294 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1295 psdir=$ac_optarg ;;
1296
c906108c
SS
1297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1298 | -silent | --silent | --silen | --sile | --sil)
1299 silent=yes ;;
1300
1301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1302 ac_prev=sbindir ;;
1303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1304 | --sbi=* | --sb=*)
bec39cab 1305 sbindir=$ac_optarg ;;
c906108c
SS
1306
1307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1309 | --sharedst | --shareds | --shared | --share | --shar \
1310 | --sha | --sh)
1311 ac_prev=sharedstatedir ;;
1312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1315 | --sha=* | --sh=*)
bec39cab 1316 sharedstatedir=$ac_optarg ;;
c906108c
SS
1317
1318 -site | --site | --sit)
1319 ac_prev=site ;;
1320 -site=* | --site=* | --sit=*)
bec39cab 1321 site=$ac_optarg ;;
3ace7edb 1322
c906108c
SS
1323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1324 ac_prev=srcdir ;;
1325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1326 srcdir=$ac_optarg ;;
c906108c
SS
1327
1328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1329 | --syscon | --sysco | --sysc | --sys | --sy)
1330 ac_prev=sysconfdir ;;
1331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1333 sysconfdir=$ac_optarg ;;
c906108c
SS
1334
1335 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1336 ac_prev=target_alias ;;
c906108c 1337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1338 target_alias=$ac_optarg ;;
c906108c
SS
1339
1340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1341 verbose=yes ;;
1342
bec39cab
AC
1343 -version | --version | --versio | --versi | --vers | -V)
1344 ac_init_version=: ;;
c906108c
SS
1345
1346 -with-* | --with-*)
81ecdfbb 1347 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1348 # Reject names that are not valid shell variable names.
81ecdfbb 1349 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1350 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1351 ac_useropt_orig=$ac_useropt
1352 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1353 case $ac_user_opts in
1354 *"
1355"with_$ac_useropt"
1356"*) ;;
1357 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1358 ac_unrecognized_sep=', ';;
b4e70030 1359 esac
81ecdfbb 1360 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1361
1362 -without-* | --without-*)
81ecdfbb 1363 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1364 # Reject names that are not valid shell variable names.
81ecdfbb 1365 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1366 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1367 ac_useropt_orig=$ac_useropt
1368 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369 case $ac_user_opts in
1370 *"
1371"with_$ac_useropt"
1372"*) ;;
1373 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1374 ac_unrecognized_sep=', ';;
1375 esac
1376 eval with_$ac_useropt=no ;;
c906108c
SS
1377
1378 --x)
1379 # Obsolete; use --with-x.
1380 with_x=yes ;;
1381
1382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1383 | --x-incl | --x-inc | --x-in | --x-i)
1384 ac_prev=x_includes ;;
1385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1387 x_includes=$ac_optarg ;;
c906108c
SS
1388
1389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1391 ac_prev=x_libraries ;;
1392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1394 x_libraries=$ac_optarg ;;
c906108c 1395
d0ac1c44
SM
1396 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1397Try \`$0 --help' for more information"
c906108c
SS
1398 ;;
1399
bec39cab
AC
1400 *=*)
1401 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1402 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1403 case $ac_envvar in #(
1404 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1405 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1406 esac
1407 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1408 export $ac_envvar ;;
1409
c906108c 1410 *)
bec39cab 1411 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1412 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1413 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1414 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1415 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1416 ;;
1417
1418 esac
1419done
1420
1421if test -n "$ac_prev"; then
bec39cab 1422 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1423 as_fn_error $? "missing argument to $ac_option"
c906108c 1424fi
c906108c 1425
81ecdfbb
RW
1426if test -n "$ac_unrecognized_opts"; then
1427 case $enable_option_checking in
1428 no) ;;
d0ac1c44 1429 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1430 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1431 esac
81ecdfbb 1432fi
b4e70030 1433
81ecdfbb
RW
1434# Check all directory arguments for consistency.
1435for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1436 datadir sysconfdir sharedstatedir localstatedir includedir \
1437 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1438 libdir localedir mandir
b4e70030 1439do
81ecdfbb
RW
1440 eval ac_val=\$$ac_var
1441 # Remove trailing slashes.
1442 case $ac_val in
1443 */ )
1444 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1445 eval $ac_var=\$ac_val;;
1446 esac
1447 # Be sure to have absolute directory names.
b4e70030 1448 case $ac_val in
81ecdfbb
RW
1449 [\\/$]* | ?:[\\/]* ) continue;;
1450 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1451 esac
d0ac1c44 1452 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1453done
1454
bec39cab
AC
1455# There might be people who depend on the old broken behavior: `$host'
1456# used to hold the argument of --host etc.
1457# FIXME: To remove some day.
1458build=$build_alias
1459host=$host_alias
1460target=$target_alias
1461
1462# FIXME: To remove some day.
1463if test "x$host_alias" != x; then
1464 if test "x$build_alias" = x; then
1465 cross_compiling=maybe
bec39cab
AC
1466 elif test "x$build_alias" != "x$host_alias"; then
1467 cross_compiling=yes
1468 fi
1469fi
c906108c 1470
bec39cab
AC
1471ac_tool_prefix=
1472test -n "$host_alias" && ac_tool_prefix=$host_alias-
1473
1474test "$silent" = yes && exec 6>/dev/null
c906108c 1475
c906108c 1476
81ecdfbb
RW
1477ac_pwd=`pwd` && test -n "$ac_pwd" &&
1478ac_ls_di=`ls -di .` &&
1479ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1480 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1481test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1482 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1483
1484
c906108c
SS
1485# Find the source files, if location was not specified.
1486if test -z "$srcdir"; then
1487 ac_srcdir_defaulted=yes
81ecdfbb
RW
1488 # Try the directory containing this script, then the parent directory.
1489 ac_confdir=`$as_dirname -- "$as_myself" ||
1490$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1491 X"$as_myself" : 'X\(//\)[^/]' \| \
1492 X"$as_myself" : 'X\(//\)$' \| \
1493 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1494$as_echo X"$as_myself" |
1495 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1496 s//\1/
1497 q
1498 }
1499 /^X\(\/\/\)[^/].*/{
1500 s//\1/
1501 q
1502 }
1503 /^X\(\/\/\)$/{
1504 s//\1/
1505 q
1506 }
1507 /^X\(\/\).*/{
1508 s//\1/
1509 q
1510 }
1511 s/.*/./; q'`
c906108c 1512 srcdir=$ac_confdir
81ecdfbb 1513 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1514 srcdir=..
1515 fi
1516else
1517 ac_srcdir_defaulted=no
1518fi
81ecdfbb
RW
1519if test ! -r "$srcdir/$ac_unique_file"; then
1520 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1521 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1522fi
1523ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1524ac_abs_confdir=`(
d0ac1c44 1525 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1526 pwd)`
1527# When building in place, set srcdir=.
1528if test "$ac_abs_confdir" = "$ac_pwd"; then
1529 srcdir=.
1530fi
1531# Remove unnecessary trailing slashes from srcdir.
1532# Double slashes in file names in object file debugging info
1533# mess up M-x gdb in Emacs.
1534case $srcdir in
1535*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1536esac
1537for ac_var in $ac_precious_vars; do
1538 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1539 eval ac_env_${ac_var}_value=\$${ac_var}
1540 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1541 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1542done
c906108c 1543
bec39cab
AC
1544#
1545# Report the --help message.
1546#
1547if test "$ac_init_help" = "long"; then
1548 # Omit some internal or obsolete options to make the list less imposing.
1549 # This message is too long to be a string in the A/UX 3.1 sh.
1550 cat <<_ACEOF
1551\`configure' configures this package to adapt to many kinds of systems.
1552
1553Usage: $0 [OPTION]... [VAR=VALUE]...
1554
1555To assign environment variables (e.g., CC, CFLAGS...), specify them as
1556VAR=VALUE. See below for descriptions of some of the useful variables.
1557
1558Defaults for the options are specified in brackets.
1559
1560Configuration:
1561 -h, --help display this help and exit
1562 --help=short display options specific to this package
1563 --help=recursive display the short help of all the included packages
1564 -V, --version display version information and exit
d0ac1c44 1565 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1566 --cache-file=FILE cache test results in FILE [disabled]
1567 -C, --config-cache alias for \`--cache-file=config.cache'
1568 -n, --no-create do not create output files
1569 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1570
bec39cab
AC
1571Installation directories:
1572 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1573 [$ac_default_prefix]
bec39cab 1574 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1575 [PREFIX]
bec39cab
AC
1576
1577By default, \`make install' will install all the files in
1578\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1579an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1580for instance \`--prefix=\$HOME'.
1581
1582For better control, use the options below.
1583
1584Fine tuning of the installation directories:
81ecdfbb
RW
1585 --bindir=DIR user executables [EPREFIX/bin]
1586 --sbindir=DIR system admin executables [EPREFIX/sbin]
1587 --libexecdir=DIR program executables [EPREFIX/libexec]
1588 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1589 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1590 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1591 --libdir=DIR object code libraries [EPREFIX/lib]
1592 --includedir=DIR C header files [PREFIX/include]
1593 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1594 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1595 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1596 --infodir=DIR info documentation [DATAROOTDIR/info]
1597 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1598 --mandir=DIR man documentation [DATAROOTDIR/man]
1599 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1600 --htmldir=DIR html documentation [DOCDIR]
1601 --dvidir=DIR dvi documentation [DOCDIR]
1602 --pdfdir=DIR pdf documentation [DOCDIR]
1603 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1604_ACEOF
1605
1606 cat <<\_ACEOF
1607
9009e1ae
MR
1608Program names:
1609 --program-prefix=PREFIX prepend PREFIX to installed program names
1610 --program-suffix=SUFFIX append SUFFIX to installed program names
1611 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1612
bec39cab
AC
1613X features:
1614 --x-includes=DIR X include files are in DIR
1615 --x-libraries=DIR X library files are in DIR
1616
1617System types:
1618 --build=BUILD configure for building on BUILD [guessed]
1619 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1620 --target=TARGET configure for building compilers for TARGET [HOST]
1621_ACEOF
1622fi
1623
1624if test -n "$ac_init_help"; then
1625
1626 cat <<\_ACEOF
1627
1628Optional Features:
81ecdfbb 1629 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1630 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1631 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1632 --enable-maintainer-mode
1633 enable make rules and dependencies not useful (and
1634 sometimes confusing) to the casual installer
2974be62 1635 --enable-plugins Enable support for plugins
da2f07f1 1636 --disable-largefile omit support for large files
b686ecb5
JM
1637 --enable-shared[=PKGS] build shared libraries [default=yes]
1638 --enable-static[=PKGS] build static libraries [default=yes]
1639 --enable-fast-install[=PKGS]
1640 optimize for fast installation [default=yes]
1641 --disable-libtool-lock avoid locking (might break parallel builds)
d5835df2
TV
1642 --enable-threading include support for parallel processing of data
1643 (yes/no)
862776f2 1644 --disable-rpath do not hardcode runtime library paths
d5835df2 1645 --disable-nls do not use Native Language Support
a1220294
TT
1646 --enable-targets=TARGETS
1647 alternative target configurations
5cbfbe42
GL
1648 --enable-gdb-mdebug-support
1649 Enable support for the mdebug debuginfo format
1650 (default 'yes')
4b42385c
GL
1651 --enable-gdb-dwarf-support
1652 Enable support for the dwarf debuginfo format
1653 (default 'yes')
bec39cab
AC
1654 --enable-tui enable full-screen terminal user interface (TUI)
1655 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1656 --enable-profiling enable profiling of GDB
44cee4fd 1657 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
c4375bc5
GL
1658 --enable-gdb-compile enable support for the compile subsystem, default
1659 'yes'
189b8c2e
ST
1660 --enable-source-highlight
1661 enable source-highlight for source listings
a1220294 1662 --enable-werror treat compile warnings as errors
32c1c914 1663 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1664 --enable-gdb-build-warnings
32c1c914 1665 enable GDB specific build-time compiler warnings if
a1220294 1666 gcc is used
f35d5ade 1667 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1668 --enable-sim link gdb with simulator
abbbd4a3
AB
1669 --enable-libbacktrace use libbacktrace to write a backtrace after a fatal
1670 signal.
1776e3e5 1671 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1672 --enable-unit-tests Enable the inclusion of unit tests when compiling
1673 GDB
bec39cab
AC
1674
1675Optional Packages:
1676 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1677 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
b686ecb5
JM
1678 --with-pic try to use only PIC/non-PIC objects [default=use
1679 both]
1680 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
d5835df2 1681 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
862776f2 1682 --with-gnu-ld assume the C compiler uses GNU ld default=no
d5835df2
TV
1683 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1684 --without-libipt-prefix don't search for libipt in includedir and libdir
1685 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1686 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1687 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1688 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1689 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
862776f2
AA
1690 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1691 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1692 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1693 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1694 --without-libintl-prefix don't search for libintl in includedir and libdir
1695 --with-libintl-type=TYPE type of library to search for (auto/static/shared)
a1220294 1696 --with-separate-debug-dir=PATH
32c1c914 1697 look for global separate debug info in this path
62e4f60c 1698 [LIBDIR/debug]
740ce350
TJB
1699 --with-additional-debug-dirs=PATHs
1700 colon-separated list of additional directories to
1701 search for separate debug info
b14b1491
TT
1702 --with-gdb-datadir=PATH look for global separate data files in this path
1703 [DATADIR/gdb]
29b0e8a2 1704 --with-relocated-sources=PATH
32c1c914 1705 automatically relocate this path for source files
7349ff92 1706 --with-auto-load-dir=PATH
aff139ff 1707 directories from which to load auto-loaded scripts
1564a261 1708 [$debugdir:$datadir/auto-load]
bccbefd2 1709 --with-auto-load-safe-path=PATH
aff139ff 1710 directories safe to hold auto-loaded files
7349ff92 1711 [--with-auto-load-dir]
bccbefd2
JK
1712 --without-auto-load-safe-path
1713 do not restrict auto-loaded files locations
18b4d073 1714 --with-amd-dbgapi support for the amd-dbgapi target (yes / no / auto)
0d79cdc4
AM
1715 --with-debuginfod Enable debuginfo lookups with debuginfod
1716 (auto/yes/no)
05e7c244 1717 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1718 --with-curses use the curses library instead of the termcap
1719 library
c16158bc
JM
1720 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1721 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1722 --with-system-zlib use installed libz
2cac01e3
FS
1723 --with-zstd support zstd compressed debug sections
1724 (default=auto)
478aac75 1725 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1726 --with-system-readline use installed readline library
b8e0a31c
SD
1727 --with-jit-reader-dir=PATH
1728 directory to load the JIT readers from
5c39566f 1729 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1730 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1731 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1732 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1733 --with-python[=PYTHON] include python support
1734 (auto/yes/no/<python-program>)
d13c7322
AB
1735 --with-python-libdir[=DIR]
1736 search for python's libraries in DIR
ed3ef339
DE
1737 --with-guile[=GUILE] include guile support
1738 (auto/yes/no/<guile-version>/<pkg-config-program>)
81ecdfbb 1739 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1740 --with-system-gdbinit=PATH
32c1c914 1741 automatically load a system-wide gdbinit file
ed2a2229
CB
1742 --with-system-gdbinit-dir=PATH
1743 automatically load system-wide gdbinit files from
1744 this directory
608e2dbb
TT
1745 --with-lzma support lzma compression (auto/yes/no)
1746 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1747 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1748 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1749 --with-tcl directory containing tcl configuration (tclConfig.sh)
1750 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1751 --with-x use the X Window System
393fd4c3
YQ
1752 --with-babeltrace include babeltrace support (auto/yes/no)
1753 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1754 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1755 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1756
1757Some influential environment variables:
1758 CC C compiler command
1759 CFLAGS C compiler flags
1760 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1761 nonstandard directory <lib dir>
81ecdfbb 1762 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1763 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1764 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1765 CXX C++ compiler command
1766 CXXFLAGS C++ compiler flags
bec39cab 1767 CPP C preprocessor
b686ecb5 1768 CXXCPP C++ preprocessor
f6720b1c
AM
1769 PKG_CONFIG path to pkg-config utility
1770 PKG_CONFIG_PATH
1771 directories to add to pkg-config's search path
1772 PKG_CONFIG_LIBDIR
1773 path overriding pkg-config's built-in search path
18b4d073
SM
1774 MAKEINFO Parent configure detects if it is of sufficient version.
1775 MAKEINFOFLAGS
1776 Parameters for MAKEINFO.
1777 AMD_DBGAPI_CFLAGS
1778 C compiler flags for AMD_DBGAPI, overriding pkg-config
1779 AMD_DBGAPI_LIBS
1780 linker flags for AMD_DBGAPI, overriding pkg-config
f6720b1c
AM
1781 DEBUGINFOD_CFLAGS
1782 C compiler flags for DEBUGINFOD, overriding pkg-config
1783 DEBUGINFOD_LIBS
1784 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1785 YACC The `Yet Another Compiler Compiler' implementation to use.
1786 Defaults to the first program found out of: `bison -y', `byacc',
1787 `yacc'.
81ecdfbb
RW
1788 YFLAGS The list of arguments that will be passed by default to $YACC.
1789 This script will default YFLAGS to the empty string to avoid a
1790 default value of `-d' given by some make applications.
2cac01e3
FS
1791 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1792 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
99118062
AP
1793 GMPLIBS How to link GMP
1794 GMPINC How to find GMP include files
81ecdfbb 1795 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1796
1797Use these variables to override the choices made by `configure' or to help
1798it to find libraries and programs with nonstandard names/locations.
1799
81ecdfbb 1800Report bugs to the package provider.
bec39cab 1801_ACEOF
81ecdfbb 1802ac_status=$?
bec39cab
AC
1803fi
1804
1805if test "$ac_init_help" = "recursive"; then
1806 # If there are subdirs, report their specific --help.
bec39cab 1807 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1808 test -d "$ac_dir" ||
1809 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1810 continue
bec39cab
AC
1811 ac_builddir=.
1812
81ecdfbb
RW
1813case "$ac_dir" in
1814.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1815*)
1816 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1817 # A ".." for each directory in $ac_dir_suffix.
1818 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1819 case $ac_top_builddir_sub in
1820 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1821 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1822 esac ;;
1823esac
1824ac_abs_top_builddir=$ac_pwd
1825ac_abs_builddir=$ac_pwd$ac_dir_suffix
1826# for backward compatibility:
1827ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1828
1829case $srcdir in
81ecdfbb 1830 .) # We are building in place.
bec39cab 1831 ac_srcdir=.
81ecdfbb
RW
1832 ac_top_srcdir=$ac_top_builddir_sub
1833 ac_abs_top_srcdir=$ac_pwd ;;
1834 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1835 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1836 ac_top_srcdir=$srcdir
1837 ac_abs_top_srcdir=$srcdir ;;
1838 *) # Relative name.
1839 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1840 ac_top_srcdir=$ac_top_build_prefix$srcdir
1841 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1842esac
81ecdfbb 1843ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1844
81ecdfbb
RW
1845 cd "$ac_dir" || { ac_status=$?; continue; }
1846 # Check for guested configure.
1847 if test -f "$ac_srcdir/configure.gnu"; then
1848 echo &&
1849 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1850 elif test -f "$ac_srcdir/configure"; then
1851 echo &&
1852 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1853 else
81ecdfbb
RW
1854 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1855 fi || ac_status=$?
1856 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1857 done
1858fi
1859
81ecdfbb 1860test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1861if $ac_init_version; then
1862 cat <<\_ACEOF
81ecdfbb 1863configure
d0ac1c44 1864generated by GNU Autoconf 2.69
bec39cab 1865
d0ac1c44 1866Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1867This configure script is free software; the Free Software Foundation
1868gives unlimited permission to copy, distribute and modify it.
1869_ACEOF
81ecdfbb 1870 exit
bec39cab 1871fi
bec39cab 1872
81ecdfbb
RW
1873## ------------------------ ##
1874## Autoconf initialization. ##
1875## ------------------------ ##
bec39cab 1876
81ecdfbb
RW
1877# ac_fn_c_try_compile LINENO
1878# --------------------------
1879# Try to compile conftest.$ac_ext, and return whether this succeeded.
1880ac_fn_c_try_compile ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 rm -f conftest.$ac_objext
1884 if { { ac_try="$ac_compile"
1885case "(($ac_try" in
1886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1887 *) ac_try_echo=$ac_try;;
1888esac
1889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1890$as_echo "$ac_try_echo"; } >&5
1891 (eval "$ac_compile") 2>conftest.err
1892 ac_status=$?
1893 if test -s conftest.err; then
1894 grep -v '^ *+' conftest.err >conftest.er1
1895 cat conftest.er1 >&5
1896 mv -f conftest.er1 conftest.err
1897 fi
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; } && {
1900 test -z "$ac_c_werror_flag" ||
1901 test ! -s conftest.err
1902 } && test -s conftest.$ac_objext; then :
1903 ac_retval=0
1904else
1905 $as_echo "$as_me: failed program was:" >&5
1906sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1907
81ecdfbb
RW
1908 ac_retval=1
1909fi
d0ac1c44
SM
1910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1911 as_fn_set_status $ac_retval
81ecdfbb
RW
1912
1913} # ac_fn_c_try_compile
1914
3bc3d82a
PA
1915# ac_fn_cxx_try_compile LINENO
1916# ----------------------------
1917# Try to compile conftest.$ac_ext, and return whether this succeeded.
1918ac_fn_cxx_try_compile ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 rm -f conftest.$ac_objext
1922 if { { ac_try="$ac_compile"
1923case "(($ac_try" in
1924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925 *) ac_try_echo=$ac_try;;
1926esac
1927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928$as_echo "$ac_try_echo"; } >&5
1929 (eval "$ac_compile") 2>conftest.err
1930 ac_status=$?
1931 if test -s conftest.err; then
1932 grep -v '^ *+' conftest.err >conftest.er1
1933 cat conftest.er1 >&5
1934 mv -f conftest.er1 conftest.err
1935 fi
1936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1937 test $ac_status = 0; } && {
1938 test -z "$ac_cxx_werror_flag" ||
1939 test ! -s conftest.err
1940 } && test -s conftest.$ac_objext; then :
1941 ac_retval=0
1942else
1943 $as_echo "$as_me: failed program was:" >&5
1944sed 's/^/| /' conftest.$ac_ext >&5
1945
1946 ac_retval=1
1947fi
d0ac1c44
SM
1948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1949 as_fn_set_status $ac_retval
3bc3d82a
PA
1950
1951} # ac_fn_cxx_try_compile
1952
81ecdfbb
RW
1953# ac_fn_c_try_cpp LINENO
1954# ----------------------
1955# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1956ac_fn_c_try_cpp ()
bec39cab 1957{
81ecdfbb
RW
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 if { { ac_try="$ac_cpp conftest.$ac_ext"
1960case "(($ac_try" in
1961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962 *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1967 ac_status=$?
1968 if test -s conftest.err; then
1969 grep -v '^ *+' conftest.err >conftest.er1
1970 cat conftest.er1 >&5
1971 mv -f conftest.er1 conftest.err
1972 fi
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1974 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1975 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1976 test ! -s conftest.err
1977 }; then :
1978 ac_retval=0
1979else
1980 $as_echo "$as_me: failed program was:" >&5
1981sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1982
81ecdfbb
RW
1983 ac_retval=1
1984fi
d0ac1c44
SM
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
bec39cab 1987
81ecdfbb 1988} # ac_fn_c_try_cpp
bec39cab 1989
81ecdfbb
RW
1990# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1991# -------------------------------------------------------
1992# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1993# the include files in INCLUDES and setting the cache variable VAR
1994# accordingly.
1995ac_fn_c_check_header_mongrel ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1998 if eval \${$3+:} false; then :
81ecdfbb
RW
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2000$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2001if eval \${$3+:} false; then :
81ecdfbb
RW
2002 $as_echo_n "(cached) " >&6
2003fi
2004eval ac_res=\$$3
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2006$as_echo "$ac_res" >&6; }
2007else
2008 # Is the header compilable?
2009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2010$as_echo_n "checking $2 usability... " >&6; }
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014#include <$2>
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_header_compiler=yes
2018else
2019 ac_header_compiler=no
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2023$as_echo "$ac_header_compiler" >&6; }
bec39cab 2024
81ecdfbb
RW
2025# Is the header present?
2026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2027$as_echo_n "checking $2 presence... " >&6; }
2028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030#include <$2>
2031_ACEOF
2032if ac_fn_c_try_cpp "$LINENO"; then :
2033 ac_header_preproc=yes
2034else
2035 ac_header_preproc=no
2036fi
d0ac1c44 2037rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
2038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2039$as_echo "$ac_header_preproc" >&6; }
bec39cab 2040
81ecdfbb
RW
2041# So? What about this header?
2042case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2043 yes:no: )
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2045$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2047$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2048 ;;
2049 no:yes:* )
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2051$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2053$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2055$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2057$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2059$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2060 ;;
2061esac
2062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2063$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2064if eval \${$3+:} false; then :
81ecdfbb
RW
2065 $as_echo_n "(cached) " >&6
2066else
2067 eval "$3=\$ac_header_compiler"
2068fi
2069eval ac_res=\$$3
2070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071$as_echo "$ac_res" >&6; }
2072fi
d0ac1c44 2073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2074
81ecdfbb 2075} # ac_fn_c_check_header_mongrel
bec39cab 2076
81ecdfbb
RW
2077# ac_fn_c_try_run LINENO
2078# ----------------------
2079# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2080# that executables *can* be run.
2081ac_fn_c_try_run ()
2082{
2083 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2084 if { { ac_try="$ac_link"
2085case "(($ac_try" in
2086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2087 *) ac_try_echo=$ac_try;;
2088esac
2089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2090$as_echo "$ac_try_echo"; } >&5
2091 (eval "$ac_link") 2>&5
2092 ac_status=$?
2093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2094 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2095 { { case "(($ac_try" in
2096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2097 *) ac_try_echo=$ac_try;;
2098esac
2099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2100$as_echo "$ac_try_echo"; } >&5
2101 (eval "$ac_try") 2>&5
2102 ac_status=$?
2103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2104 test $ac_status = 0; }; }; then :
2105 ac_retval=0
2106else
2107 $as_echo "$as_me: program exited with status $ac_status" >&5
2108 $as_echo "$as_me: failed program was:" >&5
2109sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2110
81ecdfbb
RW
2111 ac_retval=$ac_status
2112fi
2113 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2114 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2115 as_fn_set_status $ac_retval
bec39cab 2116
81ecdfbb 2117} # ac_fn_c_try_run
bec39cab 2118
81ecdfbb
RW
2119# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2120# -------------------------------------------------------
2121# Tests whether HEADER exists and can be compiled using the include files in
2122# INCLUDES, setting the cache variable VAR accordingly.
2123ac_fn_c_check_header_compile ()
2124{
2125 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2128if eval \${$3+:} false; then :
81ecdfbb
RW
2129 $as_echo_n "(cached) " >&6
2130else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134#include <$2>
bec39cab 2135_ACEOF
81ecdfbb
RW
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 eval "$3=yes"
2138else
2139 eval "$3=no"
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142fi
2143eval ac_res=\$$3
2144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145$as_echo "$ac_res" >&6; }
d0ac1c44 2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2147
81ecdfbb 2148} # ac_fn_c_check_header_compile
bec39cab 2149
2974be62
AM
2150# ac_fn_c_try_link LINENO
2151# -----------------------
2152# Try to link conftest.$ac_ext, and return whether this succeeded.
2153ac_fn_c_try_link ()
2154{
2155 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2156 rm -f conftest.$ac_objext conftest$ac_exeext
2157 if { { ac_try="$ac_link"
2158case "(($ac_try" in
2159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2160 *) ac_try_echo=$ac_try;;
2161esac
2162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2163$as_echo "$ac_try_echo"; } >&5
2164 (eval "$ac_link") 2>conftest.err
2165 ac_status=$?
2166 if test -s conftest.err; then
2167 grep -v '^ *+' conftest.err >conftest.er1
2168 cat conftest.er1 >&5
2169 mv -f conftest.er1 conftest.err
2170 fi
2171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2172 test $ac_status = 0; } && {
2173 test -z "$ac_c_werror_flag" ||
2174 test ! -s conftest.err
2175 } && test -s conftest$ac_exeext && {
2176 test "$cross_compiling" = yes ||
d0ac1c44 2177 test -x conftest$ac_exeext
2974be62
AM
2178 }; then :
2179 ac_retval=0
2180else
2181 $as_echo "$as_me: failed program was:" >&5
2182sed 's/^/| /' conftest.$ac_ext >&5
2183
2184 ac_retval=1
2185fi
2186 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2187 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2188 # interfere with the next link command; also delete a directory that is
2189 # left behind by Apple's compiler. We do this before executing the actions.
2190 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2191 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2192 as_fn_set_status $ac_retval
2974be62
AM
2193
2194} # ac_fn_c_try_link
2195
b686ecb5
JM
2196# ac_fn_c_check_func LINENO FUNC VAR
2197# ----------------------------------
2198# Tests whether FUNC exists, setting the cache variable VAR accordingly
2199ac_fn_c_check_func ()
2200{
2201 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
2204if eval \${$3+:} false; then :
2205 $as_echo_n "(cached) " >&6
2206else
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2210 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2211#define $2 innocuous_$2
2212
2213/* System header to define __stub macros and hopefully few prototypes,
2214 which can conflict with char $2 (); below.
2215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2216 <limits.h> exists even on freestanding compilers. */
2217
2218#ifdef __STDC__
2219# include <limits.h>
2220#else
2221# include <assert.h>
2222#endif
2223
2224#undef $2
2225
2226/* Override any GCC internal prototype to avoid an error.
2227 Use char because int might match the return type of a GCC
2228 builtin and then its argument prototype would still apply. */
2229#ifdef __cplusplus
2230extern "C"
2231#endif
2232char $2 ();
2233/* The GNU C library defines this for functions which it implements
2234 to always fail with ENOSYS. Some functions are actually named
2235 something starting with __ and the normal name is an alias. */
2236#if defined __stub_$2 || defined __stub___$2
2237choke me
2238#endif
2239
2240int
2241main ()
2242{
2243return $2 ();
2244 ;
2245 return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_link "$LINENO"; then :
2249 eval "$3=yes"
2250else
2251 eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext \
2254 conftest$ac_exeext conftest.$ac_ext
2255fi
2256eval ac_res=\$$3
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258$as_echo "$ac_res" >&6; }
2259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260
2261} # ac_fn_c_check_func
2262
2263# ac_fn_cxx_try_cpp LINENO
2264# ------------------------
2265# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2266ac_fn_cxx_try_cpp ()
2267{
2268 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269 if { { ac_try="$ac_cpp conftest.$ac_ext"
2270case "(($ac_try" in
2271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2272 *) ac_try_echo=$ac_try;;
2273esac
2274eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2275$as_echo "$ac_try_echo"; } >&5
2276 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2277 ac_status=$?
2278 if test -s conftest.err; then
2279 grep -v '^ *+' conftest.err >conftest.er1
2280 cat conftest.er1 >&5
2281 mv -f conftest.er1 conftest.err
2282 fi
2283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2284 test $ac_status = 0; } > conftest.i && {
2285 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2286 test ! -s conftest.err
2287 }; then :
2288 ac_retval=0
2289else
2290 $as_echo "$as_me: failed program was:" >&5
2291sed 's/^/| /' conftest.$ac_ext >&5
2292
2293 ac_retval=1
2294fi
2295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2296 as_fn_set_status $ac_retval
2297
2298} # ac_fn_cxx_try_cpp
2299
2300# ac_fn_cxx_try_link LINENO
2301# -------------------------
2302# Try to link conftest.$ac_ext, and return whether this succeeded.
2303ac_fn_cxx_try_link ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 rm -f conftest.$ac_objext conftest$ac_exeext
2307 if { { ac_try="$ac_link"
2308case "(($ac_try" in
2309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2310 *) ac_try_echo=$ac_try;;
2311esac
2312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2313$as_echo "$ac_try_echo"; } >&5
2314 (eval "$ac_link") 2>conftest.err
2315 ac_status=$?
2316 if test -s conftest.err; then
2317 grep -v '^ *+' conftest.err >conftest.er1
2318 cat conftest.er1 >&5
2319 mv -f conftest.er1 conftest.err
2320 fi
2321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2322 test $ac_status = 0; } && {
2323 test -z "$ac_cxx_werror_flag" ||
2324 test ! -s conftest.err
2325 } && test -s conftest$ac_exeext && {
2326 test "$cross_compiling" = yes ||
2327 test -x conftest$ac_exeext
2328 }; then :
2329 ac_retval=0
2330else
2331 $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334 ac_retval=1
2335fi
2336 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2337 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2338 # interfere with the next link command; also delete a directory that is
2339 # left behind by Apple's compiler. We do this before executing the actions.
2340 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342 as_fn_set_status $ac_retval
2343
2344} # ac_fn_cxx_try_link
2345
b686ecb5
JM
2346# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2347# -------------------------------------------
2348# Tests whether TYPE exists after having included INCLUDES, setting cache
2349# variable VAR accordingly.
2350ac_fn_c_check_type ()
81ecdfbb
RW
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2354$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2355if eval \${$3+:} false; then :
81ecdfbb
RW
2356 $as_echo_n "(cached) " >&6
2357else
b686ecb5 2358 eval "$3=no"
81ecdfbb
RW
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
b686ecb5 2361$4
55a8c076
YQ
2362int
2363main ()
2364{
b686ecb5
JM
2365if (sizeof ($2))
2366 return 0;
55a8c076
YQ
2367 ;
2368 return 0;
2369}
2370_ACEOF
b686ecb5
JM
2371if ac_fn_c_try_compile "$LINENO"; then :
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$4
2375int
2376main ()
2377{
2378if (sizeof (($2)))
2379 return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385
55a8c076 2386else
b686ecb5 2387 eval "$3=yes"
55a8c076 2388fi
b686ecb5
JM
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55a8c076
YQ
2392fi
2393eval ac_res=\$$3
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2395$as_echo "$ac_res" >&6; }
d0ac1c44 2396 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076 2397
b686ecb5 2398} # ac_fn_c_check_type
55a8c076 2399
b686ecb5
JM
2400# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2401# ---------------------------------------------
2402# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2403# accordingly.
2404ac_fn_c_check_decl ()
f6720b1c
AM
2405{
2406 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2407 as_decl_name=`echo $2|sed 's/ *(.*//'`
2408 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2410$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2411if eval \${$3+:} false; then :
2412 $as_echo_n "(cached) " >&6
2413else
2414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h. */
2416$4
2417int
2418main ()
2419{
2420#ifndef $as_decl_name
2421#ifdef __cplusplus
2422 (void) $as_decl_use;
2423#else
2424 (void) $as_decl_name;
2425#endif
2426#endif
2427
2428 ;
2429 return 0;
2430}
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 eval "$3=yes"
2434else
2435 eval "$3=no"
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438fi
2439eval ac_res=\$$3
2440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2441$as_echo "$ac_res" >&6; }
2442 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443
2444} # ac_fn_c_check_decl
2445
05ea2a05
TT
2446# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2447# ----------------------------------------------------
2448# Tries to find if the field MEMBER exists in type AGGR, after including
2449# INCLUDES, setting cache variable VAR accordingly.
2450ac_fn_c_check_member ()
2451{
2452 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2454$as_echo_n "checking for $2.$3... " >&6; }
2455if eval \${$4+:} false; then :
2456 $as_echo_n "(cached) " >&6
2457else
2458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2459/* end confdefs.h. */
2460$5
2461int
2462main ()
2463{
2464static $2 ac_aggr;
2465if (ac_aggr.$3)
2466return 0;
2467 ;
2468 return 0;
2469}
2470_ACEOF
2471if ac_fn_c_try_compile "$LINENO"; then :
2472 eval "$4=yes"
2473else
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475/* end confdefs.h. */
2476$5
2477int
2478main ()
2479{
2480static $2 ac_aggr;
2481if (sizeof ac_aggr.$3)
2482return 0;
2483 ;
2484 return 0;
2485}
2486_ACEOF
2487if ac_fn_c_try_compile "$LINENO"; then :
2488 eval "$4=yes"
2489else
2490 eval "$4=no"
2491fi
2492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2493fi
2494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2495fi
2496eval ac_res=\$$4
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2498$as_echo "$ac_res" >&6; }
2499 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500
2501} # ac_fn_c_check_member
2502
21987b9c
TT
2503# ac_fn_cxx_check_func LINENO FUNC VAR
2504# ------------------------------------
2505# Tests whether FUNC exists, setting the cache variable VAR accordingly
2506ac_fn_cxx_check_func ()
2507{
2508 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2510$as_echo_n "checking for $2... " >&6; }
2511if eval \${$3+:} false; then :
2512 $as_echo_n "(cached) " >&6
2513else
2514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2515/* end confdefs.h. */
2516/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2517 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2518#define $2 innocuous_$2
2519
2520/* System header to define __stub macros and hopefully few prototypes,
2521 which can conflict with char $2 (); below.
2522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2523 <limits.h> exists even on freestanding compilers. */
2524
2525#ifdef __STDC__
2526# include <limits.h>
2527#else
2528# include <assert.h>
2529#endif
2530
2531#undef $2
2532
2533/* Override any GCC internal prototype to avoid an error.
2534 Use char because int might match the return type of a GCC
2535 builtin and then its argument prototype would still apply. */
2536#ifdef __cplusplus
2537extern "C"
2538#endif
2539char $2 ();
2540/* The GNU C library defines this for functions which it implements
2541 to always fail with ENOSYS. Some functions are actually named
2542 something starting with __ and the normal name is an alias. */
2543#if defined __stub_$2 || defined __stub___$2
2544choke me
2545#endif
2546
2547int
2548main ()
2549{
2550return $2 ();
2551 ;
2552 return 0;
2553}
2554_ACEOF
2555if ac_fn_cxx_try_link "$LINENO"; then :
2556 eval "$3=yes"
2557else
2558 eval "$3=no"
2559fi
2560rm -f core conftest.err conftest.$ac_objext \
2561 conftest$ac_exeext conftest.$ac_ext
2562fi
2563eval ac_res=\$$3
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2565$as_echo "$ac_res" >&6; }
2566 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2567
2568} # ac_fn_cxx_check_func
d5af19ba 2569
d5835df2
TV
2570# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2571# --------------------------------------------
2572# Tries to find the compile-time value of EXPR in a program that includes
2573# INCLUDES, setting VAR accordingly. Returns whether the value could be
2574# computed
2575ac_fn_c_compute_int ()
2576{
2577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2578 if test "$cross_compiling" = yes; then
2579 # Depending upon the size, compute the lo and hi bounds.
2580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581/* end confdefs.h. */
2582$4
2583int
2584main ()
2585{
2586static int test_array [1 - 2 * !(($2) >= 0)];
2587test_array [0] = 0;
2588return test_array [0];
2589
2590 ;
2591 return 0;
2592}
2593_ACEOF
2594if ac_fn_c_try_compile "$LINENO"; then :
2595 ac_lo=0 ac_mid=0
2596 while :; do
2597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598/* end confdefs.h. */
2599$4
2600int
2601main ()
2602{
2603static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2604test_array [0] = 0;
2605return test_array [0];
2606
2607 ;
2608 return 0;
2609}
2610_ACEOF
2611if ac_fn_c_try_compile "$LINENO"; then :
2612 ac_hi=$ac_mid; break
2613else
2614 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2615 if test $ac_lo -le $ac_mid; then
2616 ac_lo= ac_hi=
2617 break
2618 fi
2619 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2620fi
2621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2622 done
2623else
2624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2625/* end confdefs.h. */
2626$4
2627int
2628main ()
2629{
2630static int test_array [1 - 2 * !(($2) < 0)];
2631test_array [0] = 0;
2632return test_array [0];
2633
2634 ;
2635 return 0;
2636}
2637_ACEOF
2638if ac_fn_c_try_compile "$LINENO"; then :
2639 ac_hi=-1 ac_mid=-1
2640 while :; do
2641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2642/* end confdefs.h. */
2643$4
2644int
2645main ()
2646{
2647static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2648test_array [0] = 0;
2649return test_array [0];
2650
2651 ;
2652 return 0;
2653}
2654_ACEOF
2655if ac_fn_c_try_compile "$LINENO"; then :
2656 ac_lo=$ac_mid; break
2657else
2658 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2659 if test $ac_mid -le $ac_hi; then
2660 ac_lo= ac_hi=
2661 break
2662 fi
2663 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2664fi
2665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2666 done
2667else
2668 ac_lo= ac_hi=
2669fi
2670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2671fi
2672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2673# Binary search between lo and hi bounds.
2674while test "x$ac_lo" != "x$ac_hi"; do
2675 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2677/* end confdefs.h. */
2678$4
2679int
2680main ()
2681{
2682static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2683test_array [0] = 0;
2684return test_array [0];
2685
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690if ac_fn_c_try_compile "$LINENO"; then :
2691 ac_hi=$ac_mid
2692else
2693 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2694fi
2695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2696done
2697case $ac_lo in #((
2698?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2699'') ac_retval=1 ;;
2700esac
2701 else
2702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2703/* end confdefs.h. */
2704$4
2705static long int longval () { return $2; }
2706static unsigned long int ulongval () { return $2; }
2707#include <stdio.h>
2708#include <stdlib.h>
2709int
2710main ()
2711{
2712
2713 FILE *f = fopen ("conftest.val", "w");
2714 if (! f)
2715 return 1;
2716 if (($2) < 0)
2717 {
2718 long int i = longval ();
2719 if (i != ($2))
2720 return 1;
2721 fprintf (f, "%ld", i);
2722 }
2723 else
2724 {
2725 unsigned long int i = ulongval ();
2726 if (i != ($2))
2727 return 1;
2728 fprintf (f, "%lu", i);
2729 }
2730 /* Do not output a trailing newline, as this causes \r\n confusion
2731 on some platforms. */
2732 return ferror (f) || fclose (f) != 0;
2733
2734 ;
2735 return 0;
2736}
2737_ACEOF
2738if ac_fn_c_try_run "$LINENO"; then :
2739 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2740else
2741 ac_retval=1
2742fi
2743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2744 conftest.$ac_objext conftest.beam conftest.$ac_ext
2745rm -f conftest.val
2746
2747 fi
2748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2749 as_fn_set_status $ac_retval
2750
2751} # ac_fn_c_compute_int
2752cat >config.log <<_ACEOF
2753This file contains any messages produced by compilers while
2754running configure, to aid debugging if configure makes a mistake.
2755
2756It was created by $as_me, which was
2757generated by GNU Autoconf 2.69. Invocation command line was
2758
2759 $ $0 $@
2760
2761_ACEOF
2762exec 5>>config.log
2763{
81ecdfbb
RW
2764cat <<_ASUNAME
2765## --------- ##
2766## Platform. ##
2767## --------- ##
413ccac7 2768
81ecdfbb
RW
2769hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2770uname -m = `(uname -m) 2>/dev/null || echo unknown`
2771uname -r = `(uname -r) 2>/dev/null || echo unknown`
2772uname -s = `(uname -s) 2>/dev/null || echo unknown`
2773uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2774
81ecdfbb
RW
2775/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2776/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2777
81ecdfbb
RW
2778/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2779/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2780/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2781/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2782/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2783/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2784/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2785
81ecdfbb 2786_ASUNAME
bec39cab 2787
bec39cab
AC
2788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2789for as_dir in $PATH
2790do
2791 IFS=$as_save_IFS
2792 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2793 $as_echo "PATH: $as_dir"
2794 done
2795IFS=$as_save_IFS
bec39cab 2796
81ecdfbb 2797} >&5
bec39cab 2798
81ecdfbb 2799cat >&5 <<_ACEOF
bec39cab 2800
bec39cab 2801
81ecdfbb
RW
2802## ----------- ##
2803## Core tests. ##
2804## ----------- ##
2805
2806_ACEOF
2807
2808
2809# Keep a trace of the command line.
2810# Strip out --no-create and --no-recursion so they do not pile up.
2811# Strip out --silent because we don't want to record it for future runs.
2812# Also quote any args containing shell meta-characters.
2813# Make two passes to allow for proper duplicate-argument suppression.
2814ac_configure_args=
2815ac_configure_args0=
2816ac_configure_args1=
2817ac_must_keep_next=false
2818for ac_pass in 1 2
2819do
2820 for ac_arg
2821 do
2822 case $ac_arg in
2823 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2824 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2825 | -silent | --silent | --silen | --sile | --sil)
2826 continue ;;
2827 *\'*)
2828 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2829 esac
2830 case $ac_pass in
2831 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2832 2)
2833 as_fn_append ac_configure_args1 " '$ac_arg'"
2834 if test $ac_must_keep_next = true; then
2835 ac_must_keep_next=false # Got value, back to normal.
2836 else
2837 case $ac_arg in
2838 *=* | --config-cache | -C | -disable-* | --disable-* \
2839 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2840 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2841 | -with-* | --with-* | -without-* | --without-* | --x)
2842 case "$ac_configure_args0 " in
2843 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2844 esac
2845 ;;
2846 -* ) ac_must_keep_next=true ;;
2847 esac
2848 fi
2849 as_fn_append ac_configure_args " '$ac_arg'"
2850 ;;
2851 esac
2852 done
2853done
2854{ ac_configure_args0=; unset ac_configure_args0;}
2855{ ac_configure_args1=; unset ac_configure_args1;}
2856
2857# When interrupted or exit'd, cleanup temporary files, and complete
2858# config.log. We remove comments because anyway the quotes in there
2859# would cause problems or look ugly.
2860# WARNING: Use '\'' to represent an apostrophe within the trap.
2861# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2862trap 'exit_status=$?
2863 # Save into config.log some information that might help in debugging.
2864 {
2865 echo
2866
d0ac1c44 2867 $as_echo "## ---------------- ##
81ecdfbb 2868## Cache variables. ##
d0ac1c44 2869## ---------------- ##"
81ecdfbb
RW
2870 echo
2871 # The following way of writing the cache mishandles newlines in values,
2872(
2873 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2874 eval ac_val=\$$ac_var
2875 case $ac_val in #(
2876 *${as_nl}*)
2877 case $ac_var in #(
2878 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2879$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2880 esac
2881 case $ac_var in #(
2882 _ | IFS | as_nl) ;; #(
2883 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2884 *) { eval $ac_var=; unset $ac_var;} ;;
2885 esac ;;
2886 esac
2887 done
2888 (set) 2>&1 |
2889 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2890 *${as_nl}ac_space=\ *)
2891 sed -n \
2892 "s/'\''/'\''\\\\'\'''\''/g;
2893 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2894 ;; #(
2895 *)
2896 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2897 ;;
2898 esac |
2899 sort
2900)
2901 echo
2902
d0ac1c44 2903 $as_echo "## ----------------- ##
81ecdfbb 2904## Output variables. ##
d0ac1c44 2905## ----------------- ##"
81ecdfbb
RW
2906 echo
2907 for ac_var in $ac_subst_vars
2908 do
2909 eval ac_val=\$$ac_var
2910 case $ac_val in
2911 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2912 esac
2913 $as_echo "$ac_var='\''$ac_val'\''"
2914 done | sort
2915 echo
2916
2917 if test -n "$ac_subst_files"; then
d0ac1c44 2918 $as_echo "## ------------------- ##
81ecdfbb 2919## File substitutions. ##
d0ac1c44 2920## ------------------- ##"
81ecdfbb
RW
2921 echo
2922 for ac_var in $ac_subst_files
2923 do
2924 eval ac_val=\$$ac_var
2925 case $ac_val in
2926 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2927 esac
2928 $as_echo "$ac_var='\''$ac_val'\''"
2929 done | sort
2930 echo
2931 fi
2932
2933 if test -s confdefs.h; then
d0ac1c44 2934 $as_echo "## ----------- ##
81ecdfbb 2935## confdefs.h. ##
d0ac1c44 2936## ----------- ##"
81ecdfbb
RW
2937 echo
2938 cat confdefs.h
2939 echo
2940 fi
2941 test "$ac_signal" != 0 &&
2942 $as_echo "$as_me: caught signal $ac_signal"
2943 $as_echo "$as_me: exit $exit_status"
2944 } >&5
2945 rm -f core *.core core.conftest.* &&
2946 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2947 exit $exit_status
2948' 0
2949for ac_signal in 1 2 13 15; do
2950 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2951done
2952ac_signal=0
2953
2954# confdefs.h avoids OS command line length limits that DEFS can exceed.
2955rm -f -r conftest* confdefs.h
2956
2957$as_echo "/* confdefs.h */" > confdefs.h
2958
2959# Predefined preprocessor variables.
2960
2961cat >>confdefs.h <<_ACEOF
2962#define PACKAGE_NAME "$PACKAGE_NAME"
2963_ACEOF
2964
2965cat >>confdefs.h <<_ACEOF
2966#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2967_ACEOF
2968
2969cat >>confdefs.h <<_ACEOF
2970#define PACKAGE_VERSION "$PACKAGE_VERSION"
2971_ACEOF
2972
2973cat >>confdefs.h <<_ACEOF
2974#define PACKAGE_STRING "$PACKAGE_STRING"
2975_ACEOF
2976
2977cat >>confdefs.h <<_ACEOF
2978#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2979_ACEOF
2980
2981cat >>confdefs.h <<_ACEOF
2982#define PACKAGE_URL "$PACKAGE_URL"
2983_ACEOF
2984
2985
2986# Let the site file select an alternate cache file if it wants to.
2987# Prefer an explicitly selected file to automatically selected ones.
2988ac_site_file1=NONE
2989ac_site_file2=NONE
2990if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2991 # We do not want a PATH search for config.site.
2992 case $CONFIG_SITE in #((
2993 -*) ac_site_file1=./$CONFIG_SITE;;
2994 */*) ac_site_file1=$CONFIG_SITE;;
2995 *) ac_site_file1=./$CONFIG_SITE;;
2996 esac
81ecdfbb
RW
2997elif test "x$prefix" != xNONE; then
2998 ac_site_file1=$prefix/share/config.site
2999 ac_site_file2=$prefix/etc/config.site
3000else
3001 ac_site_file1=$ac_default_prefix/share/config.site
3002 ac_site_file2=$ac_default_prefix/etc/config.site
3003fi
3004for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3005do
3006 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3007 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3009$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3010 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3011 . "$ac_site_file" \
3012 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3014as_fn_error $? "failed to load site script $ac_site_file
3015See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
3016 fi
3017done
3018
3019if test -r "$cache_file"; then
d0ac1c44
SM
3020 # Some versions of bash will fail to source /dev/null (special files
3021 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3022 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
3023 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3024$as_echo "$as_me: loading cache $cache_file" >&6;}
3025 case $cache_file in
3026 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3027 *) . "./$cache_file";;
3028 esac
3029 fi
3030else
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3032$as_echo "$as_me: creating cache $cache_file" >&6;}
3033 >$cache_file
bec39cab
AC
3034fi
3035
d0ac1c44
SM
3036as_fn_append ac_header_list " stdlib.h"
3037as_fn_append ac_header_list " unistd.h"
3038as_fn_append ac_header_list " sys/param.h"
d5835df2 3039gt_needs="$gt_needs "
81ecdfbb
RW
3040# Check that the precious variables saved in the cache have kept the same
3041# value.
3042ac_cache_corrupted=false
3043for ac_var in $ac_precious_vars; do
3044 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3045 eval ac_new_set=\$ac_env_${ac_var}_set
3046 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3047 eval ac_new_val=\$ac_env_${ac_var}_value
3048 case $ac_old_set,$ac_new_set in
3049 set,)
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3051$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3052 ac_cache_corrupted=: ;;
3053 ,set)
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3055$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3056 ac_cache_corrupted=: ;;
3057 ,);;
3058 *)
3059 if test "x$ac_old_val" != "x$ac_new_val"; then
3060 # differences in whitespace do not lead to failure.
3061 ac_old_val_w=`echo x $ac_old_val`
3062 ac_new_val_w=`echo x $ac_new_val`
3063 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3065$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3066 ac_cache_corrupted=:
3067 else
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3069$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3070 eval $ac_var=\$ac_old_val
3071 fi
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3073$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3075$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3076 fi;;
3077 esac
3078 # Pass precious variables to config.status.
3079 if test "$ac_new_set" = set; then
3080 case $ac_new_val in
3081 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3082 *) ac_arg=$ac_var=$ac_new_val ;;
3083 esac
3084 case " $ac_configure_args " in
3085 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3086 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3087 esac
3088 fi
3089done
3090if $ac_cache_corrupted; then
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3094$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3095 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
3096fi
3097## -------------------- ##
3098## Main body of script. ##
3099## -------------------- ##
3100
3101ac_ext=c
3102ac_cpp='$CPP $CPPFLAGS'
3103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3105ac_compiler_gnu=$ac_cv_c_compiler_gnu
3106
3107
3108
3109
3110
5593a99a 3111
7e3941ac 3112
81ecdfbb
RW
3113ac_config_headers="$ac_config_headers config.h:config.in"
3114
3115
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3117$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3118 # Check whether --enable-maintainer-mode was given.
3119if test "${enable_maintainer_mode+set}" = set; then :
3120 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3121else
3122 USE_MAINTAINER_MODE=no
3123fi
3124
3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3126$as_echo "$USE_MAINTAINER_MODE" >&6; }
3127 if test $USE_MAINTAINER_MODE = yes; then
3128 MAINTAINER_MODE_TRUE=
3129 MAINTAINER_MODE_FALSE='#'
3130else
3131 MAINTAINER_MODE_TRUE='#'
3132 MAINTAINER_MODE_FALSE=
3133fi
3134
3135 MAINT=$MAINTAINER_MODE_TRUE
3136
3137
3138
3139ac_ext=c
3140ac_cpp='$CPP $CPPFLAGS'
3141ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3142ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3143ac_compiler_gnu=$ac_cv_c_compiler_gnu
3144if test -n "$ac_tool_prefix"; then
3145 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3146set dummy ${ac_tool_prefix}gcc; ac_word=$2
3147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3148$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3149if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3150 $as_echo_n "(cached) " >&6
c906108c
SS
3151else
3152 if test -n "$CC"; then
3153 ac_cv_prog_CC="$CC" # Let the user override the test.
3154else
bec39cab
AC
3155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3156for as_dir in $PATH
3157do
3158 IFS=$as_save_IFS
3159 test -z "$as_dir" && as_dir=.
81ecdfbb 3160 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3162 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3164 break 2
3165 fi
3166done
81ecdfbb
RW
3167 done
3168IFS=$as_save_IFS
bec39cab 3169
c906108c
SS
3170fi
3171fi
bec39cab 3172CC=$ac_cv_prog_CC
c906108c 3173if test -n "$CC"; then
81ecdfbb
RW
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3175$as_echo "$CC" >&6; }
c906108c 3176else
81ecdfbb
RW
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3178$as_echo "no" >&6; }
c906108c
SS
3179fi
3180
81ecdfbb 3181
b4e70030
JB
3182fi
3183if test -z "$ac_cv_prog_CC"; then
3184 ac_ct_CC=$CC
81ecdfbb
RW
3185 # Extract the first word of "gcc", so it can be a program name with args.
3186set dummy gcc; ac_word=$2
3187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3188$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3189if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3190 $as_echo_n "(cached) " >&6
b4e70030
JB
3191else
3192 if test -n "$ac_ct_CC"; then
3193 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3194else
3195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196for as_dir in $PATH
3197do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
81ecdfbb 3200 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3202 ac_cv_prog_ac_ct_CC="gcc"
3203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3204 break 2
4e8d927d 3205 fi
b4e70030 3206done
81ecdfbb
RW
3207 done
3208IFS=$as_save_IFS
b4e70030
JB
3209
3210fi
3211fi
3212ac_ct_CC=$ac_cv_prog_ac_ct_CC
3213if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3215$as_echo "$ac_ct_CC" >&6; }
b4e70030 3216else
81ecdfbb
RW
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218$as_echo "no" >&6; }
b4e70030
JB
3219fi
3220
81ecdfbb
RW
3221 if test "x$ac_ct_CC" = x; then
3222 CC=""
3223 else
3224 case $cross_compiling:$ac_tool_warned in
3225yes:)
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3228ac_tool_warned=yes ;;
3229esac
3230 CC=$ac_ct_CC
3231 fi
b4e70030
JB
3232else
3233 CC="$ac_cv_prog_CC"
3234fi
3235
c906108c 3236if test -z "$CC"; then
81ecdfbb
RW
3237 if test -n "$ac_tool_prefix"; then
3238 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3239set dummy ${ac_tool_prefix}cc; ac_word=$2
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3241$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3242if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3243 $as_echo_n "(cached) " >&6
c906108c
SS
3244else
3245 if test -n "$CC"; then
3246 ac_cv_prog_CC="$CC" # Let the user override the test.
3247else
bec39cab
AC
3248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
81ecdfbb 3253 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3255 ac_cv_prog_CC="${ac_tool_prefix}cc"
3256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3257 break 2
3258 fi
3259done
81ecdfbb
RW
3260 done
3261IFS=$as_save_IFS
3262
3263fi
3264fi
3265CC=$ac_cv_prog_CC
3266if test -n "$CC"; then
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3268$as_echo "$CC" >&6; }
3269else
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271$as_echo "no" >&6; }
3272fi
3273
3274
3275 fi
3276fi
3277if test -z "$CC"; then
3278 # Extract the first word of "cc", so it can be a program name with args.
3279set dummy cc; ac_word=$2
3280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3281$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3282if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3283 $as_echo_n "(cached) " >&6
3284else
3285 if test -n "$CC"; then
3286 ac_cv_prog_CC="$CC" # Let the user override the test.
3287else
3288 ac_prog_rejected=no
3289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290for as_dir in $PATH
3291do
3292 IFS=$as_save_IFS
3293 test -z "$as_dir" && as_dir=.
3294 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3295 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3296 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3297 ac_prog_rejected=yes
3298 continue
3299 fi
3300 ac_cv_prog_CC="cc"
3301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3302 break 2
3303 fi
3304done
3305 done
3306IFS=$as_save_IFS
bec39cab 3307
c906108c
SS
3308if test $ac_prog_rejected = yes; then
3309 # We found a bogon in the path, so make sure we never use it.
3310 set dummy $ac_cv_prog_CC
3311 shift
bec39cab 3312 if test $# != 0; then
c906108c
SS
3313 # We chose a different compiler from the bogus one.
3314 # However, it has the same basename, so the bogon will be chosen
3315 # first if we set CC to just the basename; use the full file name.
3316 shift
bec39cab 3317 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3318 fi
3319fi
3320fi
3321fi
bec39cab 3322CC=$ac_cv_prog_CC
c906108c 3323if test -n "$CC"; then
81ecdfbb
RW
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3325$as_echo "$CC" >&6; }
c906108c 3326else
81ecdfbb
RW
3327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3328$as_echo "no" >&6; }
c906108c
SS
3329fi
3330
81ecdfbb 3331
bec39cab
AC
3332fi
3333if test -z "$CC"; then
3334 if test -n "$ac_tool_prefix"; then
81ecdfbb 3335 for ac_prog in cl.exe
bec39cab
AC
3336 do
3337 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3338set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3340$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3341if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3342 $as_echo_n "(cached) " >&6
c906108c
SS
3343else
3344 if test -n "$CC"; then
3345 ac_cv_prog_CC="$CC" # Let the user override the test.
3346else
bec39cab
AC
3347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in $PATH
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
81ecdfbb 3352 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3354 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3356 break 2
3357 fi
3358done
81ecdfbb
RW
3359 done
3360IFS=$as_save_IFS
bec39cab 3361
c906108c
SS
3362fi
3363fi
bec39cab 3364CC=$ac_cv_prog_CC
c906108c 3365if test -n "$CC"; then
81ecdfbb
RW
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3367$as_echo "$CC" >&6; }
c906108c 3368else
81ecdfbb
RW
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3370$as_echo "no" >&6; }
c906108c 3371fi
bec39cab 3372
81ecdfbb 3373
bec39cab
AC
3374 test -n "$CC" && break
3375 done
3376fi
3377if test -z "$CC"; then
3378 ac_ct_CC=$CC
81ecdfbb 3379 for ac_prog in cl.exe
bec39cab
AC
3380do
3381 # Extract the first word of "$ac_prog", so it can be a program name with args.
3382set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3385if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3386 $as_echo_n "(cached) " >&6
bec39cab
AC
3387else
3388 if test -n "$ac_ct_CC"; then
3389 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3390else
3391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392for as_dir in $PATH
3393do
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
81ecdfbb 3396 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3398 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3400 break 2
c906108c 3401 fi
bec39cab 3402done
81ecdfbb
RW
3403 done
3404IFS=$as_save_IFS
bec39cab
AC
3405
3406fi
3407fi
3408ac_ct_CC=$ac_cv_prog_ac_ct_CC
3409if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3411$as_echo "$ac_ct_CC" >&6; }
bec39cab 3412else
81ecdfbb
RW
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3414$as_echo "no" >&6; }
c906108c
SS
3415fi
3416
81ecdfbb 3417
bec39cab
AC
3418 test -n "$ac_ct_CC" && break
3419done
c906108c 3420
81ecdfbb
RW
3421 if test "x$ac_ct_CC" = x; then
3422 CC=""
3423 else
3424 case $cross_compiling:$ac_tool_warned in
3425yes:)
3426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3428ac_tool_warned=yes ;;
3429esac
3430 CC=$ac_ct_CC
3431 fi
bec39cab
AC
3432fi
3433
3434fi
3435
3436
81ecdfbb
RW
3437test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3439as_fn_error $? "no acceptable C compiler found in \$PATH
3440See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3441
3442# Provide some information about the compiler.
81ecdfbb
RW
3443$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3444set X $ac_compile
3445ac_compiler=$2
3446for ac_option in --version -v -V -qversion; do
3447 { { ac_try="$ac_compiler $ac_option >&5"
3448case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451esac
3452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3453$as_echo "$ac_try_echo"; } >&5
3454 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3455 ac_status=$?
81ecdfbb
RW
3456 if test -s conftest.err; then
3457 sed '10a\
3458... rest of stderr output deleted ...
3459 10q' conftest.err >conftest.er1
3460 cat conftest.er1 >&5
81ecdfbb 3461 fi
d0ac1c44 3462 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3463 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3464 test $ac_status = 0; }
3465done
bec39cab 3466
81ecdfbb 3467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3468/* end confdefs.h. */
3469
3470int
3471main ()
3472{
3473
3474 ;
3475 return 0;
3476}
3477_ACEOF
3478ac_clean_files_save=$ac_clean_files
d0ac1c44 3479ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3480# Try to create an executable without -o first, disregard a.out.
3481# It will help us diagnose broken compilers, and finding out an intuition
3482# of exeext.
d0ac1c44
SM
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3484$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3485ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3486
3487# The possible output files:
3488ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3489
3490ac_rmfiles=
3491for ac_file in $ac_files
3492do
3493 case $ac_file in
3494 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3495 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3496 esac
3497done
3498rm -f $ac_rmfiles
3499
3500if { { ac_try="$ac_link_default"
3501case "(($ac_try" in
3502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3503 *) ac_try_echo=$ac_try;;
3504esac
3505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3506$as_echo "$ac_try_echo"; } >&5
3507 (eval "$ac_link_default") 2>&5
3508 ac_status=$?
3509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3510 test $ac_status = 0; }; then :
3511 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3512# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3513# in a Makefile. We should not override ac_cv_exeext if it was cached,
3514# so that the user can short-circuit this test for compilers unknown to
3515# Autoconf.
3516for ac_file in $ac_files ''
bec39cab
AC
3517do
3518 test -f "$ac_file" || continue
3519 case $ac_file in
81ecdfbb 3520 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3521 ;;
3522 [ab].out )
3523 # We found the default executable, but exeext='' is most
3524 # certainly right.
3525 break;;
3526 *.* )
81ecdfbb
RW
3527 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3528 then :; else
3529 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3530 fi
3531 # We set ac_cv_exeext here because the later test for it is not
3532 # safe: cross compilers may not add the suffix if given an `-o'
3533 # argument, so we may need to know it at that point already.
3534 # Even if this section looks crufty: it has the advantage of
3535 # actually working.
b4e70030
JB
3536 break;;
3537 * )
3538 break;;
bec39cab
AC
3539 esac
3540done
81ecdfbb
RW
3541test "$ac_cv_exeext" = no && ac_cv_exeext=
3542
bec39cab 3543else
81ecdfbb
RW
3544 ac_file=''
3545fi
81ecdfbb 3546if test -z "$ac_file"; then :
d0ac1c44
SM
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3548$as_echo "no" >&6; }
3549$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3550sed 's/^/| /' conftest.$ac_ext >&5
3551
81ecdfbb
RW
3552{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3554as_fn_error 77 "C compiler cannot create executables
3555See \`config.log' for more details" "$LINENO" 5; }
3556else
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3558$as_echo "yes" >&6; }
bec39cab 3559fi
d0ac1c44
SM
3560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3561$as_echo_n "checking for C compiler default output file name... " >&6; }
3562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3563$as_echo "$ac_file" >&6; }
b4e70030 3564ac_exeext=$ac_cv_exeext
b4e70030 3565
d0ac1c44 3566rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3567ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3569$as_echo_n "checking for suffix of executables... " >&6; }
3570if { { ac_try="$ac_link"
3571case "(($ac_try" in
3572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3573 *) ac_try_echo=$ac_try;;
3574esac
3575eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3576$as_echo "$ac_try_echo"; } >&5
3577 (eval "$ac_link") 2>&5
bec39cab 3578 ac_status=$?
81ecdfbb
RW
3579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3580 test $ac_status = 0; }; then :
b4e70030
JB
3581 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3582# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3583# work properly (i.e., refer to `conftest.exe'), while it won't with
3584# `rm'.
3585for ac_file in conftest.exe conftest conftest.*; do
3586 test -f "$ac_file" || continue
3587 case $ac_file in
81ecdfbb 3588 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3589 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3590 break;;
3591 * ) break;;
3592 esac
3593done
c906108c 3594else
81ecdfbb
RW
3595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3597as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3598See \`config.log' for more details" "$LINENO" 5; }
c906108c 3599fi
d0ac1c44 3600rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3602$as_echo "$ac_cv_exeext" >&6; }
c906108c 3603
b4e70030 3604rm -f conftest.$ac_ext
bec39cab
AC
3605EXEEXT=$ac_cv_exeext
3606ac_exeext=$EXEEXT
d0ac1c44
SM
3607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3608/* end confdefs.h. */
3609#include <stdio.h>
3610int
3611main ()
3612{
3613FILE *f = fopen ("conftest.out", "w");
3614 return ferror (f) || fclose (f) != 0;
3615
3616 ;
3617 return 0;
3618}
3619_ACEOF
3620ac_clean_files="$ac_clean_files conftest.out"
3621# Check that the compiler produces executables we can run. If not, either
3622# the compiler is broken, or we cross compile.
3623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3624$as_echo_n "checking whether we are cross compiling... " >&6; }
3625if test "$cross_compiling" != yes; then
3626 { { ac_try="$ac_link"
3627case "(($ac_try" in
3628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3629 *) ac_try_echo=$ac_try;;
3630esac
3631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3632$as_echo "$ac_try_echo"; } >&5
3633 (eval "$ac_link") 2>&5
3634 ac_status=$?
3635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3636 test $ac_status = 0; }
3637 if { ac_try='./conftest$ac_cv_exeext'
3638 { { case "(($ac_try" in
3639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3640 *) ac_try_echo=$ac_try;;
3641esac
3642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3643$as_echo "$ac_try_echo"; } >&5
3644 (eval "$ac_try") 2>&5
3645 ac_status=$?
3646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3647 test $ac_status = 0; }; }; then
3648 cross_compiling=no
3649 else
3650 if test "$cross_compiling" = maybe; then
3651 cross_compiling=yes
3652 else
3653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3655as_fn_error $? "cannot run C compiled programs.
3656If you meant to cross compile, use \`--host'.
3657See \`config.log' for more details" "$LINENO" 5; }
3658 fi
3659 fi
3660fi
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3662$as_echo "$cross_compiling" >&6; }
3663
3664rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3665ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3667$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3668if ${ac_cv_objext+:} false; then :
81ecdfbb 3669 $as_echo_n "(cached) " >&6
bec39cab 3670else
81ecdfbb 3671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3672/* end confdefs.h. */
3673
3674int
3675main ()
3676{
3677
3678 ;
3679 return 0;
3680}
3681_ACEOF
3682rm -f conftest.o conftest.obj
81ecdfbb
RW
3683if { { ac_try="$ac_compile"
3684case "(($ac_try" in
3685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3686 *) ac_try_echo=$ac_try;;
3687esac
3688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3689$as_echo "$ac_try_echo"; } >&5
3690 (eval "$ac_compile") 2>&5
3691 ac_status=$?
3692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3693 test $ac_status = 0; }; then :
3694 for ac_file in conftest.o conftest.obj conftest.*; do
3695 test -f "$ac_file" || continue;
bec39cab 3696 case $ac_file in
81ecdfbb 3697 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3698 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3699 break;;
3700 esac
3701done
c906108c 3702else
81ecdfbb 3703 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3704sed 's/^/| /' conftest.$ac_ext >&5
3705
81ecdfbb
RW
3706{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3708as_fn_error $? "cannot compute suffix of object files: cannot compile
3709See \`config.log' for more details" "$LINENO" 5; }
c906108c 3710fi
b4e70030 3711rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3712fi
81ecdfbb
RW
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3714$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3715OBJEXT=$ac_cv_objext
3716ac_objext=$OBJEXT
81ecdfbb
RW
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3718$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3719if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3720 $as_echo_n "(cached) " >&6
c906108c 3721else
81ecdfbb 3722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3723/* end confdefs.h. */
3724
3725int
3726main ()
3727{
3728#ifndef __GNUC__
3729 choke me
3730#endif
3731
3732 ;
3733 return 0;
3734}
3735_ACEOF
81ecdfbb 3736if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3737 ac_compiler_gnu=yes
3738else
81ecdfbb 3739 ac_compiler_gnu=no
bec39cab 3740fi
81ecdfbb 3741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3742ac_cv_c_compiler_gnu=$ac_compiler_gnu
3743
3744fi
81ecdfbb
RW
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3746$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3747if test $ac_compiler_gnu = yes; then
3748 GCC=yes
3749else
3750 GCC=
3751fi
bec39cab
AC
3752ac_test_CFLAGS=${CFLAGS+set}
3753ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3755$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3756if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3757 $as_echo_n "(cached) " >&6
bec39cab 3758else
81ecdfbb
RW
3759 ac_save_c_werror_flag=$ac_c_werror_flag
3760 ac_c_werror_flag=yes
3761 ac_cv_prog_cc_g=no
3762 CFLAGS="-g"
3763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3764/* end confdefs.h. */
3765
3766int
3767main ()
3768{
3769
3770 ;
3771 return 0;
3772}
3773_ACEOF
81ecdfbb 3774if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3775 ac_cv_prog_cc_g=yes
3776else
81ecdfbb
RW
3777 CFLAGS=""
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779/* end confdefs.h. */
3780
3781int
3782main ()
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
3789if ac_fn_c_try_compile "$LINENO"; then :
3790
3791else
3792 ac_c_werror_flag=$ac_save_c_werror_flag
3793 CFLAGS="-g"
3794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795/* end confdefs.h. */
3796
3797int
3798main ()
3799{
c906108c 3800
81ecdfbb
RW
3801 ;
3802 return 0;
3803}
3804_ACEOF
3805if ac_fn_c_try_compile "$LINENO"; then :
3806 ac_cv_prog_cc_g=yes
3807fi
3808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3809fi
3810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3811fi
81ecdfbb
RW
3812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3813 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3814fi
81ecdfbb
RW
3815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3816$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3817if test "$ac_test_CFLAGS" = set; then
bec39cab 3818 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3819elif test $ac_cv_prog_cc_g = yes; then
3820 if test "$GCC" = yes; then
3821 CFLAGS="-g -O2"
3822 else
3823 CFLAGS="-g"
3824 fi
3825else
3826 if test "$GCC" = yes; then
3827 CFLAGS="-O2"
3828 else
3829 CFLAGS=
3830 fi
3831fi
81ecdfbb
RW
3832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3833$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3834if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3835 $as_echo_n "(cached) " >&6
bec39cab 3836else
81ecdfbb 3837 ac_cv_prog_cc_c89=no
bec39cab 3838ac_save_CC=$CC
81ecdfbb 3839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3840/* end confdefs.h. */
c906108c
SS
3841#include <stdarg.h>
3842#include <stdio.h>
d0ac1c44 3843struct stat;
c906108c
SS
3844/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3845struct buf { int x; };
3846FILE * (*rcsopen) (struct buf *, struct stat *, int);
3847static char *e (p, i)
3848 char **p;
3849 int i;
3850{
3851 return p[i];
3852}
3853static char *f (char * (*g) (char **, int), char **p, ...)
3854{
3855 char *s;
3856 va_list v;
3857 va_start (v,p);
3858 s = g (p, va_arg (v,int));
3859 va_end (v);
3860 return s;
3861}
bec39cab
AC
3862
3863/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3864 function prototypes and stuff, but not '\xHH' hex character constants.
3865 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3866 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3867 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3868 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3869 that's true only with -std. */
bec39cab
AC
3870int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3871
81ecdfbb
RW
3872/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3873 inside strings and character constants. */
3874#define FOO(x) 'x'
3875int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3876
c906108c
SS
3877int test (int i, double x);
3878struct s1 {int (*f) (int a);};
3879struct s2 {int (*f) (double a);};
3880int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3881int argc;
3882char **argv;
bec39cab
AC
3883int
3884main ()
3885{
c906108c 3886return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3887 ;
3888 return 0;
3889}
3890_ACEOF
81ecdfbb
RW
3891for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3892 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3893do
3894 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3895 if ac_fn_c_try_compile "$LINENO"; then :
3896 ac_cv_prog_cc_c89=$ac_arg
c906108c 3897fi
81ecdfbb
RW
3898rm -f core conftest.err conftest.$ac_objext
3899 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3900done
81ecdfbb 3901rm -f conftest.$ac_ext
bec39cab 3902CC=$ac_save_CC
c906108c
SS
3903
3904fi
81ecdfbb
RW
3905# AC_CACHE_VAL
3906case "x$ac_cv_prog_cc_c89" in
3907 x)
3908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3909$as_echo "none needed" >&6; } ;;
3910 xno)
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3912$as_echo "unsupported" >&6; } ;;
bec39cab 3913 *)
81ecdfbb
RW
3914 CC="$CC $ac_cv_prog_cc_c89"
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3916$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3917esac
81ecdfbb 3918if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3919
b4e70030
JB
3920fi
3921
bec39cab
AC
3922ac_ext=c
3923ac_cpp='$CPP $CPPFLAGS'
3924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3926ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3927
3bc3d82a
PA
3928ac_ext=cpp
3929ac_cpp='$CXXCPP $CPPFLAGS'
3930ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3931ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3932ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3933if test -z "$CXX"; then
3934 if test -n "$CCC"; then
3935 CXX=$CCC
3936 else
3937 if test -n "$ac_tool_prefix"; then
3938 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3939 do
3940 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3943$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3944if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3945 $as_echo_n "(cached) " >&6
3946else
3947 if test -n "$CXX"; then
3948 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3949else
3950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953 IFS=$as_save_IFS
3954 test -z "$as_dir" && as_dir=.
3955 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3957 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959 break 2
3960 fi
3961done
3962 done
3963IFS=$as_save_IFS
3964
3965fi
3966fi
3967CXX=$ac_cv_prog_CXX
3968if test -n "$CXX"; then
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3970$as_echo "$CXX" >&6; }
3971else
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977 test -n "$CXX" && break
3978 done
3979fi
3980if test -z "$CXX"; then
3981 ac_ct_CXX=$CXX
3982 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3983do
3984 # Extract the first word of "$ac_prog", so it can be a program name with args.
3985set dummy $ac_prog; ac_word=$2
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3987$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3988if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3989 $as_echo_n "(cached) " >&6
3990else
3991 if test -n "$ac_ct_CXX"; then
3992 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3993else
3994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3995for as_dir in $PATH
3996do
3997 IFS=$as_save_IFS
3998 test -z "$as_dir" && as_dir=.
3999 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
4001 ac_cv_prog_ac_ct_CXX="$ac_prog"
4002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4003 break 2
4004 fi
4005done
4006 done
4007IFS=$as_save_IFS
4008
4009fi
4010fi
4011ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4012if test -n "$ac_ct_CXX"; then
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4014$as_echo "$ac_ct_CXX" >&6; }
4015else
4016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4017$as_echo "no" >&6; }
4018fi
4019
4020
4021 test -n "$ac_ct_CXX" && break
4022done
4023
4024 if test "x$ac_ct_CXX" = x; then
4025 CXX="g++"
4026 else
4027 case $cross_compiling:$ac_tool_warned in
4028yes:)
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4031ac_tool_warned=yes ;;
4032esac
4033 CXX=$ac_ct_CXX
4034 fi
4035fi
4036
4037 fi
4038fi
4039# Provide some information about the compiler.
4040$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4041set X $ac_compile
4042ac_compiler=$2
4043for ac_option in --version -v -V -qversion; do
4044 { { ac_try="$ac_compiler $ac_option >&5"
4045case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4052 ac_status=$?
4053 if test -s conftest.err; then
4054 sed '10a\
4055... rest of stderr output deleted ...
4056 10q' conftest.err >conftest.er1
4057 cat conftest.er1 >&5
3bc3d82a 4058 fi
d0ac1c44 4059 rm -f conftest.er1 conftest.err
3bc3d82a
PA
4060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4061 test $ac_status = 0; }
4062done
4063
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4065$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 4066if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
4067 $as_echo_n "(cached) " >&6
4068else
4069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070/* end confdefs.h. */
4071
4072int
4073main ()
4074{
4075#ifndef __GNUC__
4076 choke me
4077#endif
4078
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083if ac_fn_cxx_try_compile "$LINENO"; then :
4084 ac_compiler_gnu=yes
4085else
4086 ac_compiler_gnu=no
4087fi
4088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4089ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4090
4091fi
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4093$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4094if test $ac_compiler_gnu = yes; then
4095 GXX=yes
4096else
4097 GXX=
4098fi
4099ac_test_CXXFLAGS=${CXXFLAGS+set}
4100ac_save_CXXFLAGS=$CXXFLAGS
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4102$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 4103if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
4104 $as_echo_n "(cached) " >&6
4105else
4106 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4107 ac_cxx_werror_flag=yes
4108 ac_cv_prog_cxx_g=no
4109 CXXFLAGS="-g"
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4111/* end confdefs.h. */
4112
4113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121if ac_fn_cxx_try_compile "$LINENO"; then :
4122 ac_cv_prog_cxx_g=yes
4123else
4124 CXXFLAGS=""
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4126/* end confdefs.h. */
4127
4128int
4129main ()
4130{
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
4136if ac_fn_cxx_try_compile "$LINENO"; then :
4137
4138else
4139 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4140 CXXFLAGS="-g"
4141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4142/* end confdefs.h. */
4143
4144int
4145main ()
4146{
4147
4148 ;
4149 return 0;
4150}
4151_ACEOF
4152if ac_fn_cxx_try_compile "$LINENO"; then :
4153 ac_cv_prog_cxx_g=yes
4154fi
4155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4156fi
4157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4158fi
4159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4161fi
4162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4163$as_echo "$ac_cv_prog_cxx_g" >&6; }
4164if test "$ac_test_CXXFLAGS" = set; then
4165 CXXFLAGS=$ac_save_CXXFLAGS
4166elif test $ac_cv_prog_cxx_g = yes; then
4167 if test "$GXX" = yes; then
4168 CXXFLAGS="-g -O2"
4169 else
4170 CXXFLAGS="-g"
4171 fi
4172else
4173 if test "$GXX" = yes; then
4174 CXXFLAGS="-O2"
4175 else
4176 CXXFLAGS=
4177 fi
4178fi
4179ac_ext=c
4180ac_cpp='$CPP $CPPFLAGS'
4181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4183ac_compiler_gnu=$ac_cv_c_compiler_gnu
4184
4185
60ca704f 4186
bec39cab
AC
4187ac_ext=c
4188ac_cpp='$CPP $CPPFLAGS'
4189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4191ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4193$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4194# On Suns, sometimes $CPP names a directory.
4195if test -n "$CPP" && test -d "$CPP"; then
4196 CPP=
8bb2c122 4197fi
bec39cab 4198if test -z "$CPP"; then
d0ac1c44 4199 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4200 $as_echo_n "(cached) " >&6
bec39cab
AC
4201else
4202 # Double quotes because CPP needs to be expanded
4203 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4204 do
4205 ac_preproc_ok=false
4206for ac_c_preproc_warn_flag in '' yes
4207do
4208 # Use a header file that comes with gcc, so configuring glibc
4209 # with a fresh cross-compiler works.
4210 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4211 # <limits.h> exists even on freestanding compilers.
4212 # On the NeXT, cc -E runs the code through the compiler's parser,
4213 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4215/* end confdefs.h. */
4216#ifdef __STDC__
4217# include <limits.h>
4218#else
4219# include <assert.h>
4220#endif
4221 Syntax error
4222_ACEOF
81ecdfbb 4223if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4224
81ecdfbb 4225else
bec39cab
AC
4226 # Broken: fails on valid input.
4227continue
4228fi
d0ac1c44 4229rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4230
81ecdfbb 4231 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4232 # can be detected and how.
81ecdfbb 4233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4234/* end confdefs.h. */
4235#include <ac_nonexistent.h>
4236_ACEOF
81ecdfbb 4237if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4238 # Broken: success on invalid input.
4239continue
8bb2c122 4240else
bec39cab
AC
4241 # Passes both tests.
4242ac_preproc_ok=:
4243break
8bb2c122 4244fi
d0ac1c44 4245rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4246
bec39cab
AC
4247done
4248# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4249rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4250if $ac_preproc_ok; then :
bec39cab
AC
4251 break
4252fi
8bb2c122 4253
bec39cab
AC
4254 done
4255 ac_cv_prog_CPP=$CPP
ddc9cd0f 4256
c906108c 4257fi
bec39cab
AC
4258 CPP=$ac_cv_prog_CPP
4259else
4260 ac_cv_prog_CPP=$CPP
c906108c 4261fi
81ecdfbb
RW
4262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4263$as_echo "$CPP" >&6; }
bec39cab
AC
4264ac_preproc_ok=false
4265for ac_c_preproc_warn_flag in '' yes
4266do
4267 # Use a header file that comes with gcc, so configuring glibc
4268 # with a fresh cross-compiler works.
4269 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4270 # <limits.h> exists even on freestanding compilers.
4271 # On the NeXT, cc -E runs the code through the compiler's parser,
4272 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4274/* end confdefs.h. */
4275#ifdef __STDC__
4276# include <limits.h>
4277#else
4278# include <assert.h>
4279#endif
4280 Syntax error
4281_ACEOF
81ecdfbb 4282if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4283
81ecdfbb 4284else
bec39cab
AC
4285 # Broken: fails on valid input.
4286continue
4287fi
d0ac1c44 4288rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4289
81ecdfbb 4290 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4291 # can be detected and how.
81ecdfbb 4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4293/* end confdefs.h. */
4294#include <ac_nonexistent.h>
4295_ACEOF
81ecdfbb 4296if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4297 # Broken: success on invalid input.
4298continue
c906108c 4299else
bec39cab
AC
4300 # Passes both tests.
4301ac_preproc_ok=:
4302break
c906108c 4303fi
d0ac1c44 4304rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4305
bec39cab
AC
4306done
4307# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4308rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4309if $ac_preproc_ok; then :
4310
c906108c 4311else
81ecdfbb
RW
4312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4314as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4315See \`config.log' for more details" "$LINENO" 5; }
c906108c 4316fi
c906108c 4317
bec39cab
AC
4318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323
4324
81ecdfbb
RW
4325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4326$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4327if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4328 $as_echo_n "(cached) " >&6
4e8d927d 4329else
81ecdfbb
RW
4330 if test -z "$GREP"; then
4331 ac_path_GREP_found=false
4332 # Loop through the user's path and test for each of PROGNAME-LIST
4333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4334for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4335do
4336 IFS=$as_save_IFS
4337 test -z "$as_dir" && as_dir=.
4338 for ac_prog in grep ggrep; do
4339 for ac_exec_ext in '' $ac_executable_extensions; do
4340 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4341 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4342# Check for GNU ac_path_GREP and select it if it is found.
4343 # Check for GNU $ac_path_GREP
4344case `"$ac_path_GREP" --version 2>&1` in
4345*GNU*)
4346 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4347*)
4348 ac_count=0
4349 $as_echo_n 0123456789 >"conftest.in"
4350 while :
4351 do
4352 cat "conftest.in" "conftest.in" >"conftest.tmp"
4353 mv "conftest.tmp" "conftest.in"
4354 cp "conftest.in" "conftest.nl"
4355 $as_echo 'GREP' >> "conftest.nl"
4356 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4357 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4358 as_fn_arith $ac_count + 1 && ac_count=$as_val
4359 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4360 # Best one so far, save it but keep looking for a better one
4361 ac_cv_path_GREP="$ac_path_GREP"
4362 ac_path_GREP_max=$ac_count
bec39cab 4363 fi
81ecdfbb
RW
4364 # 10*(2^10) chars as input seems more than enough
4365 test $ac_count -gt 10 && break
4366 done
4367 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4368esac
bec39cab 4369
81ecdfbb
RW
4370 $ac_path_GREP_found && break 3
4371 done
4372 done
4373 done
4374IFS=$as_save_IFS
4375 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4376 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4377 fi
c906108c 4378else
81ecdfbb 4379 ac_cv_path_GREP=$GREP
c906108c 4380fi
c906108c 4381
81ecdfbb
RW
4382fi
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4384$as_echo "$ac_cv_path_GREP" >&6; }
4385 GREP="$ac_cv_path_GREP"
c906108c 4386
c906108c 4387
81ecdfbb
RW
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4389$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4390if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4391 $as_echo_n "(cached) " >&6
783e057b 4392else
81ecdfbb
RW
4393 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4394 then ac_cv_path_EGREP="$GREP -E"
4395 else
4396 if test -z "$EGREP"; then
4397 ac_path_EGREP_found=false
4398 # Loop through the user's path and test for each of PROGNAME-LIST
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4404 for ac_prog in egrep; do
4405 for ac_exec_ext in '' $ac_executable_extensions; do
4406 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4407 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4408# Check for GNU ac_path_EGREP and select it if it is found.
4409 # Check for GNU $ac_path_EGREP
4410case `"$ac_path_EGREP" --version 2>&1` in
4411*GNU*)
4412 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4413*)
4414 ac_count=0
4415 $as_echo_n 0123456789 >"conftest.in"
4416 while :
4417 do
4418 cat "conftest.in" "conftest.in" >"conftest.tmp"
4419 mv "conftest.tmp" "conftest.in"
4420 cp "conftest.in" "conftest.nl"
4421 $as_echo 'EGREP' >> "conftest.nl"
4422 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4424 as_fn_arith $ac_count + 1 && ac_count=$as_val
4425 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4426 # Best one so far, save it but keep looking for a better one
4427 ac_cv_path_EGREP="$ac_path_EGREP"
4428 ac_path_EGREP_max=$ac_count
4429 fi
4430 # 10*(2^10) chars as input seems more than enough
4431 test $ac_count -gt 10 && break
4432 done
4433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4434esac
bec39cab 4435
81ecdfbb
RW
4436 $ac_path_EGREP_found && break 3
4437 done
4438 done
4439 done
4440IFS=$as_save_IFS
4441 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4442 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4443 fi
783e057b 4444else
81ecdfbb 4445 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4446fi
4447
81ecdfbb 4448 fi
783e057b 4449fi
81ecdfbb
RW
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4451$as_echo "$ac_cv_path_EGREP" >&6; }
4452 EGREP="$ac_cv_path_EGREP"
4453
783e057b 4454
81ecdfbb
RW
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4456$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4457if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4458 $as_echo_n "(cached) " >&6
783e057b 4459else
81ecdfbb 4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4461/* end confdefs.h. */
783e057b 4462#include <stdlib.h>
bec39cab 4463#include <stdarg.h>
783e057b
DJ
4464#include <string.h>
4465#include <float.h>
c906108c 4466
bec39cab
AC
4467int
4468main ()
4469{
c906108c 4470
bec39cab
AC
4471 ;
4472 return 0;
4473}
4474_ACEOF
81ecdfbb 4475if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4476 ac_cv_header_stdc=yes
c906108c 4477else
81ecdfbb 4478 ac_cv_header_stdc=no
c906108c 4479fi
81ecdfbb 4480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4481
783e057b
DJ
4482if test $ac_cv_header_stdc = yes; then
4483 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4485/* end confdefs.h. */
4486#include <string.h>
c906108c 4487
783e057b
DJ
4488_ACEOF
4489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4490 $EGREP "memchr" >/dev/null 2>&1; then :
4491
c906108c 4492else
783e057b 4493 ac_cv_header_stdc=no
c906108c 4494fi
783e057b 4495rm -f conftest*
c906108c
SS
4496
4497fi
4498
783e057b
DJ
4499if test $ac_cv_header_stdc = yes; then
4500 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4502/* end confdefs.h. */
4503#include <stdlib.h>
bec39cab 4504
783e057b
DJ
4505_ACEOF
4506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4507 $EGREP "free" >/dev/null 2>&1; then :
4508
bec39cab 4509else
783e057b 4510 ac_cv_header_stdc=no
bec39cab 4511fi
783e057b 4512rm -f conftest*
bec39cab
AC
4513
4514fi
bec39cab 4515
783e057b
DJ
4516if test $ac_cv_header_stdc = yes; then
4517 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4518 if test "$cross_compiling" = yes; then :
783e057b 4519 :
bec39cab 4520else
81ecdfbb 4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4522/* end confdefs.h. */
4523#include <ctype.h>
81ecdfbb 4524#include <stdlib.h>
783e057b
DJ
4525#if ((' ' & 0x0FF) == 0x020)
4526# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4527# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4528#else
4529# define ISLOWER(c) \
4530 (('a' <= (c) && (c) <= 'i') \
4531 || ('j' <= (c) && (c) <= 'r') \
4532 || ('s' <= (c) && (c) <= 'z'))
4533# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4534#endif
4535
4536#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4537int
4538main ()
4539{
4540 int i;
4541 for (i = 0; i < 256; i++)
4542 if (XOR (islower (i), ISLOWER (i))
4543 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4544 return 2;
4545 return 0;
783e057b
DJ
4546}
4547_ACEOF
81ecdfbb 4548if ac_fn_c_try_run "$LINENO"; then :
783e057b 4549
81ecdfbb
RW
4550else
4551 ac_cv_header_stdc=no
783e057b 4552fi
81ecdfbb
RW
4553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4554 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4555fi
81ecdfbb 4556
783e057b
DJ
4557fi
4558fi
81ecdfbb
RW
4559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4560$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4561if test $ac_cv_header_stdc = yes; then
4562
81ecdfbb 4563$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4564
4565fi
4566
4567# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4568for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4569 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4570do :
4571 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4572ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4573"
d0ac1c44 4574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4575 cat >>confdefs.h <<_ACEOF
81ecdfbb 4576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4577_ACEOF
4578
4579fi
4580
4581done
4582
4583
4584
81ecdfbb 4585 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4586if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4587 MINIX=yes
4588else
4589 MINIX=
4590fi
4591
4592
4593 if test "$MINIX" = yes; then
4594
81ecdfbb 4595$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4596
4597
81ecdfbb 4598$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4599
4600
81ecdfbb 4601$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4602
4603 fi
4604
4605
81ecdfbb
RW
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4607$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4608if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4609 $as_echo_n "(cached) " >&6
783e057b 4610else
81ecdfbb 4611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4612/* end confdefs.h. */
4613
d0ac1c44
SM
4614# define __EXTENSIONS__ 1
4615 $ac_includes_default
783e057b
DJ
4616int
4617main ()
4618{
4619
4620 ;
4621 return 0;
4622}
4623_ACEOF
81ecdfbb 4624if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4625 ac_cv_safe_to_define___extensions__=yes
4626else
81ecdfbb 4627 ac_cv_safe_to_define___extensions__=no
783e057b 4628fi
81ecdfbb 4629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4630fi
81ecdfbb
RW
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4632$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4633 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4634 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4635
81ecdfbb 4636 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4637
81ecdfbb 4638 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4639
81ecdfbb 4640 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4641
81ecdfbb 4642 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4643
4644
c971b7fa
PA
4645ac_aux_dir=
4646for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4647 if test -f "$ac_dir/install-sh"; then
4648 ac_aux_dir=$ac_dir
4649 ac_install_sh="$ac_aux_dir/install-sh -c"
4650 break
4651 elif test -f "$ac_dir/install.sh"; then
4652 ac_aux_dir=$ac_dir
4653 ac_install_sh="$ac_aux_dir/install.sh -c"
4654 break
4655 elif test -f "$ac_dir/shtool"; then
4656 ac_aux_dir=$ac_dir
4657 ac_install_sh="$ac_aux_dir/shtool install -c"
4658 break
4659 fi
c971b7fa
PA
4660done
4661if test -z "$ac_aux_dir"; then
d0ac1c44 4662 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4663fi
770d76d7 4664
c971b7fa
PA
4665# These three variables are undocumented and unsupported,
4666# and are intended to be withdrawn in a future Autoconf release.
4667# They can cause serious problems if a builder's source tree is in a directory
4668# whose full name contains unusual characters.
4669ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4670ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4671ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4672
770d76d7 4673
c971b7fa
PA
4674# Make sure we can run config.sub.
4675$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4676 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4677
c971b7fa
PA
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4679$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4680if ${ac_cv_build+:} false; then :
c971b7fa 4681 $as_echo_n "(cached) " >&6
770d76d7 4682else
c971b7fa
PA
4683 ac_build_alias=$build_alias
4684test "x$ac_build_alias" = x &&
4685 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4686test "x$ac_build_alias" = x &&
d0ac1c44 4687 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4688ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4689 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4690
770d76d7 4691fi
c971b7fa
PA
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4693$as_echo "$ac_cv_build" >&6; }
4694case $ac_cv_build in
4695*-*-*) ;;
d0ac1c44 4696*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4697esac
c971b7fa
PA
4698build=$ac_cv_build
4699ac_save_IFS=$IFS; IFS='-'
4700set x $ac_cv_build
4701shift
4702build_cpu=$1
4703build_vendor=$2
4704shift; shift
4705# Remember, the first character of IFS is used to create $*,
4706# except with old shells:
4707build_os=$*
4708IFS=$ac_save_IFS
4709case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4710
4711
c971b7fa
PA
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4713$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4714if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4715 $as_echo_n "(cached) " >&6
4716else
c971b7fa
PA
4717 if test "x$host_alias" = x; then
4718 ac_cv_host=$ac_cv_build
81ecdfbb 4719else
c971b7fa 4720 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4721 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4722fi
81ecdfbb
RW
4723
4724fi
c971b7fa
PA
4725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4726$as_echo "$ac_cv_host" >&6; }
4727case $ac_cv_host in
4728*-*-*) ;;
d0ac1c44 4729*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4730esac
c971b7fa
PA
4731host=$ac_cv_host
4732ac_save_IFS=$IFS; IFS='-'
4733set x $ac_cv_host
4734shift
4735host_cpu=$1
4736host_vendor=$2
4737shift; shift
4738# Remember, the first character of IFS is used to create $*,
4739# except with old shells:
4740host_os=$*
4741IFS=$ac_save_IFS
4742case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4743
4744
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4746$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4747if ${ac_cv_target+:} false; then :
3388710e
JM
4748 $as_echo_n "(cached) " >&6
4749else
4750 if test "x$target_alias" = x; then
4751 ac_cv_target=$ac_cv_host
4752else
4753 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4754 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4755fi
4756
4757fi
4758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4759$as_echo "$ac_cv_target" >&6; }
4760case $ac_cv_target in
4761*-*-*) ;;
d0ac1c44 4762*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4763esac
4764target=$ac_cv_target
4765ac_save_IFS=$IFS; IFS='-'
4766set x $ac_cv_target
4767shift
4768target_cpu=$1
4769target_vendor=$2
4770shift; shift
4771# Remember, the first character of IFS is used to create $*,
4772# except with old shells:
4773target_os=$*
4774IFS=$ac_save_IFS
4775case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4776
4777
4778# The aliases save the names the user supplied, while $host etc.
4779# will get canonicalized.
4780test -n "$target_alias" &&
4781 test "$program_prefix$program_suffix$program_transform_name" = \
4782 NONENONEs,x,x, &&
4783 program_prefix=${target_alias}-
4784
4785# The tests for host and target for $enable_largefile require
4786# canonical names.
4787
4788
81ecdfbb 4789
da2f07f1
JK
4790# As the $enable_largefile decision depends on --enable-plugins we must set it
4791# even in directories otherwise not depending on the $plugins option.
4792
4793
2974be62
AM
4794 maybe_plugins=no
4795 for ac_header in dlfcn.h
4796do :
4797 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4798"
d0ac1c44 4799if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4800 cat >>confdefs.h <<_ACEOF
4801#define HAVE_DLFCN_H 1
4802_ACEOF
4803 maybe_plugins=yes
4804fi
4805
4806done
4807
4808 for ac_header in windows.h
4809do :
4810 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4811"
d0ac1c44 4812if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4813 cat >>confdefs.h <<_ACEOF
4814#define HAVE_WINDOWS_H 1
4815_ACEOF
4816 maybe_plugins=yes
4817fi
4818
4819done
4820
4821
4822 # Check whether --enable-plugins was given.
da2f07f1
JK
4823if test "${enable_plugins+set}" = set; then :
4824 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4825 no) plugins=no ;;
4826 *) plugins=yes
4827 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4828 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4829 fi ;;
4830 esac
da2f07f1 4831else
2974be62
AM
4832 plugins=$maybe_plugins
4833
da2f07f1
JK
4834fi
4835
2974be62 4836 if test "$plugins" = "yes"; then
458412c3
TT
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4838$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4839if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4840 $as_echo_n "(cached) " >&6
4841else
4842 ac_func_search_save_LIBS=$LIBS
4843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844/* end confdefs.h. */
4845
4846/* Override any GCC internal prototype to avoid an error.
4847 Use char because int might match the return type of a GCC
4848 builtin and then its argument prototype would still apply. */
4849#ifdef __cplusplus
4850extern "C"
4851#endif
458412c3 4852char dlsym ();
2974be62
AM
4853int
4854main ()
4855{
458412c3 4856return dlsym ();
2974be62
AM
4857 ;
4858 return 0;
4859}
4860_ACEOF
4861for ac_lib in '' dl; do
4862 if test -z "$ac_lib"; then
4863 ac_res="none required"
4864 else
4865 ac_res=-l$ac_lib
4866 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4867 fi
4868 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4869 ac_cv_search_dlsym=$ac_res
2974be62
AM
4870fi
4871rm -f core conftest.err conftest.$ac_objext \
4872 conftest$ac_exeext
d0ac1c44 4873 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4874 break
4875fi
4876done
d0ac1c44 4877if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4878
4879else
458412c3 4880 ac_cv_search_dlsym=no
2974be62
AM
4881fi
4882rm conftest.$ac_ext
4883LIBS=$ac_func_search_save_LIBS
4884fi
458412c3
TT
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4886$as_echo "$ac_cv_search_dlsym" >&6; }
4887ac_res=$ac_cv_search_dlsym
2974be62
AM
4888if test "$ac_res" != no; then :
4889 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4890
4891fi
4892
4893 fi
da2f07f1
JK
4894
4895
4896case "${host}" in
c8693053
RO
4897 sparc-*-solaris*|i?86-*-solaris*)
4898 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4899 # were mutually exclusive until Solaris 11.3. Without procfs support,
4900 # the bfd/ elf module cannot provide certain routines such as
4901 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4902 # explicitly requested large-file support through the
4903 # --enable-largefile switch, disable large-file support in favor of
4904 # procfs support.
4905 #
4906 # Check if <sys/procfs.h> is incompatible with large-file support.
4907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4908/* end confdefs.h. */
4909#define _FILE_OFFSET_BITS 64
4910#define _STRUCTURED_PROC 1
4911#include <sys/procfs.h>
4912int
4913main ()
4914{
4915
4916 ;
4917 return 0;
4918}
4919_ACEOF
4920if ac_fn_c_try_compile "$LINENO"; then :
4921 acx_cv_procfs_lfs=yes
4922else
4923 acx_cv_procfs_lfs=no
4924fi
4925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926 #
4927 # Forcefully disable large-file support only if necessary, gdb is in
4928 # tree and enabled.
4929 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4930 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4931 : ${enable_largefile="no"}
4932 if test "$plugins" = yes; then
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4934plugin support disabled; require large-file support which is incompatible with GDB." >&5
4935$as_echo "$as_me: WARNING:
4936plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4937 plugins=no
4938 fi
4939 fi
4940 #
4941 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4942 # benefit of g++ 9+ which predefines it on Solaris.
4943 if test "$enable_largefile" = no; then
4944 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4945
4946 fi
da2f07f1
JK
4947 ;;
4948esac
4949
4950# Check whether --enable-largefile was given.
4951if test "${enable_largefile+set}" = set; then :
4952 enableval=$enable_largefile;
4953fi
4954
4955if test "$enable_largefile" != no; then
4956
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4958$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4959if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4960 $as_echo_n "(cached) " >&6
4961else
4962 ac_cv_sys_largefile_CC=no
4963 if test "$GCC" != yes; then
4964 ac_save_CC=$CC
4965 while :; do
4966 # IRIX 6.2 and later do not support large files by default,
4967 # so use the C compiler's -n32 option if that helps.
4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4969/* end confdefs.h. */
4970#include <sys/types.h>
4971 /* Check that off_t can represent 2**63 - 1 correctly.
4972 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4973 since some C++ compilers masquerading as C compilers
4974 incorrectly reject 9223372036854775807. */
4975#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4976 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4977 && LARGE_OFF_T % 2147483647 == 1)
4978 ? 1 : -1];
4979int
4980main ()
4981{
4982
4983 ;
4984 return 0;
4985}
4986_ACEOF
4987 if ac_fn_c_try_compile "$LINENO"; then :
4988 break
4989fi
4990rm -f core conftest.err conftest.$ac_objext
4991 CC="$CC -n32"
4992 if ac_fn_c_try_compile "$LINENO"; then :
4993 ac_cv_sys_largefile_CC=' -n32'; break
4994fi
4995rm -f core conftest.err conftest.$ac_objext
4996 break
4997 done
4998 CC=$ac_save_CC
4999 rm -f conftest.$ac_ext
5000 fi
5001fi
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5003$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5004 if test "$ac_cv_sys_largefile_CC" != no; then
5005 CC=$CC$ac_cv_sys_largefile_CC
5006 fi
5007
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5009$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5010if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
5011 $as_echo_n "(cached) " >&6
5012else
5013 while :; do
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5015/* end confdefs.h. */
5016#include <sys/types.h>
5017 /* Check that off_t can represent 2**63 - 1 correctly.
5018 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5019 since some C++ compilers masquerading as C compilers
5020 incorrectly reject 9223372036854775807. */
5021#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5022 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5023 && LARGE_OFF_T % 2147483647 == 1)
5024 ? 1 : -1];
5025int
5026main ()
5027{
5028
5029 ;
5030 return 0;
5031}
5032_ACEOF
5033if ac_fn_c_try_compile "$LINENO"; then :
5034 ac_cv_sys_file_offset_bits=no; break
5035fi
5036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5038/* end confdefs.h. */
5039#define _FILE_OFFSET_BITS 64
5040#include <sys/types.h>
5041 /* Check that off_t can represent 2**63 - 1 correctly.
5042 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5043 since some C++ compilers masquerading as C compilers
5044 incorrectly reject 9223372036854775807. */
5045#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5046 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5047 && LARGE_OFF_T % 2147483647 == 1)
5048 ? 1 : -1];
5049int
5050main ()
5051{
5052
5053 ;
5054 return 0;
5055}
5056_ACEOF
5057if ac_fn_c_try_compile "$LINENO"; then :
5058 ac_cv_sys_file_offset_bits=64; break
5059fi
5060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5061 ac_cv_sys_file_offset_bits=unknown
5062 break
5063done
5064fi
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5066$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5067case $ac_cv_sys_file_offset_bits in #(
5068 no | unknown) ;;
5069 *)
5070cat >>confdefs.h <<_ACEOF
5071#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5072_ACEOF
5073;;
5074esac
5075rm -rf conftest*
5076 if test $ac_cv_sys_file_offset_bits = unknown; then
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5078$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5079if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
5080 $as_echo_n "(cached) " >&6
5081else
5082 while :; do
5083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5084/* end confdefs.h. */
5085#include <sys/types.h>
5086 /* Check that off_t can represent 2**63 - 1 correctly.
5087 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5088 since some C++ compilers masquerading as C compilers
5089 incorrectly reject 9223372036854775807. */
5090#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5091 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5092 && LARGE_OFF_T % 2147483647 == 1)
5093 ? 1 : -1];
5094int
5095main ()
5096{
5097
5098 ;
5099 return 0;
5100}
5101_ACEOF
5102if ac_fn_c_try_compile "$LINENO"; then :
5103 ac_cv_sys_large_files=no; break
5104fi
5105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5107/* end confdefs.h. */
5108#define _LARGE_FILES 1
5109#include <sys/types.h>
5110 /* Check that off_t can represent 2**63 - 1 correctly.
5111 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5112 since some C++ compilers masquerading as C compilers
5113 incorrectly reject 9223372036854775807. */
5114#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5115 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5116 && LARGE_OFF_T % 2147483647 == 1)
5117 ? 1 : -1];
5118int
5119main ()
5120{
5121
5122 ;
5123 return 0;
5124}
5125_ACEOF
5126if ac_fn_c_try_compile "$LINENO"; then :
5127 ac_cv_sys_large_files=1; break
5128fi
5129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5130 ac_cv_sys_large_files=unknown
5131 break
5132done
5133fi
5134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5135$as_echo "$ac_cv_sys_large_files" >&6; }
5136case $ac_cv_sys_large_files in #(
5137 no | unknown) ;;
5138 *)
5139cat >>confdefs.h <<_ACEOF
5140#define _LARGE_FILES $ac_cv_sys_large_files
5141_ACEOF
5142;;
5143esac
5144rm -rf conftest*
5145 fi
d0ac1c44
SM
5146
5147
da2f07f1
JK
5148fi
5149
5150
d0ac1c44
SM
5151# Expand $ac_aux_dir to an absolute path.
5152am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5153
d0ac1c44 5154if test x"${install_sh+set}" != xset; then
4869db5e
RM
5155 case $am_aux_dir in
5156 *\ * | *\ *)
5157 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5158 *)
5159 install_sh="\${SHELL} $am_aux_dir/install-sh"
5160 esac
5161fi
5162
d0ac1c44
SM
5163# Installed binaries are usually stripped using 'strip' when the user
5164# run "make install-strip". However 'strip' might not be the right
4869db5e 5165# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5166# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5167if test "$cross_compiling" != no; then
5168 if test -n "$ac_tool_prefix"; then
5169 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5170set dummy ${ac_tool_prefix}strip; ac_word=$2
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5173if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5174 $as_echo_n "(cached) " >&6
5175else
5176 if test -n "$STRIP"; then
5177 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5178else
5179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180for as_dir in $PATH
5181do
5182 IFS=$as_save_IFS
5183 test -z "$as_dir" && as_dir=.
5184 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5185 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5186 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5188 break 2
5189 fi
5190done
5191 done
5192IFS=$as_save_IFS
5193
5194fi
5195fi
5196STRIP=$ac_cv_prog_STRIP
5197if test -n "$STRIP"; then
5198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5199$as_echo "$STRIP" >&6; }
5200else
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202$as_echo "no" >&6; }
5203fi
5204
5205
5206fi
5207if test -z "$ac_cv_prog_STRIP"; then
5208 ac_ct_STRIP=$STRIP
5209 # Extract the first word of "strip", so it can be a program name with args.
5210set dummy strip; ac_word=$2
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5212$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5213if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5214 $as_echo_n "(cached) " >&6
5215else
5216 if test -n "$ac_ct_STRIP"; then
5217 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5218else
5219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220for as_dir in $PATH
5221do
5222 IFS=$as_save_IFS
5223 test -z "$as_dir" && as_dir=.
5224 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5226 ac_cv_prog_ac_ct_STRIP="strip"
5227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228 break 2
5229 fi
5230done
5231 done
5232IFS=$as_save_IFS
5233
5234fi
5235fi
5236ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5237if test -n "$ac_ct_STRIP"; then
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5239$as_echo "$ac_ct_STRIP" >&6; }
5240else
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5242$as_echo "no" >&6; }
5243fi
5244
5245 if test "x$ac_ct_STRIP" = x; then
5246 STRIP=":"
5247 else
5248 case $cross_compiling:$ac_tool_warned in
5249yes:)
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5251$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5252ac_tool_warned=yes ;;
5253esac
5254 STRIP=$ac_ct_STRIP
5255 fi
5256else
5257 STRIP="$ac_cv_prog_STRIP"
5258fi
5259
5260fi
5261INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5262
783e057b
DJ
5263
5264ac_aux_dir=
81ecdfbb 5265for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
783e057b
DJ
5279done
5280if test -z "$ac_aux_dir"; then
d0ac1c44 5281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5282fi
81ecdfbb
RW
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
783e057b 5292
783e057b 5293
91e1a0ed
SM
5294# Set build, build_cpu, build_vendor and build_os.
5295
5296
5297# Set host, host_cpu, host_vendor, and host_os.
5298
5299
5300# Set target, target_cpu, target_vendor, and target_os.
5301
5302
b316465f
TT
5303 case ${build_alias} in
5304 "") build_noncanonical=${build} ;;
5305 *) build_noncanonical=${build_alias} ;;
5306esac
5307
5308 case ${host_alias} in
5309 "") host_noncanonical=${build_noncanonical} ;;
5310 *) host_noncanonical=${host_alias} ;;
5311esac
5312
5313 case ${target_alias} in
5314 "") target_noncanonical=${host_noncanonical} ;;
5315 *) target_noncanonical=${target_alias} ;;
5316esac
5317
5318
5319
5320
9009e1ae
MR
5321test "$program_prefix" != NONE &&
5322 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5323# Use a double $ so make ignores it.
5324test "$program_suffix" != NONE &&
5325 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5326# Double any \ or $.
5327# By default was `s,x,x', remove it if useless.
5328ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5329program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5330
81ecdfbb 5331
b686ecb5
JM
5332# We require libtool to link with the in-tree libtool libraries
5333# the proper way.
5334case `pwd` in
5335 *\ * | *\ *)
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
5337$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5338esac
0bcda685
PA
5339
5340
0bcda685 5341
b686ecb5
JM
5342macro_version='2.2.7a'
5343macro_revision='1.3134'
0bcda685 5344
0bcda685 5345
0bcda685 5346
0bcda685 5347
0bcda685 5348
0bcda685 5349
0bcda685 5350
0bcda685 5351
0bcda685 5352
0bcda685 5353
0bcda685 5354
0bcda685 5355
0bcda685 5356
b686ecb5 5357ltmain="$ac_aux_dir/ltmain.sh"
0bcda685 5358
b686ecb5
JM
5359# Backslashify metacharacters that are still active within
5360# double-quoted strings.
5361sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
0bcda685 5362
b686ecb5
JM
5363# Same as above, but do not quote variable references.
5364double_quote_subst='s/\(["`\\]\)/\\\1/g'
0bcda685 5365
b686ecb5
JM
5366# Sed substitution to delay expansion of an escaped shell variable in a
5367# double_quote_subst'ed string.
5368delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
0bcda685 5369
b686ecb5
JM
5370# Sed substitution to delay expansion of an escaped single quote.
5371delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
0bcda685 5372
b686ecb5
JM
5373# Sed substitution to avoid accidental globbing in evaled expressions
5374no_glob_subst='s/\*/\\\*/g'
0bcda685 5375
b686ecb5
JM
5376ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5377ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5378ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
0bcda685 5379
b686ecb5
JM
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
5381$as_echo_n "checking how to print strings... " >&6; }
5382# Test print first, because it will be a builtin if present.
5383if test "X`print -r -- -n 2>/dev/null`" = X-n && \
5384 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5385 ECHO='print -r --'
5386elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5387 ECHO='printf %s\n'
5388else
5389 # Use this function as a fallback that always works.
5390 func_fallback_echo ()
0bcda685 5391 {
b686ecb5
JM
5392 eval 'cat <<_LTECHO_EOF
5393$1
5394_LTECHO_EOF'
0bcda685 5395 }
b686ecb5
JM
5396 ECHO='func_fallback_echo'
5397fi
0bcda685 5398
b686ecb5
JM
5399# func_echo_all arg...
5400# Invoke $ECHO with all args, space-separated.
5401func_echo_all ()
5402{
5403 $ECHO ""
5404}
0bcda685 5405
b686ecb5
JM
5406case "$ECHO" in
5407 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
5408$as_echo "printf" >&6; } ;;
5409 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
5410$as_echo "print -r" >&6; } ;;
5411 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
5412$as_echo "cat" >&6; } ;;
5413esac
0bcda685 5414
0bcda685 5415
0bcda685 5416
0bcda685 5417
0bcda685 5418
0bcda685 5419
0bcda685 5420
0bcda685 5421
0bcda685 5422
0bcda685 5423
0bcda685 5424
0bcda685 5425
0bcda685 5426
0bcda685 5427
b686ecb5
JM
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5429$as_echo_n "checking for a sed that does not truncate output... " >&6; }
5430if ${ac_cv_path_SED+:} false; then :
5431 $as_echo_n "(cached) " >&6
5432else
5433 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5434 for ac_i in 1 2 3 4 5 6 7; do
5435 ac_script="$ac_script$as_nl$ac_script"
5436 done
5437 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5438 { ac_script=; unset ac_script;}
5439 if test -z "$SED"; then
5440 ac_path_SED_found=false
5441 # Loop through the user's path and test for each of PROGNAME-LIST
5442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445 IFS=$as_save_IFS
5446 test -z "$as_dir" && as_dir=.
5447 for ac_prog in sed gsed; do
5448 for ac_exec_ext in '' $ac_executable_extensions; do
5449 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5450 as_fn_executable_p "$ac_path_SED" || continue
5451# Check for GNU ac_path_SED and select it if it is found.
5452 # Check for GNU $ac_path_SED
5453case `"$ac_path_SED" --version 2>&1` in
5454*GNU*)
5455 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5456*)
5457 ac_count=0
5458 $as_echo_n 0123456789 >"conftest.in"
5459 while :
5460 do
5461 cat "conftest.in" "conftest.in" >"conftest.tmp"
5462 mv "conftest.tmp" "conftest.in"
5463 cp "conftest.in" "conftest.nl"
5464 $as_echo '' >> "conftest.nl"
5465 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5466 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5467 as_fn_arith $ac_count + 1 && ac_count=$as_val
5468 if test $ac_count -gt ${ac_path_SED_max-0}; then
5469 # Best one so far, save it but keep looking for a better one
5470 ac_cv_path_SED="$ac_path_SED"
5471 ac_path_SED_max=$ac_count
5472 fi
5473 # 10*(2^10) chars as input seems more than enough
5474 test $ac_count -gt 10 && break
5475 done
5476 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5477esac
0bcda685 5478
b686ecb5
JM
5479 $ac_path_SED_found && break 3
5480 done
5481 done
5482 done
5483IFS=$as_save_IFS
5484 if test -z "$ac_cv_path_SED"; then
5485 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5486 fi
5487else
5488 ac_cv_path_SED=$SED
5489fi
0bcda685 5490
b686ecb5
JM
5491fi
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5493$as_echo "$ac_cv_path_SED" >&6; }
5494 SED="$ac_cv_path_SED"
5495 rm -f conftest.sed
0bcda685 5496
b686ecb5
JM
5497test -z "$SED" && SED=sed
5498Xsed="$SED -e 1s/^X//"
0bcda685 5499
0bcda685 5500
0bcda685 5501
0bcda685 5502
0bcda685 5503
0bcda685 5504
0bcda685 5505
0bcda685 5506
0bcda685 5507
0bcda685
PA
5508
5509
b686ecb5
JM
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5511$as_echo_n "checking for fgrep... " >&6; }
5512if ${ac_cv_path_FGREP+:} false; then :
5513 $as_echo_n "(cached) " >&6
5514else
5515 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5516 then ac_cv_path_FGREP="$GREP -F"
5517 else
5518 if test -z "$FGREP"; then
5519 ac_path_FGREP_found=false
5520 # Loop through the user's path and test for each of PROGNAME-LIST
5521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5523do
5524 IFS=$as_save_IFS
5525 test -z "$as_dir" && as_dir=.
5526 for ac_prog in fgrep; do
5527 for ac_exec_ext in '' $ac_executable_extensions; do
5528 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5529 as_fn_executable_p "$ac_path_FGREP" || continue
5530# Check for GNU ac_path_FGREP and select it if it is found.
5531 # Check for GNU $ac_path_FGREP
5532case `"$ac_path_FGREP" --version 2>&1` in
5533*GNU*)
5534 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5535*)
5536 ac_count=0
5537 $as_echo_n 0123456789 >"conftest.in"
5538 while :
5539 do
5540 cat "conftest.in" "conftest.in" >"conftest.tmp"
5541 mv "conftest.tmp" "conftest.in"
5542 cp "conftest.in" "conftest.nl"
5543 $as_echo 'FGREP' >> "conftest.nl"
5544 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5545 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5546 as_fn_arith $ac_count + 1 && ac_count=$as_val
5547 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5548 # Best one so far, save it but keep looking for a better one
5549 ac_cv_path_FGREP="$ac_path_FGREP"
5550 ac_path_FGREP_max=$ac_count
5551 fi
5552 # 10*(2^10) chars as input seems more than enough
5553 test $ac_count -gt 10 && break
5554 done
5555 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5556esac
0bcda685 5557
b686ecb5
JM
5558 $ac_path_FGREP_found && break 3
5559 done
5560 done
5561 done
5562IFS=$as_save_IFS
5563 if test -z "$ac_cv_path_FGREP"; then
5564 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5565 fi
0bcda685 5566else
b686ecb5 5567 ac_cv_path_FGREP=$FGREP
0bcda685 5568fi
b686ecb5
JM
5569
5570 fi
0bcda685 5571fi
b686ecb5
JM
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5573$as_echo "$ac_cv_path_FGREP" >&6; }
5574 FGREP="$ac_cv_path_FGREP"
0bcda685 5575
0bcda685 5576
b686ecb5 5577test -z "$GREP" && GREP=grep
0bcda685 5578
0bcda685 5579
0bcda685 5580
0bcda685 5581
0bcda685 5582
0bcda685 5583
0bcda685 5584
0bcda685 5585
0bcda685 5586
0bcda685 5587
0bcda685 5588
0bcda685 5589
0bcda685 5590
0bcda685 5591
0bcda685 5592
0bcda685 5593
0bcda685 5594
0bcda685 5595
0bcda685 5596
b686ecb5
JM
5597# Check whether --with-gnu-ld was given.
5598if test "${with_gnu_ld+set}" = set; then :
5599 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5600else
5601 with_gnu_ld=no
5602fi
0bcda685 5603
b686ecb5
JM
5604ac_prog=ld
5605if test "$GCC" = yes; then
5606 # Check if gcc -print-prog-name=ld gives a path.
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5608$as_echo_n "checking for ld used by $CC... " >&6; }
5609 case $host in
5610 *-*-mingw*)
5611 # gcc leaves a trailing carriage return which upsets mingw
5612 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5613 *)
5614 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5615 esac
5616 case $ac_prog in
5617 # Accept absolute paths.
5618 [\\/]* | ?:[\\/]*)
5619 re_direlt='/[^/][^/]*/\.\./'
5620 # Canonicalize the pathname of ld
5621 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5622 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5623 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5624 done
5625 test -z "$LD" && LD="$ac_prog"
5626 ;;
5627 "")
5628 # If it fails, then pretend we aren't using GCC.
5629 ac_prog=ld
5630 ;;
5631 *)
5632 # If it is relative, then search for the first ld in PATH.
5633 with_gnu_ld=unknown
5634 ;;
5635 esac
5636elif test "$with_gnu_ld" = yes; then
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5638$as_echo_n "checking for GNU ld... " >&6; }
5639else
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5641$as_echo_n "checking for non-GNU ld... " >&6; }
5642fi
5643if ${lt_cv_path_LD+:} false; then :
5644 $as_echo_n "(cached) " >&6
5645else
5646 if test -z "$LD"; then
5647 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5648 for ac_dir in $PATH; do
5649 IFS="$lt_save_ifs"
5650 test -z "$ac_dir" && ac_dir=.
5651 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5652 lt_cv_path_LD="$ac_dir/$ac_prog"
5653 # Check to see if the program is GNU ld. I'd rather use --version,
5654 # but apparently some variants of GNU ld only accept -v.
5655 # Break only if it was the GNU/non-GNU ld that we prefer.
5656 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5657 *GNU* | *'with BFD'*)
5658 test "$with_gnu_ld" != no && break
5659 ;;
5660 *)
5661 test "$with_gnu_ld" != yes && break
5662 ;;
5663 esac
5664 fi
5665 done
5666 IFS="$lt_save_ifs"
5667else
5668 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5669fi
5670fi
0bcda685 5671
b686ecb5
JM
5672LD="$lt_cv_path_LD"
5673if test -n "$LD"; then
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5675$as_echo "$LD" >&6; }
5676else
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5678$as_echo "no" >&6; }
5679fi
5680test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5682$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5683if ${lt_cv_prog_gnu_ld+:} false; then :
5684 $as_echo_n "(cached) " >&6
5685else
5686 # I'd rather use --version here, but apparently some GNU lds only accept -v.
5687case `$LD -v 2>&1 </dev/null` in
5688*GNU* | *'with BFD'*)
5689 lt_cv_prog_gnu_ld=yes
5690 ;;
5691*)
5692 lt_cv_prog_gnu_ld=no
5693 ;;
5694esac
5695fi
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5697$as_echo "$lt_cv_prog_gnu_ld" >&6; }
5698with_gnu_ld=$lt_cv_prog_gnu_ld
0bcda685 5699
0bcda685 5700
0bcda685 5701
0bcda685 5702
0bcda685 5703
0bcda685 5704
0bcda685 5705
0bcda685 5706
0bcda685 5707
b686ecb5
JM
5708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5709$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5710if ${lt_cv_path_NM+:} false; then :
5711 $as_echo_n "(cached) " >&6
5712else
5713 if test -n "$NM"; then
5714 # Let the user override the nm to test.
5715 lt_nm_to_check="$NM"
5716 else
5717 lt_nm_to_check="${ac_tool_prefix}nm"
5718 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5719 lt_nm_to_check="$lt_nm_to_check nm"
5720 fi
5721 fi
5722 for lt_tmp_nm in "$lt_nm_to_check"; do
5723 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5724 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5725 IFS="$lt_save_ifs"
5726 test -z "$ac_dir" && ac_dir=.
5727 # Strip out any user-provided options from the nm to test twice,
5728 # the first time to test to see if nm (rather than its options) has
5729 # an explicit path, the second time to yield a file which can be
5730 # nm'ed itself.
5731 tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`"
5732 case "$tmp_nm_path" in
5733 */*|*\\*) tmp_nm="$lt_tmp_nm";;
5734 *) tmp_nm="$ac_dir/$lt_tmp_nm";;
5735 esac
5736 tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`"
5737 if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then
5738 # Check to see if the nm accepts a BSD-compat flag.
5739 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5740 # nm: unknown option "B" ignored
5741 case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
5742 *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
5743 break
5744 ;;
5745 *)
5746 case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
5747 *$tmp_nm*)
5748 lt_cv_path_NM="$tmp_nm -p"
5749 break
5750 ;;
5751 *)
5752 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5753 continue # so that we can try to find one that supports BSD flags
5754 ;;
5755 esac
5756 ;;
5757 esac
5758 fi
5759 done
5760 IFS="$lt_save_ifs"
5761 done
5762 : ${lt_cv_path_NM=no}
5763fi
5764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5765$as_echo "$lt_cv_path_NM" >&6; }
5766if test "$lt_cv_path_NM" != "no"; then
5767 NM="$lt_cv_path_NM"
5768else
5769 # Didn't find any BSD compatible name lister, look for dumpbin.
5770 if test -n "$DUMPBIN"; then :
5771 # Let the user override the test.
5772 else
5773 if test -n "$ac_tool_prefix"; then
5774 for ac_prog in dumpbin "link -dump"
5775 do
5776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_prog_DUMPBIN+:} false; then :
5781 $as_echo_n "(cached) " >&6
5782else
5783 if test -n "$DUMPBIN"; then
5784 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5785else
5786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789 IFS=$as_save_IFS
5790 test -z "$as_dir" && as_dir=.
5791 for ac_exec_ext in '' $ac_executable_extensions; do
5792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795 break 2
5796 fi
5797done
5798 done
5799IFS=$as_save_IFS
0bcda685 5800
b686ecb5
JM
5801fi
5802fi
5803DUMPBIN=$ac_cv_prog_DUMPBIN
5804if test -n "$DUMPBIN"; then
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5806$as_echo "$DUMPBIN" >&6; }
5807else
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5809$as_echo "no" >&6; }
5810fi
0bcda685 5811
0bcda685 5812
b686ecb5
JM
5813 test -n "$DUMPBIN" && break
5814 done
5815fi
5816if test -z "$DUMPBIN"; then
5817 ac_ct_DUMPBIN=$DUMPBIN
5818 for ac_prog in dumpbin "link -dump"
5819do
5820 # Extract the first word of "$ac_prog", so it can be a program name with args.
5821set dummy $ac_prog; ac_word=$2
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823$as_echo_n "checking for $ac_word... " >&6; }
5824if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
5825 $as_echo_n "(cached) " >&6
5826else
5827 if test -n "$ac_ct_DUMPBIN"; then
5828 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
5829else
5830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831for as_dir in $PATH
5832do
5833 IFS=$as_save_IFS
5834 test -z "$as_dir" && as_dir=.
5835 for ac_exec_ext in '' $ac_executable_extensions; do
5836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5837 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5839 break 2
5840 fi
5841done
5842 done
5843IFS=$as_save_IFS
0bcda685 5844
b686ecb5
JM
5845fi
5846fi
5847ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
5848if test -n "$ac_ct_DUMPBIN"; then
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
5850$as_echo "$ac_ct_DUMPBIN" >&6; }
5851else
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
5854fi
0bcda685 5855
0bcda685 5856
b686ecb5
JM
5857 test -n "$ac_ct_DUMPBIN" && break
5858done
0bcda685 5859
b686ecb5
JM
5860 if test "x$ac_ct_DUMPBIN" = x; then
5861 DUMPBIN=":"
5862 else
5863 case $cross_compiling:$ac_tool_warned in
5864yes:)
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5867ac_tool_warned=yes ;;
5868esac
5869 DUMPBIN=$ac_ct_DUMPBIN
5870 fi
5871fi
0bcda685 5872
b686ecb5
JM
5873 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5874 *COFF*)
5875 DUMPBIN="$DUMPBIN -symbols"
5876 ;;
5877 *)
5878 DUMPBIN=:
5879 ;;
5880 esac
5881 fi
0bcda685 5882
b686ecb5
JM
5883 if test "$DUMPBIN" != ":"; then
5884 NM="$DUMPBIN"
5885 fi
5886fi
5887test -z "$NM" && NM=nm
0bcda685 5888
0bcda685 5889
0bcda685 5890
0bcda685 5891
0bcda685 5892
0bcda685 5893
b686ecb5
JM
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
5895$as_echo_n "checking the name lister ($NM) interface... " >&6; }
5896if ${lt_cv_nm_interface+:} false; then :
5897 $as_echo_n "(cached) " >&6
5898else
5899 lt_cv_nm_interface="BSD nm"
5900 echo "int some_variable = 0;" > conftest.$ac_ext
5901 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
5902 (eval "$ac_compile" 2>conftest.err)
5903 cat conftest.err >&5
5904 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5905 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5906 cat conftest.err >&5
5907 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
5908 cat conftest.out >&5
5909 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5910 lt_cv_nm_interface="MS dumpbin"
5911 fi
5912 rm -f conftest*
5913fi
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5915$as_echo "$lt_cv_nm_interface" >&6; }
0bcda685 5916
b686ecb5
JM
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5918$as_echo_n "checking whether ln -s works... " >&6; }
5919LN_S=$as_ln_s
5920if test "$LN_S" = "ln -s"; then
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5922$as_echo "yes" >&6; }
5923else
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5925$as_echo "no, using $LN_S" >&6; }
5926fi
0bcda685 5927
b686ecb5
JM
5928# find the maximum length of command line arguments
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5930$as_echo_n "checking the maximum length of command line arguments... " >&6; }
5931if ${lt_cv_sys_max_cmd_len+:} false; then :
5932 $as_echo_n "(cached) " >&6
5933else
5934 i=0
5935 teststring="ABCD"
0bcda685 5936
b686ecb5
JM
5937 case $build_os in
5938 msdosdjgpp*)
5939 # On DJGPP, this test can blow up pretty badly due to problems in libc
5940 # (any single argument exceeding 2000 bytes causes a buffer overrun
5941 # during glob expansion). Even if it were fixed, the result of this
5942 # check would be larger than it should be.
5943 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5944 ;;
0bcda685 5945
b686ecb5
JM
5946 gnu*)
5947 # Under GNU Hurd, this test is not required because there is
5948 # no limit to the length of command line arguments.
5949 # Libtool will interpret -1 as no limit whatsoever
5950 lt_cv_sys_max_cmd_len=-1;
5951 ;;
0bcda685 5952
b686ecb5
JM
5953 cygwin* | mingw* | cegcc*)
5954 # On Win9x/ME, this test blows up -- it succeeds, but takes
5955 # about 5 minutes as the teststring grows exponentially.
5956 # Worse, since 9x/ME are not pre-emptively multitasking,
5957 # you end up with a "frozen" computer, even though with patience
5958 # the test eventually succeeds (with a max line length of 256k).
5959 # Instead, let's just punt: use the minimum linelength reported by
5960 # all of the supported platforms: 8192 (on NT/2K/XP).
5961 lt_cv_sys_max_cmd_len=8192;
5962 ;;
0bcda685 5963
b686ecb5
JM
5964 mint*)
5965 # On MiNT this can take a long time and run out of memory.
5966 lt_cv_sys_max_cmd_len=8192;
5967 ;;
0bcda685 5968
b686ecb5
JM
5969 amigaos*)
5970 # On AmigaOS with pdksh, this test takes hours, literally.
5971 # So we just punt and use a minimum line length of 8192.
5972 lt_cv_sys_max_cmd_len=8192;
5973 ;;
0bcda685 5974
b686ecb5
JM
5975 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5976 # This has been around since 386BSD, at least. Likely further.
5977 if test -x /sbin/sysctl; then
5978 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5979 elif test -x /usr/sbin/sysctl; then
5980 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5981 else
5982 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5983 fi
5984 # And add a safety zone
5985 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5986 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5987 ;;
0bcda685 5988
b686ecb5
JM
5989 interix*)
5990 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5991 lt_cv_sys_max_cmd_len=196608
5992 ;;
0bcda685 5993
b686ecb5
JM
5994 osf*)
5995 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5996 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5997 # nice to cause kernel panics so lets avoid the loop below.
5998 # First set a reasonable default.
5999 lt_cv_sys_max_cmd_len=16384
6000 #
6001 if test -x /sbin/sysconfig; then
6002 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6003 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6004 esac
6005 fi
6006 ;;
6007 sco3.2v5*)
6008 lt_cv_sys_max_cmd_len=102400
6009 ;;
6010 sysv5* | sco5v6* | sysv4.2uw2*)
6011 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6012 if test -n "$kargmax"; then
6013 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6014 else
6015 lt_cv_sys_max_cmd_len=32768
6016 fi
6017 ;;
6018 *)
6019 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6020 if test -n "$lt_cv_sys_max_cmd_len"; then
6021 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6022 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6023 else
6024 # Make teststring a little bigger before we do anything with it.
6025 # a 1K string should be a reasonable start.
6026 for i in 1 2 3 4 5 6 7 8 ; do
6027 teststring=$teststring$teststring
6028 done
6029 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6030 # If test is not a shell built-in, we'll probably end up computing a
6031 # maximum length that is only half of the actual maximum length, but
6032 # we can't tell.
6033 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
6034 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6035 test $i != 17 # 1/2 MB should be enough
6036 do
6037 i=`expr $i + 1`
6038 teststring=$teststring$teststring
6039 done
6040 # Only check the string length outside the loop.
6041 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6042 teststring=
6043 # Add a significant safety factor because C++ compilers can tack on
6044 # massive amounts of additional arguments before passing them to the
6045 # linker. It appears as though 1/2 is a usable value.
6046 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6047 fi
6048 ;;
6049 esac
0bcda685 6050
b686ecb5 6051fi
0bcda685 6052
b686ecb5
JM
6053if test -n $lt_cv_sys_max_cmd_len ; then
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6055$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6056else
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6058$as_echo "none" >&6; }
6059fi
6060max_cmd_len=$lt_cv_sys_max_cmd_len
0bcda685 6061
0bcda685 6062
0bcda685 6063
0bcda685 6064
0bcda685 6065
0bcda685 6066
b686ecb5
JM
6067: ${CP="cp -f"}
6068: ${MV="mv -f"}
6069: ${RM="rm -f"}
0bcda685 6070
b686ecb5
JM
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
6072$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
6073# Try some XSI features
6074xsi_shell=no
6075( _lt_dummy="a/b/c"
6076 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6077 = c,a/b,, \
6078 && eval 'test $(( 1 + 1 )) -eq 2 \
6079 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
6080 && xsi_shell=yes
6081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
6082$as_echo "$xsi_shell" >&6; }
0bcda685 6083
0bcda685 6084
b686ecb5
JM
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
6086$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
6087lt_shell_append=no
6088( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
6089 >/dev/null 2>&1 \
6090 && lt_shell_append=yes
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
6092$as_echo "$lt_shell_append" >&6; }
0bcda685
PA
6093
6094
b686ecb5
JM
6095if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6096 lt_unset=unset
0bcda685 6097else
b686ecb5 6098 lt_unset=false
0bcda685 6099fi
0bcda685 6100
0bcda685 6101
0bcda685 6102
0bcda685 6103
0bcda685 6104
b686ecb5
JM
6105# test EBCDIC or ASCII
6106case `echo X|tr X '\101'` in
6107 A) # ASCII based system
6108 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6109 lt_SP2NL='tr \040 \012'
6110 lt_NL2SP='tr \015\012 \040\040'
6111 ;;
6112 *) # EBCDIC based system
6113 lt_SP2NL='tr \100 \n'
6114 lt_NL2SP='tr \r\n \100\100'
6115 ;;
6116esac
0bcda685 6117
0bcda685 6118
0bcda685 6119
0bcda685 6120
0bcda685 6121
0bcda685 6122
0bcda685 6123
0bcda685 6124
0bcda685 6125
b686ecb5
JM
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6127$as_echo_n "checking for $LD option to reload object files... " >&6; }
6128if ${lt_cv_ld_reload_flag+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 lt_cv_ld_reload_flag='-r'
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6134$as_echo "$lt_cv_ld_reload_flag" >&6; }
6135reload_flag=$lt_cv_ld_reload_flag
6136case $reload_flag in
6137"" | " "*) ;;
6138*) reload_flag=" $reload_flag" ;;
6139esac
6140reload_cmds='$LD$reload_flag -o $output$reload_objs'
6141case $host_os in
6142 darwin*)
6143 if test "$GCC" = yes; then
6144 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6145 else
6146 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6147 fi
6148 ;;
6149esac
0bcda685 6150
0bcda685 6151
0bcda685 6152
0bcda685 6153
0bcda685 6154
0bcda685 6155
0bcda685 6156
0bcda685 6157
0bcda685 6158
b686ecb5
JM
6159if test -n "$ac_tool_prefix"; then
6160 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6161set dummy ${ac_tool_prefix}objdump; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_prog_OBJDUMP+:} false; then :
6165 $as_echo_n "(cached) " >&6
6166else
6167 if test -n "$OBJDUMP"; then
6168 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6169else
6170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH
6172do
6173 IFS=$as_save_IFS
6174 test -z "$as_dir" && as_dir=.
6175 for ac_exec_ext in '' $ac_executable_extensions; do
6176 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6177 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6179 break 2
6180 fi
6181done
6182 done
6183IFS=$as_save_IFS
0bcda685 6184
b686ecb5
JM
6185fi
6186fi
6187OBJDUMP=$ac_cv_prog_OBJDUMP
6188if test -n "$OBJDUMP"; then
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6190$as_echo "$OBJDUMP" >&6; }
6191else
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
0bcda685 6195
0bcda685 6196
b686ecb5
JM
6197fi
6198if test -z "$ac_cv_prog_OBJDUMP"; then
6199 ac_ct_OBJDUMP=$OBJDUMP
6200 # Extract the first word of "objdump", so it can be a program name with args.
6201set dummy objdump; ac_word=$2
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
6205 $as_echo_n "(cached) " >&6
6206else
6207 if test -n "$ac_ct_OBJDUMP"; then
6208 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6209else
6210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
6215 for ac_exec_ext in '' $ac_executable_extensions; do
6216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6217 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6219 break 2
6220 fi
6221done
6222 done
6223IFS=$as_save_IFS
0bcda685 6224
b686ecb5
JM
6225fi
6226fi
6227ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6228if test -n "$ac_ct_OBJDUMP"; then
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6230$as_echo "$ac_ct_OBJDUMP" >&6; }
6231else
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
6234fi
0bcda685 6235
b686ecb5
JM
6236 if test "x$ac_ct_OBJDUMP" = x; then
6237 OBJDUMP="false"
6238 else
6239 case $cross_compiling:$ac_tool_warned in
6240yes:)
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6243ac_tool_warned=yes ;;
6244esac
6245 OBJDUMP=$ac_ct_OBJDUMP
6246 fi
6247else
6248 OBJDUMP="$ac_cv_prog_OBJDUMP"
6249fi
0bcda685 6250
b686ecb5 6251test -z "$OBJDUMP" && OBJDUMP=objdump
0bcda685 6252
0bcda685 6253
0bcda685 6254
0bcda685 6255
0bcda685 6256
0bcda685 6257
0bcda685 6258
0bcda685 6259
0bcda685 6260
b686ecb5
JM
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6262$as_echo_n "checking how to recognize dependent libraries... " >&6; }
6263if ${lt_cv_deplibs_check_method+:} false; then :
6264 $as_echo_n "(cached) " >&6
6265else
6266 lt_cv_file_magic_cmd='$MAGIC_CMD'
6267lt_cv_file_magic_test_file=
6268lt_cv_deplibs_check_method='unknown'
6269# Need to set the preceding variable on all platforms that support
6270# interlibrary dependencies.
6271# 'none' -- dependencies not supported.
6272# `unknown' -- same as none, but documents that we really don't know.
6273# 'pass_all' -- all dependencies passed with no checks.
6274# 'test_compile' -- check by making test program.
6275# 'file_magic [[regex]]' -- check by looking for files in library path
6276# which responds to the $file_magic_cmd with a given extended regex.
6277# If you have `file' or equivalent on your system and you're not sure
6278# whether `pass_all' will *always* work, you probably want this one.
0bcda685 6279
b686ecb5
JM
6280case $host_os in
6281aix[4-9]*)
6282 lt_cv_deplibs_check_method=pass_all
6283 ;;
0bcda685 6284
b686ecb5
JM
6285beos*)
6286 lt_cv_deplibs_check_method=pass_all
6287 ;;
0bcda685 6288
b686ecb5
JM
6289bsdi[45]*)
6290 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6291 lt_cv_file_magic_cmd='/usr/bin/file -L'
6292 lt_cv_file_magic_test_file=/shlib/libc.so
6293 ;;
0bcda685 6294
b686ecb5
JM
6295cygwin*)
6296 # func_win32_libid is a shell function defined in ltmain.sh
6297 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6298 lt_cv_file_magic_cmd='func_win32_libid'
6299 ;;
0bcda685 6300
b686ecb5
JM
6301mingw* | pw32*)
6302 # Base MSYS/MinGW do not provide the 'file' command needed by
6303 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6304 # unless we find 'file', for example because we are cross-compiling.
6305 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6306 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
6307 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6308 lt_cv_file_magic_cmd='func_win32_libid'
6309 else
6310 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6311 lt_cv_file_magic_cmd='$OBJDUMP -f'
6312 fi
6313 ;;
0bcda685 6314
b686ecb5
JM
6315cegcc*)
6316 # use the weaker test based on 'objdump'. See mingw*.
6317 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6318 lt_cv_file_magic_cmd='$OBJDUMP -f'
6319 ;;
0bcda685 6320
b686ecb5
JM
6321darwin* | rhapsody*)
6322 lt_cv_deplibs_check_method=pass_all
6323 ;;
0bcda685 6324
b686ecb5
JM
6325freebsd* | dragonfly*)
6326 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6327 case $host_cpu in
6328 i*86 )
6329 # Not sure whether the presence of OpenBSD here was a mistake.
6330 # Let's accept both of them until this is cleared up.
6331 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6332 lt_cv_file_magic_cmd=/usr/bin/file
6333 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6334 ;;
6335 esac
6336 else
6337 lt_cv_deplibs_check_method=pass_all
6338 fi
6339 ;;
0bcda685 6340
b686ecb5
JM
6341gnu*)
6342 lt_cv_deplibs_check_method=pass_all
6343 ;;
0bcda685 6344
b686ecb5
JM
6345haiku*)
6346 lt_cv_deplibs_check_method=pass_all
6347 ;;
0bcda685 6348
b686ecb5
JM
6349hpux10.20* | hpux11*)
6350 lt_cv_file_magic_cmd=/usr/bin/file
6351 case $host_cpu in
6352 ia64*)
6353 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6354 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6355 ;;
6356 hppa*64*)
6357 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]'
6358 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6359 ;;
6360 *)
6361 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6362 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6363 ;;
6364 esac
6365 ;;
0bcda685 6366
b686ecb5
JM
6367interix[3-9]*)
6368 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6369 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6370 ;;
0bcda685 6371
b686ecb5
JM
6372irix5* | irix6* | nonstopux*)
6373 case $LD in
6374 *-32|*"-32 ") libmagic=32-bit;;
6375 *-n32|*"-n32 ") libmagic=N32;;
6376 *-64|*"-64 ") libmagic=64-bit;;
6377 *) libmagic=never-match;;
6378 esac
6379 lt_cv_deplibs_check_method=pass_all
6380 ;;
0bcda685 6381
b686ecb5 6382# This must be Linux ELF.
6a6859cb 6383linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
b686ecb5
JM
6384 lt_cv_deplibs_check_method=pass_all
6385 ;;
0bcda685 6386
b686ecb5
JM
6387netbsd*)
6388 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6389 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6390 else
6391 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6392 fi
6393 ;;
0bcda685 6394
b686ecb5
JM
6395newos6*)
6396 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6397 lt_cv_file_magic_cmd=/usr/bin/file
6398 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6399 ;;
0bcda685 6400
b686ecb5
JM
6401*nto* | *qnx*)
6402 lt_cv_deplibs_check_method=pass_all
6403 ;;
0bcda685 6404
b686ecb5
JM
6405openbsd*)
6406 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6407 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6408 else
6409 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6410 fi
6411 ;;
0bcda685 6412
b686ecb5
JM
6413osf3* | osf4* | osf5*)
6414 lt_cv_deplibs_check_method=pass_all
6415 ;;
0bcda685 6416
b686ecb5
JM
6417rdos*)
6418 lt_cv_deplibs_check_method=pass_all
6419 ;;
0bcda685 6420
b686ecb5
JM
6421solaris*)
6422 lt_cv_deplibs_check_method=pass_all
6423 ;;
0bcda685 6424
b686ecb5
JM
6425sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6426 lt_cv_deplibs_check_method=pass_all
6427 ;;
0bcda685 6428
b686ecb5
JM
6429sysv4 | sysv4.3*)
6430 case $host_vendor in
6431 motorola)
6432 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]'
6433 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6434 ;;
6435 ncr)
6436 lt_cv_deplibs_check_method=pass_all
6437 ;;
6438 sequent)
6439 lt_cv_file_magic_cmd='/bin/file'
6440 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6441 ;;
6442 sni)
6443 lt_cv_file_magic_cmd='/bin/file'
6444 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6445 lt_cv_file_magic_test_file=/lib/libc.so
6446 ;;
6447 siemens)
6448 lt_cv_deplibs_check_method=pass_all
6449 ;;
6450 pc)
6451 lt_cv_deplibs_check_method=pass_all
6452 ;;
6453 esac
6454 ;;
0bcda685 6455
b686ecb5
JM
6456tpf*)
6457 lt_cv_deplibs_check_method=pass_all
6458 ;;
6a6859cb
AM
6459vxworks*)
6460 # Assume VxWorks cross toolchains are built on Linux, possibly
6461 # as canadian for Windows hosts.
6462 lt_cv_deplibs_check_method=pass_all
6463 ;;
b686ecb5 6464esac
0bcda685 6465
b686ecb5
JM
6466fi
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6468$as_echo "$lt_cv_deplibs_check_method" >&6; }
6469file_magic_cmd=$lt_cv_file_magic_cmd
6470deplibs_check_method=$lt_cv_deplibs_check_method
6471test -z "$deplibs_check_method" && deplibs_check_method=unknown
0bcda685 6472
0bcda685 6473
0bcda685 6474
0bcda685
PA
6475
6476
6477
0bcda685 6478
0bcda685 6479
0bcda685 6480
0bcda685
PA
6481
6482
6483
b686ecb5
JM
6484plugin_option=
6485plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
6486for plugin in $plugin_names; do
6487 plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
6488 if test x$plugin_so = x$plugin; then
6489 plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
6490 fi
6491 if test x$plugin_so != x$plugin; then
6492 plugin_option="--plugin $plugin_so"
6493 break
6494 fi
6495done
0bcda685 6496
b686ecb5
JM
6497if test -n "$ac_tool_prefix"; then
6498 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6499set dummy ${ac_tool_prefix}ar; ac_word=$2
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501$as_echo_n "checking for $ac_word... " >&6; }
6502if ${ac_cv_prog_AR+:} false; then :
6503 $as_echo_n "(cached) " >&6
a417dc56 6504else
b686ecb5
JM
6505 if test -n "$AR"; then
6506 ac_cv_prog_AR="$AR" # Let the user override the test.
6507else
6508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6509for as_dir in $PATH
6510do
6511 IFS=$as_save_IFS
6512 test -z "$as_dir" && as_dir=.
6513 for ac_exec_ext in '' $ac_executable_extensions; do
6514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6515 ac_cv_prog_AR="${ac_tool_prefix}ar"
6516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6517 break 2
6518 fi
6519done
6520 done
6521IFS=$as_save_IFS
a417dc56 6522
b686ecb5
JM
6523fi
6524fi
6525AR=$ac_cv_prog_AR
6526if test -n "$AR"; then
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6528$as_echo "$AR" >&6; }
6529else
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
a417dc56 6533
a417dc56 6534
b686ecb5
JM
6535fi
6536if test -z "$ac_cv_prog_AR"; then
6537 ac_ct_AR=$AR
6538 # Extract the first word of "ar", so it can be a program name with args.
6539set dummy ar; ac_word=$2
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6541$as_echo_n "checking for $ac_word... " >&6; }
6542if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 6543 $as_echo_n "(cached) " >&6
a417dc56 6544else
b686ecb5
JM
6545 if test -n "$ac_ct_AR"; then
6546 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6547else
6548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549for as_dir in $PATH
6550do
6551 IFS=$as_save_IFS
6552 test -z "$as_dir" && as_dir=.
6553 for ac_exec_ext in '' $ac_executable_extensions; do
6554 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6555 ac_cv_prog_ac_ct_AR="ar"
6556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557 break 2
a417dc56 6558 fi
b686ecb5 6559done
a417dc56 6560 done
b686ecb5 6561IFS=$as_save_IFS
a417dc56 6562
b686ecb5
JM
6563fi
6564fi
6565ac_ct_AR=$ac_cv_prog_ac_ct_AR
6566if test -n "$ac_ct_AR"; then
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6568$as_echo "$ac_ct_AR" >&6; }
a417dc56 6569else
b686ecb5
JM
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
a417dc56
RW
6572fi
6573
b686ecb5
JM
6574 if test "x$ac_ct_AR" = x; then
6575 AR="false"
6576 else
6577 case $cross_compiling:$ac_tool_warned in
6578yes:)
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6580$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6581ac_tool_warned=yes ;;
6582esac
6583 AR=$ac_ct_AR
6584 fi
6585else
6586 AR="$ac_cv_prog_AR"
a417dc56 6587fi
a417dc56 6588
b686ecb5
JM
6589test -z "$AR" && AR=ar
6590if test -n "$plugin_option"; then
6591 if $AR --help 2>&1 | grep -q "\--plugin"; then
6592 touch conftest.c
6593 $AR $plugin_option rc conftest.a conftest.c
6594 if test "$?" != 0; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
6596$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
6597 else
6598 AR="$AR $plugin_option"
6599 fi
6600 rm -f conftest.*
6601 fi
a417dc56 6602fi
b686ecb5 6603test -z "$AR_FLAGS" && AR_FLAGS=cru
a417dc56
RW
6604
6605
c971b7fa 6606
c971b7fa 6607
c971b7fa 6608
783e057b 6609
783e057b 6610
783e057b
DJ
6611
6612
c971b7fa 6613
c971b7fa 6614
b686ecb5
JM
6615if test -n "$ac_tool_prefix"; then
6616 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6617set dummy ${ac_tool_prefix}strip; ac_word=$2
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if ${ac_cv_prog_STRIP+:} false; then :
6621 $as_echo_n "(cached) " >&6
6622else
6623 if test -n "$STRIP"; then
6624 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6625else
6626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629 IFS=$as_save_IFS
6630 test -z "$as_dir" && as_dir=.
6631 for ac_exec_ext in '' $ac_executable_extensions; do
6632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635 break 2
6636 fi
6637done
6638 done
6639IFS=$as_save_IFS
e28b3332 6640
e28b3332 6641fi
b686ecb5
JM
6642fi
6643STRIP=$ac_cv_prog_STRIP
6644if test -n "$STRIP"; then
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6646$as_echo "$STRIP" >&6; }
6647else
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
e28b3332 6651
c971b7fa 6652
b686ecb5
JM
6653fi
6654if test -z "$ac_cv_prog_STRIP"; then
6655 ac_ct_STRIP=$STRIP
6656 # Extract the first word of "strip", so it can be a program name with args.
6657set dummy strip; ac_word=$2
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6659$as_echo_n "checking for $ac_word... " >&6; }
6660if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6661 $as_echo_n "(cached) " >&6
6662else
6663 if test -n "$ac_ct_STRIP"; then
6664 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6665else
6666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6667for as_dir in $PATH
6668do
6669 IFS=$as_save_IFS
6670 test -z "$as_dir" && as_dir=.
6671 for ac_exec_ext in '' $ac_executable_extensions; do
6672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6673 ac_cv_prog_ac_ct_STRIP="strip"
6674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6675 break 2
6676 fi
6677done
6678 done
6679IFS=$as_save_IFS
c971b7fa 6680
b686ecb5
JM
6681fi
6682fi
6683ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6684if test -n "$ac_ct_STRIP"; then
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6686$as_echo "$ac_ct_STRIP" >&6; }
6687else
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6689$as_echo "no" >&6; }
e28b3332 6690fi
e28b3332 6691
b686ecb5
JM
6692 if test "x$ac_ct_STRIP" = x; then
6693 STRIP=":"
6694 else
6695 case $cross_compiling:$ac_tool_warned in
6696yes:)
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6699ac_tool_warned=yes ;;
6700esac
6701 STRIP=$ac_ct_STRIP
6702 fi
6703else
6704 STRIP="$ac_cv_prog_STRIP"
6705fi
c971b7fa 6706
b686ecb5 6707test -z "$STRIP" && STRIP=:
c971b7fa
PA
6708
6709
6710
c971b7fa
PA
6711
6712
6713
b686ecb5
JM
6714if test -n "$ac_tool_prefix"; then
6715 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6716set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6718$as_echo_n "checking for $ac_word... " >&6; }
6719if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
6720 $as_echo_n "(cached) " >&6
6721else
b686ecb5
JM
6722 if test -n "$RANLIB"; then
6723 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6724else
6725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6726for as_dir in $PATH
6727do
6728 IFS=$as_save_IFS
6729 test -z "$as_dir" && as_dir=.
6730 for ac_exec_ext in '' $ac_executable_extensions; do
6731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6732 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6734 break 2
c971b7fa 6735 fi
b686ecb5
JM
6736done
6737 done
6738IFS=$as_save_IFS
6739
c971b7fa 6740fi
b686ecb5
JM
6741fi
6742RANLIB=$ac_cv_prog_RANLIB
6743if test -n "$RANLIB"; then
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6745$as_echo "$RANLIB" >&6; }
6746else
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
c971b7fa 6749fi
e28b3332
DJ
6750
6751
b686ecb5
JM
6752fi
6753if test -z "$ac_cv_prog_RANLIB"; then
6754 ac_ct_RANLIB=$RANLIB
6755 # Extract the first word of "ranlib", so it can be a program name with args.
6756set dummy ranlib; ac_word=$2
6757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6758$as_echo_n "checking for $ac_word... " >&6; }
6759if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6760 $as_echo_n "(cached) " >&6
6761else
6762 if test -n "$ac_ct_RANLIB"; then
6763 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6764else
6765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6766for as_dir in $PATH
6767do
6768 IFS=$as_save_IFS
6769 test -z "$as_dir" && as_dir=.
6770 for ac_exec_ext in '' $ac_executable_extensions; do
6771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6772 ac_cv_prog_ac_ct_RANLIB="ranlib"
6773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6774 break 2
6775 fi
6776done
6777 done
6778IFS=$as_save_IFS
bec39cab 6779
b686ecb5
JM
6780fi
6781fi
6782ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6783if test -n "$ac_ct_RANLIB"; then
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6785$as_echo "$ac_ct_RANLIB" >&6; }
6786else
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6788$as_echo "no" >&6; }
6789fi
bec39cab 6790
b686ecb5
JM
6791 if test "x$ac_ct_RANLIB" = x; then
6792 RANLIB=":"
6793 else
6794 case $cross_compiling:$ac_tool_warned in
6795yes:)
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6798ac_tool_warned=yes ;;
6799esac
6800 RANLIB=$ac_ct_RANLIB
6801 fi
b14b1491 6802else
b686ecb5 6803 RANLIB="$ac_cv_prog_RANLIB"
81ecdfbb
RW
6804fi
6805
b686ecb5
JM
6806test -z "$RANLIB" && RANLIB=:
6807if test -n "$plugin_option" && test "$RANLIB" != ":"; then
6808 if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
6809 RANLIB="$RANLIB $plugin_option"
6810 fi
6811fi
20e95c23 6812
20e95c23 6813
20e95c23 6814
20e95c23 6815
20e95c23 6816
0c4a4063 6817
b686ecb5
JM
6818# Determine commands to create old-style static archives.
6819old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6820old_postinstall_cmds='chmod 644 $oldlib'
6821old_postuninstall_cmds=
6822
6823if test -n "$RANLIB"; then
6824 case $host_os in
6825 openbsd*)
6826 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6827 ;;
6828 *)
6829 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6830 ;;
b14b1491 6831 esac
b686ecb5
JM
6832 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6833fi
b14b1491 6834
b686ecb5
JM
6835case $host_os in
6836 darwin*)
6837 lock_old_archive_extraction=yes ;;
6838 *)
6839 lock_old_archive_extraction=no ;;
6840esac
b14b1491
TT
6841
6842
6843
0c4a4063 6844
f83d8a90 6845
f83d8a90 6846
f83d8a90
DE
6847
6848
6849
b14b1491
TT
6850
6851
6852
81ecdfbb 6853
20e95c23 6854
b14b1491 6855
20e95c23 6856
b14b1491
TT
6857
6858
0c4a4063 6859
b686ecb5
JM
6860
6861
6862for ac_prog in gawk mawk nawk awk
6863do
6864 # Extract the first word of "$ac_prog", so it can be a program name with args.
6865set dummy $ac_prog; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_prog_AWK+:} false; then :
6869 $as_echo_n "(cached) " >&6
6870else
6871 if test -n "$AWK"; then
6872 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6873else
6874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875for as_dir in $PATH
6876do
6877 IFS=$as_save_IFS
6878 test -z "$as_dir" && as_dir=.
6879 for ac_exec_ext in '' $ac_executable_extensions; do
6880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881 ac_cv_prog_AWK="$ac_prog"
6882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883 break 2
b14b1491 6884 fi
b686ecb5
JM
6885done
6886 done
6887IFS=$as_save_IFS
b14b1491 6888
b686ecb5
JM
6889fi
6890fi
6891AWK=$ac_cv_prog_AWK
6892if test -n "$AWK"; then
6893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6894$as_echo "$AWK" >&6; }
6895else
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897$as_echo "no" >&6; }
6898fi
b14b1491
TT
6899
6900
b686ecb5
JM
6901 test -n "$AWK" && break
6902done
783e057b 6903
20e95c23 6904
0c4a4063 6905
29b0e8a2 6906
29b0e8a2 6907
29b0e8a2
JM
6908
6909
6910
81ecdfbb 6911
29b0e8a2 6912
7349ff92 6913
7349ff92 6914
7349ff92 6915
7349ff92 6916
7349ff92
JK
6917
6918
7349ff92 6919
bccbefd2 6920
bccbefd2 6921
b686ecb5
JM
6922# If no C compiler was specified, use CC.
6923LTCC=${LTCC-"$CC"}
bccbefd2 6924
b686ecb5
JM
6925# If no C compiler flags were specified, use CFLAGS.
6926LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
bccbefd2 6927
b686ecb5
JM
6928# Allow CC to be a program name with arguments.
6929compiler=$CC
bccbefd2
JK
6930
6931
b686ecb5
JM
6932# Check for command to grab the raw symbol name followed by C symbol from nm.
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
6934$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6935if ${lt_cv_sys_global_symbol_pipe+:} false; then :
6936 $as_echo_n "(cached) " >&6
6937else
bccbefd2 6938
b686ecb5
JM
6939# These are sane defaults that work on at least a few old systems.
6940# [They come from Ultrix. What could be older than Ultrix?!! ;)]
29b0e8a2 6941
b686ecb5
JM
6942# Character class describing NM global symbol codes.
6943symcode='[BCDEGRST]'
20e95c23 6944
b686ecb5
JM
6945# Regexp to match symbols that can be accessed directly from C.
6946sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
20e95c23 6947
b686ecb5
JM
6948# Define system-specific variables.
6949case $host_os in
6950aix*)
6951 symcode='[BCDT]'
6952 ;;
6953cygwin* | mingw* | pw32* | cegcc*)
6954 symcode='[ABCDGISTW]'
6955 ;;
6956hpux*)
6957 if test "$host_cpu" = ia64; then
6958 symcode='[ABCDEGRST]'
6959 fi
6960 ;;
6961irix* | nonstopux*)
6962 symcode='[BCDEGRST]'
6963 ;;
6964osf*)
6965 symcode='[BCDEGQRST]'
6966 ;;
6967solaris*)
6968 symcode='[BCDRT]'
6969 ;;
6970sco3.2v5*)
6971 symcode='[DT]'
6972 ;;
6973sysv4.2uw2*)
6974 symcode='[DT]'
6975 ;;
6976sysv5* | sco5v6* | unixware* | OpenUNIX*)
6977 symcode='[ABDT]'
6978 ;;
6979sysv4)
6980 symcode='[DFNSTU]'
6981 ;;
6982esac
20e95c23 6983
b686ecb5
JM
6984# If we're using GNU nm, then use its standard symbol codes.
6985case `$NM -V 2>&1` in
6986*GNU* | *'with BFD'*)
6987 symcode='[ABCDGIRSTW]' ;;
783e057b 6988esac
81ecdfbb 6989
b686ecb5
JM
6990# Transform an extracted symbol line into a proper C declaration.
6991# Some systems (esp. on ia64) link data and code symbols differently,
6992# so use this general approach.
6993lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
20e95c23 6994
b686ecb5
JM
6995# Transform an extracted symbol line into symbol name and symbol address
6996lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
6997lt_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'"
6998
6999# Handle CRLF in mingw tool chain
7000opt_cr=
7001case $build_os in
7002mingw*)
7003 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7004 ;;
783e057b 7005esac
1d5269c9 7006
b686ecb5
JM
7007# Try without a prefix underscore, then with it.
7008for ac_symprfx in "" "_"; do
7009
7010 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7011 symxfrm="\\1 $ac_symprfx\\2 \\2"
7012
7013 # Write the raw and C identifiers.
7014 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7015 # Fake it for dumpbin and say T for any non-static function
7016 # and D for any global variable.
7017 # Also find C++ and __fastcall symbols from MSVC++,
7018 # which start with @ or ?.
7019 lt_cv_sys_global_symbol_pipe="$AWK '"\
7020" {last_section=section; section=\$ 3};"\
7021" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7022" \$ 0!~/External *\|/{next};"\
7023" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7024" {if(hide[section]) next};"\
7025" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
7026" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
7027" s[1]~/^[@?]/{print s[1], s[1]; next};"\
7028" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
7029" ' prfx=^$ac_symprfx"
7030 else
7031 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7032 fi
1d5269c9 7033
b686ecb5
JM
7034 # Check to see that the pipe works correctly.
7035 pipe_works=no
1d5269c9 7036
b686ecb5
JM
7037 rm -f conftest*
7038 cat > conftest.$ac_ext <<_LT_EOF
7039#ifdef __cplusplus
7040extern "C" {
7041#endif
7042char nm_test_var;
7043void nm_test_func(void);
7044void nm_test_func(void){}
7045#ifdef __cplusplus
7046}
7047#endif
7048int main(){nm_test_var='a';nm_test_func();return(0);}
7049_LT_EOF
1d5269c9 7050
b686ecb5
JM
7051 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7052 (eval $ac_compile) 2>&5
7053 ac_status=$?
7054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7055 test $ac_status = 0; }; then
7056 # Now try to grab the symbols.
7057 nlist=conftest.nm
7058 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
7059 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
7060 ac_status=$?
7061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7062 test $ac_status = 0; } && test -s "$nlist"; then
7063 # Try sorting and uniquifying the output.
7064 if sort "$nlist" | uniq > "$nlist"T; then
7065 mv -f "$nlist"T "$nlist"
7066 else
7067 rm -f "$nlist"T
7068 fi
1d5269c9 7069
b686ecb5
JM
7070 # Make sure that we snagged all the symbols we need.
7071 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7072 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7073 cat <<_LT_EOF > conftest.$ac_ext
7074#ifdef __cplusplus
7075extern "C" {
7076#endif
1d5269c9 7077
b686ecb5
JM
7078_LT_EOF
7079 # Now generate the symbol file.
7080 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
1d5269c9 7081
b686ecb5 7082 cat <<_LT_EOF >> conftest.$ac_ext
1d5269c9 7083
b686ecb5
JM
7084/* The mapping between symbol names and symbols. */
7085const struct {
7086 const char *name;
7087 void *address;
7088}
7089lt__PROGRAM__LTX_preloaded_symbols[] =
7090{
7091 { "@PROGRAM@", (void *) 0 },
7092_LT_EOF
7093 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7094 cat <<\_LT_EOF >> conftest.$ac_ext
7095 {0, (void *) 0}
7096};
7097
7098/* This works around a problem in FreeBSD linker */
7099#ifdef FREEBSD_WORKAROUND
7100static const void *lt_preloaded_setup() {
7101 return lt__PROGRAM__LTX_preloaded_symbols;
7102}
7103#endif
1d5269c9 7104
b686ecb5
JM
7105#ifdef __cplusplus
7106}
7107#endif
7108_LT_EOF
7109 # Now try linking the two files.
7110 mv conftest.$ac_objext conftstm.$ac_objext
7111 lt_save_LIBS="$LIBS"
7112 lt_save_CFLAGS="$CFLAGS"
7113 LIBS="conftstm.$ac_objext"
7114 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7115 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7116 (eval $ac_link) 2>&5
7117 ac_status=$?
7118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7119 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7120 pipe_works=yes
7121 fi
7122 LIBS="$lt_save_LIBS"
7123 CFLAGS="$lt_save_CFLAGS"
7124 else
7125 echo "cannot find nm_test_func in $nlist" >&5
7126 fi
7127 else
7128 echo "cannot find nm_test_var in $nlist" >&5
7129 fi
7130 else
7131 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7132 fi
7133 else
7134 echo "$progname: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 fi
7137 rm -rf conftest* conftst*
7138
7139 # Do not use the global_symbol_pipe unless it works.
7140 if test "$pipe_works" = yes; then
7141 break
7142 else
7143 lt_cv_sys_global_symbol_pipe=
7144 fi
7145done
1d5269c9
MF
7146
7147fi
7148
b686ecb5
JM
7149if test -z "$lt_cv_sys_global_symbol_pipe"; then
7150 lt_cv_sys_global_symbol_to_cdecl=
7151fi
7152if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7154$as_echo "failed" >&6; }
1d5269c9 7155else
b686ecb5
JM
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7157$as_echo "ok" >&6; }
81ecdfbb
RW
7158fi
7159
1d5269c9
MF
7160
7161
20e95c23
DJ
7162
7163
7164
7165
7166
bf307134 7167
b292c783 7168
20e95c23 7169
c0993dbe
UW
7170
7171
7172
b292c783 7173
c0993dbe 7174
c0993dbe 7175
c0993dbe 7176
c0993dbe 7177
c0993dbe 7178
c0993dbe 7179
c0993dbe 7180
b686ecb5
JM
7181# Check whether --enable-libtool-lock was given.
7182if test "${enable_libtool_lock+set}" = set; then :
7183 enableval=$enable_libtool_lock;
c0993dbe
UW
7184fi
7185
b686ecb5 7186test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
81ecdfbb 7187
b686ecb5
JM
7188# Some flags need to be propagated to the compiler or linker for good
7189# libtool support.
7190case $host in
7191ia64-*-hpux*)
7192 # Find out which ABI we are using.
7193 echo 'int i;' > conftest.$ac_ext
7194 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7195 (eval $ac_compile) 2>&5
7196 ac_status=$?
7197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7198 test $ac_status = 0; }; then
7199 case `/usr/bin/file conftest.$ac_objext` in
7200 *ELF-32*)
7201 HPUX_IA64_MODE="32"
7202 ;;
7203 *ELF-64*)
7204 HPUX_IA64_MODE="64"
7205 ;;
7206 esac
c0993dbe 7207 fi
b686ecb5
JM
7208 rm -rf conftest*
7209 ;;
7210*-*-irix6*)
7211 # Find out which ABI we are using.
7212 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7213 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7214 (eval $ac_compile) 2>&5
7215 ac_status=$?
7216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7217 test $ac_status = 0; }; then
7218 if test "$lt_cv_prog_gnu_ld" = yes; then
7219 case `/usr/bin/file conftest.$ac_objext` in
7220 *32-bit*)
7221 LD="${LD-ld} -melf32bsmip"
7222 ;;
7223 *N32*)
7224 LD="${LD-ld} -melf32bmipn32"
7225 ;;
7226 *64-bit*)
7227 LD="${LD-ld} -melf64bmip"
7228 ;;
7229 esac
7230 else
7231 case `/usr/bin/file conftest.$ac_objext` in
7232 *32-bit*)
7233 LD="${LD-ld} -32"
7234 ;;
7235 *N32*)
7236 LD="${LD-ld} -n32"
7237 ;;
7238 *64-bit*)
7239 LD="${LD-ld} -64"
7240 ;;
7241 esac
7242 fi
7243 fi
7244 rm -rf conftest*
7245 ;;
c0993dbe 7246
b686ecb5
JM
7247x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
7248s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7249 # Find out which ABI we are using.
7250 echo 'int i;' > conftest.$ac_ext
7251 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7252 (eval $ac_compile) 2>&5
7253 ac_status=$?
7254 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7255 test $ac_status = 0; }; then
7256 case `/usr/bin/file conftest.o` in
7257 *32-bit*)
7258 case $host in
7259 x86_64-*kfreebsd*-gnu)
7260 LD="${LD-ld} -m elf_i386_fbsd"
7261 ;;
7262 x86_64-*linux*)
7263 case `/usr/bin/file conftest.o` in
7264 *x86-64*)
7265 LD="${LD-ld} -m elf32_x86_64"
7266 ;;
7267 *)
7268 LD="${LD-ld} -m elf_i386"
7269 ;;
7270 esac
7271 ;;
7272 powerpc64le-*linux*)
7273 LD="${LD-ld} -m elf32lppclinux"
7274 ;;
7275 powerpc64-*linux*)
7276 LD="${LD-ld} -m elf32ppclinux"
7277 ;;
7278 s390x-*linux*)
7279 LD="${LD-ld} -m elf_s390"
7280 ;;
7281 sparc64-*linux*)
7282 LD="${LD-ld} -m elf32_sparc"
7283 ;;
7284 esac
7285 ;;
7286 *64-bit*)
7287 case $host in
7288 x86_64-*kfreebsd*-gnu)
7289 LD="${LD-ld} -m elf_x86_64_fbsd"
7290 ;;
7291 x86_64-*linux*)
7292 LD="${LD-ld} -m elf_x86_64"
7293 ;;
7294 powerpcle-*linux*)
7295 LD="${LD-ld} -m elf64lppc"
7296 ;;
7297 powerpc-*linux*)
7298 LD="${LD-ld} -m elf64ppc"
7299 ;;
7300 s390*-*linux*|s390*-*tpf*)
7301 LD="${LD-ld} -m elf64_s390"
7302 ;;
7303 sparc*-*linux*)
7304 LD="${LD-ld} -m elf64_sparc"
7305 ;;
7306 esac
7307 ;;
7308 esac
7309 fi
7310 rm -rf conftest*
7311 ;;
4fd404c2 7312
b686ecb5
JM
7313*-*-sco3.2v5*)
7314 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7315 SAVE_CFLAGS="$CFLAGS"
7316 CFLAGS="$CFLAGS -belf"
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7318$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7319if ${lt_cv_cc_needs_belf+:} false; then :
7320 $as_echo_n "(cached) " >&6
c0993dbe 7321else
b686ecb5
JM
7322 ac_ext=c
7323ac_cpp='$CPP $CPPFLAGS'
7324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7326ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb 7327
b686ecb5
JM
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329/* end confdefs.h. */
c0993dbe 7330
b686ecb5
JM
7331int
7332main ()
7333{
4fd404c2 7334
b686ecb5
JM
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339if ac_fn_c_try_link "$LINENO"; then :
7340 lt_cv_cc_needs_belf=yes
c0993dbe 7341else
b686ecb5 7342 lt_cv_cc_needs_belf=no
81ecdfbb 7343fi
b686ecb5
JM
7344rm -f core conftest.err conftest.$ac_objext \
7345 conftest$ac_exeext conftest.$ac_ext
7346 ac_ext=c
7347ac_cpp='$CPP $CPPFLAGS'
7348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7350ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb 7351
b686ecb5
JM
7352fi
7353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7354$as_echo "$lt_cv_cc_needs_belf" >&6; }
7355 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7356 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7357 CFLAGS="$SAVE_CFLAGS"
7358 fi
7359 ;;
7360sparc*-*solaris*)
7361 # Find out which ABI we are using.
7362 echo 'int i;' > conftest.$ac_ext
7363 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7364 (eval $ac_compile) 2>&5
7365 ac_status=$?
7366 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7367 test $ac_status = 0; }; then
7368 case `/usr/bin/file conftest.o` in
7369 *64-bit*)
7370 case $lt_cv_prog_gnu_ld in
7371 yes*) LD="${LD-ld} -m elf64_sparc" ;;
7372 *)
7373 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7374 LD="${LD-ld} -64"
7375 fi
7376 ;;
7377 esac
7378 ;;
7379 esac
7380 fi
7381 rm -rf conftest*
7382 ;;
c0993dbe
UW
7383esac
7384
b686ecb5 7385need_locks="$enable_libtool_lock"
f6720b1c
AM
7386
7387
b686ecb5
JM
7388 case $host_os in
7389 rhapsody* | darwin*)
7390 if test -n "$ac_tool_prefix"; then
7391 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7392set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
f6720b1c
AM
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394$as_echo_n "checking for $ac_word... " >&6; }
b686ecb5 7395if ${ac_cv_prog_DSYMUTIL+:} false; then :
f6720b1c
AM
7396 $as_echo_n "(cached) " >&6
7397else
b686ecb5
JM
7398 if test -n "$DSYMUTIL"; then
7399 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7400else
7401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
f6720b1c
AM
7402for as_dir in $PATH
7403do
7404 IFS=$as_save_IFS
7405 test -z "$as_dir" && as_dir=.
7406 for ac_exec_ext in '' $ac_executable_extensions; do
7407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b686ecb5 7408 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
f6720b1c
AM
7409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7410 break 2
7411 fi
7412done
7413 done
7414IFS=$as_save_IFS
7415
f6720b1c 7416fi
b686ecb5
JM
7417fi
7418DSYMUTIL=$ac_cv_prog_DSYMUTIL
7419if test -n "$DSYMUTIL"; then
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7421$as_echo "$DSYMUTIL" >&6; }
f6720b1c
AM
7422else
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424$as_echo "no" >&6; }
7425fi
7426
7427
7428fi
b686ecb5
JM
7429if test -z "$ac_cv_prog_DSYMUTIL"; then
7430 ac_ct_DSYMUTIL=$DSYMUTIL
7431 # Extract the first word of "dsymutil", so it can be a program name with args.
7432set dummy dsymutil; ac_word=$2
f6720b1c
AM
7433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434$as_echo_n "checking for $ac_word... " >&6; }
b686ecb5 7435if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
f6720b1c
AM
7436 $as_echo_n "(cached) " >&6
7437else
b686ecb5
JM
7438 if test -n "$ac_ct_DSYMUTIL"; then
7439 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7440else
7441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
f6720b1c
AM
7442for as_dir in $PATH
7443do
7444 IFS=$as_save_IFS
7445 test -z "$as_dir" && as_dir=.
7446 for ac_exec_ext in '' $ac_executable_extensions; do
7447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b686ecb5 7448 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
f6720b1c
AM
7449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450 break 2
7451 fi
7452done
7453 done
7454IFS=$as_save_IFS
7455
f6720b1c 7456fi
b686ecb5
JM
7457fi
7458ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7459if test -n "$ac_ct_DSYMUTIL"; then
7460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7461$as_echo "$ac_ct_DSYMUTIL" >&6; }
f6720b1c
AM
7462else
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464$as_echo "no" >&6; }
7465fi
7466
b686ecb5
JM
7467 if test "x$ac_ct_DSYMUTIL" = x; then
7468 DSYMUTIL=":"
f6720b1c
AM
7469 else
7470 case $cross_compiling:$ac_tool_warned in
7471yes:)
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7474ac_tool_warned=yes ;;
7475esac
b686ecb5 7476 DSYMUTIL=$ac_ct_DSYMUTIL
f6720b1c
AM
7477 fi
7478else
b686ecb5 7479 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
f6720b1c
AM
7480fi
7481
b686ecb5
JM
7482 if test -n "$ac_tool_prefix"; then
7483 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7484set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7486$as_echo_n "checking for $ac_word... " >&6; }
7487if ${ac_cv_prog_NMEDIT+:} false; then :
7488 $as_echo_n "(cached) " >&6
7489else
7490 if test -n "$NMEDIT"; then
7491 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7492else
7493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7494for as_dir in $PATH
7495do
7496 IFS=$as_save_IFS
7497 test -z "$as_dir" && as_dir=.
7498 for ac_exec_ext in '' $ac_executable_extensions; do
7499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7500 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7502 break 2
7503 fi
7504done
7505 done
7506IFS=$as_save_IFS
0d79cdc4 7507
b686ecb5
JM
7508fi
7509fi
7510NMEDIT=$ac_cv_prog_NMEDIT
7511if test -n "$NMEDIT"; then
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7513$as_echo "$NMEDIT" >&6; }
0d79cdc4 7514else
b686ecb5
JM
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516$as_echo "no" >&6; }
0d79cdc4
AM
7517fi
7518
f6720b1c 7519
b686ecb5
JM
7520fi
7521if test -z "$ac_cv_prog_NMEDIT"; then
7522 ac_ct_NMEDIT=$NMEDIT
7523 # Extract the first word of "nmedit", so it can be a program name with args.
7524set dummy nmedit; ac_word=$2
7525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7526$as_echo_n "checking for $ac_word... " >&6; }
7527if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7528 $as_echo_n "(cached) " >&6
0d79cdc4 7529else
b686ecb5
JM
7530 if test -n "$ac_ct_NMEDIT"; then
7531 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7532else
7533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536 IFS=$as_save_IFS
7537 test -z "$as_dir" && as_dir=.
7538 for ac_exec_ext in '' $ac_executable_extensions; do
7539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542 break 2
7543 fi
7544done
7545 done
7546IFS=$as_save_IFS
7547
0d79cdc4 7548fi
0d79cdc4 7549fi
b686ecb5
JM
7550ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7551if test -n "$ac_ct_NMEDIT"; then
7552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7553$as_echo "$ac_ct_NMEDIT" >&6; }
f6720b1c 7554else
b686ecb5
JM
7555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556$as_echo "no" >&6; }
0d79cdc4 7557fi
bec39cab 7558
b686ecb5
JM
7559 if test "x$ac_ct_NMEDIT" = x; then
7560 NMEDIT=":"
7561 else
7562 case $cross_compiling:$ac_tool_warned in
7563yes:)
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7565$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7566ac_tool_warned=yes ;;
7567esac
7568 NMEDIT=$ac_ct_NMEDIT
7569 fi
7570else
7571 NMEDIT="$ac_cv_prog_NMEDIT"
7572fi
377170fa 7573
b686ecb5
JM
7574 if test -n "$ac_tool_prefix"; then
7575 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7576set dummy ${ac_tool_prefix}lipo; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_prog_LIPO+:} false; then :
7580 $as_echo_n "(cached) " >&6
d70f978b 7581else
b686ecb5
JM
7582 if test -n "$LIPO"; then
7583 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
7584else
7585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588 IFS=$as_save_IFS
7589 test -z "$as_dir" && as_dir=.
7590 for ac_exec_ext in '' $ac_executable_extensions; do
7591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
7593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594 break 2
7595 fi
7596done
7597 done
7598IFS=$as_save_IFS
7599
d70f978b 7600fi
b686ecb5
JM
7601fi
7602LIPO=$ac_cv_prog_LIPO
7603if test -n "$LIPO"; then
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
7605$as_echo "$LIPO" >&6; }
7606else
7607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
377170fa 7609fi
d70f978b 7610
0d79cdc4 7611
b686ecb5
JM
7612fi
7613if test -z "$ac_cv_prog_LIPO"; then
7614 ac_ct_LIPO=$LIPO
7615 # Extract the first word of "lipo", so it can be a program name with args.
7616set dummy lipo; ac_word=$2
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7618$as_echo_n "checking for $ac_word... " >&6; }
7619if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
7620 $as_echo_n "(cached) " >&6
7621else
7622 if test -n "$ac_ct_LIPO"; then
7623 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
7624else
7625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628 IFS=$as_save_IFS
7629 test -z "$as_dir" && as_dir=.
7630 for ac_exec_ext in '' $ac_executable_extensions; do
7631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632 ac_cv_prog_ac_ct_LIPO="lipo"
7633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634 break 2
7635 fi
7636done
7637 done
7638IFS=$as_save_IFS
0d79cdc4 7639
b686ecb5
JM
7640fi
7641fi
7642ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
7643if test -n "$ac_ct_LIPO"; then
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
7645$as_echo "$ac_ct_LIPO" >&6; }
7646else
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
f6720b1c 7648$as_echo "no" >&6; }
b686ecb5 7649fi
0d79cdc4 7650
b686ecb5
JM
7651 if test "x$ac_ct_LIPO" = x; then
7652 LIPO=":"
7653 else
7654 case $cross_compiling:$ac_tool_warned in
7655yes:)
7656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7658ac_tool_warned=yes ;;
7659esac
7660 LIPO=$ac_ct_LIPO
7661 fi
f6720b1c 7662else
b686ecb5 7663 LIPO="$ac_cv_prog_LIPO"
f6720b1c 7664fi
0d79cdc4 7665
b686ecb5
JM
7666 if test -n "$ac_tool_prefix"; then
7667 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
7668set dummy ${ac_tool_prefix}otool; ac_word=$2
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670$as_echo_n "checking for $ac_word... " >&6; }
7671if ${ac_cv_prog_OTOOL+:} false; then :
7672 $as_echo_n "(cached) " >&6
f6720b1c 7673else
b686ecb5
JM
7674 if test -n "$OTOOL"; then
7675 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
7676else
7677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7678for as_dir in $PATH
7679do
7680 IFS=$as_save_IFS
7681 test -z "$as_dir" && as_dir=.
7682 for ac_exec_ext in '' $ac_executable_extensions; do
7683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7684 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
7685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7686 break 2
7687 fi
7688done
7689 done
7690IFS=$as_save_IFS
f6720b1c
AM
7691
7692fi
0d79cdc4 7693fi
b686ecb5
JM
7694OTOOL=$ac_cv_prog_OTOOL
7695if test -n "$OTOOL"; then
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
7697$as_echo "$OTOOL" >&6; }
bec39cab 7698else
b686ecb5
JM
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7700$as_echo "no" >&6; }
05e7c244 7701fi
bec39cab 7702
05e7c244 7703
05e7c244 7704fi
b686ecb5
JM
7705if test -z "$ac_cv_prog_OTOOL"; then
7706 ac_ct_OTOOL=$OTOOL
7707 # Extract the first word of "otool", so it can be a program name with args.
7708set dummy otool; ac_word=$2
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710$as_echo_n "checking for $ac_word... " >&6; }
7711if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
7712 $as_echo_n "(cached) " >&6
7713else
7714 if test -n "$ac_ct_OTOOL"; then
7715 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
7716else
7717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718for as_dir in $PATH
7719do
7720 IFS=$as_save_IFS
7721 test -z "$as_dir" && as_dir=.
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724 ac_cv_prog_ac_ct_OTOOL="otool"
7725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726 break 2
7727 fi
7728done
7729 done
7730IFS=$as_save_IFS
bec39cab 7731
b686ecb5
JM
7732fi
7733fi
7734ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
7735if test -n "$ac_ct_OTOOL"; then
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
7737$as_echo "$ac_ct_OTOOL" >&6; }
7738else
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
bec39cab
AC
7741fi
7742
b686ecb5
JM
7743 if test "x$ac_ct_OTOOL" = x; then
7744 OTOOL=":"
7745 else
7746 case $cross_compiling:$ac_tool_warned in
7747yes:)
7748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7750ac_tool_warned=yes ;;
05e7c244 7751esac
b686ecb5
JM
7752 OTOOL=$ac_ct_OTOOL
7753 fi
7754else
7755 OTOOL="$ac_cv_prog_OTOOL"
7756fi
bec39cab 7757
b686ecb5
JM
7758 if test -n "$ac_tool_prefix"; then
7759 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
7760set dummy ${ac_tool_prefix}otool64; ac_word=$2
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7762$as_echo_n "checking for $ac_word... " >&6; }
7763if ${ac_cv_prog_OTOOL64+:} false; then :
7764 $as_echo_n "(cached) " >&6
7765else
7766 if test -n "$OTOOL64"; then
7767 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
7768else
7769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772 IFS=$as_save_IFS
7773 test -z "$as_dir" && as_dir=.
7774 for ac_exec_ext in '' $ac_executable_extensions; do
7775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
7777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778 break 2
7779 fi
7780done
7781 done
7782IFS=$as_save_IFS
bec39cab
AC
7783
7784fi
b686ecb5
JM
7785fi
7786OTOOL64=$ac_cv_prog_OTOOL64
7787if test -n "$OTOOL64"; then
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
7789$as_echo "$OTOOL64" >&6; }
7790else
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792$as_echo "no" >&6; }
7793fi
7794
bec39cab 7795
b686ecb5
JM
7796fi
7797if test -z "$ac_cv_prog_OTOOL64"; then
7798 ac_ct_OTOOL64=$OTOOL64
7799 # Extract the first word of "otool64", so it can be a program name with args.
7800set dummy otool64; ac_word=$2
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7802$as_echo_n "checking for $ac_word... " >&6; }
7803if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
7804 $as_echo_n "(cached) " >&6
7805else
7806 if test -n "$ac_ct_OTOOL64"; then
7807 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
7808else
7809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7810for as_dir in $PATH
7811do
7812 IFS=$as_save_IFS
7813 test -z "$as_dir" && as_dir=.
7814 for ac_exec_ext in '' $ac_executable_extensions; do
7815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7816 ac_cv_prog_ac_ct_OTOOL64="otool64"
7817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7818 break 2
7819 fi
bec39cab 7820done
b686ecb5
JM
7821 done
7822IFS=$as_save_IFS
bec39cab 7823
b686ecb5
JM
7824fi
7825fi
7826ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
7827if test -n "$ac_ct_OTOOL64"; then
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
7829$as_echo "$ac_ct_OTOOL64" >&6; }
7830else
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832$as_echo "no" >&6; }
7833fi
7834
7835 if test "x$ac_ct_OTOOL64" = x; then
7836 OTOOL64=":"
7837 else
7838 case $cross_compiling:$ac_tool_warned in
7839yes:)
7840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7842ac_tool_warned=yes ;;
7843esac
7844 OTOOL64=$ac_ct_OTOOL64
05e7c244 7845 fi
b686ecb5
JM
7846else
7847 OTOOL64="$ac_cv_prog_OTOOL64"
a9322a30
TT
7848fi
7849
cb01cfba 7850
81ecdfbb 7851
cb01cfba 7852
cb01cfba 7853
4fd404c2 7854
bec39cab 7855
a9322a30 7856
a9322a30 7857
a9322a30 7858
5593a99a 7859
5593a99a 7860
5593a99a 7861
60ca704f 7862
bec39cab 7863
b686ecb5
JM
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
7877$as_echo_n "checking for -single_module linker flag... " >&6; }
7878if ${lt_cv_apple_cc_single_mod+:} false; then :
7879 $as_echo_n "(cached) " >&6
7880else
7881 lt_cv_apple_cc_single_mod=no
7882 if test -z "${LT_MULTI_MODULE}"; then
7883 # By default we will add the -single_module flag. You can override
7884 # by either setting the environment variable LT_MULTI_MODULE
7885 # non-empty at configure time, or by adding -multi_module to the
7886 # link flags.
7887 rm -rf libconftest.dylib*
7888 echo "int foo(void){return 1;}" > conftest.c
7889 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7890-dynamiclib -Wl,-single_module conftest.c" >&5
7891 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7892 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
7893 _lt_result=$?
7894 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
7895 lt_cv_apple_cc_single_mod=yes
7896 else
7897 cat conftest.err >&5
7898 fi
7899 rm -rf libconftest.dylib*
7900 rm -f conftest.*
7901 fi
bec39cab 7902fi
b686ecb5
JM
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
7904$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
7906$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
7907if ${lt_cv_ld_exported_symbols_list+:} false; then :
81ecdfbb 7908 $as_echo_n "(cached) " >&6
bec39cab 7909else
b686ecb5
JM
7910 lt_cv_ld_exported_symbols_list=no
7911 save_LDFLAGS=$LDFLAGS
7912 echo "_main" > conftest.sym
7913 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
7914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7915/* end confdefs.h. */
b686ecb5 7916
bec39cab
AC
7917int
7918main ()
7919{
5593a99a 7920
bec39cab
AC
7921 ;
7922 return 0;
7923}
7924_ACEOF
81ecdfbb 7925if ac_fn_c_try_link "$LINENO"; then :
b686ecb5 7926 lt_cv_ld_exported_symbols_list=yes
bec39cab 7927else
b686ecb5 7928 lt_cv_ld_exported_symbols_list=no
bec39cab 7929fi
81ecdfbb
RW
7930rm -f core conftest.err conftest.$ac_objext \
7931 conftest$ac_exeext conftest.$ac_ext
b686ecb5 7932 LDFLAGS="$save_LDFLAGS"
5593a99a 7933
bec39cab 7934fi
b686ecb5
JM
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
7936$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
7938$as_echo_n "checking for -force_load linker flag... " >&6; }
7939if ${lt_cv_ld_force_load+:} false; then :
7940 $as_echo_n "(cached) " >&6
7941else
7942 lt_cv_ld_force_load=no
7943 cat > conftest.c << _LT_EOF
7944int forced_loaded() { return 2;}
7945_LT_EOF
7946 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
7947 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
7948 echo "$AR cru libconftest.a conftest.o" >&5
7949 $AR cru libconftest.a conftest.o 2>&5
7950 cat > conftest.c << _LT_EOF
7951int main() { return 0;}
7952_LT_EOF
7953 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
7954 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
7955 _lt_result=$?
7956 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
7957 lt_cv_ld_force_load=yes
7958 else
7959 cat conftest.err >&5
7960 fi
7961 rm -f conftest.err libconftest.a conftest conftest.c
7962 rm -rf conftest.dSYM
7963
7964fi
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
7966$as_echo "$lt_cv_ld_force_load" >&6; }
6a6859cb
AM
7967 # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to
7968 # build without first building modern cctools / linker.
7969 case $host_cpu-$host_os in
7970 *-rhapsody* | *-darwin1.[012])
b686ecb5 7971 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
6a6859cb 7972 *-darwin1.*)
b686ecb5 7973 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6a6859cb
AM
7974 *-darwin*)
7975 # darwin 5.x (macOS 10.1) onwards we only need to adjust when the
7976 # deployment target is forced to an earlier version.
7977 case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
7978 UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*)
7979 ;;
b686ecb5 7980 10.[012][,.]*)
6a6859cb
AM
7981 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7982 ;;
7983 *)
7984 ;;
7985 esac
b686ecb5
JM
7986 ;;
7987 esac
7988 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
7989 _lt_dar_single_mod='$single_module'
7990 fi
7991 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
7992 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
7993 else
7994 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
7995 fi
7996 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
7997 _lt_dsymutil='~$DSYMUTIL $lib || :'
7998 else
7999 _lt_dsymutil=
8000 fi
8001 ;;
8002 esac
a9322a30 8003
b686ecb5
JM
8004for ac_header in dlfcn.h
8005do :
8006 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8007"
8008if test "x$ac_cv_header_dlfcn_h" = xyes; then :
8009 cat >>confdefs.h <<_ACEOF
8010#define HAVE_DLFCN_H 1
8011_ACEOF
bec39cab
AC
8012
8013fi
bec39cab 8014
b686ecb5 8015done
bec39cab 8016
5593a99a 8017
5593a99a 8018
bec39cab 8019
bec39cab 8020
bec39cab 8021
b686ecb5 8022# Set options
44cee4fd
TT
8023
8024
8025
b686ecb5 8026 enable_dlopen=no
c16158bc
JM
8027
8028
b686ecb5
JM
8029 enable_win32_dll=no
8030
8031
8032 # Check whether --enable-shared was given.
8033if test "${enable_shared+set}" = set; then :
8034 enableval=$enable_shared; p=${PACKAGE-default}
8035 case $enableval in
8036 yes) enable_shared=yes ;;
8037 no) enable_shared=no ;;
8038 *)
8039 enable_shared=no
8040 # Look at the argument we got. We use all the common list separators.
8041 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8042 for pkg in $enableval; do
8043 IFS="$lt_save_ifs"
8044 if test "X$pkg" = "X$p"; then
8045 enable_shared=yes
8046 fi
8047 done
8048 IFS="$lt_save_ifs"
8049 ;;
8050 esac
c16158bc 8051else
b686ecb5
JM
8052 enable_shared=yes
8053fi
8054
8055
8056
8057
c16158bc 8058
b686ecb5
JM
8059
8060
8061
8062
8063 # Check whether --enable-static was given.
8064if test "${enable_static+set}" = set; then :
8065 enableval=$enable_static; p=${PACKAGE-default}
8066 case $enableval in
8067 yes) enable_static=yes ;;
8068 no) enable_static=no ;;
8069 *)
8070 enable_static=no
8071 # Look at the argument we got. We use all the common list separators.
8072 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8073 for pkg in $enableval; do
8074 IFS="$lt_save_ifs"
8075 if test "X$pkg" = "X$p"; then
8076 enable_static=yes
8077 fi
8078 done
8079 IFS="$lt_save_ifs"
8080 ;;
8081 esac
8082else
8083 enable_static=yes
81ecdfbb 8084fi
c16158bc
JM
8085
8086
8087
8088
81ecdfbb 8089
b686ecb5
JM
8090
8091
8092
8093
8094
8095# Check whether --with-pic was given.
8096if test "${with_pic+set}" = set; then :
8097 withval=$with_pic; pic_mode="$withval"
c16158bc 8098else
b686ecb5
JM
8099 pic_mode=default
8100fi
8101
8102
8103test -z "$pic_mode" && pic_mode=default
8104
8105
8106
8107
c16158bc 8108
b686ecb5
JM
8109
8110
8111 # Check whether --enable-fast-install was given.
8112if test "${enable_fast_install+set}" = set; then :
8113 enableval=$enable_fast_install; p=${PACKAGE-default}
8114 case $enableval in
8115 yes) enable_fast_install=yes ;;
8116 no) enable_fast_install=no ;;
8117 *)
8118 enable_fast_install=no
8119 # Look at the argument we got. We use all the common list separators.
8120 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8121 for pkg in $enableval; do
8122 IFS="$lt_save_ifs"
8123 if test "X$pkg" = "X$p"; then
8124 enable_fast_install=yes
8125 fi
8126 done
8127 IFS="$lt_save_ifs"
8128 ;;
8129 esac
8130else
8131 enable_fast_install=yes
81ecdfbb
RW
8132fi
8133
c16158bc
JM
8134
8135
8136
8137
c16158bc
JM
8138
8139
c16158bc
JM
8140
8141
bec39cab 8142
b686ecb5
JM
8143
8144# This can be used to rebuild libtool when needed
8145LIBTOOL_DEPS="$ltmain"
8146
8147# Always use our own libtool.
8148LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175test -z "$LN_S" && LN_S="ln -s"
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190if test -n "${ZSH_VERSION+set}" ; then
8191 setopt NO_GLOB_SUBST
8192fi
8193
8194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8195$as_echo_n "checking for objdir... " >&6; }
8196if ${lt_cv_objdir+:} false; then :
81ecdfbb 8197 $as_echo_n "(cached) " >&6
bec39cab 8198else
b686ecb5
JM
8199 rm -f .libs 2>/dev/null
8200mkdir .libs 2>/dev/null
8201if test -d .libs; then
8202 lt_cv_objdir=.libs
bec39cab 8203else
b686ecb5
JM
8204 # MS-DOS does not allow filenames that begin with a dot.
8205 lt_cv_objdir=_libs
8206fi
8207rmdir .libs 2>/dev/null
8208fi
8209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8210$as_echo "$lt_cv_objdir" >&6; }
8211objdir=$lt_cv_objdir
8212
8213
8214
8215
8216
8217cat >>confdefs.h <<_ACEOF
8218#define LT_OBJDIR "$lt_cv_objdir/"
8219_ACEOF
8220
8221
8222
8223
8224case $host_os in
8225aix3*)
8226 # AIX sometimes has problems with the GCC collect2 program. For some
8227 # reason, if we set the COLLECT_NAMES environment variable, the problems
8228 # vanish in a puff of smoke.
8229 if test "X${COLLECT_NAMES+set}" != Xset; then
8230 COLLECT_NAMES=
8231 export COLLECT_NAMES
bec39cab 8232 fi
b686ecb5
JM
8233 ;;
8234esac
8235
8236# Global variables:
8237ofile=libtool
8238can_build_shared=yes
8239
8240# All known linkers require a `.a' archive for static linking (except MSVC,
8241# which needs '.lib').
8242libext=a
8243
8244with_gnu_ld="$lt_cv_prog_gnu_ld"
8245
8246old_CC="$CC"
8247old_CFLAGS="$CFLAGS"
8248
8249# Set sane defaults for various variables
8250test -z "$CC" && CC=cc
8251test -z "$LTCC" && LTCC=$CC
8252test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8253test -z "$LD" && LD=ld
8254test -z "$ac_objext" && ac_objext=o
8255
8256for cc_temp in $compiler""; do
8257 case $cc_temp in
8258 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8259 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8260 \-*) ;;
8261 *) break;;
8262 esac
bec39cab 8263done
b686ecb5 8264cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
bec39cab 8265
b686ecb5
JM
8266
8267# Only perform the check for file, if the check method requires it
8268test -z "$MAGIC_CMD" && MAGIC_CMD=file
8269case $deplibs_check_method in
8270file_magic*)
8271 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8273$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8274if ${lt_cv_path_MAGIC_CMD+:} false; then :
8275 $as_echo_n "(cached) " >&6
8276else
8277 case $MAGIC_CMD in
8278[\\/*] | ?:[\\/]*)
8279 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8280 ;;
8281*)
8282 lt_save_MAGIC_CMD="$MAGIC_CMD"
8283 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8284 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8285 for ac_dir in $ac_dummy; do
8286 IFS="$lt_save_ifs"
8287 test -z "$ac_dir" && ac_dir=.
8288 if test -f $ac_dir/${ac_tool_prefix}file; then
8289 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8290 if test -n "$file_magic_test_file"; then
8291 case $deplibs_check_method in
8292 "file_magic "*)
8293 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8294 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8295 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8296 $EGREP "$file_magic_regex" > /dev/null; then
8297 :
8298 else
8299 cat <<_LT_EOF 1>&2
8300
8301*** Warning: the command libtool uses to detect shared libraries,
8302*** $file_magic_cmd, produces output that libtool cannot recognize.
8303*** The result is that libtool may fail to recognize shared libraries
8304*** as such. This will affect the creation of libtool libraries that
8305*** depend on shared libraries, but programs linked with such libtool
8306*** libraries will work regardless of this problem. Nevertheless, you
8307*** may want to report the problem to your system manager and/or to
8308*** bug-libtool@gnu.org
8309
8310_LT_EOF
8311 fi ;;
8312 esac
8313 fi
8314 break
8315 fi
8316 done
8317 IFS="$lt_save_ifs"
8318 MAGIC_CMD="$lt_save_MAGIC_CMD"
8319 ;;
8320esac
bec39cab 8321fi
b686ecb5
JM
8322
8323MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8324if test -n "$MAGIC_CMD"; then
8325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8326$as_echo "$MAGIC_CMD" >&6; }
bec39cab 8327else
81ecdfbb
RW
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329$as_echo "no" >&6; }
bec39cab
AC
8330fi
8331
bec39cab 8332
bec39cab 8333
b686ecb5
JM
8334
8335
8336if test -z "$lt_cv_path_MAGIC_CMD"; then
8337 if test -n "$ac_tool_prefix"; then
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8339$as_echo_n "checking for file... " >&6; }
8340if ${lt_cv_path_MAGIC_CMD+:} false; then :
c971b7fa
PA
8341 $as_echo_n "(cached) " >&6
8342else
b686ecb5
JM
8343 case $MAGIC_CMD in
8344[\\/*] | ?:[\\/]*)
8345 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8346 ;;
8347*)
8348 lt_save_MAGIC_CMD="$MAGIC_CMD"
8349 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8350 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8351 for ac_dir in $ac_dummy; do
8352 IFS="$lt_save_ifs"
8353 test -z "$ac_dir" && ac_dir=.
8354 if test -f $ac_dir/file; then
8355 lt_cv_path_MAGIC_CMD="$ac_dir/file"
8356 if test -n "$file_magic_test_file"; then
8357 case $deplibs_check_method in
8358 "file_magic "*)
8359 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8360 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8361 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8362 $EGREP "$file_magic_regex" > /dev/null; then
c971b7fa
PA
8363 :
8364 else
b686ecb5
JM
8365 cat <<_LT_EOF 1>&2
8366
8367*** Warning: the command libtool uses to detect shared libraries,
8368*** $file_magic_cmd, produces output that libtool cannot recognize.
8369*** The result is that libtool may fail to recognize shared libraries
8370*** as such. This will affect the creation of libtool libraries that
8371*** depend on shared libraries, but programs linked with such libtool
8372*** libraries will work regardless of this problem. Nevertheless, you
8373*** may want to report the problem to your system manager and/or to
8374*** bug-libtool@gnu.org
8375
8376_LT_EOF
8377 fi ;;
8378 esac
8379 fi
8380 break
8381 fi
8382 done
8383 IFS="$lt_save_ifs"
8384 MAGIC_CMD="$lt_save_MAGIC_CMD"
8385 ;;
c971b7fa 8386esac
b686ecb5 8387fi
c971b7fa 8388
b686ecb5
JM
8389MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8390if test -n "$MAGIC_CMD"; then
8391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8392$as_echo "$MAGIC_CMD" >&6; }
8393else
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
c971b7fa 8397
c971b7fa 8398
c971b7fa 8399 else
b686ecb5 8400 MAGIC_CMD=:
c971b7fa
PA
8401 fi
8402fi
c971b7fa 8403
b686ecb5
JM
8404 fi
8405 ;;
8406esac
c971b7fa 8407
b686ecb5 8408# Use C for the default configuration in the libtool script
c971b7fa 8409
b686ecb5
JM
8410lt_save_CC="$CC"
8411ac_ext=c
8412ac_cpp='$CPP $CPPFLAGS'
8413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8415ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 8416
bec39cab 8417
b686ecb5
JM
8418# Source file extension for C test sources.
8419ac_ext=c
bec39cab 8420
b686ecb5
JM
8421# Object file extension for compiled C test sources.
8422objext=o
8423objext=$objext
bec39cab 8424
b686ecb5
JM
8425# Code to be used in simple compile tests
8426lt_simple_compile_test_code="int some_variable = 0;"
81ecdfbb 8427
b686ecb5
JM
8428# Code to be used in simple link tests
8429lt_simple_link_test_code='int main(){return(0);}'
8430
8431
8432
8433
8434
8435
8436
8437# If no C compiler was specified, use CC.
8438LTCC=${LTCC-"$CC"}
8439
8440# If no C compiler flags were specified, use CFLAGS.
8441LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8442
8443# Allow CC to be a program name with arguments.
8444compiler=$CC
8445
8446# Save the default compiler, since it gets overwritten when the other
8447# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8448compiler_DEFAULT=$CC
8449
8450# save warnings/boilerplate of simple test code
8451ac_outfile=conftest.$ac_objext
8452echo "$lt_simple_compile_test_code" >conftest.$ac_ext
8453eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8454_lt_compiler_boilerplate=`cat conftest.err`
8455$RM conftest*
8456
8457ac_outfile=conftest.$ac_objext
8458echo "$lt_simple_link_test_code" >conftest.$ac_ext
8459eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8460_lt_linker_boilerplate=`cat conftest.err`
8461$RM -r conftest*
8462
8463
8464## CAVEAT EMPTOR:
8465## There is no encapsulation within the following macros, do not change
8466## the running order or otherwise move them around unless you know exactly
8467## what you are doing...
8468if test -n "$compiler"; then
8469
8470lt_prog_compiler_no_builtin_flag=
8471
8472if test "$GCC" = yes; then
8473 case $cc_basename in
8474 nvcc*)
8475 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
8476 *)
8477 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
8478 esac
8479
8480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8481$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8482if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
81ecdfbb 8483 $as_echo_n "(cached) " >&6
bec39cab 8484else
b686ecb5
JM
8485 lt_cv_prog_compiler_rtti_exceptions=no
8486 ac_outfile=conftest.$ac_objext
8487 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8488 lt_compiler_flag="-fno-rtti -fno-exceptions"
8489 # Insert the option either (1) after the last *FLAGS variable, or
8490 # (2) before a word containing "conftest.", or (3) at the end.
8491 # Note that $ac_compile itself does not contain backslashes and begins
8492 # with a dollar sign (not a hyphen), so the echo should work correctly.
8493 # The option is referenced via a variable to avoid confusing sed.
8494 lt_compile=`echo "$ac_compile" | $SED \
8495 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8496 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8497 -e 's:$: $lt_compiler_flag:'`
8498 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8499 (eval "$lt_compile" 2>conftest.err)
8500 ac_status=$?
8501 cat conftest.err >&5
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 if (exit $ac_status) && test -s "$ac_outfile"; then
8504 # The compiler can only warn and ignore the option if not recognized
8505 # So say no if there are warnings other than the usual output.
8506 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8507 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8508 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8509 lt_cv_prog_compiler_rtti_exceptions=yes
8510 fi
8511 fi
8512 $RM conftest*
bec39cab 8513
bec39cab 8514fi
b686ecb5
JM
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8516$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8517
8518if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8519 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
bec39cab 8520else
b686ecb5 8521 :
bec39cab
AC
8522fi
8523
bec39cab
AC
8524fi
8525
bec39cab 8526
bec39cab 8527
81ecdfbb 8528
bec39cab
AC
8529
8530
b686ecb5
JM
8531 lt_prog_compiler_wl=
8532lt_prog_compiler_pic=
8533lt_prog_compiler_static=
bec39cab 8534
b686ecb5
JM
8535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8536$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
bec39cab 8537
b686ecb5
JM
8538 if test "$GCC" = yes; then
8539 lt_prog_compiler_wl='-Wl,'
8540 lt_prog_compiler_static='-static'
8541
8542 case $host_os in
8543 aix*)
8544 # All AIX code is PIC.
8545 if test "$host_cpu" = ia64; then
8546 # AIX 5 now supports IA64 processor
8547 lt_prog_compiler_static='-Bstatic'
8548 fi
8549 lt_prog_compiler_pic='-fPIC'
8550 ;;
81ecdfbb 8551
b686ecb5
JM
8552 amigaos*)
8553 case $host_cpu in
8554 powerpc)
8555 # see comment about AmigaOS4 .so support
8556 lt_prog_compiler_pic='-fPIC'
8557 ;;
8558 m68k)
8559 # FIXME: we need at least 68020 code to build shared libraries, but
8560 # adding the `-m68020' flag to GCC prevents building anything better,
8561 # like `-m68040'.
8562 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8563 ;;
8564 esac
8565 ;;
bec39cab 8566
b686ecb5
JM
8567 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8568 # PIC is the default for these OSes.
8569 ;;
bec39cab 8570
b686ecb5
JM
8571 mingw* | cygwin* | pw32* | os2* | cegcc*)
8572 # This hack is so that the source file can tell whether it is being
8573 # built for inclusion in a dll (and should export symbols for example).
8574 # Although the cygwin gcc ignores -fPIC, still need this for old-style
8575 # (--disable-auto-import) libraries
8576 lt_prog_compiler_pic='-DDLL_EXPORT'
8577 ;;
8578
8579 darwin* | rhapsody*)
8580 # PIC is the default on this platform
8581 # Common symbols not allowed in MH_DYLIB files
8582 lt_prog_compiler_pic='-fno-common'
8583 ;;
8584
8585 haiku*)
8586 # PIC is the default for Haiku.
8587 # The "-static" flag exists, but is broken.
8588 lt_prog_compiler_static=
8589 ;;
8590
8591 hpux*)
8592 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8593 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
8594 # sets the default TLS model and affects inlining.
8595 case $host_cpu in
8596 hppa*64*)
8597 # +Z the default
8598 ;;
8599 *)
8600 lt_prog_compiler_pic='-fPIC'
8601 ;;
8602 esac
8603 ;;
8604
8605 interix[3-9]*)
8606 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8607 # Instead, we relocate shared libraries at runtime.
8608 ;;
8609
8610 msdosdjgpp*)
8611 # Just because we use GCC doesn't mean we suddenly get shared libraries
8612 # on systems that don't support them.
8613 lt_prog_compiler_can_build_shared=no
8614 enable_shared=no
8615 ;;
8616
8617 *nto* | *qnx*)
8618 # QNX uses GNU C++, but need to define -shared option too, otherwise
8619 # it will coredump.
8620 lt_prog_compiler_pic='-fPIC -shared'
8621 ;;
8622
8623 sysv4*MP*)
8624 if test -d /usr/nec; then
8625 lt_prog_compiler_pic=-Kconform_pic
8626 fi
8627 ;;
8628
8629 *)
8630 lt_prog_compiler_pic='-fPIC'
8631 ;;
8632 esac
8633
8634 case $cc_basename in
8635 nvcc*) # Cuda Compiler Driver 2.2
8636 lt_prog_compiler_wl='-Xlinker '
8637 lt_prog_compiler_pic='-Xcompiler -fPIC'
8638 ;;
8639 esac
81ecdfbb 8640 else
b686ecb5
JM
8641 # PORTME Check for flag to pass linker flags through the system compiler.
8642 case $host_os in
8643 aix*)
8644 lt_prog_compiler_wl='-Wl,'
8645 if test "$host_cpu" = ia64; then
8646 # AIX 5 now supports IA64 processor
8647 lt_prog_compiler_static='-Bstatic'
8648 else
8649 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8650 fi
8651 ;;
8652
8653 mingw* | cygwin* | pw32* | os2* | cegcc*)
8654 # This hack is so that the source file can tell whether it is being
8655 # built for inclusion in a dll (and should export symbols for example).
8656 lt_prog_compiler_pic='-DDLL_EXPORT'
8657 ;;
8658
8659 hpux9* | hpux10* | hpux11*)
8660 lt_prog_compiler_wl='-Wl,'
8661 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8662 # not for PA HP-UX.
8663 case $host_cpu in
8664 hppa*64*|ia64*)
8665 # +Z the default
8666 ;;
8667 *)
8668 lt_prog_compiler_pic='+Z'
8669 ;;
8670 esac
8671 # Is there a better lt_prog_compiler_static that works with the bundled CC?
8672 lt_prog_compiler_static='${wl}-a ${wl}archive'
8673 ;;
8674
8675 irix5* | irix6* | nonstopux*)
8676 lt_prog_compiler_wl='-Wl,'
8677 # PIC (with -KPIC) is the default.
8678 lt_prog_compiler_static='-non_shared'
8679 ;;
8680
8681 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8682 case $cc_basename in
8683 # old Intel for x86_64 which still supported -KPIC.
8684 ecc*)
8685 lt_prog_compiler_wl='-Wl,'
8686 lt_prog_compiler_pic='-KPIC'
8687 lt_prog_compiler_static='-static'
8688 ;;
8689 # icc used to be incompatible with GCC.
8690 # ICC 10 doesn't accept -KPIC any more.
8691 icc* | ifort*)
8692 lt_prog_compiler_wl='-Wl,'
8693 lt_prog_compiler_pic='-fPIC'
8694 lt_prog_compiler_static='-static'
8695 ;;
8696 # Lahey Fortran 8.1.
8697 lf95*)
8698 lt_prog_compiler_wl='-Wl,'
8699 lt_prog_compiler_pic='--shared'
8700 lt_prog_compiler_static='--static'
8701 ;;
8702 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8703 # Portland Group compilers (*not* the Pentium gcc compiler,
8704 # which looks to be a dead project)
8705 lt_prog_compiler_wl='-Wl,'
8706 lt_prog_compiler_pic='-fpic'
8707 lt_prog_compiler_static='-Bstatic'
8708 ;;
8709 ccc*)
8710 lt_prog_compiler_wl='-Wl,'
8711 # All Alpha code is PIC.
8712 lt_prog_compiler_static='-non_shared'
8713 ;;
8714 xl* | bgxl* | bgf* | mpixl*)
8715 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8716 lt_prog_compiler_wl='-Wl,'
8717 lt_prog_compiler_pic='-qpic'
8718 lt_prog_compiler_static='-qstaticlink'
8719 ;;
8720 *)
8721 case `$CC -V 2>&1 | sed 5q` in
8722 *Sun\ F* | *Sun*Fortran*)
8723 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8724 lt_prog_compiler_pic='-KPIC'
8725 lt_prog_compiler_static='-Bstatic'
8726 lt_prog_compiler_wl=''
8727 ;;
8728 *Sun\ C*)
8729 # Sun C 5.9
8730 lt_prog_compiler_pic='-KPIC'
8731 lt_prog_compiler_static='-Bstatic'
8732 lt_prog_compiler_wl='-Wl,'
8733 ;;
8734 esac
8735 ;;
8736 esac
8737 ;;
8738
8739 newsos6)
8740 lt_prog_compiler_pic='-KPIC'
8741 lt_prog_compiler_static='-Bstatic'
8742 ;;
8743
8744 *nto* | *qnx*)
8745 # QNX uses GNU C++, but need to define -shared option too, otherwise
8746 # it will coredump.
8747 lt_prog_compiler_pic='-fPIC -shared'
8748 ;;
8749
8750 osf3* | osf4* | osf5*)
8751 lt_prog_compiler_wl='-Wl,'
8752 # All OSF/1 code is PIC.
8753 lt_prog_compiler_static='-non_shared'
8754 ;;
8755
8756 rdos*)
8757 lt_prog_compiler_static='-non_shared'
8758 ;;
8759
8760 solaris*)
8761 lt_prog_compiler_pic='-KPIC'
8762 lt_prog_compiler_static='-Bstatic'
8763 case $cc_basename in
8764 f77* | f90* | f95*)
8765 lt_prog_compiler_wl='-Qoption ld ';;
8766 *)
8767 lt_prog_compiler_wl='-Wl,';;
8768 esac
8769 ;;
8770
8771 sunos4*)
8772 lt_prog_compiler_wl='-Qoption ld '
8773 lt_prog_compiler_pic='-PIC'
8774 lt_prog_compiler_static='-Bstatic'
8775 ;;
8776
8777 sysv4 | sysv4.2uw2* | sysv4.3*)
8778 lt_prog_compiler_wl='-Wl,'
8779 lt_prog_compiler_pic='-KPIC'
8780 lt_prog_compiler_static='-Bstatic'
8781 ;;
8782
8783 sysv4*MP*)
8784 if test -d /usr/nec ;then
8785 lt_prog_compiler_pic='-Kconform_pic'
8786 lt_prog_compiler_static='-Bstatic'
8787 fi
8788 ;;
8789
8790 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8791 lt_prog_compiler_wl='-Wl,'
8792 lt_prog_compiler_pic='-KPIC'
8793 lt_prog_compiler_static='-Bstatic'
8794 ;;
8795
8796 unicos*)
8797 lt_prog_compiler_wl='-Wl,'
8798 lt_prog_compiler_can_build_shared=no
8799 ;;
8800
8801 uts4*)
8802 lt_prog_compiler_pic='-pic'
8803 lt_prog_compiler_static='-Bstatic'
8804 ;;
8805
8806 *)
8807 lt_prog_compiler_can_build_shared=no
8808 ;;
8809 esac
81ecdfbb 8810 fi
bec39cab 8811
b686ecb5
JM
8812case $host_os in
8813 # For platforms which do not support PIC, -DPIC is meaningless:
8814 *djgpp*)
8815 lt_prog_compiler_pic=
8816 ;;
8817 *)
8818 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8819 ;;
8820esac
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8822$as_echo "$lt_prog_compiler_pic" >&6; }
8823
8824
8825
8826
8827
8828
8829#
8830# Check to make sure the PIC flag actually works.
8831#
8832if test -n "$lt_prog_compiler_pic"; then
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8834$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8835if ${lt_cv_prog_compiler_pic_works+:} false; then :
81ecdfbb 8836 $as_echo_n "(cached) " >&6
bec39cab 8837else
b686ecb5
JM
8838 lt_cv_prog_compiler_pic_works=no
8839 ac_outfile=conftest.$ac_objext
8840 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8841 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8842 # Insert the option either (1) after the last *FLAGS variable, or
8843 # (2) before a word containing "conftest.", or (3) at the end.
8844 # Note that $ac_compile itself does not contain backslashes and begins
8845 # with a dollar sign (not a hyphen), so the echo should work correctly.
8846 # The option is referenced via a variable to avoid confusing sed.
8847 lt_compile=`echo "$ac_compile" | $SED \
8848 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8849 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8850 -e 's:$: $lt_compiler_flag:'`
8851 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8852 (eval "$lt_compile" 2>conftest.err)
8853 ac_status=$?
8854 cat conftest.err >&5
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 if (exit $ac_status) && test -s "$ac_outfile"; then
8857 # The compiler can only warn and ignore the option if not recognized
8858 # So say no if there are warnings other than the usual output.
8859 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8860 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8861 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8862 lt_cv_prog_compiler_pic_works=yes
8863 fi
8864 fi
8865 $RM conftest*
bec39cab
AC
8866
8867fi
b686ecb5
JM
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
8869$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8870
8871if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
8872 case $lt_prog_compiler_pic in
8873 "" | " "*) ;;
8874 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8875 esac
bec39cab 8876else
b686ecb5
JM
8877 lt_prog_compiler_pic=
8878 lt_prog_compiler_can_build_shared=no
bec39cab
AC
8879fi
8880
8881fi
b686ecb5
JM
8882
8883
8884
8885
8886
8887
8888#
8889# Check to make sure the static flag actually works.
8890#
8891wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8893$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8894if ${lt_cv_prog_compiler_static_works+:} false; then :
81ecdfbb 8895 $as_echo_n "(cached) " >&6
bec39cab 8896else
b686ecb5
JM
8897 lt_cv_prog_compiler_static_works=no
8898 save_LDFLAGS="$LDFLAGS"
8899 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8900 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8901 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8902 # The linker can only warn and ignore the option if not recognized
8903 # So say no if there are warnings
8904 if test -s conftest.err; then
8905 # Append any errors to the config.log.
8906 cat conftest.err 1>&5
8907 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
8908 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8909 if diff conftest.exp conftest.er2 >/dev/null; then
8910 lt_cv_prog_compiler_static_works=yes
8911 fi
8912 else
8913 lt_cv_prog_compiler_static_works=yes
8914 fi
8915 fi
8916 $RM -r conftest*
8917 LDFLAGS="$save_LDFLAGS"
bec39cab
AC
8918
8919fi
b686ecb5
JM
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8921$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8922
8923if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8924 :
bec39cab 8925else
b686ecb5 8926 lt_prog_compiler_static=
bec39cab
AC
8927fi
8928
b686ecb5
JM
8929
8930
8931
8932
8933
8934
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8936$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8937if ${lt_cv_prog_compiler_c_o+:} false; then :
8938 $as_echo_n "(cached) " >&6
bec39cab 8939else
b686ecb5
JM
8940 lt_cv_prog_compiler_c_o=no
8941 $RM -r conftest 2>/dev/null
8942 mkdir conftest
8943 cd conftest
8944 mkdir out
8945 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8946
8947 lt_compiler_flag="-o out/conftest2.$ac_objext"
8948 # Insert the option either (1) after the last *FLAGS variable, or
8949 # (2) before a word containing "conftest.", or (3) at the end.
8950 # Note that $ac_compile itself does not contain backslashes and begins
8951 # with a dollar sign (not a hyphen), so the echo should work correctly.
8952 lt_compile=`echo "$ac_compile" | $SED \
8953 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8954 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8955 -e 's:$: $lt_compiler_flag:'`
8956 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8957 (eval "$lt_compile" 2>out/conftest.err)
8958 ac_status=$?
8959 cat out/conftest.err >&5
8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8962 then
8963 # The compiler can only warn and ignore the option if not recognized
8964 # So say no if there are warnings
8965 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
8966 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8967 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8968 lt_cv_prog_compiler_c_o=yes
8969 fi
8970 fi
8971 chmod u+w . 2>&5
8972 $RM conftest*
8973 # SGI C++ compiler will create directory out/ii_files/ for
8974 # template instantiation
8975 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8976 $RM out/* && rmdir out
8977 cd ..
8978 $RM -r conftest
8979 $RM conftest*
8980
bec39cab 8981fi
b686ecb5
JM
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8983$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
bec39cab 8984
b686ecb5
JM
8985
8986
8987
8988
8989
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8991$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8992if ${lt_cv_prog_compiler_c_o+:} false; then :
81ecdfbb 8993 $as_echo_n "(cached) " >&6
bec39cab 8994else
b686ecb5
JM
8995 lt_cv_prog_compiler_c_o=no
8996 $RM -r conftest 2>/dev/null
8997 mkdir conftest
8998 cd conftest
8999 mkdir out
9000 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9001
9002 lt_compiler_flag="-o out/conftest2.$ac_objext"
9003 # Insert the option either (1) after the last *FLAGS variable, or
9004 # (2) before a word containing "conftest.", or (3) at the end.
9005 # Note that $ac_compile itself does not contain backslashes and begins
9006 # with a dollar sign (not a hyphen), so the echo should work correctly.
9007 lt_compile=`echo "$ac_compile" | $SED \
9008 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9009 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9010 -e 's:$: $lt_compiler_flag:'`
9011 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9012 (eval "$lt_compile" 2>out/conftest.err)
9013 ac_status=$?
9014 cat out/conftest.err >&5
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9017 then
9018 # The compiler can only warn and ignore the option if not recognized
9019 # So say no if there are warnings
9020 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9021 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9022 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9023 lt_cv_prog_compiler_c_o=yes
9024 fi
9025 fi
9026 chmod u+w . 2>&5
9027 $RM conftest*
9028 # SGI C++ compiler will create directory out/ii_files/ for
9029 # template instantiation
9030 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9031 $RM out/* && rmdir out
9032 cd ..
9033 $RM -r conftest
9034 $RM conftest*
9035
9036fi
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9038$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9039
9040
9041
9042
9043hard_links="nottested"
9044if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9045 # do not overwrite the value of need_locks provided by the user
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9047$as_echo_n "checking if we can lock with hard links... " >&6; }
9048 hard_links=yes
9049 $RM conftest*
9050 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9051 touch conftest.a
9052 ln conftest.a conftest.b 2>&5 || hard_links=no
9053 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9055$as_echo "$hard_links" >&6; }
9056 if test "$hard_links" = no; then
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9058$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9059 need_locks=warn
9060 fi
bec39cab 9061else
b686ecb5
JM
9062 need_locks=no
9063fi
9064
9065
9066
9067
9068
9069
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9071$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9072
9073 runpath_var=
9074 allow_undefined_flag=
9075 always_export_symbols=no
9076 archive_cmds=
9077 archive_expsym_cmds=
9078 compiler_needs_object=no
9079 enable_shared_with_static_runtimes=no
9080 export_dynamic_flag_spec=
9081 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9082 hardcode_automatic=no
9083 hardcode_direct=no
9084 hardcode_direct_absolute=no
9085 hardcode_libdir_flag_spec=
9086 hardcode_libdir_flag_spec_ld=
9087 hardcode_libdir_separator=
9088 hardcode_minus_L=no
9089 hardcode_shlibpath_var=unsupported
9090 inherit_rpath=no
9091 link_all_deplibs=unknown
9092 module_cmds=
9093 module_expsym_cmds=
9094 old_archive_from_new_cmds=
9095 old_archive_from_expsyms_cmds=
9096 thread_safe_flag_spec=
9097 whole_archive_flag_spec=
9098 # include_expsyms should be a list of space-separated symbols to be *always*
9099 # included in the symbol list
9100 include_expsyms=
9101 # exclude_expsyms can be an extended regexp of symbols to exclude
9102 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9103 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9104 # as well as any symbol that contains `d'.
9105 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9106 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9107 # platforms (ab)use it in PIC code, but their linkers get confused if
9108 # the symbol is explicitly referenced. Since portable code cannot
9109 # rely on this symbol name, it's probably fine to never include it in
9110 # preloaded symbol tables.
9111 # Exclude shared library initialization/finalization symbols.
9112 extract_expsyms_cmds=
9113
9114 case $host_os in
9115 cygwin* | mingw* | pw32* | cegcc*)
9116 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9117 # When not using gcc, we currently assume that we are using
9118 # Microsoft Visual C++.
9119 if test "$GCC" != yes; then
9120 with_gnu_ld=no
9121 fi
9122 ;;
9123 interix*)
9124 # we just hope/assume this is gcc and not c89 (= MSVC++)
9125 with_gnu_ld=yes
9126 ;;
9127 openbsd*)
9128 with_gnu_ld=no
9129 ;;
9130 esac
81ecdfbb 9131
b686ecb5
JM
9132 ld_shlibs=yes
9133
9134 # On some targets, GNU ld is compatible enough with the native linker
9135 # that we're better off using the native interface for both.
9136 lt_use_gnu_ld_interface=no
9137 if test "$with_gnu_ld" = yes; then
9138 case $host_os in
9139 aix*)
9140 # The AIX port of GNU ld has always aspired to compatibility
9141 # with the native linker. However, as the warning in the GNU ld
9142 # block says, versions before 2.19.5* couldn't really create working
9143 # shared libraries, regardless of the interface used.
9144 case `$LD -v 2>&1` in
9145 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9146 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9147 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9148 *)
9149 lt_use_gnu_ld_interface=yes
9150 ;;
9151 esac
9152 ;;
9153 *)
9154 lt_use_gnu_ld_interface=yes
9155 ;;
9156 esac
bec39cab 9157 fi
bec39cab 9158
b686ecb5
JM
9159 if test "$lt_use_gnu_ld_interface" = yes; then
9160 # If archive_cmds runs LD, not CC, wlarc should be empty
9161 wlarc='${wl}'
9162
9163 # Set some defaults for GNU ld with shared library support. These
9164 # are reset later if shared libraries are not supported. Putting them
9165 # here allows them to be overridden if necessary.
9166 runpath_var=LD_RUN_PATH
9167 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9168 export_dynamic_flag_spec='${wl}--export-dynamic'
9169 # ancient GNU ld didn't support --whole-archive et. al.
9170 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9171 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9172 else
9173 whole_archive_flag_spec=
9174 fi
9175 supports_anon_versioning=no
9176 case `$LD -v 2>&1` in
9177 *GNU\ gold*) supports_anon_versioning=yes ;;
9178 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9179 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9180 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9181 *\ 2.11.*) ;; # other 2.11 versions
9182 *) supports_anon_versioning=yes ;;
9183 esac
bec39cab 9184
b686ecb5
JM
9185 # See if GNU ld supports shared libraries.
9186 case $host_os in
9187 aix[3-9]*)
9188 # On AIX/PPC, the GNU linker is very broken
9189 if test "$host_cpu" != ia64; then
9190 ld_shlibs=no
9191 cat <<_LT_EOF 1>&2
9192
9193*** Warning: the GNU linker, at least up to release 2.19, is reported
9194*** to be unable to reliably create shared libraries on AIX.
9195*** Therefore, libtool is disabling shared libraries support. If you
9196*** really care for shared libraries, you may want to install binutils
9197*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9198*** You will then need to restart the configuration process.
9199
9200_LT_EOF
9201 fi
9202 ;;
c906108c 9203
b686ecb5
JM
9204 amigaos*)
9205 case $host_cpu in
9206 powerpc)
9207 # see comment about AmigaOS4 .so support
9208 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9209 archive_expsym_cmds=''
9210 ;;
9211 m68k)
9212 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)'
9213 hardcode_libdir_flag_spec='-L$libdir'
9214 hardcode_minus_L=yes
9215 ;;
9216 esac
9217 ;;
bec39cab 9218
b686ecb5
JM
9219 beos*)
9220 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9221 allow_undefined_flag=unsupported
9222 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9223 # support --undefined. This deserves some investigation. FIXME
9224 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9225 else
9226 ld_shlibs=no
9227 fi
9228 ;;
bec39cab 9229
b686ecb5
JM
9230 cygwin* | mingw* | pw32* | cegcc*)
9231 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9232 # as there is no search path for DLLs.
9233 hardcode_libdir_flag_spec='-L$libdir'
9234 export_dynamic_flag_spec='${wl}--export-all-symbols'
9235 allow_undefined_flag=unsupported
9236 always_export_symbols=no
9237 enable_shared_with_static_runtimes=yes
9238 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9239
9240 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9241 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9242 # If the export-symbols file already is a .def file (1st line
9243 # is EXPORTS), use it as is; otherwise, prepend...
9244 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9245 cp $export_symbols $output_objdir/$soname.def;
9246 else
9247 echo EXPORTS > $output_objdir/$soname.def;
9248 cat $export_symbols >> $output_objdir/$soname.def;
9249 fi~
9250 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9251 else
9252 ld_shlibs=no
9253 fi
9254 ;;
c906108c 9255
b686ecb5
JM
9256 haiku*)
9257 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9258 link_all_deplibs=yes
9259 ;;
81ecdfbb 9260
b686ecb5
JM
9261 interix[3-9]*)
9262 hardcode_direct=no
9263 hardcode_shlibpath_var=no
9264 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9265 export_dynamic_flag_spec='${wl}-E'
9266 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9267 # Instead, shared libraries are loaded at an image base (0x10000000 by
9268 # default) and relocated if they conflict, which is a slow very memory
9269 # consuming and fragmenting process. To avoid this, we pick a random,
9270 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9271 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9272 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9273 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'
9274 ;;
c906108c 9275
6a6859cb 9276 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
b686ecb5
JM
9277 tmp_diet=no
9278 if test "$host_os" = linux-dietlibc; then
9279 case $cc_basename in
9280 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
9281 esac
9282 fi
9283 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9284 && test "$tmp_diet" = no
9285 then
9286 tmp_addflag=' $pic_flag'
9287 tmp_sharedflag='-shared'
9288 case $cc_basename,$host_cpu in
9289 pgcc*) # Portland Group C compiler
9290 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'
9291 tmp_addflag=' $pic_flag'
9292 ;;
9293 pgf77* | pgf90* | pgf95* | pgfortran*)
9294 # Portland Group f77 and f90 compilers
9295 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'
9296 tmp_addflag=' $pic_flag -Mnomain' ;;
9297 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
9298 tmp_addflag=' -i_dynamic' ;;
9299 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
9300 tmp_addflag=' -i_dynamic -nofor_main' ;;
9301 ifc* | ifort*) # Intel Fortran compiler
9302 tmp_addflag=' -nofor_main' ;;
9303 lf95*) # Lahey Fortran 8.1
9304 whole_archive_flag_spec=
9305 tmp_sharedflag='--shared' ;;
9306 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9307 tmp_sharedflag='-qmkshrobj'
9308 tmp_addflag= ;;
9309 nvcc*) # Cuda Compiler Driver 2.2
9310 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'
9311 compiler_needs_object=yes
9312 ;;
9313 esac
9314 case `$CC -V 2>&1 | sed 5q` in
9315 *Sun\ C*) # Sun C 5.9
9316 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'
9317 compiler_needs_object=yes
9318 tmp_sharedflag='-G' ;;
9319 *Sun\ F*) # Sun Fortran 8.3
9320 tmp_sharedflag='-G' ;;
9321 esac
9322 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
c906108c 9323
b686ecb5
JM
9324 if test "x$supports_anon_versioning" = xyes; then
9325 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9326 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9327 echo "local: *; };" >> $output_objdir/$libname.ver~
9328 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9329 fi
c906108c 9330
b686ecb5
JM
9331 case $cc_basename in
9332 xlf* | bgf* | bgxlf* | mpixlf*)
9333 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
9334 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9335 hardcode_libdir_flag_spec=
9336 hardcode_libdir_flag_spec_ld='-rpath $libdir'
9337 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
9338 if test "x$supports_anon_versioning" = xyes; then
9339 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9340 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9341 echo "local: *; };" >> $output_objdir/$libname.ver~
9342 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9343 fi
9344 ;;
9345 esac
9346 else
9347 ld_shlibs=no
9348 fi
9349 ;;
c906108c 9350
b686ecb5
JM
9351 netbsd*)
9352 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9353 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9354 wlarc=
9355 else
9356 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9357 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9358 fi
9359 ;;
c906108c 9360
b686ecb5
JM
9361 solaris*)
9362 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9363 ld_shlibs=no
9364 cat <<_LT_EOF 1>&2
9365
9366*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9367*** create shared libraries on Solaris systems. Therefore, libtool
9368*** is disabling shared libraries support. We urge you to upgrade GNU
9369*** binutils to release 2.9.1 or newer. Another option is to modify
9370*** your PATH or compiler configuration so that the native linker is
9371*** used, and then restart.
9372
9373_LT_EOF
9374 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9375 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9376 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9377 else
9378 ld_shlibs=no
9379 fi
9380 ;;
c906108c 9381
b686ecb5
JM
9382 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9383 case `$LD -v 2>&1` in
9384 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
9385 ld_shlibs=no
9386 cat <<_LT_EOF 1>&2
c906108c 9387
b686ecb5
JM
9388*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
9389*** reliably create shared libraries on SCO systems. Therefore, libtool
9390*** is disabling shared libraries support. We urge you to upgrade GNU
9391*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
9392*** your PATH or compiler configuration so that the native linker is
9393*** used, and then restart.
bec39cab 9394
b686ecb5
JM
9395_LT_EOF
9396 ;;
9397 *)
9398 # For security reasons, it is highly recommended that you always
9399 # use absolute paths for naming shared libraries, and exclude the
9400 # DT_RUNPATH tag from executables and libraries. But doing so
9401 # requires that you compile everything twice, which is a pain.
9402 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9403 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9404 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9405 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9406 else
9407 ld_shlibs=no
9408 fi
9409 ;;
9410 esac
9411 ;;
c906108c 9412
b686ecb5
JM
9413 sunos4*)
9414 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9415 wlarc=
9416 hardcode_direct=yes
9417 hardcode_shlibpath_var=no
9418 ;;
bec39cab 9419
b686ecb5
JM
9420 *)
9421 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9422 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9423 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9424 else
9425 ld_shlibs=no
9426 fi
9427 ;;
9428 esac
bec39cab 9429
b686ecb5
JM
9430 if test "$ld_shlibs" = no; then
9431 runpath_var=
9432 hardcode_libdir_flag_spec=
9433 export_dynamic_flag_spec=
9434 whole_archive_flag_spec=
9435 fi
9436 else
9437 # PORTME fill in a description of your system's linker (not GNU ld)
9438 case $host_os in
9439 aix3*)
9440 allow_undefined_flag=unsupported
9441 always_export_symbols=yes
9442 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'
9443 # Note: this linker hardcodes the directories in LIBPATH if there
9444 # are no directories specified by -L.
9445 hardcode_minus_L=yes
9446 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
9447 # Neither direct hardcoding nor static linking is supported with a
9448 # broken collect2.
9449 hardcode_direct=unsupported
9450 fi
9451 ;;
9452
9453 aix[4-9]*)
9454 if test "$host_cpu" = ia64; then
9455 # On IA64, the linker does run time linking by default, so we don't
9456 # have to do anything special.
9457 aix_use_runtimelinking=no
9458 exp_sym_flag='-Bexport'
9459 no_entry_flag=""
9460 else
9461 # If we're using GNU nm, then we don't want the "-C" option.
9462 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9463 # Also, AIX nm treats weak defined symbols like other global
9464 # defined symbols, whereas GNU nm marks them as "W".
9465 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9466 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'
9467 else
9468 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9469 fi
9470 aix_use_runtimelinking=no
9471
9472 # Test if we are trying to use run time linking or normal
9473 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9474 # need to do runtime linking.
9475 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
9476 for ld_flag in $LDFLAGS; do
9477 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9478 aix_use_runtimelinking=yes
9479 break
9480 fi
9481 done
9482 ;;
9483 esac
9484
9485 exp_sym_flag='-bexport'
9486 no_entry_flag='-bnoentry'
9487 fi
9488
9489 # When large executables or shared objects are built, AIX ld can
9490 # have problems creating the table of contents. If linking a library
9491 # or program results in "error TOC overflow" add -mminimal-toc to
9492 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
9493 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9494
9495 archive_cmds=''
9496 hardcode_direct=yes
9497 hardcode_direct_absolute=yes
9498 hardcode_libdir_separator=':'
9499 link_all_deplibs=yes
9500 file_list_spec='${wl}-f,'
9501
9502 if test "$GCC" = yes; then
9503 case $host_os in aix4.[012]|aix4.[012].*)
9504 # We only want to do this on AIX 4.2 and lower, the check
9505 # below for broken collect2 doesn't work under 4.3+
9506 collect2name=`${CC} -print-prog-name=collect2`
9507 if test -f "$collect2name" &&
9508 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9509 then
9510 # We have reworked collect2
9511 :
9512 else
9513 # We have old collect2
9514 hardcode_direct=unsupported
9515 # It fails to find uninstalled libraries when the uninstalled
9516 # path is not listed in the libpath. Setting hardcode_minus_L
9517 # to unsupported forces relinking
9518 hardcode_minus_L=yes
9519 hardcode_libdir_flag_spec='-L$libdir'
9520 hardcode_libdir_separator=
9521 fi
9522 ;;
9523 esac
9524 shared_flag='-shared'
9525 if test "$aix_use_runtimelinking" = yes; then
9526 shared_flag="$shared_flag "'${wl}-G'
9527 fi
9528 else
9529 # not using gcc
9530 if test "$host_cpu" = ia64; then
9531 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9532 # chokes on -Wl,-G. The following line is correct:
9533 shared_flag='-G'
9534 else
9535 if test "$aix_use_runtimelinking" = yes; then
9536 shared_flag='${wl}-G'
9537 else
9538 shared_flag='${wl}-bM:SRE'
9539 fi
9540 fi
9541 fi
9542
9543 export_dynamic_flag_spec='${wl}-bexpall'
9544 # It seems that -bexpall does not export symbols beginning with
9545 # underscore (_), so it is better to generate a list of symbols to export.
9546 always_export_symbols=yes
9547 if test "$aix_use_runtimelinking" = yes; then
9548 # Warning - without using the other runtime loading flags (-brtl),
9549 # -berok will link without error, but may produce a broken library.
9550 allow_undefined_flag='-berok'
9551 # Determine the default libpath from the value encoded in an
9552 # empty executable.
9553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9554/* end confdefs.h. */
ddc9cd0f 9555
bec39cab
AC
9556int
9557main ()
9558{
b686ecb5 9559
bec39cab
AC
9560 ;
9561 return 0;
9562}
9563_ACEOF
b686ecb5 9564if ac_fn_c_try_link "$LINENO"; then :
ddc9cd0f 9565
b686ecb5
JM
9566lt_aix_libpath_sed='
9567 /Import File Strings/,/^$/ {
9568 /^0/ {
9569 s/^0 *\(.*\)$/\1/
9570 p
9571 }
9572 }'
9573aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9574# Check for a 64-bit object if we didn't find anything.
9575if test -z "$aix_libpath"; then
9576 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
bec39cab 9577fi
bec39cab 9578fi
b686ecb5
JM
9579rm -f core conftest.err conftest.$ac_objext \
9580 conftest$ac_exeext conftest.$ac_ext
9581if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
96baa820 9582
b686ecb5
JM
9583 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9584 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"
9585 else
9586 if test "$host_cpu" = ia64; then
9587 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9588 allow_undefined_flag="-z nodefs"
9589 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"
9590 else
9591 # Determine the default libpath from the value encoded in an
9592 # empty executable.
9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
9594/* end confdefs.h. */
9595
b4e70030
JB
9596int
9597main ()
9598{
b686ecb5 9599
b4e70030
JB
9600 ;
9601 return 0;
9602}
9603_ACEOF
b686ecb5 9604if ac_fn_c_try_link "$LINENO"; then :
b4e70030 9605
b686ecb5
JM
9606lt_aix_libpath_sed='
9607 /Import File Strings/,/^$/ {
9608 /^0/ {
9609 s/^0 *\(.*\)$/\1/
9610 p
9611 }
9612 }'
9613aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9614# Check for a 64-bit object if we didn't find anything.
9615if test -z "$aix_libpath"; then
9616 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
b4e70030 9617fi
b4e70030 9618fi
b686ecb5
JM
9619rm -f core conftest.err conftest.$ac_objext \
9620 conftest$ac_exeext conftest.$ac_ext
9621if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9622
9623 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9624 # Warning - without using the other run time loading flags,
9625 # -berok will link without error, but may produce a broken library.
9626 no_undefined_flag=' ${wl}-bernotok'
9627 allow_undefined_flag=' ${wl}-berok'
9628 if test "$with_gnu_ld" = yes; then
9629 # We only use this code for GNU lds that support --whole-archive.
9630 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9631 else
9632 # Exported symbols can be pulled into shared objects from archives
9633 whole_archive_flag_spec='$convenience'
9634 fi
9635 archive_cmds_need_lc=yes
9636 # This is similar to how AIX traditionally builds its shared libraries.
9637 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'
9638 fi
9639 fi
9640 ;;
b4e70030 9641
b686ecb5
JM
9642 amigaos*)
9643 case $host_cpu in
9644 powerpc)
9645 # see comment about AmigaOS4 .so support
9646 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9647 archive_expsym_cmds=''
9648 ;;
9649 m68k)
9650 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)'
9651 hardcode_libdir_flag_spec='-L$libdir'
9652 hardcode_minus_L=yes
9653 ;;
9654 esac
9655 ;;
b4e70030 9656
b686ecb5
JM
9657 bsdi[45]*)
9658 export_dynamic_flag_spec=-rdynamic
9659 ;;
b4e70030 9660
b686ecb5
JM
9661 cygwin* | mingw* | pw32* | cegcc*)
9662 # When not using gcc, we currently assume that we are using
9663 # Microsoft Visual C++.
9664 # hardcode_libdir_flag_spec is actually meaningless, as there is
9665 # no search path for DLLs.
9666 hardcode_libdir_flag_spec=' '
9667 allow_undefined_flag=unsupported
9668 # Tell ltmain to make .lib files, not .a files.
9669 libext=lib
9670 # Tell ltmain to make .dll files, not .so files.
9671 shrext_cmds=".dll"
9672 # FIXME: Setting linknames here is a bad hack.
9673 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9674 # The linker will automatically build a .lib file if we build a DLL.
9675 old_archive_from_new_cmds='true'
9676 # FIXME: Should let the user specify the lib program.
9677 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9678 fix_srcfile_path='`cygpath -w "$srcfile"`'
9679 enable_shared_with_static_runtimes=yes
9680 ;;
b040ad30 9681
b686ecb5 9682 darwin* | rhapsody*)
b040ad30 9683
b040ad30 9684
b686ecb5
JM
9685 archive_cmds_need_lc=no
9686 hardcode_direct=no
9687 hardcode_automatic=yes
9688 hardcode_shlibpath_var=unsupported
9689 if test "$lt_cv_ld_force_load" = "yes"; then
9690 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\"`'
9691 else
9692 whole_archive_flag_spec=''
9693 fi
9694 link_all_deplibs=yes
9695 allow_undefined_flag="$_lt_dar_allow_undefined"
9696 case $cc_basename in
9697 ifort*) _lt_dar_can_shared=yes ;;
9698 *) _lt_dar_can_shared=$GCC ;;
9699 esac
9700 if test "$_lt_dar_can_shared" = "yes"; then
9701 output_verbose_link_cmd=func_echo_all
9702 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9703 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
9704 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}"
9705 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}"
233a11ab 9706
b686ecb5
JM
9707 else
9708 ld_shlibs=no
9709 fi
233a11ab 9710
b686ecb5 9711 ;;
233a11ab 9712
b686ecb5
JM
9713 dgux*)
9714 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9715 hardcode_libdir_flag_spec='-L$libdir'
9716 hardcode_shlibpath_var=no
9717 ;;
b040ad30 9718
b686ecb5
JM
9719 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9720 # support. Future versions do this automatically, but an explicit c++rt0.o
9721 # does not break anything, and helps significantly (at the cost of a little
9722 # extra space).
9723 freebsd2.2*)
9724 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9725 hardcode_libdir_flag_spec='-R$libdir'
9726 hardcode_direct=yes
9727 hardcode_shlibpath_var=no
9728 ;;
233a11ab 9729
b686ecb5
JM
9730 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9731 freebsd2.*)
9732 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9733 hardcode_direct=yes
9734 hardcode_minus_L=yes
9735 hardcode_shlibpath_var=no
9736 ;;
77f120bf 9737
b686ecb5
JM
9738 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9739 freebsd* | dragonfly*)
9740 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9741 hardcode_libdir_flag_spec='-R$libdir'
9742 hardcode_direct=yes
9743 hardcode_shlibpath_var=no
9744 ;;
2cac01e3 9745
b686ecb5
JM
9746 hpux9*)
9747 if test "$GCC" = yes; then
9748 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9749 else
9750 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'
9751 fi
9752 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9753 hardcode_libdir_separator=:
9754 hardcode_direct=yes
9755
9756 # hardcode_minus_L: Not really in the search PATH,
9757 # but as the default location of the library.
9758 hardcode_minus_L=yes
9759 export_dynamic_flag_spec='${wl}-E'
9760 ;;
2cac01e3 9761
b686ecb5
JM
9762 hpux10*)
9763 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9764 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9765 else
9766 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9767 fi
9768 if test "$with_gnu_ld" = no; then
9769 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9770 hardcode_libdir_flag_spec_ld='+b $libdir'
9771 hardcode_libdir_separator=:
9772 hardcode_direct=yes
9773 hardcode_direct_absolute=yes
9774 export_dynamic_flag_spec='${wl}-E'
9775 # hardcode_minus_L: Not really in the search PATH,
9776 # but as the default location of the library.
9777 hardcode_minus_L=yes
9778 fi
9779 ;;
2cac01e3 9780
b686ecb5
JM
9781 hpux11*)
9782 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9783 case $host_cpu in
9784 hppa*64*)
6a6859cb 9785 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
b686ecb5
JM
9786 ;;
9787 ia64*)
9788 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9789 ;;
9790 *)
9791 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9792 ;;
9793 esac
9794 else
9795 case $host_cpu in
9796 hppa*64*)
6a6859cb 9797 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
b686ecb5
JM
9798 ;;
9799 ia64*)
9800 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9801 ;;
9802 *)
2cac01e3 9803
b686ecb5
JM
9804 # Older versions of the 11.00 compiler do not understand -b yet
9805 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9807$as_echo_n "checking if $CC understands -b... " >&6; }
9808if ${lt_cv_prog_compiler__b+:} false; then :
9809 $as_echo_n "(cached) " >&6
2cac01e3 9810else
b686ecb5
JM
9811 lt_cv_prog_compiler__b=no
9812 save_LDFLAGS="$LDFLAGS"
9813 LDFLAGS="$LDFLAGS -b"
9814 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9815 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9816 # The linker can only warn and ignore the option if not recognized
9817 # So say no if there are warnings
9818 if test -s conftest.err; then
9819 # Append any errors to the config.log.
9820 cat conftest.err 1>&5
9821 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9822 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9823 if diff conftest.exp conftest.er2 >/dev/null; then
9824 lt_cv_prog_compiler__b=yes
9825 fi
9826 else
9827 lt_cv_prog_compiler__b=yes
9828 fi
9829 fi
9830 $RM -r conftest*
9831 LDFLAGS="$save_LDFLAGS"
9832
2cac01e3 9833fi
b686ecb5
JM
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9835$as_echo "$lt_cv_prog_compiler__b" >&6; }
9836
9837if test x"$lt_cv_prog_compiler__b" = xyes; then
9838 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
2cac01e3 9839else
b686ecb5 9840 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
2cac01e3
FS
9841fi
9842
b686ecb5
JM
9843 ;;
9844 esac
9845 fi
9846 if test "$with_gnu_ld" = no; then
9847 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9848 hardcode_libdir_separator=:
9849
9850 case $host_cpu in
9851 hppa*64*|ia64*)
9852 hardcode_direct=no
9853 hardcode_shlibpath_var=no
9854 ;;
9855 *)
9856 hardcode_direct=yes
9857 hardcode_direct_absolute=yes
9858 export_dynamic_flag_spec='${wl}-E'
9859
9860 # hardcode_minus_L: Not really in the search PATH,
9861 # but as the default location of the library.
9862 hardcode_minus_L=yes
9863 ;;
9864 esac
9865 fi
9866 ;;
2cac01e3 9867
b686ecb5
JM
9868 irix5* | irix6* | nonstopux*)
9869 if test "$GCC" = yes; then
9870 archive_cmds='$CC -shared $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'
9871 # Try to use the -exported_symbol ld option, if it does not
9872 # work, assume that -exports_file does not work either and
9873 # implicitly export all symbols.
9874 save_LDFLAGS="$LDFLAGS"
9875 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9877/* end confdefs.h. */
9878int foo(void) {}
2cac01e3
FS
9879_ACEOF
9880if ac_fn_c_try_link "$LINENO"; then :
b686ecb5 9881 archive_expsym_cmds='$CC -shared $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'
2cac01e3 9882
2cac01e3
FS
9883fi
9884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext conftest.$ac_ext
b686ecb5
JM
9886 LDFLAGS="$save_LDFLAGS"
9887 else
9888 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'
9889 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'
9890 fi
9891 archive_cmds_need_lc='no'
9892 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9893 hardcode_libdir_separator=:
9894 inherit_rpath=yes
9895 link_all_deplibs=yes
9896 ;;
2cac01e3 9897
b686ecb5
JM
9898 netbsd*)
9899 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9900 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9901 else
9902 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9903 fi
9904 hardcode_libdir_flag_spec='-R$libdir'
9905 hardcode_direct=yes
9906 hardcode_shlibpath_var=no
9907 ;;
2cac01e3 9908
b686ecb5
JM
9909 newsos6)
9910 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9911 hardcode_direct=yes
9912 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9913 hardcode_libdir_separator=:
9914 hardcode_shlibpath_var=no
9915 ;;
2cac01e3 9916
b686ecb5
JM
9917 *nto* | *qnx*)
9918 ;;
2cac01e3 9919
b686ecb5
JM
9920 openbsd*)
9921 if test -f /usr/libexec/ld.so; then
9922 hardcode_direct=yes
9923 hardcode_shlibpath_var=no
9924 hardcode_direct_absolute=yes
9925 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9926 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9927 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9928 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9929 export_dynamic_flag_spec='${wl}-E'
9930 else
9931 case $host_os in
9932 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9933 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9934 hardcode_libdir_flag_spec='-R$libdir'
9935 ;;
9936 *)
9937 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9938 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9939 ;;
9940 esac
9941 fi
9942 else
9943 ld_shlibs=no
9944 fi
9945 ;;
2cac01e3 9946
b686ecb5
JM
9947 os2*)
9948 hardcode_libdir_flag_spec='-L$libdir'
9949 hardcode_minus_L=yes
9950 allow_undefined_flag=unsupported
9951 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'
9952 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9953 ;;
2cac01e3 9954
b686ecb5
JM
9955 osf3*)
9956 if test "$GCC" = yes; then
9957 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9958 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'
9959 else
9960 allow_undefined_flag=' -expect_unresolved \*'
9961 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'
9962 fi
9963 archive_cmds_need_lc='no'
9964 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9965 hardcode_libdir_separator=:
9966 ;;
2cac01e3 9967
b686ecb5
JM
9968 osf4* | osf5*) # as osf3* with the addition of -msym flag
9969 if test "$GCC" = yes; then
9970 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9971 archive_cmds='$CC -shared${allow_undefined_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'
9972 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9973 else
9974 allow_undefined_flag=' -expect_unresolved \*'
9975 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'
9976 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~
9977 $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'
2cac01e3 9978
b686ecb5
JM
9979 # Both c and cxx compiler support -rpath directly
9980 hardcode_libdir_flag_spec='-rpath $libdir'
9981 fi
9982 archive_cmds_need_lc='no'
9983 hardcode_libdir_separator=:
9984 ;;
2cac01e3 9985
b686ecb5
JM
9986 solaris*)
9987 no_undefined_flag=' -z defs'
9988 if test "$GCC" = yes; then
9989 wlarc='${wl}'
9990 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9991 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9992 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9993 else
9994 case `$CC -V 2>&1` in
9995 *"Compilers 5.0"*)
9996 wlarc=''
9997 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9998 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9999 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
10000 ;;
10001 *)
10002 wlarc='${wl}'
10003 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
10004 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10005 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10006 ;;
10007 esac
10008 fi
10009 hardcode_libdir_flag_spec='-R$libdir'
10010 hardcode_shlibpath_var=no
10011 case $host_os in
10012 solaris2.[0-5] | solaris2.[0-5].*) ;;
10013 *)
10014 # The compiler driver will combine and reorder linker options,
10015 # but understands `-z linker_flag'. GCC discards it without `$wl',
10016 # but is careful enough not to reorder.
10017 # Supported since Solaris 2.6 (maybe 2.5.1?)
10018 if test "$GCC" = yes; then
10019 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
10020 else
10021 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
10022 fi
10023 ;;
10024 esac
10025 link_all_deplibs=yes
10026 ;;
10027
10028 sunos4*)
10029 if test "x$host_vendor" = xsequent; then
10030 # Use $CC to link under sequent, because it throws in some extra .o
10031 # files that make .init and .fini sections work.
10032 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10033 else
10034 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10035 fi
10036 hardcode_libdir_flag_spec='-L$libdir'
10037 hardcode_direct=yes
10038 hardcode_minus_L=yes
10039 hardcode_shlibpath_var=no
10040 ;;
2cac01e3 10041
b686ecb5
JM
10042 sysv4)
10043 case $host_vendor in
10044 sni)
10045 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10046 hardcode_direct=yes # is this really true???
10047 ;;
10048 siemens)
10049 ## LD is ld it makes a PLAMLIB
10050 ## CC just makes a GrossModule.
10051 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10052 reload_cmds='$CC -r -o $output$reload_objs'
10053 hardcode_direct=no
10054 ;;
10055 motorola)
10056 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10057 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10058 ;;
10059 esac
10060 runpath_var='LD_RUN_PATH'
10061 hardcode_shlibpath_var=no
10062 ;;
2cac01e3 10063
b686ecb5
JM
10064 sysv4.3*)
10065 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10066 hardcode_shlibpath_var=no
10067 export_dynamic_flag_spec='-Bexport'
10068 ;;
2cac01e3 10069
b686ecb5
JM
10070 sysv4*MP*)
10071 if test -d /usr/nec; then
10072 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10073 hardcode_shlibpath_var=no
10074 runpath_var=LD_RUN_PATH
10075 hardcode_runpath_var=yes
10076 ld_shlibs=yes
10077 fi
10078 ;;
2cac01e3 10079
b686ecb5
JM
10080 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10081 no_undefined_flag='${wl}-z,text'
10082 archive_cmds_need_lc=no
10083 hardcode_shlibpath_var=no
10084 runpath_var='LD_RUN_PATH'
2cac01e3 10085
b686ecb5
JM
10086 if test "$GCC" = yes; then
10087 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10088 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10089 else
10090 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10091 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10092 fi
10093 ;;
2cac01e3 10094
b686ecb5
JM
10095 sysv5* | sco3.2v5* | sco5v6*)
10096 # Note: We can NOT use -z defs as we might desire, because we do not
10097 # link with -lc, and that would cause any symbols used from libc to
10098 # always be unresolved, which means just about no library would
10099 # ever link correctly. If we're not using GNU ld we use -z text
10100 # though, which does catch some bad symbols but isn't as heavy-handed
10101 # as -z defs.
10102 no_undefined_flag='${wl}-z,text'
10103 allow_undefined_flag='${wl}-z,nodefs'
10104 archive_cmds_need_lc=no
10105 hardcode_shlibpath_var=no
10106 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10107 hardcode_libdir_separator=':'
10108 link_all_deplibs=yes
10109 export_dynamic_flag_spec='${wl}-Bexport'
10110 runpath_var='LD_RUN_PATH'
10111
10112 if test "$GCC" = yes; then
10113 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10114 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10115 else
10116 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10117 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10118 fi
10119 ;;
2cac01e3 10120
b686ecb5
JM
10121 uts4*)
10122 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10123 hardcode_libdir_flag_spec='-L$libdir'
10124 hardcode_shlibpath_var=no
10125 ;;
2cac01e3 10126
b686ecb5
JM
10127 *)
10128 ld_shlibs=no
10129 ;;
10130 esac
10131
10132 if test x$host_vendor = xsni; then
10133 case $host in
10134 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10135 export_dynamic_flag_spec='${wl}-Blargedynsym'
10136 ;;
10137 esac
10138 fi
016a3251 10139 fi
016a3251 10140
b686ecb5
JM
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10142$as_echo "$ld_shlibs" >&6; }
10143test "$ld_shlibs" = no && can_build_shared=no
016a3251 10144
b686ecb5 10145with_gnu_ld=$with_gnu_ld
016a3251 10146
b686ecb5
JM
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161#
10162# Do we need to explicitly link libc?
10163#
10164case "x$archive_cmds_need_lc" in
10165x|xyes)
10166 # Assume -lc should be added
10167 archive_cmds_need_lc=yes
10168
10169 if test "$enable_shared" = yes && test "$GCC" = yes; then
10170 case $archive_cmds in
10171 *'~'*)
10172 # FIXME: we may have to deal with multi-command sequences.
016a3251 10173 ;;
b686ecb5
JM
10174 '$CC '*)
10175 # Test whether the compiler implicitly links with -lc since on some
10176 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10177 # to ld, don't add -lc before -lgcc.
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
10179$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
10180if ${lt_cv_archive_cmds_need_lc+:} false; then :
016a3251
DD
10181 $as_echo_n "(cached) " >&6
10182else
b686ecb5
JM
10183 $RM conftest*
10184 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10185
10186 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10187 (eval $ac_compile) 2>&5
10188 ac_status=$?
10189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10190 test $ac_status = 0; } 2>conftest.err; then
10191 soname=conftest
10192 lib=conftest
10193 libobjs=conftest.$ac_objext
10194 deplibs=
10195 wl=$lt_prog_compiler_wl
10196 pic_flag=$lt_prog_compiler_pic
10197 compiler_flags=-v
10198 linker_flags=-v
10199 verstring=
10200 output_objdir=.
10201 libname=conftest
10202 lt_save_allow_undefined_flag=$allow_undefined_flag
10203 allow_undefined_flag=
10204 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
10205 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
10206 ac_status=$?
10207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10208 test $ac_status = 0; }
10209 then
10210 lt_cv_archive_cmds_need_lc=no
10211 else
10212 lt_cv_archive_cmds_need_lc=yes
10213 fi
10214 allow_undefined_flag=$lt_save_allow_undefined_flag
10215 else
10216 cat conftest.err 1>&5
10217 fi
10218 $RM conftest*
016a3251 10219
016a3251 10220fi
b686ecb5
JM
10221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
10222$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
10223 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
10224 ;;
10225 esac
10226 fi
10227 ;;
10228esac
016a3251
DD
10229
10230
10231
016a3251 10232
016a3251 10233
016a3251
DD
10234
10235
10236
10237
10238
10239
10240
10241
016a3251 10242
016a3251 10243
016a3251 10244
77f120bf 10245
6c7a06a3 10246
016a3251 10247
016a3251 10248
016a3251 10249
016a3251 10250
6c7a06a3 10251
81ecdfbb 10252
9f1528a1 10253
9f1528a1 10254
9f1528a1 10255
016a3251 10256
016a3251 10257
016a3251 10258
016a3251 10259
016a3251 10260
016a3251 10261
016a3251 10262
016a3251 10263
016a3251 10264
016a3251 10265
016a3251
DD
10266
10267
10268
10269
10270
6c7a06a3 10271
6c7a06a3 10272
6c7a06a3 10273
94ae1714 10274
94ae1714 10275
6c7a06a3 10276
016a3251 10277
94ae1714 10278
016a3251 10279
016a3251 10280
016a3251 10281
016a3251 10282
94ae1714 10283
6c7a06a3 10284
6c7a06a3 10285
6c7a06a3 10286
b4e70030 10287
6c7a06a3 10288
6c7a06a3 10289
6c7a06a3 10290
6c7a06a3 10291
6c7a06a3 10292
6c7a06a3
TT
10293
10294
478aac75
DE
10295
10296
478aac75 10297
478aac75
DE
10298
10299
478aac75 10300
478aac75
DE
10301
10302
10303
478aac75
DE
10304
10305
cb01cfba 10306
6c7a06a3 10307
81ecdfbb 10308
6c7a06a3 10309
6c7a06a3
TT
10310
10311
cb01cfba 10312
6c7a06a3 10313
6c7a06a3 10314
6c7a06a3 10315
6c7a06a3 10316
6c7a06a3 10317
6c7a06a3 10318
06825bd1 10319
06825bd1 10320
8ee53726 10321
3841debe 10322
6a30b0a5 10323
6a30b0a5 10324
7c26f8da 10325
7c26f8da 10326
5593a99a 10327
5593a99a 10328
5593a99a 10329
86c6b807 10330
6a30b0a5
AS
10331
10332
10333
10334
10335
f997c383 10336
f997c383 10337
f997c383 10338
f997c383 10339
f997c383
SD
10340
10341
10342
f997c383
SD
10343
10344
f997c383 10345
f997c383 10346
f997c383
SD
10347
10348
10349
f997c383
SD
10350
10351
f997c383 10352
f997c383 10353
f997c383
SD
10354
10355
10356
f997c383
SD
10357
10358
10359
f997c383
SD
10360
10361
f997c383
SD
10362
10363
a2d08b9e 10364
a2d08b9e 10365
a2d08b9e 10366
a2d08b9e
SD
10367
10368
39037522 10369
b8e0a31c 10370
b8e0a31c
SD
10371
10372
b8e0a31c 10373
b8e0a31c
SD
10374
10375
10376
10377
b8e0a31c 10378
b8e0a31c
SD
10379
10380
10381
10382
10383
81ecdfbb 10384
5c39566f 10385
b686ecb5
JM
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
10387$as_echo_n "checking dynamic linker characteristics... " >&6; }
5c39566f 10388
b686ecb5
JM
10389if test "$GCC" = yes; then
10390 case $host_os in
10391 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
10392 *) lt_awk_arg="/^libraries:/" ;;
10393 esac
10394 case $host_os in
10395 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
10396 *) lt_sed_strip_eq="s,=/,/,g" ;;
10397 esac
10398 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
10399 case $lt_search_path_spec in
10400 *\;*)
10401 # if the path contains ";" then we assume it to be the separator
10402 # otherwise default to the standard path separator (i.e. ":") - it is
10403 # assumed that no part of a normal pathname contains ";" but that should
10404 # okay in the real world where ";" in dirpaths is itself problematic.
10405 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
10406 ;;
10407 *)
10408 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
10409 ;;
10410 esac
10411 # Ok, now we have the path, separated by spaces, we can step through it
10412 # and add multilib dir if necessary.
10413 lt_tmp_lt_search_path_spec=
10414 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
10415 for lt_sys_path in $lt_search_path_spec; do
10416 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
10417 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
10418 else
10419 test -d "$lt_sys_path" && \
10420 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
10421 fi
10422 done
10423 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
10424BEGIN {RS=" "; FS="/|\n";} {
10425 lt_foo="";
10426 lt_count=0;
10427 for (lt_i = NF; lt_i > 0; lt_i--) {
10428 if ($lt_i != "" && $lt_i != ".") {
10429 if ($lt_i == "..") {
10430 lt_count++;
10431 } else {
10432 if (lt_count == 0) {
10433 lt_foo="/" $lt_i lt_foo;
10434 } else {
10435 lt_count--;
10436 }
10437 }
10438 }
10439 }
10440 if (lt_foo != "") { lt_freq[lt_foo]++; }
10441 if (lt_freq[lt_foo] == 1) { print lt_foo; }
10442}'`
10443 # AWK program above erroneously prepends '/' to C:/dos/paths
10444 # for these hosts.
10445 case $host_os in
10446 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
10447 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
10448 esac
10449 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
10450else
10451 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
10452fi
10453library_names_spec=
10454libname_spec='lib$name'
10455soname_spec=
10456shrext_cmds=".so"
10457postinstall_cmds=
10458postuninstall_cmds=
10459finish_cmds=
10460finish_eval=
10461shlibpath_var=
10462shlibpath_overrides_runpath=unknown
10463version_type=none
10464dynamic_linker="$host_os ld.so"
10465sys_lib_dlsearch_path_spec="/lib /usr/lib"
10466need_lib_prefix=unknown
10467hardcode_into_libs=no
10468
10469# when you set need_version to no, make sure it does not cause -set_version
10470# flags to be left without arguments
10471need_version=unknown
3841debe 10472
b686ecb5
JM
10473case $host_os in
10474aix3*)
10475 version_type=linux
10476 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10477 shlibpath_var=LIBPATH
3841debe 10478
b686ecb5
JM
10479 # AIX 3 has no versioning support, so we append a major version to the name.
10480 soname_spec='${libname}${release}${shared_ext}$major'
10481 ;;
3841debe 10482
b686ecb5
JM
10483aix[4-9]*)
10484 version_type=linux
10485 need_lib_prefix=no
10486 need_version=no
10487 hardcode_into_libs=yes
10488 if test "$host_cpu" = ia64; then
10489 # AIX 5 supports IA64
10490 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
10491 shlibpath_var=LD_LIBRARY_PATH
10492 else
10493 # With GCC up to 2.95.x, collect2 would create an import file
10494 # for dependence libraries. The import file would start with
10495 # the line `#! .'. This would cause the generated library to
10496 # depend on `.', always an invalid library. This was fixed in
10497 # development snapshots of GCC prior to 3.0.
10498 case $host_os in
10499 aix4 | aix4.[01] | aix4.[01].*)
10500 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10501 echo ' yes '
10502 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
10503 :
10504 else
10505 can_build_shared=no
10506 fi
10507 ;;
10508 esac
10509 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10510 # soname into executable. Probably we can add versioning support to
10511 # collect2, so additional links can be useful in future.
10512 if test "$aix_use_runtimelinking" = yes; then
10513 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10514 # instead of lib<name>.a to let people know that these are not
10515 # typical AIX shared libraries.
10516 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10517 else
10518 # We preserve .a as extension for shared libraries through AIX4.2
10519 # and later when we are not doing run time linking.
10520 library_names_spec='${libname}${release}.a $libname.a'
10521 soname_spec='${libname}${release}${shared_ext}$major'
10522 fi
10523 shlibpath_var=LIBPATH
10524 fi
10525 ;;
3841debe 10526
b686ecb5
JM
10527amigaos*)
10528 case $host_cpu in
10529 powerpc)
10530 # Since July 2007 AmigaOS4 officially supports .so libraries.
10531 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
10532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10533 ;;
10534 m68k)
10535 library_names_spec='$libname.ixlibrary $libname.a'
10536 # Create ${libname}_ixlibrary.a entries in /sys/libs.
10537 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'
10538 ;;
10539 esac
10540 ;;
3841debe 10541
b686ecb5
JM
10542beos*)
10543 library_names_spec='${libname}${shared_ext}'
10544 dynamic_linker="$host_os ld.so"
10545 shlibpath_var=LIBRARY_PATH
10546 ;;
3841debe 10547
b686ecb5
JM
10548bsdi[45]*)
10549 version_type=linux
10550 need_version=no
10551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10552 soname_spec='${libname}${release}${shared_ext}$major'
10553 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10554 shlibpath_var=LD_LIBRARY_PATH
10555 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10556 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10557 # the default ld.so.conf also contains /usr/contrib/lib and
10558 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10559 # libtool to hard-code these into programs
10560 ;;
3841debe 10561
b686ecb5
JM
10562cygwin* | mingw* | pw32* | cegcc*)
10563 version_type=windows
10564 shrext_cmds=".dll"
10565 need_version=no
10566 need_lib_prefix=no
10567
10568 case $GCC,$host_os in
10569 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
10570 library_names_spec='$libname.dll.a'
10571 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10572 postinstall_cmds='base_file=`basename \${file}`~
10573 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10574 dldir=$destdir/`dirname \$dlpath`~
10575 test -d \$dldir || mkdir -p \$dldir~
10576 $install_prog $dir/$dlname \$dldir/$dlname~
10577 chmod a+x \$dldir/$dlname~
10578 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
10579 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
10580 fi'
10581 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10582 dlpath=$dir/\$dldll~
10583 $RM \$dlpath'
10584 shlibpath_overrides_runpath=yes
10585
10586 case $host_os in
10587 cygwin*)
10588 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10589 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10590
10591 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
10592 ;;
10593 mingw* | cegcc*)
10594 # MinGW DLLs use traditional 'lib' prefix
10595 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10596 ;;
10597 pw32*)
10598 # pw32 DLLs use 'pw' prefix rather than 'lib'
10599 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10600 ;;
10601 esac
10602 ;;
3841debe 10603
b686ecb5
JM
10604 *)
10605 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10606 ;;
10607 esac
10608 dynamic_linker='Win32 ld.exe'
10609 # FIXME: first we should search . and the directory the executable is in
10610 shlibpath_var=PATH
10611 ;;
3841debe 10612
b686ecb5
JM
10613darwin* | rhapsody*)
10614 dynamic_linker="$host_os dyld"
10615 version_type=darwin
10616 need_lib_prefix=no
10617 need_version=no
10618 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10619 soname_spec='${libname}${release}${major}$shared_ext'
10620 shlibpath_overrides_runpath=yes
10621 shlibpath_var=DYLD_LIBRARY_PATH
10622 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10623
10624 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10625 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10626 ;;
3841debe 10627
b686ecb5
JM
10628dgux*)
10629 version_type=linux
10630 need_lib_prefix=no
10631 need_version=no
10632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10633 soname_spec='${libname}${release}${shared_ext}$major'
10634 shlibpath_var=LD_LIBRARY_PATH
10635 ;;
3841debe 10636
b686ecb5
JM
10637freebsd* | dragonfly*)
10638 # DragonFly does not have aout. When/if they implement a new
10639 # versioning mechanism, adjust this.
10640 if test -x /usr/bin/objformat; then
10641 objformat=`/usr/bin/objformat`
10642 else
10643 case $host_os in
10644 freebsd[23].*) objformat=aout ;;
10645 *) objformat=elf ;;
10646 esac
10647 fi
10648 version_type=freebsd-$objformat
10649 case $version_type in
10650 freebsd-elf*)
10651 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10652 need_version=no
10653 need_lib_prefix=no
10654 ;;
10655 freebsd-*)
10656 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10657 need_version=yes
10658 ;;
10659 esac
10660 shlibpath_var=LD_LIBRARY_PATH
10661 case $host_os in
10662 freebsd2.*)
10663 shlibpath_overrides_runpath=yes
10664 ;;
10665 freebsd3.[01]* | freebsdelf3.[01]*)
10666 shlibpath_overrides_runpath=yes
10667 hardcode_into_libs=yes
10668 ;;
10669 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10670 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10671 shlibpath_overrides_runpath=no
10672 hardcode_into_libs=yes
10673 ;;
10674 *) # from 4.6 on, and DragonFly
10675 shlibpath_overrides_runpath=yes
10676 hardcode_into_libs=yes
10677 ;;
10678 esac
10679 ;;
3841debe 10680
b686ecb5
JM
10681haiku*)
10682 version_type=linux
10683 need_lib_prefix=no
10684 need_version=no
10685 dynamic_linker="$host_os runtime_loader"
10686 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10687 soname_spec='${libname}${release}${shared_ext}$major'
10688 shlibpath_var=LIBRARY_PATH
10689 shlibpath_overrides_runpath=yes
10690 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10691 hardcode_into_libs=yes
10692 ;;
10693
10694hpux9* | hpux10* | hpux11*)
10695 # Give a soname corresponding to the major version so that dld.sl refuses to
10696 # link against other versions.
10697 version_type=sunos
10698 need_lib_prefix=no
10699 need_version=no
10700 case $host_cpu in
10701 ia64*)
10702 shrext_cmds='.so'
10703 hardcode_into_libs=yes
10704 dynamic_linker="$host_os dld.so"
10705 shlibpath_var=LD_LIBRARY_PATH
10706 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10708 soname_spec='${libname}${release}${shared_ext}$major'
10709 if test "X$HPUX_IA64_MODE" = X32; then
10710 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3841debe 10711 else
b686ecb5
JM
10712 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10713 fi
10714 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10715 ;;
10716 hppa*64*)
10717 shrext_cmds='.sl'
10718 hardcode_into_libs=yes
10719 dynamic_linker="$host_os dld.sl"
10720 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10721 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10723 soname_spec='${libname}${release}${shared_ext}$major'
10724 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10725 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10726 ;;
10727 *)
10728 shrext_cmds='.sl'
10729 dynamic_linker="$host_os dld.sl"
10730 shlibpath_var=SHLIB_PATH
10731 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10733 soname_spec='${libname}${release}${shared_ext}$major'
10734 ;;
10735 esac
10736 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
10737 postinstall_cmds='chmod 555 $lib'
10738 # or fails outright, so override atomically:
10739 install_override_mode=555
10740 ;;
3841debe 10741
b686ecb5
JM
10742interix[3-9]*)
10743 version_type=linux
10744 need_lib_prefix=no
10745 need_version=no
10746 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10747 soname_spec='${libname}${release}${shared_ext}$major'
10748 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10749 shlibpath_var=LD_LIBRARY_PATH
10750 shlibpath_overrides_runpath=no
10751 hardcode_into_libs=yes
10752 ;;
3841debe 10753
b686ecb5
JM
10754irix5* | irix6* | nonstopux*)
10755 case $host_os in
10756 nonstopux*) version_type=nonstopux ;;
10757 *)
10758 if test "$lt_cv_prog_gnu_ld" = yes; then
10759 version_type=linux
10760 else
10761 version_type=irix
10762 fi ;;
10763 esac
10764 need_lib_prefix=no
10765 need_version=no
10766 soname_spec='${libname}${release}${shared_ext}$major'
10767 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10768 case $host_os in
10769 irix5* | nonstopux*)
10770 libsuff= shlibsuff=
10771 ;;
10772 *)
10773 case $LD in # libtool.m4 will add one of these switches to LD
10774 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10775 libsuff= shlibsuff= libmagic=32-bit;;
10776 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10777 libsuff=32 shlibsuff=N32 libmagic=N32;;
10778 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10779 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10780 *) libsuff= shlibsuff= libmagic=never-match;;
10781 esac
10782 ;;
10783 esac
10784 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10785 shlibpath_overrides_runpath=no
10786 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10787 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10788 hardcode_into_libs=yes
10789 ;;
3841debe 10790
b686ecb5
JM
10791# No shared lib support for Linux oldld, aout, or coff.
10792linux*oldld* | linux*aout* | linux*coff*)
10793 dynamic_linker=no
10794 ;;
3841debe 10795
b686ecb5 10796# This must be Linux ELF.
6a6859cb
AM
10797
10798# uclinux* changes (here and below) have been submitted to the libtool
10799# project, but have not yet been accepted: they are GCC-local changes
10800# for the time being. (See
10801# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
10802linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi)
b686ecb5
JM
10803 version_type=linux
10804 need_lib_prefix=no
10805 need_version=no
10806 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10807 soname_spec='${libname}${release}${shared_ext}$major'
10808 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10809 shlibpath_var=LD_LIBRARY_PATH
10810 shlibpath_overrides_runpath=no
10811
10812 # Some binutils ld are patched to set DT_RUNPATH
10813 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10814 $as_echo_n "(cached) " >&6
10815else
10816 lt_cv_shlibpath_overrides_runpath=no
10817 save_LDFLAGS=$LDFLAGS
10818 save_libdir=$libdir
10819 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10820 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822/* end confdefs.h. */
3841debe 10823
b686ecb5
JM
10824int
10825main ()
10826{
81ecdfbb 10827
b686ecb5
JM
10828 ;
10829 return 0;
10830}
10831_ACEOF
10832if ac_fn_c_try_link "$LINENO"; then :
10833 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
10834 lt_cv_shlibpath_overrides_runpath=yes
10835fi
10836fi
10837rm -f core conftest.err conftest.$ac_objext \
10838 conftest$ac_exeext conftest.$ac_ext
10839 LDFLAGS=$save_LDFLAGS
10840 libdir=$save_libdir
9f1528a1 10841
9f1528a1
AB
10842fi
10843
b686ecb5 10844 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
9f1528a1 10845
b686ecb5
JM
10846 # This implies no fast_install, which is unacceptable.
10847 # Some rework will be needed to allow for fast_install
10848 # before this can be enabled.
10849 hardcode_into_libs=yes
3841debe 10850
b686ecb5
JM
10851 # Append ld.so.conf contents to the search path
10852 if test -f /etc/ld.so.conf; then
10853 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' ' '`
10854 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10855 fi
3841debe 10856
b686ecb5
JM
10857 # We used to test for /lib/ld.so.1 and disable shared libraries on
10858 # powerpc, because MkLinux only supported shared libraries with the
10859 # GNU dynamic linker. Since this was broken with cross compilers,
10860 # most powerpc-linux boxes support dynamic linking these days and
10861 # people can always --disable-shared, the test was removed, and we
10862 # assume the GNU/Linux dynamic linker is in use.
10863 dynamic_linker='GNU/Linux ld.so'
10864 ;;
3841debe 10865
b686ecb5
JM
10866netbsd*)
10867 version_type=sunos
10868 need_lib_prefix=no
10869 need_version=no
10870 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10871 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10872 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10873 dynamic_linker='NetBSD (a.out) ld.so'
10874 else
10875 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10876 soname_spec='${libname}${release}${shared_ext}$major'
10877 dynamic_linker='NetBSD ld.elf_so'
10878 fi
10879 shlibpath_var=LD_LIBRARY_PATH
10880 shlibpath_overrides_runpath=yes
10881 hardcode_into_libs=yes
10882 ;;
3841debe 10883
b686ecb5
JM
10884newsos6)
10885 version_type=linux
10886 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10887 shlibpath_var=LD_LIBRARY_PATH
10888 shlibpath_overrides_runpath=yes
10889 ;;
3841debe 10890
b686ecb5
JM
10891*nto* | *qnx*)
10892 version_type=qnx
10893 need_lib_prefix=no
10894 need_version=no
10895 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10896 soname_spec='${libname}${release}${shared_ext}$major'
10897 shlibpath_var=LD_LIBRARY_PATH
10898 shlibpath_overrides_runpath=no
10899 hardcode_into_libs=yes
10900 dynamic_linker='ldqnx.so'
10901 ;;
3841debe 10902
b686ecb5
JM
10903openbsd*)
10904 version_type=sunos
10905 sys_lib_dlsearch_path_spec="/usr/lib"
10906 need_lib_prefix=no
10907 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10908 case $host_os in
10909 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10910 *) need_version=no ;;
10911 esac
10912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10913 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10914 shlibpath_var=LD_LIBRARY_PATH
10915 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10916 case $host_os in
10917 openbsd2.[89] | openbsd2.[89].*)
10918 shlibpath_overrides_runpath=no
10919 ;;
10920 *)
10921 shlibpath_overrides_runpath=yes
10922 ;;
10923 esac
10924 else
10925 shlibpath_overrides_runpath=yes
10926 fi
10927 ;;
3841debe 10928
b686ecb5
JM
10929os2*)
10930 libname_spec='$name'
10931 shrext_cmds=".dll"
10932 need_lib_prefix=no
10933 library_names_spec='$libname${shared_ext} $libname.a'
10934 dynamic_linker='OS/2 ld.exe'
10935 shlibpath_var=LIBPATH
10936 ;;
3841debe 10937
b686ecb5
JM
10938osf3* | osf4* | osf5*)
10939 version_type=osf
10940 need_lib_prefix=no
10941 need_version=no
10942 soname_spec='${libname}${release}${shared_ext}$major'
10943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10944 shlibpath_var=LD_LIBRARY_PATH
10945 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10946 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10947 ;;
3841debe 10948
b686ecb5
JM
10949rdos*)
10950 dynamic_linker=no
10951 ;;
3841debe 10952
b686ecb5
JM
10953solaris*)
10954 version_type=linux
10955 need_lib_prefix=no
10956 need_version=no
10957 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10958 soname_spec='${libname}${release}${shared_ext}$major'
10959 shlibpath_var=LD_LIBRARY_PATH
10960 shlibpath_overrides_runpath=yes
10961 hardcode_into_libs=yes
10962 # ldd complains unless libraries are executable
10963 postinstall_cmds='chmod +x $lib'
10964 ;;
a9322a30 10965
b686ecb5
JM
10966sunos4*)
10967 version_type=sunos
10968 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10969 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10970 shlibpath_var=LD_LIBRARY_PATH
10971 shlibpath_overrides_runpath=yes
10972 if test "$with_gnu_ld" = yes; then
10973 need_lib_prefix=no
10974 fi
10975 need_version=yes
10976 ;;
a9322a30 10977
b686ecb5
JM
10978sysv4 | sysv4.3*)
10979 version_type=linux
10980 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10981 soname_spec='${libname}${release}${shared_ext}$major'
10982 shlibpath_var=LD_LIBRARY_PATH
10983 case $host_vendor in
10984 sni)
10985 shlibpath_overrides_runpath=no
10986 need_lib_prefix=no
10987 runpath_var=LD_RUN_PATH
10988 ;;
10989 siemens)
10990 need_lib_prefix=no
10991 ;;
10992 motorola)
10993 need_lib_prefix=no
10994 need_version=no
10995 shlibpath_overrides_runpath=no
10996 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10997 ;;
10998 esac
10999 ;;
a9322a30 11000
b686ecb5
JM
11001sysv4*MP*)
11002 if test -d /usr/nec ;then
11003 version_type=linux
11004 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
11005 soname_spec='$libname${shared_ext}.$major'
11006 shlibpath_var=LD_LIBRARY_PATH
11007 fi
11008 ;;
a9322a30 11009
b686ecb5
JM
11010sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11011 version_type=freebsd-elf
11012 need_lib_prefix=no
11013 need_version=no
11014 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11015 soname_spec='${libname}${release}${shared_ext}$major'
11016 shlibpath_var=LD_LIBRARY_PATH
11017 shlibpath_overrides_runpath=yes
11018 hardcode_into_libs=yes
11019 if test "$with_gnu_ld" = yes; then
11020 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
11021 else
11022 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
11023 case $host_os in
11024 sco3.2v5*)
11025 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
11026 ;;
11027 esac
11028 fi
11029 sys_lib_dlsearch_path_spec='/usr/lib'
11030 ;;
a8111142 11031
b686ecb5
JM
11032tpf*)
11033 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
11034 version_type=linux
11035 need_lib_prefix=no
11036 need_version=no
11037 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11038 shlibpath_var=LD_LIBRARY_PATH
11039 shlibpath_overrides_runpath=no
11040 hardcode_into_libs=yes
11041 ;;
a9322a30 11042
b686ecb5
JM
11043uts4*)
11044 version_type=linux
11045 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11046 soname_spec='${libname}${release}${shared_ext}$major'
11047 shlibpath_var=LD_LIBRARY_PATH
11048 ;;
a9322a30 11049
6a6859cb
AM
11050# Shared libraries for VwWorks, >= 7 only at this stage
11051# and (fpic) still incompatible with "large" code models
11052# in a few configurations. Only for RTP mode in any case,
11053# and upon explicit request at configure time.
11054vxworks7*)
11055 dynamic_linker=no
11056 case ${with_multisubdir}-${enable_shared} in
11057 *large*)
11058 ;;
11059 *mrtp*-yes)
11060 version_type=linux
11061 need_lib_prefix=no
11062 need_version=no
11063 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11064 soname_spec='${libname}${release}${shared_ext}$major'
11065 dynamic_linker="$host_os module_loader"
11066 ;;
11067 esac
11068 ;;
b686ecb5
JM
11069*)
11070 dynamic_linker=no
11071 ;;
11072esac
11073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
11074$as_echo "$dynamic_linker" >&6; }
11075test "$dynamic_linker" = no && can_build_shared=no
bec39cab 11076
b686ecb5
JM
11077variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11078if test "$GCC" = yes; then
11079 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
bec39cab 11080fi
c906108c 11081
b686ecb5
JM
11082if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11083 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11084fi
11085if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11086 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
95ca63c4 11087fi
bec39cab 11088
bec39cab 11089
95ca63c4
CF
11090
11091
11092
7cb9022a
MK
11093
11094
bec39cab 11095
95ca63c4 11096
95ca63c4 11097
a9322a30 11098
2c947d9b
JB
11099
11100
11101
11102
11103
11104
11105
11106
2c947d9b 11107
2c947d9b 11108
2c947d9b 11109
2c947d9b
JB
11110
11111
2c947d9b 11112
2c947d9b 11113
2c947d9b 11114
2c947d9b 11115
2c947d9b 11116
2c947d9b
JB
11117
11118
2c947d9b 11119
2c947d9b 11120
2c947d9b 11121
2c947d9b 11122
2c947d9b 11123
2c947d9b 11124
2c947d9b 11125
2c947d9b 11126
2c947d9b 11127
2c947d9b 11128
2c947d9b 11129
2c947d9b 11130
2c947d9b
JB
11131
11132
2c947d9b 11133
2c947d9b 11134
2c947d9b 11135
2c947d9b
JB
11136
11137
2c947d9b 11138
2c947d9b 11139
2c947d9b 11140
2c947d9b 11141
2c947d9b
JB
11142
11143
11144
11145
11146
11147
11148
2400729e 11149
2400729e 11150
2400729e 11151
2400729e
UW
11152
11153
11154
11155
11156
11157
11158
11159
2400729e 11160
2400729e 11161
2400729e 11162
2400729e
UW
11163
11164
2400729e 11165
2400729e 11166
2400729e 11167
2400729e 11168
2400729e 11169
2400729e 11170
9f1528a1 11171
b686ecb5
JM
11172
11173
11174
11175
11176
11177
11178
11179
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
11181$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
11182hardcode_action=
11183if test -n "$hardcode_libdir_flag_spec" ||
11184 test -n "$runpath_var" ||
11185 test "X$hardcode_automatic" = "Xyes" ; then
11186
11187 # We can hardcode non-existent directories.
11188 if test "$hardcode_direct" != no &&
11189 # If the only mechanism to avoid hardcoding is shlibpath_var, we
11190 # have to relink, otherwise we might link with an installed library
11191 # when we should be linking with a yet-to-be-installed one
11192 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
11193 test "$hardcode_minus_L" != no; then
11194 # Linking always hardcodes the temporary library directory.
11195 hardcode_action=relink
11196 else
11197 # We can link without hardcoding, and we can hardcode nonexisting dirs.
11198 hardcode_action=immediate
11199 fi
9f1528a1 11200else
b686ecb5
JM
11201 # We cannot hardcode anything, or else we can only hardcode existing
11202 # directories.
11203 hardcode_action=unsupported
9f1528a1 11204fi
b686ecb5
JM
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
11206$as_echo "$hardcode_action" >&6; }
9f1528a1 11207
b686ecb5
JM
11208if test "$hardcode_action" = relink ||
11209 test "$inherit_rpath" = yes; then
11210 # Fast installation is not supported
11211 enable_fast_install=no
11212elif test "$shlibpath_overrides_runpath" = yes ||
11213 test "$enable_shared" = no; then
11214 # Fast installation is not necessary
11215 enable_fast_install=needless
11216fi
9f1528a1 11217
2400729e 11218
2400729e 11219
2400729e 11220
2400729e 11221
2400729e 11222
b686ecb5
JM
11223 if test "x$enable_dlopen" != xyes; then
11224 enable_dlopen=unknown
11225 enable_dlopen_self=unknown
11226 enable_dlopen_self_static=unknown
11227else
11228 lt_cv_dlopen=no
11229 lt_cv_dlopen_libs=
2400729e 11230
b686ecb5
JM
11231 case $host_os in
11232 beos*)
11233 lt_cv_dlopen="load_add_on"
11234 lt_cv_dlopen_libs=
11235 lt_cv_dlopen_self=yes
11236 ;;
2400729e 11237
b686ecb5
JM
11238 mingw* | pw32* | cegcc*)
11239 lt_cv_dlopen="LoadLibrary"
11240 lt_cv_dlopen_libs=
11241 ;;
2400729e 11242
b686ecb5
JM
11243 cygwin*)
11244 lt_cv_dlopen="dlopen"
11245 lt_cv_dlopen_libs=
11246 ;;
2400729e 11247
b686ecb5
JM
11248 darwin*)
11249 # if libdl is installed we need to link against it
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11251$as_echo_n "checking for dlopen in -ldl... " >&6; }
11252if ${ac_cv_lib_dl_dlopen+:} false; then :
11253 $as_echo_n "(cached) " >&6
11254else
11255 ac_check_lib_save_LIBS=$LIBS
11256LIBS="-ldl $LIBS"
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11258/* end confdefs.h. */
2400729e 11259
b686ecb5
JM
11260/* Override any GCC internal prototype to avoid an error.
11261 Use char because int might match the return type of a GCC
11262 builtin and then its argument prototype would still apply. */
11263#ifdef __cplusplus
11264extern "C"
11265#endif
11266char dlopen ();
11267int
11268main ()
11269{
11270return dlopen ();
11271 ;
11272 return 0;
11273}
11274_ACEOF
11275if ac_fn_c_try_link "$LINENO"; then :
11276 ac_cv_lib_dl_dlopen=yes
11277else
11278 ac_cv_lib_dl_dlopen=no
11279fi
11280rm -f core conftest.err conftest.$ac_objext \
11281 conftest$ac_exeext conftest.$ac_ext
11282LIBS=$ac_check_lib_save_LIBS
11283fi
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11285$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11286if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11287 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11288else
2400729e 11289
b686ecb5
JM
11290 lt_cv_dlopen="dyld"
11291 lt_cv_dlopen_libs=
11292 lt_cv_dlopen_self=yes
2400729e 11293
b686ecb5 11294fi
2400729e 11295
b686ecb5 11296 ;;
2400729e 11297
b686ecb5
JM
11298 *)
11299 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
11300if test "x$ac_cv_func_shl_load" = xyes; then :
11301 lt_cv_dlopen="shl_load"
11302else
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
11304$as_echo_n "checking for shl_load in -ldld... " >&6; }
11305if ${ac_cv_lib_dld_shl_load+:} false; then :
11306 $as_echo_n "(cached) " >&6
11307else
11308 ac_check_lib_save_LIBS=$LIBS
11309LIBS="-ldld $LIBS"
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11311/* end confdefs.h. */
2400729e 11312
b686ecb5
JM
11313/* Override any GCC internal prototype to avoid an error.
11314 Use char because int might match the return type of a GCC
11315 builtin and then its argument prototype would still apply. */
11316#ifdef __cplusplus
11317extern "C"
11318#endif
11319char shl_load ();
11320int
11321main ()
11322{
11323return shl_load ();
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328if ac_fn_c_try_link "$LINENO"; then :
11329 ac_cv_lib_dld_shl_load=yes
11330else
11331 ac_cv_lib_dld_shl_load=no
11332fi
11333rm -f core conftest.err conftest.$ac_objext \
11334 conftest$ac_exeext conftest.$ac_ext
11335LIBS=$ac_check_lib_save_LIBS
11336fi
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11338$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
11339if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
11340 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
11341else
11342 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11343if test "x$ac_cv_func_dlopen" = xyes; then :
11344 lt_cv_dlopen="dlopen"
11345else
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11347$as_echo_n "checking for dlopen in -ldl... " >&6; }
11348if ${ac_cv_lib_dl_dlopen+:} false; then :
11349 $as_echo_n "(cached) " >&6
11350else
11351 ac_check_lib_save_LIBS=$LIBS
11352LIBS="-ldl $LIBS"
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11354/* end confdefs.h. */
2400729e 11355
b686ecb5
JM
11356/* Override any GCC internal prototype to avoid an error.
11357 Use char because int might match the return type of a GCC
11358 builtin and then its argument prototype would still apply. */
11359#ifdef __cplusplus
11360extern "C"
11361#endif
11362char dlopen ();
11363int
11364main ()
11365{
11366return dlopen ();
11367 ;
11368 return 0;
11369}
11370_ACEOF
11371if ac_fn_c_try_link "$LINENO"; then :
11372 ac_cv_lib_dl_dlopen=yes
11373else
11374 ac_cv_lib_dl_dlopen=no
11375fi
11376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
11378LIBS=$ac_check_lib_save_LIBS
11379fi
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11381$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11382if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11383 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11384else
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
11386$as_echo_n "checking for dlopen in -lsvld... " >&6; }
11387if ${ac_cv_lib_svld_dlopen+:} false; then :
2400729e
UW
11388 $as_echo_n "(cached) " >&6
11389else
b686ecb5
JM
11390 ac_check_lib_save_LIBS=$LIBS
11391LIBS="-lsvld $LIBS"
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11393/* end confdefs.h. */
2400729e 11394
b686ecb5
JM
11395/* Override any GCC internal prototype to avoid an error.
11396 Use char because int might match the return type of a GCC
11397 builtin and then its argument prototype would still apply. */
11398#ifdef __cplusplus
11399extern "C"
11400#endif
11401char dlopen ();
11402int
11403main ()
11404{
11405return dlopen ();
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410if ac_fn_c_try_link "$LINENO"; then :
11411 ac_cv_lib_svld_dlopen=yes
11412else
11413 ac_cv_lib_svld_dlopen=no
11414fi
11415rm -f core conftest.err conftest.$ac_objext \
11416 conftest$ac_exeext conftest.$ac_ext
11417LIBS=$ac_check_lib_save_LIBS
11418fi
11419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
11420$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
11421if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
11422 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
11423else
11424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
11425$as_echo_n "checking for dld_link in -ldld... " >&6; }
11426if ${ac_cv_lib_dld_dld_link+:} false; then :
11427 $as_echo_n "(cached) " >&6
11428else
11429 ac_check_lib_save_LIBS=$LIBS
11430LIBS="-ldld $LIBS"
11431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400729e 11432/* end confdefs.h. */
b686ecb5
JM
11433
11434/* Override any GCC internal prototype to avoid an error.
11435 Use char because int might match the return type of a GCC
11436 builtin and then its argument prototype would still apply. */
11437#ifdef __cplusplus
11438extern "C"
11439#endif
11440char dld_link ();
2400729e
UW
11441int
11442main ()
11443{
b686ecb5 11444return dld_link ();
2400729e
UW
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449if ac_fn_c_try_link "$LINENO"; then :
b686ecb5 11450 ac_cv_lib_dld_dld_link=yes
2400729e 11451else
b686ecb5 11452 ac_cv_lib_dld_dld_link=no
2400729e
UW
11453fi
11454rm -f core conftest.err conftest.$ac_objext \
11455 conftest$ac_exeext conftest.$ac_ext
b686ecb5
JM
11456LIBS=$ac_check_lib_save_LIBS
11457fi
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
11459$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
11460if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
11461 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
11462fi
11463
2400729e
UW
11464
11465fi
2400729e 11466
2400729e 11467
b686ecb5 11468fi
2400729e
UW
11469
11470
b686ecb5 11471fi
2400729e
UW
11472
11473
b686ecb5 11474fi
2400729e
UW
11475
11476
2400729e
UW
11477fi
11478
b686ecb5
JM
11479 ;;
11480 esac
a9322a30 11481
b686ecb5
JM
11482 if test "x$lt_cv_dlopen" != xno; then
11483 enable_dlopen=yes
11484 else
11485 enable_dlopen=no
11486 fi
a9322a30 11487
b686ecb5
JM
11488 case $lt_cv_dlopen in
11489 dlopen)
11490 save_CPPFLAGS="$CPPFLAGS"
11491 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
a9322a30 11492
b686ecb5
JM
11493 save_LDFLAGS="$LDFLAGS"
11494 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
ec685c5e 11495
b686ecb5
JM
11496 save_LIBS="$LIBS"
11497 LIBS="$lt_cv_dlopen_libs $LIBS"
0c4a4063 11498
b686ecb5
JM
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
11500$as_echo_n "checking whether a program can dlopen itself... " >&6; }
11501if ${lt_cv_dlopen_self+:} false; then :
11502 $as_echo_n "(cached) " >&6
bec39cab 11503else
b686ecb5
JM
11504 if test "$cross_compiling" = yes; then :
11505 lt_cv_dlopen_self=cross
11506else
11507 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11508 lt_status=$lt_dlunknown
11509 cat > conftest.$ac_ext <<_LT_EOF
4b42385c 11510#line 11510 "configure"
b686ecb5 11511#include "confdefs.h"
bec39cab 11512
b686ecb5
JM
11513#if HAVE_DLFCN_H
11514#include <dlfcn.h>
11515#endif
9a156167 11516
b686ecb5 11517#include <stdio.h>
ec685c5e 11518
b686ecb5
JM
11519#ifdef RTLD_GLOBAL
11520# define LT_DLGLOBAL RTLD_GLOBAL
11521#else
11522# ifdef DL_GLOBAL
11523# define LT_DLGLOBAL DL_GLOBAL
11524# else
11525# define LT_DLGLOBAL 0
11526# endif
11527#endif
ec685c5e 11528
b686ecb5
JM
11529/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11530 find out it does not work in some platform. */
11531#ifndef LT_DLLAZY_OR_NOW
11532# ifdef RTLD_LAZY
11533# define LT_DLLAZY_OR_NOW RTLD_LAZY
11534# else
11535# ifdef DL_LAZY
11536# define LT_DLLAZY_OR_NOW DL_LAZY
11537# else
11538# ifdef RTLD_NOW
11539# define LT_DLLAZY_OR_NOW RTLD_NOW
11540# else
11541# ifdef DL_NOW
11542# define LT_DLLAZY_OR_NOW DL_NOW
11543# else
11544# define LT_DLLAZY_OR_NOW 0
11545# endif
11546# endif
11547# endif
11548# endif
11549#endif
ec685c5e 11550
b686ecb5
JM
11551/* When -fvisbility=hidden is used, assume the code has been annotated
11552 correspondingly for the symbols needed. */
11553#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11554void fnord () __attribute__((visibility("default")));
11555#endif
602d2b52 11556
b686ecb5
JM
11557void fnord () { int i=42; }
11558int main ()
11559{
11560 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11561 int status = $lt_dlunknown;
11562
11563 if (self)
11564 {
11565 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
ec685c5e 11566 else
b686ecb5
JM
11567 {
11568 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11569 else puts (dlerror ());
11570 }
11571 /* dlclose (self); */
11572 }
11573 else
11574 puts (dlerror ());
11575
11576 return status;
11577}
11578_LT_EOF
11579 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11580 (eval $ac_link) 2>&5
11581 ac_status=$?
11582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11583 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11584 (./conftest; exit; ) >&5 2>/dev/null
11585 lt_status=$?
11586 case x$lt_status in
11587 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11588 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11589 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11590 esac
11591 else :
11592 # compilation failed
11593 lt_cv_dlopen_self=no
ec685c5e 11594 fi
b686ecb5
JM
11595fi
11596rm -fr conftest*
11597
ec685c5e 11598
ec685c5e 11599fi
b686ecb5
JM
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
11601$as_echo "$lt_cv_dlopen_self" >&6; }
11602
11603 if test "x$lt_cv_dlopen_self" = xyes; then
11604 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
11606$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
11607if ${lt_cv_dlopen_self_static+:} false; then :
11608 $as_echo_n "(cached) " >&6
ec685c5e 11609else
b686ecb5
JM
11610 if test "$cross_compiling" = yes; then :
11611 lt_cv_dlopen_self_static=cross
11612else
11613 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11614 lt_status=$lt_dlunknown
11615 cat > conftest.$ac_ext <<_LT_EOF
4b42385c 11616#line 11616 "configure"
b686ecb5 11617#include "confdefs.h"
ec685c5e 11618
b686ecb5
JM
11619#if HAVE_DLFCN_H
11620#include <dlfcn.h>
11621#endif
ec685c5e 11622
b686ecb5 11623#include <stdio.h>
81ecdfbb 11624
b686ecb5
JM
11625#ifdef RTLD_GLOBAL
11626# define LT_DLGLOBAL RTLD_GLOBAL
11627#else
11628# ifdef DL_GLOBAL
11629# define LT_DLGLOBAL DL_GLOBAL
11630# else
11631# define LT_DLGLOBAL 0
11632# endif
11633#endif
bec39cab 11634
b686ecb5
JM
11635/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11636 find out it does not work in some platform. */
11637#ifndef LT_DLLAZY_OR_NOW
11638# ifdef RTLD_LAZY
11639# define LT_DLLAZY_OR_NOW RTLD_LAZY
11640# else
11641# ifdef DL_LAZY
11642# define LT_DLLAZY_OR_NOW DL_LAZY
11643# else
11644# ifdef RTLD_NOW
11645# define LT_DLLAZY_OR_NOW RTLD_NOW
11646# else
11647# ifdef DL_NOW
11648# define LT_DLLAZY_OR_NOW DL_NOW
11649# else
11650# define LT_DLLAZY_OR_NOW 0
11651# endif
11652# endif
11653# endif
11654# endif
11655#endif
81ecdfbb 11656
b686ecb5
JM
11657/* When -fvisbility=hidden is used, assume the code has been annotated
11658 correspondingly for the symbols needed. */
11659#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11660void fnord () __attribute__((visibility("default")));
11661#endif
71737c43 11662
b686ecb5
JM
11663void fnord () { int i=42; }
11664int main ()
11665{
11666 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11667 int status = $lt_dlunknown;
ec685c5e 11668
b686ecb5
JM
11669 if (self)
11670 {
11671 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
11672 else
11673 {
11674 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11675 else puts (dlerror ());
11676 }
11677 /* dlclose (self); */
11678 }
11679 else
11680 puts (dlerror ());
420697bb 11681
b686ecb5 11682 return status;
ec685c5e 11683}
b686ecb5
JM
11684_LT_EOF
11685 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11686 (eval $ac_link) 2>&5
11687 ac_status=$?
11688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11689 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11690 (./conftest; exit; ) >&5 2>/dev/null
11691 lt_status=$?
11692 case x$lt_status in
11693 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11694 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11695 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11696 esac
11697 else :
11698 # compilation failed
11699 lt_cv_dlopen_self_static=no
11700 fi
ec685c5e 11701fi
b686ecb5 11702rm -fr conftest*
81ecdfbb 11703
ec685c5e 11704
b686ecb5
JM
11705fi
11706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11707$as_echo "$lt_cv_dlopen_self_static" >&6; }
11708 fi
0c4a4063 11709
b686ecb5
JM
11710 CPPFLAGS="$save_CPPFLAGS"
11711 LDFLAGS="$save_LDFLAGS"
11712 LIBS="$save_LIBS"
11713 ;;
11714 esac
0c4a4063 11715
b686ecb5
JM
11716 case $lt_cv_dlopen_self in
11717 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11718 *) enable_dlopen_self=unknown ;;
11719 esac
0c4a4063 11720
b686ecb5
JM
11721 case $lt_cv_dlopen_self_static in
11722 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11723 *) enable_dlopen_self_static=unknown ;;
0c4a4063 11724 esac
b686ecb5 11725fi
0c4a4063 11726
0c4a4063
DE
11727
11728
436868fb 11729
d13c7322 11730
d13c7322 11731
d13c7322 11732
d13c7322
AB
11733
11734
436868fb 11735
436868fb 11736
436868fb 11737
d13c7322 11738
d13c7322
AB
11739
11740
d13c7322 11741
d13c7322 11742
b686ecb5
JM
11743striplib=
11744old_striplib=
11745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
11746$as_echo_n "checking whether stripping libraries is possible... " >&6; }
11747if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11748 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11749 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11751$as_echo "yes" >&6; }
11752else
11753# FIXME - insert some real tests, host_os isn't really good enough
11754 case $host_os in
11755 darwin*)
11756 if test -n "$STRIP" ; then
11757 striplib="$STRIP -x"
11758 old_striplib="$STRIP -S"
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11760$as_echo "yes" >&6; }
11761 else
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
11764 fi
11765 ;;
11766 *)
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
11769 ;;
11770 esac
11771fi
d13c7322 11772
d13c7322 11773
436868fb 11774
81ecdfbb 11775
a9322a30 11776
043b6510 11777
c83393b9 11778
9a156167 11779
a4a1c157
PA
11780
11781
ed3ef339
DE
11782
11783
b686ecb5
JM
11784 # Report which library types will actually be built
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11786$as_echo_n "checking if libtool supports shared libraries... " >&6; }
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11788$as_echo "$can_build_shared" >&6; }
4df42755 11789
b686ecb5
JM
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11791$as_echo_n "checking whether to build shared libraries... " >&6; }
11792 test "$can_build_shared" = "no" && enable_shared=no
ed3ef339 11793
b686ecb5
JM
11794 # On AIX, shared libraries and static libraries use the same namespace, and
11795 # are all built from PIC.
11796 case $host_os in
11797 aix3*)
11798 test "$enable_shared" = yes && enable_static=no
11799 if test -n "$RANLIB"; then
11800 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11801 postinstall_cmds='$RANLIB $lib'
11802 fi
11803 ;;
ed3ef339 11804
b686ecb5
JM
11805 aix[4-9]*)
11806 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11807 test "$enable_shared" = yes && enable_static=no
11808 fi
11809 ;;
11810 esac
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11812$as_echo "$enable_shared" >&6; }
ed3ef339 11813
b686ecb5
JM
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11815$as_echo_n "checking whether to build static libraries... " >&6; }
11816 # Make sure either enable_shared or enable_static is yes.
11817 test "$enable_shared" = yes || enable_static=yes
11818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11819$as_echo "$enable_static" >&6; }
e1402065
DE
11820
11821
11822
11823
e1402065 11824fi
b686ecb5
JM
11825ac_ext=c
11826ac_cpp='$CPP $CPPFLAGS'
11827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11829ac_compiler_gnu=$ac_cv_c_compiler_gnu
e1402065 11830
b686ecb5 11831CC="$lt_save_CC"
e1402065 11832
b686ecb5
JM
11833 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11834 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11835 (test "X$CXX" != "Xg++"))) ; then
11836 ac_ext=cpp
11837ac_cpp='$CXXCPP $CPPFLAGS'
11838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
11842$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
11843if test -z "$CXXCPP"; then
11844 if ${ac_cv_prog_CXXCPP+:} false; then :
ed3ef339
DE
11845 $as_echo_n "(cached) " >&6
11846else
b686ecb5
JM
11847 # Double quotes because CXXCPP needs to be expanded
11848 for CXXCPP in "$CXX -E" "/lib/cpp"
11849 do
11850 ac_preproc_ok=false
11851for ac_cxx_preproc_warn_flag in '' yes
ed3ef339 11852do
b686ecb5
JM
11853 # Use a header file that comes with gcc, so configuring glibc
11854 # with a fresh cross-compiler works.
11855 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11856 # <limits.h> exists even on freestanding compilers.
11857 # On the NeXT, cc -E runs the code through the compiler's parser,
11858 # not just through cpp. "Syntax error" is here to catch this case.
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861#ifdef __STDC__
11862# include <limits.h>
11863#else
11864# include <assert.h>
11865#endif
11866 Syntax error
11867_ACEOF
11868if ac_fn_cxx_try_cpp "$LINENO"; then :
ed3ef339 11869
b686ecb5
JM
11870else
11871 # Broken: fails on valid input.
11872continue
ed3ef339 11873fi
b686ecb5
JM
11874rm -f conftest.err conftest.i conftest.$ac_ext
11875
11876 # OK, works on sane cases. Now check whether nonexistent headers
11877 # can be detected and how.
11878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11879/* end confdefs.h. */
11880#include <ac_nonexistent.h>
11881_ACEOF
11882if ac_fn_cxx_try_cpp "$LINENO"; then :
11883 # Broken: success on invalid input.
11884continue
ed3ef339 11885else
b686ecb5
JM
11886 # Passes both tests.
11887ac_preproc_ok=:
11888break
ed3ef339 11889fi
b686ecb5 11890rm -f conftest.err conftest.i conftest.$ac_ext
ed3ef339 11891
b686ecb5
JM
11892done
11893# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11894rm -f conftest.i conftest.err conftest.$ac_ext
11895if $ac_preproc_ok; then :
11896 break
11897fi
ed3ef339 11898
b686ecb5
JM
11899 done
11900 ac_cv_prog_CXXCPP=$CXXCPP
ed3ef339 11901
b686ecb5
JM
11902fi
11903 CXXCPP=$ac_cv_prog_CXXCPP
11904else
11905 ac_cv_prog_CXXCPP=$CXXCPP
11906fi
11907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
11908$as_echo "$CXXCPP" >&6; }
11909ac_preproc_ok=false
11910for ac_cxx_preproc_warn_flag in '' yes
11911do
11912 # Use a header file that comes with gcc, so configuring glibc
11913 # with a fresh cross-compiler works.
11914 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11915 # <limits.h> exists even on freestanding compilers.
11916 # On the NeXT, cc -E runs the code through the compiler's parser,
11917 # not just through cpp. "Syntax error" is here to catch this case.
11918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919/* end confdefs.h. */
11920#ifdef __STDC__
11921# include <limits.h>
11922#else
11923# include <assert.h>
11924#endif
11925 Syntax error
11926_ACEOF
11927if ac_fn_cxx_try_cpp "$LINENO"; then :
ed3ef339 11928
b686ecb5
JM
11929else
11930 # Broken: fails on valid input.
11931continue
11932fi
11933rm -f conftest.err conftest.i conftest.$ac_ext
ed3ef339 11934
b686ecb5
JM
11935 # OK, works on sane cases. Now check whether nonexistent headers
11936 # can be detected and how.
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ed3ef339 11938/* end confdefs.h. */
b686ecb5 11939#include <ac_nonexistent.h>
ed3ef339 11940_ACEOF
b686ecb5
JM
11941if ac_fn_cxx_try_cpp "$LINENO"; then :
11942 # Broken: success on invalid input.
11943continue
ed3ef339 11944else
b686ecb5
JM
11945 # Passes both tests.
11946ac_preproc_ok=:
11947break
ed3ef339 11948fi
b686ecb5 11949rm -f conftest.err conftest.i conftest.$ac_ext
92fab5a6 11950
b686ecb5
JM
11951done
11952# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11953rm -f conftest.i conftest.err conftest.$ac_ext
11954if $ac_preproc_ok; then :
92fab5a6 11955
b686ecb5
JM
11956else
11957 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
ed3ef339 11958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
b686ecb5 11959as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
d0ac1c44 11960See \`config.log' for more details" "$LINENO" 5; }
b686ecb5 11961fi
ed3ef339 11962
b686ecb5
JM
11963ac_ext=c
11964ac_cpp='$CPP $CPPFLAGS'
11965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11967ac_compiler_gnu=$ac_cv_c_compiler_gnu
ed3ef339 11968
ed3ef339 11969else
b686ecb5 11970 _lt_caught_CXX_error=yes
ed3ef339 11971fi
92fab5a6 11972
b686ecb5
JM
11973ac_ext=cpp
11974ac_cpp='$CXXCPP $CPPFLAGS'
11975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
92fab5a6 11978
b686ecb5
JM
11979archive_cmds_need_lc_CXX=no
11980allow_undefined_flag_CXX=
11981always_export_symbols_CXX=no
11982archive_expsym_cmds_CXX=
11983compiler_needs_object_CXX=no
11984export_dynamic_flag_spec_CXX=
11985hardcode_direct_CXX=no
11986hardcode_direct_absolute_CXX=no
11987hardcode_libdir_flag_spec_CXX=
11988hardcode_libdir_flag_spec_ld_CXX=
11989hardcode_libdir_separator_CXX=
11990hardcode_minus_L_CXX=no
11991hardcode_shlibpath_var_CXX=unsupported
11992hardcode_automatic_CXX=no
11993inherit_rpath_CXX=no
11994module_cmds_CXX=
11995module_expsym_cmds_CXX=
11996link_all_deplibs_CXX=unknown
11997old_archive_cmds_CXX=$old_archive_cmds
11998reload_flag_CXX=$reload_flag
11999reload_cmds_CXX=$reload_cmds
12000no_undefined_flag_CXX=
12001whole_archive_flag_spec_CXX=
12002enable_shared_with_static_runtimes_CXX=no
12003
12004# Source file extension for C++ test sources.
12005ac_ext=cpp
92fab5a6 12006
b686ecb5
JM
12007# Object file extension for compiled C++ test sources.
12008objext=o
12009objext_CXX=$objext
92fab5a6 12010
b686ecb5
JM
12011# No sense in running all these tests if we already determined that
12012# the CXX compiler isn't working. Some variables (like enable_shared)
12013# are currently assumed to apply to all compilers on this platform,
12014# and will be corrupted by setting them based on a non-working compiler.
12015if test "$_lt_caught_CXX_error" != yes; then
12016 # Code to be used in simple compile tests
12017 lt_simple_compile_test_code="int some_variable = 0;"
ed3ef339 12018
b686ecb5
JM
12019 # Code to be used in simple link tests
12020 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
ed3ef339 12021
b686ecb5 12022 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
ed3ef339 12023
92fab5a6 12024
92fab5a6
AW
12025
12026
92fab5a6 12027
ed3ef339 12028
b686ecb5
JM
12029# If no C compiler was specified, use CC.
12030LTCC=${LTCC-"$CC"}
12031
12032# If no C compiler flags were specified, use CFLAGS.
12033LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12034
12035# Allow CC to be a program name with arguments.
12036compiler=$CC
12037
12038
12039 # save warnings/boilerplate of simple test code
12040 ac_outfile=conftest.$ac_objext
12041echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12042eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12043_lt_compiler_boilerplate=`cat conftest.err`
12044$RM conftest*
12045
12046 ac_outfile=conftest.$ac_objext
12047echo "$lt_simple_link_test_code" >conftest.$ac_ext
12048eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12049_lt_linker_boilerplate=`cat conftest.err`
12050$RM -r conftest*
12051
12052
12053 # Allow CC to be a program name with arguments.
12054 lt_save_CC=$CC
12055 lt_save_LD=$LD
12056 lt_save_GCC=$GCC
12057 GCC=$GXX
12058 lt_save_with_gnu_ld=$with_gnu_ld
12059 lt_save_path_LD=$lt_cv_path_LD
12060 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
12061 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
e1402065 12062 else
b686ecb5 12063 $as_unset lt_cv_prog_gnu_ld
e1402065 12064 fi
b686ecb5
JM
12065 if test -n "${lt_cv_path_LDCXX+set}"; then
12066 lt_cv_path_LD=$lt_cv_path_LDCXX
12067 else
12068 $as_unset lt_cv_path_LD
e1402065 12069 fi
b686ecb5
JM
12070 test -z "${LDCXX+set}" || LD=$LDCXX
12071 CC=${CXX-"c++"}
12072 compiler=$CC
12073 compiler_CXX=$CC
12074 for cc_temp in $compiler""; do
12075 case $cc_temp in
12076 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
12077 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
12078 \-*) ;;
12079 *) break;;
12080 esac
12081done
12082cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
ed3ef339 12083
ed3ef339 12084
b686ecb5
JM
12085 if test -n "$compiler"; then
12086 # We don't want -fno-exception when compiling C++ code, so set the
12087 # no_builtin_flag separately
12088 if test "$GXX" = yes; then
12089 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
ed3ef339 12090 else
b686ecb5 12091 lt_prog_compiler_no_builtin_flag_CXX=
ed3ef339 12092 fi
92fab5a6 12093
b686ecb5
JM
12094 if test "$GXX" = yes; then
12095 # Set up default GNU C++ configuration
12096
92fab5a6
AW
12097
12098
b686ecb5
JM
12099# Check whether --with-gnu-ld was given.
12100if test "${with_gnu_ld+set}" = set; then :
12101 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12102else
12103 with_gnu_ld=no
92fab5a6
AW
12104fi
12105
b686ecb5
JM
12106ac_prog=ld
12107if test "$GCC" = yes; then
12108 # Check if gcc -print-prog-name=ld gives a path.
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12110$as_echo_n "checking for ld used by $CC... " >&6; }
12111 case $host in
12112 *-*-mingw*)
12113 # gcc leaves a trailing carriage return which upsets mingw
12114 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12115 *)
12116 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12117 esac
12118 case $ac_prog in
12119 # Accept absolute paths.
12120 [\\/]* | ?:[\\/]*)
12121 re_direlt='/[^/][^/]*/\.\./'
12122 # Canonicalize the pathname of ld
12123 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
12124 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
12125 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
12126 done
12127 test -z "$LD" && LD="$ac_prog"
12128 ;;
12129 "")
12130 # If it fails, then pretend we aren't using GCC.
12131 ac_prog=ld
12132 ;;
12133 *)
12134 # If it is relative, then search for the first ld in PATH.
12135 with_gnu_ld=unknown
12136 ;;
12137 esac
12138elif test "$with_gnu_ld" = yes; then
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12140$as_echo_n "checking for GNU ld... " >&6; }
12141else
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12143$as_echo_n "checking for non-GNU ld... " >&6; }
12144fi
12145if ${lt_cv_path_LD+:} false; then :
12146 $as_echo_n "(cached) " >&6
12147else
12148 if test -z "$LD"; then
12149 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12150 for ac_dir in $PATH; do
12151 IFS="$lt_save_ifs"
12152 test -z "$ac_dir" && ac_dir=.
12153 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12154 lt_cv_path_LD="$ac_dir/$ac_prog"
12155 # Check to see if the program is GNU ld. I'd rather use --version,
12156 # but apparently some variants of GNU ld only accept -v.
12157 # Break only if it was the GNU/non-GNU ld that we prefer.
12158 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
12159 *GNU* | *'with BFD'*)
12160 test "$with_gnu_ld" != no && break
12161 ;;
12162 *)
12163 test "$with_gnu_ld" != yes && break
12164 ;;
12165 esac
ed3ef339 12166 fi
b686ecb5
JM
12167 done
12168 IFS="$lt_save_ifs"
12169else
12170 lt_cv_path_LD="$LD" # Let the user override the test with a path.
12171fi
12172fi
ed3ef339 12173
b686ecb5
JM
12174LD="$lt_cv_path_LD"
12175if test -n "$LD"; then
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12177$as_echo "$LD" >&6; }
12178else
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12180$as_echo "no" >&6; }
12181fi
12182test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12184$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12185if ${lt_cv_prog_gnu_ld+:} false; then :
12186 $as_echo_n "(cached) " >&6
12187else
12188 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12189case `$LD -v 2>&1 </dev/null` in
12190*GNU* | *'with BFD'*)
12191 lt_cv_prog_gnu_ld=yes
12192 ;;
12193*)
12194 lt_cv_prog_gnu_ld=no
ed3ef339
DE
12195 ;;
12196esac
b686ecb5
JM
12197fi
12198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
12199$as_echo "$lt_cv_prog_gnu_ld" >&6; }
12200with_gnu_ld=$lt_cv_prog_gnu_ld
ed3ef339 12201
e76c5d17 12202
e76c5d17 12203
e76c5d17 12204
e76c5d17 12205
e76c5d17 12206
e76c5d17 12207
b686ecb5
JM
12208 # Check if GNU C++ uses GNU ld as the underlying linker, since the
12209 # archiving commands below assume that GNU ld is being used.
12210 if test "$with_gnu_ld" = yes; then
12211 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12212 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
e76c5d17 12213
b686ecb5
JM
12214 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12215 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
e76c5d17 12216
b686ecb5
JM
12217 # If archive_cmds runs LD, not CC, wlarc should be empty
12218 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
12219 # investigate it a little bit more. (MM)
12220 wlarc='${wl}'
e76c5d17 12221
b686ecb5
JM
12222 # ancient GNU ld didn't support --whole-archive et. al.
12223 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
12224 $GREP 'no-whole-archive' > /dev/null; then
12225 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
12226 else
12227 whole_archive_flag_spec_CXX=
12228 fi
12229 else
12230 with_gnu_ld=no
12231 wlarc=
12232
12233 # A generic and very simple default shared library creation
12234 # command for GNU C++ for the case where it uses the native
12235 # linker, instead of GNU ld. If possible, this setting should
12236 # overridden to take advantage of the native linker features on
12237 # the platform it is being used on.
12238 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
12239 fi
e76c5d17 12240
b686ecb5
JM
12241 # Commands to make compiler produce verbose output that lists
12242 # what "hidden" libraries, object files and flags are used when
12243 # linking a shared library.
12244 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
e76c5d17 12245
b686ecb5
JM
12246 else
12247 GXX=no
12248 with_gnu_ld=no
12249 wlarc=
12250 fi
e76c5d17 12251
b686ecb5
JM
12252 # PORTME: fill in a description of your system's C++ link characteristics
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12254$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
12255 ld_shlibs_CXX=yes
12256 case $host_os in
12257 aix3*)
12258 # FIXME: insert proper C++ library support
12259 ld_shlibs_CXX=no
12260 ;;
12261 aix[4-9]*)
12262 if test "$host_cpu" = ia64; then
12263 # On IA64, the linker does run time linking by default, so we don't
12264 # have to do anything special.
12265 aix_use_runtimelinking=no
12266 exp_sym_flag='-Bexport'
12267 no_entry_flag=""
12268 else
12269 aix_use_runtimelinking=no
12270
12271 # Test if we are trying to use run time linking or normal
12272 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
12273 # need to do runtime linking.
12274 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12275 for ld_flag in $LDFLAGS; do
12276 case $ld_flag in
12277 *-brtl*)
12278 aix_use_runtimelinking=yes
12279 break
12280 ;;
12281 esac
12282 done
12283 ;;
12284 esac
e76c5d17 12285
b686ecb5
JM
12286 exp_sym_flag='-bexport'
12287 no_entry_flag='-bnoentry'
12288 fi
e76c5d17 12289
b686ecb5
JM
12290 # When large executables or shared objects are built, AIX ld can
12291 # have problems creating the table of contents. If linking a library
12292 # or program results in "error TOC overflow" add -mminimal-toc to
12293 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
12294 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12295
12296 archive_cmds_CXX=''
12297 hardcode_direct_CXX=yes
12298 hardcode_direct_absolute_CXX=yes
12299 hardcode_libdir_separator_CXX=':'
12300 link_all_deplibs_CXX=yes
12301 file_list_spec_CXX='${wl}-f,'
12302
12303 if test "$GXX" = yes; then
12304 case $host_os in aix4.[012]|aix4.[012].*)
12305 # We only want to do this on AIX 4.2 and lower, the check
12306 # below for broken collect2 doesn't work under 4.3+
12307 collect2name=`${CC} -print-prog-name=collect2`
12308 if test -f "$collect2name" &&
12309 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12310 then
12311 # We have reworked collect2
12312 :
12313 else
12314 # We have old collect2
12315 hardcode_direct_CXX=unsupported
12316 # It fails to find uninstalled libraries when the uninstalled
12317 # path is not listed in the libpath. Setting hardcode_minus_L
12318 # to unsupported forces relinking
12319 hardcode_minus_L_CXX=yes
12320 hardcode_libdir_flag_spec_CXX='-L$libdir'
12321 hardcode_libdir_separator_CXX=
12322 fi
12323 esac
12324 shared_flag='-shared'
12325 if test "$aix_use_runtimelinking" = yes; then
12326 shared_flag="$shared_flag "'${wl}-G'
12327 fi
12328 else
12329 # not using gcc
12330 if test "$host_cpu" = ia64; then
12331 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12332 # chokes on -Wl,-G. The following line is correct:
12333 shared_flag='-G'
12334 else
12335 if test "$aix_use_runtimelinking" = yes; then
12336 shared_flag='${wl}-G'
12337 else
12338 shared_flag='${wl}-bM:SRE'
12339 fi
12340 fi
12341 fi
ed3ef339 12342
b686ecb5
JM
12343 export_dynamic_flag_spec_CXX='${wl}-bexpall'
12344 # It seems that -bexpall does not export symbols beginning with
12345 # underscore (_), so it is better to generate a list of symbols to
12346 # export.
12347 always_export_symbols_CXX=yes
12348 if test "$aix_use_runtimelinking" = yes; then
12349 # Warning - without using the other runtime loading flags (-brtl),
12350 # -berok will link without error, but may produce a broken library.
12351 allow_undefined_flag_CXX='-berok'
12352 # Determine the default libpath from the value encoded in an empty
12353 # executable.
12354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355/* end confdefs.h. */
ed3ef339 12356
b686ecb5
JM
12357int
12358main ()
12359{
16954d5d 12360
b686ecb5
JM
12361 ;
12362 return 0;
12363}
16954d5d 12364_ACEOF
b686ecb5 12365if ac_fn_cxx_try_link "$LINENO"; then :
16954d5d 12366
b686ecb5
JM
12367lt_aix_libpath_sed='
12368 /Import File Strings/,/^$/ {
12369 /^0/ {
12370 s/^0 *\(.*\)$/\1/
12371 p
12372 }
12373 }'
12374aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12375# Check for a 64-bit object if we didn't find anything.
12376if test -z "$aix_libpath"; then
12377 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
16954d5d 12378fi
189b8c2e 12379fi
b686ecb5
JM
12380rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
189b8c2e 12383
b686ecb5 12384 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
189b8c2e 12385
b686ecb5
JM
12386 archive_expsym_cmds_CXX='$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"
12387 else
12388 if test "$host_cpu" = ia64; then
12389 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
12390 allow_undefined_flag_CXX="-z nodefs"
12391 archive_expsym_cmds_CXX="\$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"
12392 else
12393 # Determine the default libpath from the value encoded in an
12394 # empty executable.
12395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0f8f2de1 12396/* end confdefs.h. */
b686ecb5 12397
0f8f2de1
TV
12398int
12399main ()
12400{
0f8f2de1
TV
12401
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406if ac_fn_cxx_try_link "$LINENO"; then :
0f8f2de1 12407
b686ecb5
JM
12408lt_aix_libpath_sed='
12409 /Import File Strings/,/^$/ {
12410 /^0/ {
12411 s/^0 *\(.*\)$/\1/
12412 p
12413 }
12414 }'
12415aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12416# Check for a 64-bit object if we didn't find anything.
12417if test -z "$aix_libpath"; then
12418 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12419fi
0f8f2de1
TV
12420fi
12421rm -f core conftest.err conftest.$ac_objext \
12422 conftest$ac_exeext conftest.$ac_ext
b686ecb5
JM
12423if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
12424
12425 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
12426 # Warning - without using the other run time loading flags,
12427 # -berok will link without error, but may produce a broken library.
12428 no_undefined_flag_CXX=' ${wl}-bernotok'
12429 allow_undefined_flag_CXX=' ${wl}-berok'
12430 if test "$with_gnu_ld" = yes; then
12431 # We only use this code for GNU lds that support --whole-archive.
12432 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
12433 else
12434 # Exported symbols can be pulled into shared objects from archives
12435 whole_archive_flag_spec_CXX='$convenience'
12436 fi
12437 archive_cmds_need_lc_CXX=yes
12438 # This is similar to how AIX traditionally builds its shared
12439 # libraries.
12440 archive_expsym_cmds_CXX="\$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'
12441 fi
12442 fi
12443 ;;
0f8f2de1 12444
b686ecb5
JM
12445 beos*)
12446 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12447 allow_undefined_flag_CXX=unsupported
12448 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
12449 # support --undefined. This deserves some investigation. FIXME
12450 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12451 else
12452 ld_shlibs_CXX=no
12453 fi
12454 ;;
62f29fda 12455
b686ecb5
JM
12456 chorus*)
12457 case $cc_basename in
12458 *)
12459 # FIXME: insert proper C++ library support
12460 ld_shlibs_CXX=no
12461 ;;
12462 esac
12463 ;;
62f29fda 12464
b686ecb5
JM
12465 cygwin* | mingw* | pw32* | cegcc*)
12466 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
12467 # as there is no search path for DLLs.
12468 hardcode_libdir_flag_spec_CXX='-L$libdir'
12469 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
12470 allow_undefined_flag_CXX=unsupported
12471 always_export_symbols_CXX=no
12472 enable_shared_with_static_runtimes_CXX=yes
12473
12474 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12475 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12476 # If the export-symbols file already is a .def file (1st line
12477 # is EXPORTS), use it as is; otherwise, prepend...
12478 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
12479 cp $export_symbols $output_objdir/$soname.def;
12480 else
12481 echo EXPORTS > $output_objdir/$soname.def;
12482 cat $export_symbols >> $output_objdir/$soname.def;
12483 fi~
12484 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12485 else
12486 ld_shlibs_CXX=no
0f8f2de1 12487 fi
b686ecb5
JM
12488 ;;
12489 darwin* | rhapsody*)
12490
12491
12492 archive_cmds_need_lc_CXX=no
12493 hardcode_direct_CXX=no
12494 hardcode_automatic_CXX=yes
12495 hardcode_shlibpath_var_CXX=unsupported
12496 if test "$lt_cv_ld_force_load" = "yes"; then
12497 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
12498 else
12499 whole_archive_flag_spec_CXX=''
12500 fi
12501 link_all_deplibs_CXX=yes
12502 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
12503 case $cc_basename in
12504 ifort*) _lt_dar_can_shared=yes ;;
12505 *) _lt_dar_can_shared=$GCC ;;
12506 esac
12507 if test "$_lt_dar_can_shared" = "yes"; then
12508 output_verbose_link_cmd=func_echo_all
12509 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
12510 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
12511 archive_expsym_cmds_CXX="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}"
12512 module_expsym_cmds_CXX="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}"
12513 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
12514 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
12515 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
189b8c2e 12516 fi
b686ecb5
JM
12517
12518 else
12519 ld_shlibs_CXX=no
189b8c2e 12520 fi
62f29fda 12521
b686ecb5 12522 ;;
62f29fda 12523
b686ecb5
JM
12524 dgux*)
12525 case $cc_basename in
12526 ec++*)
12527 # FIXME: insert proper C++ library support
12528 ld_shlibs_CXX=no
12529 ;;
12530 ghcx*)
12531 # Green Hills C++ Compiler
12532 # FIXME: insert proper C++ library support
12533 ld_shlibs_CXX=no
12534 ;;
12535 *)
12536 # FIXME: insert proper C++ library support
12537 ld_shlibs_CXX=no
12538 ;;
12539 esac
12540 ;;
62f29fda 12541
b686ecb5
JM
12542 freebsd2.*)
12543 # C++ shared libraries reported to be fairly broken before
12544 # switch to ELF
12545 ld_shlibs_CXX=no
12546 ;;
58bfce93 12547
b686ecb5
JM
12548 freebsd-elf*)
12549 archive_cmds_need_lc_CXX=no
12550 ;;
5599c404 12551
b686ecb5
JM
12552 freebsd* | dragonfly*)
12553 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
12554 # conventions
12555 ld_shlibs_CXX=yes
12556 ;;
58bfce93 12557
b686ecb5
JM
12558 gnu*)
12559 ;;
58bfce93 12560
b686ecb5
JM
12561 haiku*)
12562 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12563 link_all_deplibs_CXX=yes
12564 ;;
58bfce93 12565
b686ecb5
JM
12566 hpux9*)
12567 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
12568 hardcode_libdir_separator_CXX=:
12569 export_dynamic_flag_spec_CXX='${wl}-E'
12570 hardcode_direct_CXX=yes
12571 hardcode_minus_L_CXX=yes # Not in the search PATH,
12572 # but as the default
12573 # location of the library.
12574
12575 case $cc_basename in
12576 CC*)
12577 # FIXME: insert proper C++ library support
12578 ld_shlibs_CXX=no
12579 ;;
12580 aCC*)
12581 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
12582 # Commands to make compiler produce verbose output that lists
12583 # what "hidden" libraries, object files and flags are used when
12584 # linking a shared library.
12585 #
12586 # There doesn't appear to be a way to prevent this compiler from
12587 # explicitly linking system object files so we need to strip them
12588 # from the output so that they don't get included in the library
12589 # dependencies.
12590 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
12591 ;;
12592 *)
12593 if test "$GXX" = yes; then
12594 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
12595 else
12596 # FIXME: insert proper C++ library support
12597 ld_shlibs_CXX=no
12598 fi
12599 ;;
12600 esac
12601 ;;
58bfce93 12602
b686ecb5
JM
12603 hpux10*|hpux11*)
12604 if test $with_gnu_ld = no; then
12605 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
12606 hardcode_libdir_separator_CXX=:
12607
12608 case $host_cpu in
12609 hppa*64*|ia64*)
12610 ;;
12611 *)
12612 export_dynamic_flag_spec_CXX='${wl}-E'
12613 ;;
12614 esac
12615 fi
12616 case $host_cpu in
12617 hppa*64*|ia64*)
12618 hardcode_direct_CXX=no
12619 hardcode_shlibpath_var_CXX=no
12620 ;;
12621 *)
12622 hardcode_direct_CXX=yes
12623 hardcode_direct_absolute_CXX=yes
12624 hardcode_minus_L_CXX=yes # Not in the search PATH,
12625 # but as the default
12626 # location of the library.
12627 ;;
12628 esac
58bfce93 12629
b686ecb5
JM
12630 case $cc_basename in
12631 CC*)
12632 # FIXME: insert proper C++ library support
12633 ld_shlibs_CXX=no
12634 ;;
12635 aCC*)
12636 case $host_cpu in
12637 hppa*64*)
6a6859cb 12638 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
b686ecb5
JM
12639 ;;
12640 ia64*)
12641 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12642 ;;
12643 *)
12644 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12645 ;;
12646 esac
12647 # Commands to make compiler produce verbose output that lists
12648 # what "hidden" libraries, object files and flags are used when
12649 # linking a shared library.
12650 #
12651 # There doesn't appear to be a way to prevent this compiler from
12652 # explicitly linking system object files so we need to strip them
12653 # from the output so that they don't get included in the library
12654 # dependencies.
12655 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
12656 ;;
12657 *)
12658 if test "$GXX" = yes; then
12659 if test $with_gnu_ld = no; then
12660 case $host_cpu in
12661 hppa*64*)
6a6859cb 12662 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
b686ecb5
JM
12663 ;;
12664 ia64*)
12665 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12666 ;;
12667 *)
12668 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12669 ;;
12670 esac
12671 fi
12672 else
12673 # FIXME: insert proper C++ library support
12674 ld_shlibs_CXX=no
12675 fi
12676 ;;
12677 esac
12678 ;;
58bfce93 12679
b686ecb5
JM
12680 interix[3-9]*)
12681 hardcode_direct_CXX=no
12682 hardcode_shlibpath_var_CXX=no
12683 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12684 export_dynamic_flag_spec_CXX='${wl}-E'
12685 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
12686 # Instead, shared libraries are loaded at an image base (0x10000000 by
12687 # default) and relocated if they conflict, which is a slow very memory
12688 # consuming and fragmenting process. To avoid this, we pick a random,
12689 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
12690 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
12691 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
12692 archive_expsym_cmds_CXX='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'
12693 ;;
12694 irix5* | irix6*)
12695 case $cc_basename in
12696 CC*)
12697 # SGI C++
12698 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12699
12700 # Archives containing C++ object files must be created using
12701 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
12702 # necessary to make sure instantiated templates are included
12703 # in the archive.
12704 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
12705 ;;
12706 *)
12707 if test "$GXX" = yes; then
12708 if test "$with_gnu_ld" = no; then
12709 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
12710 else
12711 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
12712 fi
12713 fi
12714 link_all_deplibs_CXX=yes
12715 ;;
12716 esac
12717 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12718 hardcode_libdir_separator_CXX=:
12719 inherit_rpath_CXX=yes
12720 ;;
58bfce93 12721
b686ecb5
JM
12722 linux* | k*bsd*-gnu | kopensolaris*-gnu)
12723 case $cc_basename in
12724 KCC*)
12725 # Kuck and Associates, Inc. (KAI) C++ Compiler
12726
12727 # KCC will only create a shared library if the output file
12728 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12729 # to its proper name (with version) after linking.
12730 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
12731 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
12732 # Commands to make compiler produce verbose output that lists
12733 # what "hidden" libraries, object files and flags are used when
12734 # linking a shared library.
12735 #
12736 # There doesn't appear to be a way to prevent this compiler from
12737 # explicitly linking system object files so we need to strip them
12738 # from the output so that they don't get included in the library
12739 # dependencies.
12740 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
12741
12742 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12743 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12744
12745 # Archives containing C++ object files must be created using
12746 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
12747 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
12748 ;;
12749 icpc* | ecpc* )
12750 # Intel C++
12751 with_gnu_ld=yes
12752 # version 8.0 and above of icpc choke on multiply defined symbols
12753 # if we add $predep_objects and $postdep_objects, however 7.1 and
12754 # earlier do not add the objects themselves.
12755 case `$CC -V 2>&1` in
12756 *"Version 7."*)
12757 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12758 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12759 ;;
12760 *) # Version 8.0 or newer
12761 tmp_idyn=
12762 case $host_cpu in
12763 ia64*) tmp_idyn=' -i_dynamic';;
12764 esac
12765 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12766 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12767 ;;
12768 esac
12769 archive_cmds_need_lc_CXX=no
12770 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12771 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12772 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
12773 ;;
12774 pgCC* | pgcpp*)
12775 # Portland Group C++ compiler
12776 case `$CC -V` in
12777 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
12778 prelink_cmds_CXX='tpldir=Template.dir~
12779 rm -rf $tpldir~
12780 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6a6859cb 12781 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
b686ecb5
JM
12782 old_archive_cmds_CXX='tpldir=Template.dir~
12783 rm -rf $tpldir~
12784 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6a6859cb 12785 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
b686ecb5
JM
12786 $RANLIB $oldlib'
12787 archive_cmds_CXX='tpldir=Template.dir~
12788 rm -rf $tpldir~
12789 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6a6859cb 12790 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
b686ecb5
JM
12791 archive_expsym_cmds_CXX='tpldir=Template.dir~
12792 rm -rf $tpldir~
12793 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6a6859cb 12794 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
b686ecb5
JM
12795 ;;
12796 *) # Version 6 and above use weak symbols
12797 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
12798 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
12799 ;;
12800 esac
58bfce93 12801
b686ecb5
JM
12802 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
12803 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12804 whole_archive_flag_spec_CXX='${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'
12805 ;;
12806 cxx*)
12807 # Compaq C++
12808 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12809 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
12810
12811 runpath_var=LD_RUN_PATH
12812 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
12813 hardcode_libdir_separator_CXX=:
12814
12815 # Commands to make compiler produce verbose output that lists
12816 # what "hidden" libraries, object files and flags are used when
12817 # linking a shared library.
12818 #
12819 # There doesn't appear to be a way to prevent this compiler from
12820 # explicitly linking system object files so we need to strip them
12821 # from the output so that they don't get included in the library
12822 # dependencies.
12823 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
12824 ;;
12825 xl* | mpixl* | bgxl*)
12826 # IBM XL 8.0 on PPC, with GNU ld
12827 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12828 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
12829 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12830 if test "x$supports_anon_versioning" = xyes; then
12831 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
12832 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12833 echo "local: *; };" >> $output_objdir/$libname.ver~
12834 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
12835 fi
12836 ;;
12837 *)
12838 case `$CC -V 2>&1 | sed 5q` in
12839 *Sun\ C*)
12840 # Sun C++ 5.9
12841 no_undefined_flag_CXX=' -zdefs'
12842 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12843 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
12844 hardcode_libdir_flag_spec_CXX='-R$libdir'
12845 whole_archive_flag_spec_CXX='${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'
12846 compiler_needs_object_CXX=yes
12847
12848 # Not sure whether something based on
12849 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
12850 # would be better.
12851 output_verbose_link_cmd='func_echo_all'
12852
12853 # Archives containing C++ object files must be created using
12854 # "CC -xar", where "CC" is the Sun C++ compiler. This is
12855 # necessary to make sure instantiated templates are included
12856 # in the archive.
12857 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
12858 ;;
12859 esac
12860 ;;
12861 esac
12862 ;;
58bfce93 12863
b686ecb5
JM
12864 lynxos*)
12865 # FIXME: insert proper C++ library support
12866 ld_shlibs_CXX=no
12867 ;;
58bfce93 12868
b686ecb5
JM
12869 m88k*)
12870 # FIXME: insert proper C++ library support
12871 ld_shlibs_CXX=no
12872 ;;
58bfce93 12873
b686ecb5
JM
12874 mvs*)
12875 case $cc_basename in
12876 cxx*)
12877 # FIXME: insert proper C++ library support
12878 ld_shlibs_CXX=no
12879 ;;
12880 *)
12881 # FIXME: insert proper C++ library support
12882 ld_shlibs_CXX=no
12883 ;;
12884 esac
12885 ;;
58bfce93 12886
b686ecb5
JM
12887 netbsd*)
12888 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12889 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
12890 wlarc=
12891 hardcode_libdir_flag_spec_CXX='-R$libdir'
12892 hardcode_direct_CXX=yes
12893 hardcode_shlibpath_var_CXX=no
12894 fi
12895 # Workaround some broken pre-1.5 toolchains
12896 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
12897 ;;
58bfce93 12898
b686ecb5
JM
12899 *nto* | *qnx*)
12900 ld_shlibs_CXX=yes
12901 ;;
58bfce93 12902
b686ecb5
JM
12903 openbsd2*)
12904 # C++ shared libraries are fairly broken
12905 ld_shlibs_CXX=no
12906 ;;
58bfce93 12907
b686ecb5
JM
12908 openbsd*)
12909 if test -f /usr/libexec/ld.so; then
12910 hardcode_direct_CXX=yes
12911 hardcode_shlibpath_var_CXX=no
12912 hardcode_direct_absolute_CXX=yes
12913 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
12914 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12915 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12916 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
12917 export_dynamic_flag_spec_CXX='${wl}-E'
12918 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
12919 fi
12920 output_verbose_link_cmd=func_echo_all
12921 else
12922 ld_shlibs_CXX=no
12923 fi
12924 ;;
58bfce93 12925
b686ecb5
JM
12926 osf3* | osf4* | osf5*)
12927 case $cc_basename in
12928 KCC*)
12929 # Kuck and Associates, Inc. (KAI) C++ Compiler
58bfce93 12930
b686ecb5
JM
12931 # KCC will only create a shared library if the output file
12932 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12933 # to its proper name (with version) after linking.
12934 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
58bfce93 12935
b686ecb5
JM
12936 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12937 hardcode_libdir_separator_CXX=:
58bfce93 12938
b686ecb5
JM
12939 # Archives containing C++ object files must be created using
12940 # the KAI C++ compiler.
12941 case $host in
12942 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
12943 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
12944 esac
12945 ;;
12946 RCC*)
12947 # Rational C++ 2.4.1
12948 # FIXME: insert proper C++ library support
12949 ld_shlibs_CXX=no
12950 ;;
12951 cxx*)
12952 case $host in
12953 osf3*)
12954 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12955 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12956 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12957 ;;
12958 *)
12959 allow_undefined_flag_CXX=' -expect_unresolved \*'
12960 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12961 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
12962 echo "-hidden">> $lib.exp~
12963 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
12964 $RM $lib.exp'
12965 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
12966 ;;
12967 esac
58bfce93 12968
b686ecb5
JM
12969 hardcode_libdir_separator_CXX=:
12970
12971 # Commands to make compiler produce verbose output that lists
12972 # what "hidden" libraries, object files and flags are used when
12973 # linking a shared library.
12974 #
12975 # There doesn't appear to be a way to prevent this compiler from
12976 # explicitly linking system object files so we need to strip them
12977 # from the output so that they don't get included in the library
12978 # dependencies.
12979 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
12980 ;;
12981 *)
12982 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12983 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12984 case $host in
12985 osf3*)
12986 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
12987 ;;
12988 *)
12989 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
12990 ;;
12991 esac
12992
12993 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12994 hardcode_libdir_separator_CXX=:
12995
12996 # Commands to make compiler produce verbose output that lists
12997 # what "hidden" libraries, object files and flags are used when
12998 # linking a shared library.
12999 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
58bfce93 13000
b686ecb5
JM
13001 else
13002 # FIXME: insert proper C++ library support
13003 ld_shlibs_CXX=no
13004 fi
13005 ;;
13006 esac
13007 ;;
58bfce93 13008
b686ecb5
JM
13009 psos*)
13010 # FIXME: insert proper C++ library support
13011 ld_shlibs_CXX=no
13012 ;;
58bfce93 13013
b686ecb5
JM
13014 sunos4*)
13015 case $cc_basename in
13016 CC*)
13017 # Sun C++ 4.x
13018 # FIXME: insert proper C++ library support
13019 ld_shlibs_CXX=no
13020 ;;
13021 lcc*)
13022 # Lucid
13023 # FIXME: insert proper C++ library support
13024 ld_shlibs_CXX=no
13025 ;;
13026 *)
13027 # FIXME: insert proper C++ library support
13028 ld_shlibs_CXX=no
13029 ;;
13030 esac
13031 ;;
58bfce93 13032
b686ecb5
JM
13033 solaris*)
13034 case $cc_basename in
13035 CC*)
13036 # Sun C++ 4.2, 5.x and Centerline C++
13037 archive_cmds_need_lc_CXX=yes
13038 no_undefined_flag_CXX=' -zdefs'
13039 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13040 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13041 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
13042
13043 hardcode_libdir_flag_spec_CXX='-R$libdir'
13044 hardcode_shlibpath_var_CXX=no
13045 case $host_os in
13046 solaris2.[0-5] | solaris2.[0-5].*) ;;
13047 *)
13048 # The compiler driver will combine and reorder linker options,
13049 # but understands `-z linker_flag'.
13050 # Supported since Solaris 2.6 (maybe 2.5.1?)
13051 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
13052 ;;
13053 esac
13054 link_all_deplibs_CXX=yes
58bfce93 13055
b686ecb5 13056 output_verbose_link_cmd='func_echo_all'
58bfce93 13057
b686ecb5
JM
13058 # Archives containing C++ object files must be created using
13059 # "CC -xar", where "CC" is the Sun C++ compiler. This is
13060 # necessary to make sure instantiated templates are included
13061 # in the archive.
13062 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
13063 ;;
13064 gcx*)
13065 # Green Hills C++ Compiler
13066 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
58bfce93 13067
b686ecb5
JM
13068 # The C++ compiler must be used to create the archive.
13069 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
13070 ;;
13071 *)
13072 # GNU C++ compiler with Solaris linker
13073 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
13074 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
13075 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
13076 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
13077 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13078 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
13079
13080 # Commands to make compiler produce verbose output that lists
13081 # what "hidden" libraries, object files and flags are used when
13082 # linking a shared library.
13083 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
13084 else
13085 # g++ 2.7 appears to require `-G' NOT `-shared' on this
13086 # platform.
13087 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
13088 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13089 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
13090
13091 # Commands to make compiler produce verbose output that lists
13092 # what "hidden" libraries, object files and flags are used when
13093 # linking a shared library.
13094 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
13095 fi
58bfce93 13096
b686ecb5
JM
13097 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
13098 case $host_os in
13099 solaris2.[0-5] | solaris2.[0-5].*) ;;
13100 *)
13101 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
13102 ;;
13103 esac
13104 fi
13105 ;;
13106 esac
13107 ;;
58bfce93 13108
b686ecb5
JM
13109 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13110 no_undefined_flag_CXX='${wl}-z,text'
13111 archive_cmds_need_lc_CXX=no
13112 hardcode_shlibpath_var_CXX=no
13113 runpath_var='LD_RUN_PATH'
13114
13115 case $cc_basename in
13116 CC*)
13117 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13118 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13119 ;;
13120 *)
13121 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13122 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13123 ;;
13124 esac
13125 ;;
58bfce93 13126
b686ecb5
JM
13127 sysv5* | sco3.2v5* | sco5v6*)
13128 # Note: We can NOT use -z defs as we might desire, because we do not
13129 # link with -lc, and that would cause any symbols used from libc to
13130 # always be unresolved, which means just about no library would
13131 # ever link correctly. If we're not using GNU ld we use -z text
13132 # though, which does catch some bad symbols but isn't as heavy-handed
13133 # as -z defs.
13134 no_undefined_flag_CXX='${wl}-z,text'
13135 allow_undefined_flag_CXX='${wl}-z,nodefs'
13136 archive_cmds_need_lc_CXX=no
13137 hardcode_shlibpath_var_CXX=no
13138 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
13139 hardcode_libdir_separator_CXX=':'
13140 link_all_deplibs_CXX=yes
13141 export_dynamic_flag_spec_CXX='${wl}-Bexport'
13142 runpath_var='LD_RUN_PATH'
13143
13144 case $cc_basename in
13145 CC*)
13146 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13147 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13148 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
13149 '"$old_archive_cmds_CXX"
13150 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
13151 '"$reload_cmds_CXX"
13152 ;;
13153 *)
13154 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13155 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13156 ;;
13157 esac
13158 ;;
58bfce93 13159
b686ecb5
JM
13160 tandem*)
13161 case $cc_basename in
13162 NCC*)
13163 # NonStop-UX NCC 3.20
13164 # FIXME: insert proper C++ library support
13165 ld_shlibs_CXX=no
13166 ;;
13167 *)
13168 # FIXME: insert proper C++ library support
13169 ld_shlibs_CXX=no
13170 ;;
13171 esac
13172 ;;
05a6b8c2 13173
b686ecb5 13174 vxworks*)
6a6859cb
AM
13175 # For VxWorks ports, we assume the use of a GNU linker with
13176 # standard elf conventions.
13177 ld_shlibs_CXX=yes
b686ecb5 13178 ;;
05a6b8c2 13179
b686ecb5
JM
13180 *)
13181 # FIXME: insert proper C++ library support
13182 ld_shlibs_CXX=no
13183 ;;
13184 esac
05a6b8c2 13185
b686ecb5
JM
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
13187$as_echo "$ld_shlibs_CXX" >&6; }
13188 test "$ld_shlibs_CXX" = no && can_build_shared=no
13189
13190 GCC_CXX="$GXX"
13191 LD_CXX="$LD"
13192
13193 ## CAVEAT EMPTOR:
13194 ## There is no encapsulation within the following macros, do not change
13195 ## the running order or otherwise move them around unless you know exactly
13196 ## what you are doing...
13197 # Dependencies to place before and after the object being linked:
13198predep_objects_CXX=
13199postdep_objects_CXX=
13200predeps_CXX=
13201postdeps_CXX=
13202compiler_lib_search_path_CXX=
13203
13204cat > conftest.$ac_ext <<_LT_EOF
13205class Foo
13206{
13207public:
13208 Foo (void) { a = 0; }
13209private:
13210 int a;
13211};
13212_LT_EOF
13213
13214if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13215 (eval $ac_compile) 2>&5
13216 ac_status=$?
13217 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13218 test $ac_status = 0; }; then
13219 # Parse the compiler output and extract the necessary
13220 # objects, libraries and library flags.
13221
13222 # Sentinel used to keep track of whether or not we are before
13223 # the conftest object file.
13224 pre_test_object_deps_done=no
13225
13226 for p in `eval "$output_verbose_link_cmd"`; do
13227 case $p in
13228
13229 -L* | -R* | -l*)
13230 # Some compilers place space between "-{L,R}" and the path.
13231 # Remove the space.
13232 if test $p = "-L" ||
13233 test $p = "-R"; then
13234 prev=$p
13235 continue
13236 else
13237 prev=
13238 fi
13239
13240 if test "$pre_test_object_deps_done" = no; then
13241 case $p in
13242 -L* | -R*)
13243 # Internal compiler library paths should come after those
13244 # provided the user. The postdeps already come after the
13245 # user supplied libs so there is no need to process them.
13246 if test -z "$compiler_lib_search_path_CXX"; then
13247 compiler_lib_search_path_CXX="${prev}${p}"
13248 else
13249 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
13250 fi
13251 ;;
13252 # The "-l" case would never come before the object being
13253 # linked, so don't bother handling this case.
13254 esac
13255 else
13256 if test -z "$postdeps_CXX"; then
13257 postdeps_CXX="${prev}${p}"
13258 else
13259 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
13260 fi
13261 fi
13262 ;;
13263
13264 *.$objext)
13265 # This assumes that the test object file only shows up
13266 # once in the compiler output.
13267 if test "$p" = "conftest.$objext"; then
13268 pre_test_object_deps_done=yes
13269 continue
13270 fi
13271
13272 if test "$pre_test_object_deps_done" = no; then
13273 if test -z "$predep_objects_CXX"; then
13274 predep_objects_CXX="$p"
13275 else
13276 predep_objects_CXX="$predep_objects_CXX $p"
13277 fi
13278 else
13279 if test -z "$postdep_objects_CXX"; then
13280 postdep_objects_CXX="$p"
13281 else
13282 postdep_objects_CXX="$postdep_objects_CXX $p"
13283 fi
13284 fi
13285 ;;
05a6b8c2 13286
b686ecb5 13287 *) ;; # Ignore the rest.
05a6b8c2 13288
b686ecb5
JM
13289 esac
13290 done
6aa4f97c 13291
b686ecb5
JM
13292 # Clean up.
13293 rm -f a.out a.exe
13294else
13295 echo "libtool.m4: error: problem compiling CXX test program"
6aa4f97c
AB
13296fi
13297
b686ecb5 13298$RM -f confest.$objext
05a6b8c2 13299
b686ecb5
JM
13300# PORTME: override above test on systems where it is broken
13301case $host_os in
13302interix[3-9]*)
13303 # Interix 3.5 installs completely hosed .la files for C++, so rather than
13304 # hack all around it, let's just trust "g++" to DTRT.
13305 predep_objects_CXX=
13306 postdep_objects_CXX=
13307 postdeps_CXX=
13308 ;;
58bfce93 13309
b686ecb5
JM
13310linux*)
13311 case `$CC -V 2>&1 | sed 5q` in
13312 *Sun\ C*)
13313 # Sun C++ 5.9
13314
13315 # The more standards-conforming stlport4 library is
13316 # incompatible with the Cstd library. Avoid specifying
13317 # it if it's in CXXFLAGS. Ignore libCrun as
13318 # -library=stlport4 depends on it.
13319 case " $CXX $CXXFLAGS " in
13320 *" -library=stlport4 "*)
13321 solaris_use_stlport4=yes
13322 ;;
13323 esac
58bfce93 13324
b686ecb5
JM
13325 if test "$solaris_use_stlport4" != yes; then
13326 postdeps_CXX='-library=Cstd -library=Crun'
13327 fi
13328 ;;
13329 esac
13330 ;;
58bfce93 13331
b686ecb5
JM
13332solaris*)
13333 case $cc_basename in
13334 CC*)
13335 # The more standards-conforming stlport4 library is
13336 # incompatible with the Cstd library. Avoid specifying
13337 # it if it's in CXXFLAGS. Ignore libCrun as
13338 # -library=stlport4 depends on it.
13339 case " $CXX $CXXFLAGS " in
13340 *" -library=stlport4 "*)
13341 solaris_use_stlport4=yes
13342 ;;
13343 esac
05ea2a05 13344
b686ecb5
JM
13345 # Adding this requires a known-good setup of shared libraries for
13346 # Sun compiler versions before 5.6, else PIC objects from an old
13347 # archive will be linked into the output, leading to subtle bugs.
13348 if test "$solaris_use_stlport4" != yes; then
13349 postdeps_CXX='-library=Cstd -library=Crun'
13350 fi
13351 ;;
13352 esac
13353 ;;
13354esac
58bfce93 13355
58bfce93 13356
b686ecb5
JM
13357case " $postdeps_CXX " in
13358*" -lc "*) archive_cmds_need_lc_CXX=no ;;
13359esac
13360 compiler_lib_search_dirs_CXX=
13361if test -n "${compiler_lib_search_path_CXX}"; then
13362 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
58bfce93 13363fi
58bfce93
MM
13364
13365
13366
13367
c56ccc05 13368
c56ccc05 13369
c56ccc05 13370
c56ccc05 13371
58bfce93 13372
c890192f 13373
81ecdfbb 13374
a9322a30 13375
bec39cab 13376
bec39cab 13377
bec39cab 13378
81ecdfbb 13379
81ecdfbb 13380
81ecdfbb 13381
06825bd1 13382
bec39cab 13383
81ecdfbb 13384
05ea2a05 13385
bec39cab 13386
bec39cab 13387
5ee754fc 13388
bec39cab 13389
05ea2a05 13390
05ea2a05 13391
05ea2a05 13392
c906108c 13393
05ea2a05 13394
b686ecb5
JM
13395 lt_prog_compiler_wl_CXX=
13396lt_prog_compiler_pic_CXX=
13397lt_prog_compiler_static_CXX=
81ecdfbb 13398
b686ecb5
JM
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13400$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
81ecdfbb 13401
b686ecb5
JM
13402 # C++ specific cases for pic, static, wl, etc.
13403 if test "$GXX" = yes; then
13404 lt_prog_compiler_wl_CXX='-Wl,'
13405 lt_prog_compiler_static_CXX='-static'
13406
13407 case $host_os in
13408 aix*)
13409 # All AIX code is PIC.
13410 if test "$host_cpu" = ia64; then
13411 # AIX 5 now supports IA64 processor
13412 lt_prog_compiler_static_CXX='-Bstatic'
13413 fi
13414 lt_prog_compiler_pic_CXX='-fPIC'
13415 ;;
a9322a30 13416
b686ecb5
JM
13417 amigaos*)
13418 case $host_cpu in
13419 powerpc)
13420 # see comment about AmigaOS4 .so support
13421 lt_prog_compiler_pic_CXX='-fPIC'
13422 ;;
13423 m68k)
13424 # FIXME: we need at least 68020 code to build shared libraries, but
13425 # adding the `-m68020' flag to GCC prevents building anything better,
13426 # like `-m68040'.
13427 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
13428 ;;
13429 esac
13430 ;;
bec39cab 13431
b686ecb5
JM
13432 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13433 # PIC is the default for these OSes.
13434 ;;
13435 mingw* | cygwin* | os2* | pw32* | cegcc*)
13436 # This hack is so that the source file can tell whether it is being
13437 # built for inclusion in a dll (and should export symbols for example).
13438 # Although the cygwin gcc ignores -fPIC, still need this for old-style
13439 # (--disable-auto-import) libraries
13440 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
13441 ;;
13442 darwin* | rhapsody*)
13443 # PIC is the default on this platform
13444 # Common symbols not allowed in MH_DYLIB files
13445 lt_prog_compiler_pic_CXX='-fno-common'
13446 ;;
13447 *djgpp*)
13448 # DJGPP does not support shared libraries at all
13449 lt_prog_compiler_pic_CXX=
13450 ;;
13451 haiku*)
13452 # PIC is the default for Haiku.
13453 # The "-static" flag exists, but is broken.
13454 lt_prog_compiler_static_CXX=
13455 ;;
13456 interix[3-9]*)
13457 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13458 # Instead, we relocate shared libraries at runtime.
13459 ;;
13460 sysv4*MP*)
13461 if test -d /usr/nec; then
13462 lt_prog_compiler_pic_CXX=-Kconform_pic
13463 fi
13464 ;;
13465 hpux*)
13466 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
13467 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
13468 # sets the default TLS model and affects inlining.
13469 case $host_cpu in
13470 hppa*64*)
13471 ;;
13472 *)
13473 lt_prog_compiler_pic_CXX='-fPIC'
13474 ;;
13475 esac
13476 ;;
13477 *qnx* | *nto*)
13478 # QNX uses GNU C++, but need to define -shared option too, otherwise
13479 # it will coredump.
13480 lt_prog_compiler_pic_CXX='-fPIC -shared'
13481 ;;
13482 *)
13483 lt_prog_compiler_pic_CXX='-fPIC'
13484 ;;
13485 esac
13486 else
13487 case $host_os in
13488 aix[4-9]*)
13489 # All AIX code is PIC.
13490 if test "$host_cpu" = ia64; then
13491 # AIX 5 now supports IA64 processor
13492 lt_prog_compiler_static_CXX='-Bstatic'
13493 else
13494 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
13495 fi
13496 ;;
13497 chorus*)
13498 case $cc_basename in
13499 cxch68*)
13500 # Green Hills C++ Compiler
13501 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
13502 ;;
13503 esac
13504 ;;
13505 dgux*)
13506 case $cc_basename in
13507 ec++*)
13508 lt_prog_compiler_pic_CXX='-KPIC'
13509 ;;
13510 ghcx*)
13511 # Green Hills C++ Compiler
13512 lt_prog_compiler_pic_CXX='-pic'
13513 ;;
13514 *)
13515 ;;
13516 esac
13517 ;;
13518 freebsd* | dragonfly*)
13519 # FreeBSD uses GNU C++
13520 ;;
13521 hpux9* | hpux10* | hpux11*)
13522 case $cc_basename in
13523 CC*)
13524 lt_prog_compiler_wl_CXX='-Wl,'
13525 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
13526 if test "$host_cpu" != ia64; then
13527 lt_prog_compiler_pic_CXX='+Z'
13528 fi
13529 ;;
13530 aCC*)
13531 lt_prog_compiler_wl_CXX='-Wl,'
13532 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
13533 case $host_cpu in
13534 hppa*64*|ia64*)
13535 # +Z the default
13536 ;;
13537 *)
13538 lt_prog_compiler_pic_CXX='+Z'
13539 ;;
13540 esac
13541 ;;
13542 *)
13543 ;;
13544 esac
13545 ;;
13546 interix*)
13547 # This is c89, which is MS Visual C++ (no shared libs)
13548 # Anyone wants to do a port?
13549 ;;
13550 irix5* | irix6* | nonstopux*)
13551 case $cc_basename in
13552 CC*)
13553 lt_prog_compiler_wl_CXX='-Wl,'
13554 lt_prog_compiler_static_CXX='-non_shared'
13555 # CC pic flag -KPIC is the default.
13556 ;;
13557 *)
13558 ;;
13559 esac
13560 ;;
13561 linux* | k*bsd*-gnu | kopensolaris*-gnu)
13562 case $cc_basename in
13563 KCC*)
13564 # KAI C++ Compiler
13565 lt_prog_compiler_wl_CXX='--backend -Wl,'
13566 lt_prog_compiler_pic_CXX='-fPIC'
13567 ;;
13568 ecpc* )
13569 # old Intel C++ for x86_64 which still supported -KPIC.
13570 lt_prog_compiler_wl_CXX='-Wl,'
13571 lt_prog_compiler_pic_CXX='-KPIC'
13572 lt_prog_compiler_static_CXX='-static'
13573 ;;
13574 icpc* )
13575 # Intel C++, used to be incompatible with GCC.
13576 # ICC 10 doesn't accept -KPIC any more.
13577 lt_prog_compiler_wl_CXX='-Wl,'
13578 lt_prog_compiler_pic_CXX='-fPIC'
13579 lt_prog_compiler_static_CXX='-static'
13580 ;;
13581 pgCC* | pgcpp*)
13582 # Portland Group C++ compiler
13583 lt_prog_compiler_wl_CXX='-Wl,'
13584 lt_prog_compiler_pic_CXX='-fpic'
13585 lt_prog_compiler_static_CXX='-Bstatic'
13586 ;;
13587 cxx*)
13588 # Compaq C++
13589 # Make sure the PIC flag is empty. It appears that all Alpha
13590 # Linux and Compaq Tru64 Unix objects are PIC.
13591 lt_prog_compiler_pic_CXX=
13592 lt_prog_compiler_static_CXX='-non_shared'
13593 ;;
13594 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
13595 # IBM XL 8.0, 9.0 on PPC and BlueGene
13596 lt_prog_compiler_wl_CXX='-Wl,'
13597 lt_prog_compiler_pic_CXX='-qpic'
13598 lt_prog_compiler_static_CXX='-qstaticlink'
13599 ;;
13600 *)
13601 case `$CC -V 2>&1 | sed 5q` in
13602 *Sun\ C*)
13603 # Sun C++ 5.9
13604 lt_prog_compiler_pic_CXX='-KPIC'
13605 lt_prog_compiler_static_CXX='-Bstatic'
13606 lt_prog_compiler_wl_CXX='-Qoption ld '
13607 ;;
13608 esac
13609 ;;
13610 esac
13611 ;;
13612 lynxos*)
13613 ;;
13614 m88k*)
13615 ;;
13616 mvs*)
13617 case $cc_basename in
13618 cxx*)
13619 lt_prog_compiler_pic_CXX='-W c,exportall'
13620 ;;
13621 *)
13622 ;;
13623 esac
13624 ;;
13625 netbsd*)
13626 ;;
13627 *qnx* | *nto*)
13628 # QNX uses GNU C++, but need to define -shared option too, otherwise
13629 # it will coredump.
13630 lt_prog_compiler_pic_CXX='-fPIC -shared'
13631 ;;
13632 osf3* | osf4* | osf5*)
13633 case $cc_basename in
13634 KCC*)
13635 lt_prog_compiler_wl_CXX='--backend -Wl,'
13636 ;;
13637 RCC*)
13638 # Rational C++ 2.4.1
13639 lt_prog_compiler_pic_CXX='-pic'
13640 ;;
13641 cxx*)
13642 # Digital/Compaq C++
13643 lt_prog_compiler_wl_CXX='-Wl,'
13644 # Make sure the PIC flag is empty. It appears that all Alpha
13645 # Linux and Compaq Tru64 Unix objects are PIC.
13646 lt_prog_compiler_pic_CXX=
13647 lt_prog_compiler_static_CXX='-non_shared'
13648 ;;
13649 *)
13650 ;;
13651 esac
13652 ;;
13653 psos*)
13654 ;;
13655 solaris*)
13656 case $cc_basename in
13657 CC*)
13658 # Sun C++ 4.2, 5.x and Centerline C++
13659 lt_prog_compiler_pic_CXX='-KPIC'
13660 lt_prog_compiler_static_CXX='-Bstatic'
13661 lt_prog_compiler_wl_CXX='-Qoption ld '
13662 ;;
13663 gcx*)
13664 # Green Hills C++ Compiler
13665 lt_prog_compiler_pic_CXX='-PIC'
13666 ;;
13667 *)
13668 ;;
13669 esac
13670 ;;
13671 sunos4*)
13672 case $cc_basename in
13673 CC*)
13674 # Sun C++ 4.x
13675 lt_prog_compiler_pic_CXX='-pic'
13676 lt_prog_compiler_static_CXX='-Bstatic'
13677 ;;
13678 lcc*)
13679 # Lucid
13680 lt_prog_compiler_pic_CXX='-pic'
13681 ;;
13682 *)
13683 ;;
13684 esac
13685 ;;
13686 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13687 case $cc_basename in
13688 CC*)
13689 lt_prog_compiler_wl_CXX='-Wl,'
13690 lt_prog_compiler_pic_CXX='-KPIC'
13691 lt_prog_compiler_static_CXX='-Bstatic'
13692 ;;
13693 esac
13694 ;;
13695 tandem*)
13696 case $cc_basename in
13697 NCC*)
13698 # NonStop-UX NCC 3.20
13699 lt_prog_compiler_pic_CXX='-KPIC'
13700 ;;
13701 *)
13702 ;;
13703 esac
13704 ;;
13705 vxworks*)
13706 ;;
13707 *)
13708 lt_prog_compiler_can_build_shared_CXX=no
13709 ;;
13710 esac
13711 fi
bec39cab 13712
b686ecb5
JM
13713case $host_os in
13714 # For platforms which do not support PIC, -DPIC is meaningless:
13715 *djgpp*)
13716 lt_prog_compiler_pic_CXX=
13717 ;;
13718 *)
13719 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
13720 ;;
13721esac
13722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
13723$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
5ee754fc 13724
5ee754fc 13725
b686ecb5
JM
13726
13727#
13728# Check to make sure the PIC flag actually works.
13729#
13730if test -n "$lt_prog_compiler_pic_CXX"; then
13731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
13732$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
13733if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
13734 $as_echo_n "(cached) " >&6
05ea2a05 13735else
b686ecb5
JM
13736 lt_cv_prog_compiler_pic_works_CXX=no
13737 ac_outfile=conftest.$ac_objext
13738 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13739 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
13740 # Insert the option either (1) after the last *FLAGS variable, or
13741 # (2) before a word containing "conftest.", or (3) at the end.
13742 # Note that $ac_compile itself does not contain backslashes and begins
13743 # with a dollar sign (not a hyphen), so the echo should work correctly.
13744 # The option is referenced via a variable to avoid confusing sed.
13745 lt_compile=`echo "$ac_compile" | $SED \
13746 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13747 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13748 -e 's:$: $lt_compiler_flag:'`
13749 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13750 (eval "$lt_compile" 2>conftest.err)
13751 ac_status=$?
13752 cat conftest.err >&5
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 if (exit $ac_status) && test -s "$ac_outfile"; then
13755 # The compiler can only warn and ignore the option if not recognized
13756 # So say no if there are warnings other than the usual output.
13757 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
13758 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13759 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13760 lt_cv_prog_compiler_pic_works_CXX=yes
13761 fi
13762 fi
13763 $RM conftest*
13764
5ee754fc 13765fi
b686ecb5
JM
13766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
13767$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
5ee754fc 13768
b686ecb5
JM
13769if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
13770 case $lt_prog_compiler_pic_CXX in
13771 "" | " "*) ;;
13772 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
13773 esac
13774else
13775 lt_prog_compiler_pic_CXX=
13776 lt_prog_compiler_can_build_shared_CXX=no
13777fi
bec39cab 13778
05ea2a05
TT
13779fi
13780
b686ecb5
JM
13781
13782
13783#
13784# Check to make sure the static flag actually works.
13785#
13786wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13788$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
13789if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
05ea2a05
TT
13790 $as_echo_n "(cached) " >&6
13791else
b686ecb5
JM
13792 lt_cv_prog_compiler_static_works_CXX=no
13793 save_LDFLAGS="$LDFLAGS"
13794 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13795 echo "$lt_simple_link_test_code" > conftest.$ac_ext
13796 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13797 # The linker can only warn and ignore the option if not recognized
13798 # So say no if there are warnings
13799 if test -s conftest.err; then
13800 # Append any errors to the config.log.
13801 cat conftest.err 1>&5
13802 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13803 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13804 if diff conftest.exp conftest.er2 >/dev/null; then
13805 lt_cv_prog_compiler_static_works_CXX=yes
13806 fi
13807 else
13808 lt_cv_prog_compiler_static_works_CXX=yes
13809 fi
13810 fi
13811 $RM -r conftest*
13812 LDFLAGS="$save_LDFLAGS"
bec39cab 13813
a8111142 13814fi
b686ecb5
JM
13815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
13816$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
a8111142 13817
b686ecb5
JM
13818if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
13819 :
13820else
13821 lt_prog_compiler_static_CXX=
05ea2a05 13822fi
a8111142 13823
07697489 13824
b686ecb5
JM
13825
13826
13827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13828$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13829if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
07697489
PA
13830 $as_echo_n "(cached) " >&6
13831else
b686ecb5
JM
13832 lt_cv_prog_compiler_c_o_CXX=no
13833 $RM -r conftest 2>/dev/null
13834 mkdir conftest
13835 cd conftest
13836 mkdir out
13837 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13838
13839 lt_compiler_flag="-o out/conftest2.$ac_objext"
13840 # Insert the option either (1) after the last *FLAGS variable, or
13841 # (2) before a word containing "conftest.", or (3) at the end.
13842 # Note that $ac_compile itself does not contain backslashes and begins
13843 # with a dollar sign (not a hyphen), so the echo should work correctly.
13844 lt_compile=`echo "$ac_compile" | $SED \
13845 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13846 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13847 -e 's:$: $lt_compiler_flag:'`
13848 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13849 (eval "$lt_compile" 2>out/conftest.err)
13850 ac_status=$?
13851 cat out/conftest.err >&5
13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13853 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13854 then
13855 # The compiler can only warn and ignore the option if not recognized
13856 # So say no if there are warnings
13857 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13858 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13859 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13860 lt_cv_prog_compiler_c_o_CXX=yes
13861 fi
13862 fi
13863 chmod u+w . 2>&5
13864 $RM conftest*
13865 # SGI C++ compiler will create directory out/ii_files/ for
13866 # template instantiation
13867 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13868 $RM out/* && rmdir out
13869 cd ..
13870 $RM -r conftest
13871 $RM conftest*
07697489
PA
13872
13873fi
b686ecb5
JM
13874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
13875$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
07697489 13876
07697489
PA
13877
13878
b686ecb5
JM
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
13880$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
13881if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
13882 $as_echo_n "(cached) " >&6
07697489 13883else
b686ecb5
JM
13884 lt_cv_prog_compiler_c_o_CXX=no
13885 $RM -r conftest 2>/dev/null
13886 mkdir conftest
13887 cd conftest
13888 mkdir out
13889 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13890
13891 lt_compiler_flag="-o out/conftest2.$ac_objext"
13892 # Insert the option either (1) after the last *FLAGS variable, or
13893 # (2) before a word containing "conftest.", or (3) at the end.
13894 # Note that $ac_compile itself does not contain backslashes and begins
13895 # with a dollar sign (not a hyphen), so the echo should work correctly.
13896 lt_compile=`echo "$ac_compile" | $SED \
13897 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13898 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13899 -e 's:$: $lt_compiler_flag:'`
13900 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13901 (eval "$lt_compile" 2>out/conftest.err)
13902 ac_status=$?
13903 cat out/conftest.err >&5
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13906 then
13907 # The compiler can only warn and ignore the option if not recognized
13908 # So say no if there are warnings
13909 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
13910 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13911 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13912 lt_cv_prog_compiler_c_o_CXX=yes
13913 fi
13914 fi
13915 chmod u+w . 2>&5
13916 $RM conftest*
13917 # SGI C++ compiler will create directory out/ii_files/ for
13918 # template instantiation
13919 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
13920 $RM out/* && rmdir out
13921 cd ..
13922 $RM -r conftest
13923 $RM conftest*
13924
13925fi
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
13927$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
13928
13929
13930
13931
13932hard_links="nottested"
13933if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
13934 # do not overwrite the value of need_locks provided by the user
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
13936$as_echo_n "checking if we can lock with hard links... " >&6; }
13937 hard_links=yes
13938 $RM conftest*
13939 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13940 touch conftest.a
13941 ln conftest.a conftest.b 2>&5 || hard_links=no
13942 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
13944$as_echo "$hard_links" >&6; }
13945 if test "$hard_links" = no; then
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
13947$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
13948 need_locks=warn
13949 fi
13950else
13951 need_locks=no
07697489
PA
13952fi
13953
07697489 13954
07697489 13955
b686ecb5
JM
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13957$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
07697489 13958
b686ecb5
JM
13959 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13960 case $host_os in
13961 aix[4-9]*)
13962 # If we're using GNU nm, then we don't want the "-C" option.
13963 # -C means demangle to AIX nm, but means don't demangle with GNU nm
13964 # Also, AIX nm treats weak defined symbols like other global defined
13965 # symbols, whereas GNU nm marks them as "W".
13966 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
13967 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
13968 else
13969 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
05ea2a05 13970 fi
b686ecb5
JM
13971 ;;
13972 pw32*)
13973 export_symbols_cmds_CXX="$ltdll_cmds"
13974 ;;
13975 cygwin* | mingw* | cegcc*)
13976 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
13977 ;;
13978 *)
13979 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13980 ;;
13981 esac
13982 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
07697489 13983
b686ecb5
JM
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
13985$as_echo "$ld_shlibs_CXX" >&6; }
13986test "$ld_shlibs_CXX" = no && can_build_shared=no
07697489 13987
b686ecb5 13988with_gnu_ld_CXX=$with_gnu_ld
05ea2a05 13989
07697489 13990
07697489 13991
07697489
PA
13992
13993
13994
b686ecb5
JM
13995#
13996# Do we need to explicitly link libc?
13997#
13998case "x$archive_cmds_need_lc_CXX" in
13999x|xyes)
14000 # Assume -lc should be added
14001 archive_cmds_need_lc_CXX=yes
14002
14003 if test "$enable_shared" = yes && test "$GCC" = yes; then
14004 case $archive_cmds_CXX in
14005 *'~'*)
14006 # FIXME: we may have to deal with multi-command sequences.
14007 ;;
14008 '$CC '*)
14009 # Test whether the compiler implicitly links with -lc since on some
14010 # systems, -lgcc has to come before -lc. If gcc already passes -lc
14011 # to ld, don't add -lc before -lgcc.
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
14013$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
14014if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
14015 $as_echo_n "(cached) " >&6
14016else
14017 $RM conftest*
14018 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
81ecdfbb 14019
b686ecb5
JM
14020 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14021 (eval $ac_compile) 2>&5
14022 ac_status=$?
14023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14024 test $ac_status = 0; } 2>conftest.err; then
14025 soname=conftest
14026 lib=conftest
14027 libobjs=conftest.$ac_objext
14028 deplibs=
14029 wl=$lt_prog_compiler_wl_CXX
14030 pic_flag=$lt_prog_compiler_pic_CXX
14031 compiler_flags=-v
14032 linker_flags=-v
14033 verstring=
14034 output_objdir=.
14035 libname=conftest
14036 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
14037 allow_undefined_flag_CXX=
14038 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
14039 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
14040 ac_status=$?
14041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14042 test $ac_status = 0; }
14043 then
14044 lt_cv_archive_cmds_need_lc_CXX=no
14045 else
14046 lt_cv_archive_cmds_need_lc_CXX=yes
14047 fi
14048 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
14049 else
14050 cat conftest.err 1>&5
14051 fi
14052 $RM conftest*
5ee754fc 14053
05ea2a05 14054fi
b686ecb5
JM
14055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
14056$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
14057 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
14058 ;;
14059 esac
14060 fi
14061 ;;
14062esac
5ee754fc 14063
05ea2a05 14064
05ea2a05 14065
bec39cab 14066
81ecdfbb 14067
81ecdfbb
RW
14068
14069
81ecdfbb 14070
7eb368b3 14071
7eb368b3 14072
7eb368b3 14073
a9322a30 14074
7eb368b3 14075
7eb368b3
NR
14076
14077
a9322a30 14078
05ea2a05
TT
14079
14080
14081
14082
14083
14084
05ea2a05 14085
bec39cab 14086
a9322a30 14087
05ea2a05 14088
a9322a30 14089
a9322a30
TT
14090
14091
a9322a30 14092
db6878ac 14093
a9322a30 14094
d0ac1c44 14095
bec39cab 14096
bec39cab 14097
bec39cab 14098
05ea2a05 14099
05ea2a05 14100
a9322a30 14101
bec39cab 14102
5ee754fc 14103
bec39cab 14104
a9322a30 14105
a9322a30 14106
bec39cab 14107
81ecdfbb 14108
05ea2a05 14109
81ecdfbb 14110
05ea2a05 14111
7eb368b3 14112
05ea2a05 14113
05ea2a05 14114
81ecdfbb 14115
d3ea6809
MM
14116
14117
14118
d0ac1c44
SM
14119
14120
14121
05ea2a05 14122
05ea2a05 14123
05ea2a05 14124
05ea2a05 14125
05ea2a05 14126
b686ecb5
JM
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
14128$as_echo_n "checking dynamic linker characteristics... " >&6; }
05ea2a05 14129
b686ecb5
JM
14130library_names_spec=
14131libname_spec='lib$name'
14132soname_spec=
14133shrext_cmds=".so"
14134postinstall_cmds=
14135postuninstall_cmds=
14136finish_cmds=
14137finish_eval=
14138shlibpath_var=
14139shlibpath_overrides_runpath=unknown
14140version_type=none
14141dynamic_linker="$host_os ld.so"
14142sys_lib_dlsearch_path_spec="/lib /usr/lib"
14143need_lib_prefix=unknown
14144hardcode_into_libs=no
05ea2a05 14145
b686ecb5
JM
14146# when you set need_version to no, make sure it does not cause -set_version
14147# flags to be left without arguments
14148need_version=unknown
05ea2a05 14149
b686ecb5
JM
14150case $host_os in
14151aix3*)
14152 version_type=linux
14153 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
14154 shlibpath_var=LIBPATH
05ea2a05 14155
b686ecb5
JM
14156 # AIX 3 has no versioning support, so we append a major version to the name.
14157 soname_spec='${libname}${release}${shared_ext}$major'
14158 ;;
05ea2a05 14159
b686ecb5
JM
14160aix[4-9]*)
14161 version_type=linux
14162 need_lib_prefix=no
14163 need_version=no
14164 hardcode_into_libs=yes
14165 if test "$host_cpu" = ia64; then
14166 # AIX 5 supports IA64
14167 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
14168 shlibpath_var=LD_LIBRARY_PATH
14169 else
14170 # With GCC up to 2.95.x, collect2 would create an import file
14171 # for dependence libraries. The import file would start with
14172 # the line `#! .'. This would cause the generated library to
14173 # depend on `.', always an invalid library. This was fixed in
14174 # development snapshots of GCC prior to 3.0.
14175 case $host_os in
14176 aix4 | aix4.[01] | aix4.[01].*)
14177 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14178 echo ' yes '
14179 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
14180 :
14181 else
14182 can_build_shared=no
14183 fi
14184 ;;
14185 esac
14186 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
14187 # soname into executable. Probably we can add versioning support to
14188 # collect2, so additional links can be useful in future.
14189 if test "$aix_use_runtimelinking" = yes; then
14190 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14191 # instead of lib<name>.a to let people know that these are not
14192 # typical AIX shared libraries.
14193 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14194 else
14195 # We preserve .a as extension for shared libraries through AIX4.2
14196 # and later when we are not doing run time linking.
14197 library_names_spec='${libname}${release}.a $libname.a'
14198 soname_spec='${libname}${release}${shared_ext}$major'
14199 fi
14200 shlibpath_var=LIBPATH
14201 fi
14202 ;;
05ea2a05 14203
b686ecb5
JM
14204amigaos*)
14205 case $host_cpu in
14206 powerpc)
14207 # Since July 2007 AmigaOS4 officially supports .so libraries.
14208 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14209 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14210 ;;
14211 m68k)
14212 library_names_spec='$libname.ixlibrary $libname.a'
14213 # Create ${libname}_ixlibrary.a entries in /sys/libs.
14214 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'
14215 ;;
14216 esac
14217 ;;
05ea2a05 14218
b686ecb5
JM
14219beos*)
14220 library_names_spec='${libname}${shared_ext}'
14221 dynamic_linker="$host_os ld.so"
14222 shlibpath_var=LIBRARY_PATH
14223 ;;
05ea2a05 14224
b686ecb5
JM
14225bsdi[45]*)
14226 version_type=linux
14227 need_version=no
14228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14229 soname_spec='${libname}${release}${shared_ext}$major'
14230 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14231 shlibpath_var=LD_LIBRARY_PATH
14232 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14233 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14234 # the default ld.so.conf also contains /usr/contrib/lib and
14235 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14236 # libtool to hard-code these into programs
14237 ;;
05ea2a05 14238
b686ecb5
JM
14239cygwin* | mingw* | pw32* | cegcc*)
14240 version_type=windows
14241 shrext_cmds=".dll"
14242 need_version=no
14243 need_lib_prefix=no
14244
14245 case $GCC,$host_os in
14246 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
14247 library_names_spec='$libname.dll.a'
14248 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14249 postinstall_cmds='base_file=`basename \${file}`~
14250 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
14251 dldir=$destdir/`dirname \$dlpath`~
14252 test -d \$dldir || mkdir -p \$dldir~
14253 $install_prog $dir/$dlname \$dldir/$dlname~
14254 chmod a+x \$dldir/$dlname~
14255 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
14256 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
14257 fi'
14258 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14259 dlpath=$dir/\$dldll~
14260 $RM \$dlpath'
14261 shlibpath_overrides_runpath=yes
14262
14263 case $host_os in
14264 cygwin*)
14265 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14266 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14267
14268 ;;
14269 mingw* | cegcc*)
14270 # MinGW DLLs use traditional 'lib' prefix
14271 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
05ea2a05 14272 ;;
b686ecb5
JM
14273 pw32*)
14274 # pw32 DLLs use 'pw' prefix rather than 'lib'
14275 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14276 ;;
14277 esac
14278 ;;
14279
14280 *)
14281 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
14282 ;;
05ea2a05 14283 esac
b686ecb5
JM
14284 dynamic_linker='Win32 ld.exe'
14285 # FIXME: first we should search . and the directory the executable is in
14286 shlibpath_var=PATH
14287 ;;
05ea2a05 14288
b686ecb5
JM
14289darwin* | rhapsody*)
14290 dynamic_linker="$host_os dyld"
14291 version_type=darwin
14292 need_lib_prefix=no
14293 need_version=no
14294 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
14295 soname_spec='${libname}${release}${major}$shared_ext'
14296 shlibpath_overrides_runpath=yes
14297 shlibpath_var=DYLD_LIBRARY_PATH
14298 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14299
14300 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
14301 ;;
05ea2a05 14302
b686ecb5
JM
14303dgux*)
14304 version_type=linux
14305 need_lib_prefix=no
14306 need_version=no
14307 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
14308 soname_spec='${libname}${release}${shared_ext}$major'
14309 shlibpath_var=LD_LIBRARY_PATH
14310 ;;
14311
14312freebsd* | dragonfly*)
14313 # DragonFly does not have aout. When/if they implement a new
14314 # versioning mechanism, adjust this.
14315 if test -x /usr/bin/objformat; then
14316 objformat=`/usr/bin/objformat`
14317 else
14318 case $host_os in
14319 freebsd[23].*) objformat=aout ;;
14320 *) objformat=elf ;;
14321 esac
14322 fi
14323 version_type=freebsd-$objformat
14324 case $version_type in
14325 freebsd-elf*)
14326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14327 need_version=no
14328 need_lib_prefix=no
14329 ;;
14330 freebsd-*)
14331 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
14332 need_version=yes
14333 ;;
14334 esac
14335 shlibpath_var=LD_LIBRARY_PATH
14336 case $host_os in
14337 freebsd2.*)
14338 shlibpath_overrides_runpath=yes
14339 ;;
14340 freebsd3.[01]* | freebsdelf3.[01]*)
14341 shlibpath_overrides_runpath=yes
14342 hardcode_into_libs=yes
14343 ;;
14344 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
14345 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
14346 shlibpath_overrides_runpath=no
14347 hardcode_into_libs=yes
14348 ;;
14349 *) # from 4.6 on, and DragonFly
14350 shlibpath_overrides_runpath=yes
14351 hardcode_into_libs=yes
14352 ;;
14353 esac
14354 ;;
14355
14356haiku*)
14357 version_type=linux
14358 need_lib_prefix=no
14359 need_version=no
14360 dynamic_linker="$host_os runtime_loader"
14361 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
14362 soname_spec='${libname}${release}${shared_ext}$major'
14363 shlibpath_var=LIBRARY_PATH
14364 shlibpath_overrides_runpath=yes
14365 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14366 hardcode_into_libs=yes
14367 ;;
14368
14369hpux9* | hpux10* | hpux11*)
14370 # Give a soname corresponding to the major version so that dld.sl refuses to
14371 # link against other versions.
14372 version_type=sunos
14373 need_lib_prefix=no
14374 need_version=no
14375 case $host_cpu in
14376 ia64*)
14377 shrext_cmds='.so'
14378 hardcode_into_libs=yes
14379 dynamic_linker="$host_os dld.so"
14380 shlibpath_var=LD_LIBRARY_PATH
14381 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14382 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14383 soname_spec='${libname}${release}${shared_ext}$major'
14384 if test "X$HPUX_IA64_MODE" = X32; then
14385 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
14386 else
14387 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
14388 fi
14389 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14390 ;;
14391 hppa*64*)
14392 shrext_cmds='.sl'
14393 hardcode_into_libs=yes
14394 dynamic_linker="$host_os dld.sl"
14395 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
14396 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14397 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14398 soname_spec='${libname}${release}${shared_ext}$major'
14399 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
14400 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
14401 ;;
14402 *)
14403 shrext_cmds='.sl'
14404 dynamic_linker="$host_os dld.sl"
14405 shlibpath_var=SHLIB_PATH
14406 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
14407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14408 soname_spec='${libname}${release}${shared_ext}$major'
14409 ;;
14410 esac
14411 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
14412 postinstall_cmds='chmod 555 $lib'
14413 # or fails outright, so override atomically:
14414 install_override_mode=555
14415 ;;
14416
14417interix[3-9]*)
14418 version_type=linux
14419 need_lib_prefix=no
14420 need_version=no
14421 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
14422 soname_spec='${libname}${release}${shared_ext}$major'
14423 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
14424 shlibpath_var=LD_LIBRARY_PATH
14425 shlibpath_overrides_runpath=no
14426 hardcode_into_libs=yes
14427 ;;
14428
14429irix5* | irix6* | nonstopux*)
14430 case $host_os in
14431 nonstopux*) version_type=nonstopux ;;
14432 *)
14433 if test "$lt_cv_prog_gnu_ld" = yes; then
14434 version_type=linux
14435 else
14436 version_type=irix
14437 fi ;;
14438 esac
14439 need_lib_prefix=no
14440 need_version=no
14441 soname_spec='${libname}${release}${shared_ext}$major'
14442 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
14443 case $host_os in
14444 irix5* | nonstopux*)
14445 libsuff= shlibsuff=
14446 ;;
14447 *)
14448 case $LD in # libtool.m4 will add one of these switches to LD
14449 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
14450 libsuff= shlibsuff= libmagic=32-bit;;
14451 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
14452 libsuff=32 shlibsuff=N32 libmagic=N32;;
14453 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
14454 libsuff=64 shlibsuff=64 libmagic=64-bit;;
14455 *) libsuff= shlibsuff= libmagic=never-match;;
14456 esac
14457 ;;
14458 esac
14459 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
14460 shlibpath_overrides_runpath=no
14461 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
14462 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
14463 hardcode_into_libs=yes
14464 ;;
14465
14466# No shared lib support for Linux oldld, aout, or coff.
14467linux*oldld* | linux*aout* | linux*coff*)
14468 dynamic_linker=no
14469 ;;
14470
14471# This must be Linux ELF.
6a6859cb
AM
14472
14473# uclinux* changes (here and below) have been submitted to the libtool
14474# project, but have not yet been accepted: they are GCC-local changes
14475# for the time being. (See
14476# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
14477linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi)
b686ecb5
JM
14478 version_type=linux
14479 need_lib_prefix=no
14480 need_version=no
14481 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14482 soname_spec='${libname}${release}${shared_ext}$major'
14483 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
14484 shlibpath_var=LD_LIBRARY_PATH
14485 shlibpath_overrides_runpath=no
14486
14487 # Some binutils ld are patched to set DT_RUNPATH
14488 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
05ea2a05
TT
14489 $as_echo_n "(cached) " >&6
14490else
b686ecb5
JM
14491 lt_cv_shlibpath_overrides_runpath=no
14492 save_LDFLAGS=$LDFLAGS
14493 save_libdir=$libdir
14494 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
14495 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
14496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05 14497/* end confdefs.h. */
b686ecb5 14498
05ea2a05
TT
14499int
14500main ()
14501{
b686ecb5 14502
05ea2a05
TT
14503 ;
14504 return 0;
14505}
14506_ACEOF
b686ecb5
JM
14507if ac_fn_cxx_try_link "$LINENO"; then :
14508 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
14509 lt_cv_shlibpath_overrides_runpath=yes
14510fi
05ea2a05
TT
14511fi
14512rm -f core conftest.err conftest.$ac_objext \
14513 conftest$ac_exeext conftest.$ac_ext
b686ecb5
JM
14514 LDFLAGS=$save_LDFLAGS
14515 libdir=$save_libdir
05ea2a05
TT
14516
14517fi
05ea2a05 14518
b686ecb5
JM
14519 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
14520
14521 # This implies no fast_install, which is unacceptable.
14522 # Some rework will be needed to allow for fast_install
14523 # before this can be enabled.
14524 hardcode_into_libs=yes
05ea2a05 14525
b686ecb5
JM
14526 # Append ld.so.conf contents to the search path
14527 if test -f /etc/ld.so.conf; then
14528 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' ' '`
14529 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
05ea2a05
TT
14530 fi
14531
b686ecb5
JM
14532 # We used to test for /lib/ld.so.1 and disable shared libraries on
14533 # powerpc, because MkLinux only supported shared libraries with the
14534 # GNU dynamic linker. Since this was broken with cross compilers,
14535 # most powerpc-linux boxes support dynamic linking these days and
14536 # people can always --disable-shared, the test was removed, and we
14537 # assume the GNU/Linux dynamic linker is in use.
14538 dynamic_linker='GNU/Linux ld.so'
14539 ;;
05ea2a05 14540
b686ecb5
JM
14541netbsd*)
14542 version_type=sunos
14543 need_lib_prefix=no
14544 need_version=no
14545 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14546 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14547 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14548 dynamic_linker='NetBSD (a.out) ld.so'
14549 else
14550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
14551 soname_spec='${libname}${release}${shared_ext}$major'
14552 dynamic_linker='NetBSD ld.elf_so'
14553 fi
14554 shlibpath_var=LD_LIBRARY_PATH
14555 shlibpath_overrides_runpath=yes
14556 hardcode_into_libs=yes
14557 ;;
b757528f 14558
b686ecb5
JM
14559newsos6)
14560 version_type=linux
14561 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14562 shlibpath_var=LD_LIBRARY_PATH
14563 shlibpath_overrides_runpath=yes
14564 ;;
bec39cab 14565
b686ecb5
JM
14566*nto* | *qnx*)
14567 version_type=qnx
14568 need_lib_prefix=no
14569 need_version=no
14570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14571 soname_spec='${libname}${release}${shared_ext}$major'
14572 shlibpath_var=LD_LIBRARY_PATH
14573 shlibpath_overrides_runpath=no
14574 hardcode_into_libs=yes
14575 dynamic_linker='ldqnx.so'
14576 ;;
a3828db0 14577
b686ecb5
JM
14578openbsd*)
14579 version_type=sunos
14580 sys_lib_dlsearch_path_spec="/usr/lib"
14581 need_lib_prefix=no
14582 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
14583 case $host_os in
14584 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
14585 *) need_version=no ;;
14586 esac
14587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14588 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
14589 shlibpath_var=LD_LIBRARY_PATH
14590 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
14591 case $host_os in
14592 openbsd2.[89] | openbsd2.[89].*)
14593 shlibpath_overrides_runpath=no
14594 ;;
14595 *)
14596 shlibpath_overrides_runpath=yes
14597 ;;
14598 esac
14599 else
14600 shlibpath_overrides_runpath=yes
14601 fi
14602 ;;
d0ac1c44 14603
b686ecb5
JM
14604os2*)
14605 libname_spec='$name'
14606 shrext_cmds=".dll"
14607 need_lib_prefix=no
14608 library_names_spec='$libname${shared_ext} $libname.a'
14609 dynamic_linker='OS/2 ld.exe'
14610 shlibpath_var=LIBPATH
14611 ;;
d0ac1c44 14612
b686ecb5
JM
14613osf3* | osf4* | osf5*)
14614 version_type=osf
14615 need_lib_prefix=no
14616 need_version=no
14617 soname_spec='${libname}${release}${shared_ext}$major'
14618 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14619 shlibpath_var=LD_LIBRARY_PATH
14620 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
14621 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
14622 ;;
bcb3dc3d 14623
b686ecb5
JM
14624rdos*)
14625 dynamic_linker=no
14626 ;;
bcb3dc3d 14627
b686ecb5
JM
14628solaris*)
14629 version_type=linux
14630 need_lib_prefix=no
14631 need_version=no
14632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14633 soname_spec='${libname}${release}${shared_ext}$major'
14634 shlibpath_var=LD_LIBRARY_PATH
14635 shlibpath_overrides_runpath=yes
14636 hardcode_into_libs=yes
14637 # ldd complains unless libraries are executable
14638 postinstall_cmds='chmod +x $lib'
14639 ;;
bec39cab 14640
b686ecb5
JM
14641sunos4*)
14642 version_type=sunos
14643 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
14644 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
14645 shlibpath_var=LD_LIBRARY_PATH
14646 shlibpath_overrides_runpath=yes
14647 if test "$with_gnu_ld" = yes; then
14648 need_lib_prefix=no
14649 fi
14650 need_version=yes
14651 ;;
bec39cab 14652
b686ecb5
JM
14653sysv4 | sysv4.3*)
14654 version_type=linux
14655 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14656 soname_spec='${libname}${release}${shared_ext}$major'
14657 shlibpath_var=LD_LIBRARY_PATH
14658 case $host_vendor in
14659 sni)
14660 shlibpath_overrides_runpath=no
14661 need_lib_prefix=no
14662 runpath_var=LD_RUN_PATH
14663 ;;
14664 siemens)
14665 need_lib_prefix=no
14666 ;;
14667 motorola)
14668 need_lib_prefix=no
14669 need_version=no
14670 shlibpath_overrides_runpath=no
14671 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14672 ;;
14673 esac
14674 ;;
8b9cf735 14675
b686ecb5
JM
14676sysv4*MP*)
14677 if test -d /usr/nec ;then
14678 version_type=linux
14679 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
14680 soname_spec='$libname${shared_ext}.$major'
14681 shlibpath_var=LD_LIBRARY_PATH
14682 fi
14683 ;;
8b9cf735 14684
b686ecb5
JM
14685sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14686 version_type=freebsd-elf
14687 need_lib_prefix=no
14688 need_version=no
14689 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
14690 soname_spec='${libname}${release}${shared_ext}$major'
14691 shlibpath_var=LD_LIBRARY_PATH
14692 shlibpath_overrides_runpath=yes
14693 hardcode_into_libs=yes
14694 if test "$with_gnu_ld" = yes; then
14695 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14696 else
14697 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14698 case $host_os in
14699 sco3.2v5*)
14700 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14701 ;;
14702 esac
14703 fi
14704 sys_lib_dlsearch_path_spec='/usr/lib'
14705 ;;
a3828db0 14706
b686ecb5
JM
14707tpf*)
14708 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
14709 version_type=linux
14710 need_lib_prefix=no
14711 need_version=no
14712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14713 shlibpath_var=LD_LIBRARY_PATH
14714 shlibpath_overrides_runpath=no
14715 hardcode_into_libs=yes
14716 ;;
a9322a30 14717
b686ecb5
JM
14718uts4*)
14719 version_type=linux
14720 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14721 soname_spec='${libname}${release}${shared_ext}$major'
14722 shlibpath_var=LD_LIBRARY_PATH
14723 ;;
a9322a30 14724
6a6859cb
AM
14725# Shared libraries for VwWorks, >= 7 only at this stage
14726# and (fpic) still incompatible with "large" code models
14727# in a few configurations. Only for RTP mode in any case,
14728# and upon explicit request at configure time.
14729vxworks7*)
14730 dynamic_linker=no
14731 case ${with_multisubdir}-${enable_shared} in
14732 *large*)
14733 ;;
14734 *mrtp*-yes)
14735 version_type=linux
14736 need_lib_prefix=no
14737 need_version=no
14738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14739 soname_spec='${libname}${release}${shared_ext}$major'
14740 dynamic_linker="$host_os module_loader"
14741 ;;
14742 esac
14743 ;;
b686ecb5
JM
14744*)
14745 dynamic_linker=no
14746 ;;
14747esac
14748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14749$as_echo "$dynamic_linker" >&6; }
14750test "$dynamic_linker" = no && can_build_shared=no
a9322a30 14751
b686ecb5
JM
14752variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14753if test "$GCC" = yes; then
14754 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14755fi
a9322a30 14756
b686ecb5
JM
14757if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
14758 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
14759fi
14760if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
14761 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
14762fi
a9322a30 14763
d0ac1c44 14764
a9322a30 14765
b686ecb5
JM
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14802$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
14803hardcode_action_CXX=
14804if test -n "$hardcode_libdir_flag_spec_CXX" ||
14805 test -n "$runpath_var_CXX" ||
14806 test "X$hardcode_automatic_CXX" = "Xyes" ; then
14807
14808 # We can hardcode non-existent directories.
14809 if test "$hardcode_direct_CXX" != no &&
14810 # If the only mechanism to avoid hardcoding is shlibpath_var, we
14811 # have to relink, otherwise we might link with an installed library
14812 # when we should be linking with a yet-to-be-installed one
14813 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
14814 test "$hardcode_minus_L_CXX" != no; then
14815 # Linking always hardcodes the temporary library directory.
14816 hardcode_action_CXX=relink
14817 else
14818 # We can link without hardcoding, and we can hardcode nonexisting dirs.
14819 hardcode_action_CXX=immediate
14820 fi
086ec9eb 14821else
b686ecb5
JM
14822 # We cannot hardcode anything, or else we can only hardcode existing
14823 # directories.
14824 hardcode_action_CXX=unsupported
a3828db0 14825fi
b686ecb5
JM
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
14827$as_echo "$hardcode_action_CXX" >&6; }
81ecdfbb 14828
b686ecb5
JM
14829if test "$hardcode_action_CXX" = relink ||
14830 test "$inherit_rpath_CXX" = yes; then
14831 # Fast installation is not supported
14832 enable_fast_install=no
14833elif test "$shlibpath_overrides_runpath" = yes ||
14834 test "$enable_shared" = no; then
14835 # Fast installation is not necessary
14836 enable_fast_install=needless
a9322a30 14837fi
a9322a30 14838
a3828db0 14839
a3828db0 14840
c906108c 14841
a9322a30 14842
c906108c 14843
b83266a0 14844
b686ecb5 14845 fi # test -n "$compiler"
b83266a0 14846
b686ecb5
JM
14847 CC=$lt_save_CC
14848 LDCXX=$LD
14849 LD=$lt_save_LD
14850 GCC=$lt_save_GCC
14851 with_gnu_ld=$lt_save_with_gnu_ld
14852 lt_cv_path_LDCXX=$lt_cv_path_LD
14853 lt_cv_path_LD=$lt_save_path_LD
14854 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
14855 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
14856fi # test "$_lt_caught_CXX_error" != yes
14857
14858ac_ext=c
14859ac_cpp='$CPP $CPPFLAGS'
14860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14862ac_compiler_gnu=$ac_cv_c_compiler_gnu
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876 ac_config_commands="$ac_config_commands libtool"
14877
14878
14879
14880
14881# Only expand once:
14882
14883
5218fa9e
JM
14884# ... and we need it soon, since it is used by some of the
14885# link tests in the configure script.
14886: ${CONFIG_LT=./config.lt}
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
14888$as_echo "$as_me: creating $CONFIG_LT" >&6;}
14889as_write_fail=0
14890cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
14891#! $SHELL
14892# Generated by $as_me.
14893# Run this file to recreate a libtool stub with the current configuration.
14894SHELL=\${CONFIG_SHELL-$SHELL}
14895export SHELL
14896_ASEOF
14897cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
14898## -------------------- ##
14899## M4sh Initialization. ##
14900## -------------------- ##
14901
14902# Be more Bourne compatible
14903DUALCASE=1; export DUALCASE # for MKS sh
14904if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14905 emulate sh
14906 NULLCMD=:
14907 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14908 # is contrary to our usage. Disable this feature.
14909 alias -g '${1+"$@"}'='"$@"'
14910 setopt NO_GLOB_SUBST
14911else
14912 case `(set -o) 2>/dev/null` in #(
14913 *posix*) :
14914 set -o posix ;; #(
14915 *) :
14916 ;;
14917esac
14918fi
14919
14920
14921as_nl='
14922'
14923export as_nl
14924# Printing a long string crashes Solaris 7 /usr/bin/printf.
14925as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14926as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14927as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14928# Prefer a ksh shell builtin over an external printf program on Solaris,
14929# but without wasting forks for bash or zsh.
14930if test -z "$BASH_VERSION$ZSH_VERSION" \
14931 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14932 as_echo='print -r --'
14933 as_echo_n='print -rn --'
14934elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14935 as_echo='printf %s\n'
14936 as_echo_n='printf %s'
14937else
14938 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14939 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14940 as_echo_n='/usr/ucb/echo -n'
14941 else
14942 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14943 as_echo_n_body='eval
14944 arg=$1;
14945 case $arg in #(
14946 *"$as_nl"*)
14947 expr "X$arg" : "X\\(.*\\)$as_nl";
14948 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14949 esac;
14950 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14951 '
14952 export as_echo_n_body
14953 as_echo_n='sh -c $as_echo_n_body as_echo'
14954 fi
14955 export as_echo_body
14956 as_echo='sh -c $as_echo_body as_echo'
14957fi
14958
14959# The user is always right.
14960if test "${PATH_SEPARATOR+set}" != set; then
14961 PATH_SEPARATOR=:
14962 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14963 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14964 PATH_SEPARATOR=';'
14965 }
14966fi
14967
14968
14969# IFS
14970# We need space, tab and new line, in precisely that order. Quoting is
14971# there to prevent editors from complaining about space-tab.
14972# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14973# splitting by setting IFS to empty value.)
14974IFS=" "" $as_nl"
14975
14976# Find who we are. Look in the path if we contain no directory separator.
14977as_myself=
14978case $0 in #((
14979 *[\\/]* ) as_myself=$0 ;;
14980 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14981for as_dir in $PATH
14982do
14983 IFS=$as_save_IFS
14984 test -z "$as_dir" && as_dir=.
14985 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14986 done
14987IFS=$as_save_IFS
14988
14989 ;;
14990esac
14991# We did not find ourselves, most probably we were run as `sh COMMAND'
14992# in which case we are not to be found in the path.
14993if test "x$as_myself" = x; then
14994 as_myself=$0
14995fi
14996if test ! -f "$as_myself"; then
14997 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14998 exit 1
14999fi
15000
15001# Unset variables that we do not need and which cause bugs (e.g. in
15002# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15003# suppresses any "Segmentation fault" message there. '((' could
15004# trigger a bug in pdksh 5.2.14.
15005for as_var in BASH_ENV ENV MAIL MAILPATH
15006do eval test x\${$as_var+set} = xset \
15007 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15008done
15009PS1='$ '
15010PS2='> '
15011PS4='+ '
15012
15013# NLS nuisances.
15014LC_ALL=C
15015export LC_ALL
15016LANGUAGE=C
15017export LANGUAGE
15018
15019# CDPATH.
15020(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15021
15022
15023# as_fn_error STATUS ERROR [LINENO LOG_FD]
15024# ----------------------------------------
15025# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15026# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15027# script with STATUS, using 1 if that was 0.
15028as_fn_error ()
15029{
15030 as_status=$1; test $as_status -eq 0 && as_status=1
15031 if test "$4"; then
15032 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15033 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15034 fi
15035 $as_echo "$as_me: error: $2" >&2
15036 as_fn_exit $as_status
15037} # as_fn_error
15038
15039
15040# as_fn_set_status STATUS
15041# -----------------------
15042# Set $? to STATUS, without forking.
15043as_fn_set_status ()
15044{
15045 return $1
15046} # as_fn_set_status
15047
15048# as_fn_exit STATUS
15049# -----------------
15050# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15051as_fn_exit ()
15052{
15053 set +e
15054 as_fn_set_status $1
15055 exit $1
15056} # as_fn_exit
15057
15058# as_fn_unset VAR
15059# ---------------
15060# Portably unset VAR.
15061as_fn_unset ()
15062{
15063 { eval $1=; unset $1;}
15064}
15065as_unset=as_fn_unset
15066# as_fn_append VAR VALUE
15067# ----------------------
15068# Append the text in VALUE to the end of the definition contained in VAR. Take
15069# advantage of any shell optimizations that allow amortized linear growth over
15070# repeated appends, instead of the typical quadratic growth present in naive
15071# implementations.
15072if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15073 eval 'as_fn_append ()
15074 {
15075 eval $1+=\$2
15076 }'
15077else
15078 as_fn_append ()
15079 {
15080 eval $1=\$$1\$2
15081 }
15082fi # as_fn_append
15083
15084# as_fn_arith ARG...
15085# ------------------
15086# Perform arithmetic evaluation on the ARGs, and store the result in the
15087# global $as_val. Take advantage of shells that can avoid forks. The arguments
15088# must be portable across $(()) and expr.
15089if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15090 eval 'as_fn_arith ()
15091 {
15092 as_val=$(( $* ))
15093 }'
15094else
15095 as_fn_arith ()
15096 {
15097 as_val=`expr "$@" || test $? -eq 1`
15098 }
15099fi # as_fn_arith
15100
15101
15102if expr a : '\(a\)' >/dev/null 2>&1 &&
15103 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15104 as_expr=expr
15105else
15106 as_expr=false
15107fi
15108
15109if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15110 as_basename=basename
15111else
15112 as_basename=false
15113fi
15114
15115if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15116 as_dirname=dirname
15117else
15118 as_dirname=false
15119fi
15120
15121as_me=`$as_basename -- "$0" ||
15122$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15123 X"$0" : 'X\(//\)$' \| \
15124 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15125$as_echo X/"$0" |
15126 sed '/^.*\/\([^/][^/]*\)\/*$/{
15127 s//\1/
15128 q
15129 }
15130 /^X\/\(\/\/\)$/{
15131 s//\1/
15132 q
15133 }
15134 /^X\/\(\/\).*/{
15135 s//\1/
15136 q
15137 }
15138 s/.*/./; q'`
15139
15140# Avoid depending upon Character Ranges.
15141as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15142as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15143as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15144as_cr_digits='0123456789'
15145as_cr_alnum=$as_cr_Letters$as_cr_digits
15146
15147ECHO_C= ECHO_N= ECHO_T=
15148case `echo -n x` in #(((((
15149-n*)
15150 case `echo 'xy\c'` in
15151 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15152 xy) ECHO_C='\c';;
15153 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15154 ECHO_T=' ';;
15155 esac;;
15156*)
15157 ECHO_N='-n';;
15158esac
15159
15160rm -f conf$$ conf$$.exe conf$$.file
15161if test -d conf$$.dir; then
15162 rm -f conf$$.dir/conf$$.file
15163else
15164 rm -f conf$$.dir
15165 mkdir conf$$.dir 2>/dev/null
15166fi
15167if (echo >conf$$.file) 2>/dev/null; then
15168 if ln -s conf$$.file conf$$ 2>/dev/null; then
15169 as_ln_s='ln -s'
15170 # ... but there are two gotchas:
15171 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15172 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15173 # In both cases, we have to default to `cp -pR'.
15174 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15175 as_ln_s='cp -pR'
15176 elif ln conf$$.file conf$$ 2>/dev/null; then
15177 as_ln_s=ln
15178 else
15179 as_ln_s='cp -pR'
15180 fi
15181else
15182 as_ln_s='cp -pR'
15183fi
15184rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15185rmdir conf$$.dir 2>/dev/null
15186
15187
15188# as_fn_mkdir_p
15189# -------------
15190# Create "$as_dir" as a directory, including parents if necessary.
15191as_fn_mkdir_p ()
15192{
15193
15194 case $as_dir in #(
15195 -*) as_dir=./$as_dir;;
15196 esac
15197 test -d "$as_dir" || eval $as_mkdir_p || {
15198 as_dirs=
15199 while :; do
15200 case $as_dir in #(
15201 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15202 *) as_qdir=$as_dir;;
15203 esac
15204 as_dirs="'$as_qdir' $as_dirs"
15205 as_dir=`$as_dirname -- "$as_dir" ||
15206$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15207 X"$as_dir" : 'X\(//\)[^/]' \| \
15208 X"$as_dir" : 'X\(//\)$' \| \
15209 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15210$as_echo X"$as_dir" |
15211 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15212 s//\1/
15213 q
15214 }
15215 /^X\(\/\/\)[^/].*/{
15216 s//\1/
15217 q
15218 }
15219 /^X\(\/\/\)$/{
15220 s//\1/
15221 q
15222 }
15223 /^X\(\/\).*/{
15224 s//\1/
15225 q
15226 }
15227 s/.*/./; q'`
15228 test -d "$as_dir" && break
15229 done
15230 test -z "$as_dirs" || eval "mkdir $as_dirs"
15231 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15232
15233
15234} # as_fn_mkdir_p
15235if mkdir -p . 2>/dev/null; then
15236 as_mkdir_p='mkdir -p "$as_dir"'
15237else
15238 test -d ./-p && rmdir ./-p
15239 as_mkdir_p=false
15240fi
15241
15242
15243# as_fn_executable_p FILE
15244# -----------------------
15245# Test if FILE is an executable regular file.
15246as_fn_executable_p ()
15247{
15248 test -f "$1" && test -x "$1"
15249} # as_fn_executable_p
15250as_test_x='test -x'
15251as_executable_p=as_fn_executable_p
15252
15253# Sed expression to map a string onto a valid CPP name.
15254as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15255
15256# Sed expression to map a string onto a valid variable name.
15257as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15258
15259
15260exec 6>&1
15261## --------------------------------- ##
15262## Main body of "$CONFIG_LT" script. ##
15263## --------------------------------- ##
15264_ASEOF
15265test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
15266
15267cat >>"$CONFIG_LT" <<\_LTEOF
15268lt_cl_silent=false
15269exec 5>>config.log
15270{
15271 echo
15272 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15273## Running $as_me. ##
15274_ASBOX
15275} >&5
15276
15277lt_cl_help="\
15278\`$as_me' creates a local libtool stub from the current configuration,
15279for use in further configure time tests before the real libtool is
15280generated.
15281
15282Usage: $0 [OPTIONS]
15283
15284 -h, --help print this help, then exit
15285 -V, --version print version number, then exit
15286 -q, --quiet do not print progress messages
15287 -d, --debug don't remove temporary files
15288
15289Report bugs to <bug-libtool@gnu.org>."
15290
15291lt_cl_version="\
15292config.lt
15293configured by $0, generated by GNU Autoconf 2.69.
15294
15295Copyright (C) 2009 Free Software Foundation, Inc.
15296This config.lt script is free software; the Free Software Foundation
15297gives unlimited permision to copy, distribute and modify it."
15298
15299while test $# != 0
15300do
15301 case $1 in
15302 --version | --v* | -V )
15303 echo "$lt_cl_version"; exit 0 ;;
15304 --help | --h* | -h )
15305 echo "$lt_cl_help"; exit 0 ;;
15306 --debug | --d* | -d )
15307 debug=: ;;
15308 --quiet | --q* | --silent | --s* | -q )
15309 lt_cl_silent=: ;;
15310
15311 -*) as_fn_error $? "unrecognized option: $1
15312Try \`$0 --help' for more information." "$LINENO" 5 ;;
15313
15314 *) as_fn_error $? "unrecognized argument: $1
15315Try \`$0 --help' for more information." "$LINENO" 5 ;;
15316 esac
15317 shift
15318done
15319
15320if $lt_cl_silent; then
15321 exec 6>/dev/null
15322fi
15323_LTEOF
15324
15325cat >>"$CONFIG_LT" <<_LTEOF
15326
15327
15328# The HP-UX ksh and POSIX shell print the target directory to stdout
15329# if CDPATH is set.
15330(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15331
15332sed_quote_subst='$sed_quote_subst'
15333double_quote_subst='$double_quote_subst'
15334delay_variable_subst='$delay_variable_subst'
15335macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
15336macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
15337enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
15338enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
15339pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
15340enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
15341SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
15342ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
15343host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
15344host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
15345host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
15346build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
15347build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
15348build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
15349SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
15350Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
15351GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
15352EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
15353FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
15354LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
15355NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
15356LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
15357max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
15358ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
15359exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
15360lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
15361lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
15362lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
15363reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
15364reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
15365OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
15366deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
15367file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
15368AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
15369AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
15370STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
15371RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
15372old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15373old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15374old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
15375lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
15376CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
15377CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
15378compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
15379GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
15380lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
15381lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
15382lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
15383lt_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"`'
15384objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
15385MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
15386lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
15387lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
15388lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
15389lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
15390lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
15391need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
15392DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
15393NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
15394LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
15395OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
15396OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
15397libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
15398shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
15399extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15400archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
15401enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
15402export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
15403whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
15404compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
15405old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
15406old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
15407archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
15408archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15409module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
15410module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
15411with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
15412allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
15413no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
15414hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
15415hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
15416hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
15417hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
15418hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
15419hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
15420hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
15421hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
15422inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
15423link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
15424fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
15425always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
15426export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
15427exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
15428include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
15429prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
15430file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
15431variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
15432need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
15433need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
15434version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
15435runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
15436shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
15437shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
15438libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
15439library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
15440soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
15441install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
15442postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
15443postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
15444finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
15445finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
15446hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
15447sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
15448sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
15449hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
15450enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
15451enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
15452enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
15453old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
15454striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
15455compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
15456predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
15457postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
15458predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
15459postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
15460compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
15461LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
15462reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
15463reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15464old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15465compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
15466GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
15467lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
15468lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
15469lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
15470lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
15471lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
15472archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
15473enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
15474export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
15475whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
15476compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
15477old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15478old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15479archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15480archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15481module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15482module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15483with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
15484allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
15485no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
15486hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
15487hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
15488hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
15489hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
15490hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
15491hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
15492hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
15493hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
15494inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
15495link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
15496fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`'
15497always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
15498export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15499exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
15500include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
15501prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
15502file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
15503hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
15504compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
15505predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
15506postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
15507predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
15508postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
15509compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
15510
15511LTCC='$LTCC'
15512LTCFLAGS='$LTCFLAGS'
15513compiler='$compiler_DEFAULT'
15514
15515# A function that is used when there is no print builtin or printf.
15516func_fallback_echo ()
15517{
15518 eval 'cat <<_LTECHO_EOF
15519\$1
15520_LTECHO_EOF'
15521}
15522
15523# Quote evaled strings.
15524for var in SHELL \
15525ECHO \
15526SED \
15527GREP \
15528EGREP \
15529FGREP \
15530LD \
15531NM \
15532LN_S \
15533lt_SP2NL \
15534lt_NL2SP \
15535reload_flag \
15536OBJDUMP \
15537deplibs_check_method \
15538file_magic_cmd \
15539AR \
15540AR_FLAGS \
15541STRIP \
15542RANLIB \
15543CC \
15544CFLAGS \
15545compiler \
15546lt_cv_sys_global_symbol_pipe \
15547lt_cv_sys_global_symbol_to_cdecl \
15548lt_cv_sys_global_symbol_to_c_name_address \
15549lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
15550lt_prog_compiler_no_builtin_flag \
15551lt_prog_compiler_wl \
15552lt_prog_compiler_pic \
15553lt_prog_compiler_static \
15554lt_cv_prog_compiler_c_o \
15555need_locks \
15556DSYMUTIL \
15557NMEDIT \
15558LIPO \
15559OTOOL \
15560OTOOL64 \
15561shrext_cmds \
15562export_dynamic_flag_spec \
15563whole_archive_flag_spec \
15564compiler_needs_object \
15565with_gnu_ld \
15566allow_undefined_flag \
15567no_undefined_flag \
15568hardcode_libdir_flag_spec \
15569hardcode_libdir_flag_spec_ld \
15570hardcode_libdir_separator \
15571fix_srcfile_path \
15572exclude_expsyms \
15573include_expsyms \
15574file_list_spec \
15575variables_saved_for_relink \
15576libname_spec \
15577library_names_spec \
15578soname_spec \
15579install_override_mode \
15580finish_eval \
15581old_striplib \
15582striplib \
15583compiler_lib_search_dirs \
15584predep_objects \
15585postdep_objects \
15586predeps \
15587postdeps \
15588compiler_lib_search_path \
15589LD_CXX \
15590reload_flag_CXX \
15591compiler_CXX \
15592lt_prog_compiler_no_builtin_flag_CXX \
15593lt_prog_compiler_wl_CXX \
15594lt_prog_compiler_pic_CXX \
15595lt_prog_compiler_static_CXX \
15596lt_cv_prog_compiler_c_o_CXX \
15597export_dynamic_flag_spec_CXX \
15598whole_archive_flag_spec_CXX \
15599compiler_needs_object_CXX \
15600with_gnu_ld_CXX \
15601allow_undefined_flag_CXX \
15602no_undefined_flag_CXX \
15603hardcode_libdir_flag_spec_CXX \
15604hardcode_libdir_flag_spec_ld_CXX \
15605hardcode_libdir_separator_CXX \
15606fix_srcfile_path_CXX \
15607exclude_expsyms_CXX \
15608include_expsyms_CXX \
15609file_list_spec_CXX \
15610compiler_lib_search_dirs_CXX \
15611predep_objects_CXX \
15612postdep_objects_CXX \
15613predeps_CXX \
15614postdeps_CXX \
15615compiler_lib_search_path_CXX; do
15616 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15617 *[\\\\\\\`\\"\\\$]*)
15618 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
15619 ;;
15620 *)
15621 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15622 ;;
15623 esac
15624done
15625
15626# Double-quote double-evaled strings.
15627for var in reload_cmds \
15628old_postinstall_cmds \
15629old_postuninstall_cmds \
15630old_archive_cmds \
15631extract_expsyms_cmds \
15632old_archive_from_new_cmds \
15633old_archive_from_expsyms_cmds \
15634archive_cmds \
15635archive_expsym_cmds \
15636module_cmds \
15637module_expsym_cmds \
15638export_symbols_cmds \
15639prelink_cmds \
15640postinstall_cmds \
15641postuninstall_cmds \
15642finish_cmds \
15643sys_lib_search_path_spec \
15644sys_lib_dlsearch_path_spec \
15645reload_cmds_CXX \
15646old_archive_cmds_CXX \
15647old_archive_from_new_cmds_CXX \
15648old_archive_from_expsyms_cmds_CXX \
15649archive_cmds_CXX \
15650archive_expsym_cmds_CXX \
15651module_cmds_CXX \
15652module_expsym_cmds_CXX \
15653export_symbols_cmds_CXX \
15654prelink_cmds_CXX; do
15655 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15656 *[\\\\\\\`\\"\\\$]*)
15657 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
15658 ;;
15659 *)
15660 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15661 ;;
15662 esac
15663done
15664
15665ac_aux_dir='$ac_aux_dir'
15666xsi_shell='$xsi_shell'
15667lt_shell_append='$lt_shell_append'
15668
15669# See if we are running on zsh, and set the options which allow our
15670# commands through without removal of \ escapes INIT.
15671if test -n "\${ZSH_VERSION+set}" ; then
15672 setopt NO_GLOB_SUBST
15673fi
15674
15675
15676 PACKAGE='$PACKAGE'
15677 VERSION='$VERSION'
15678 TIMESTAMP='$TIMESTAMP'
15679 RM='$RM'
15680 ofile='$ofile'
15681
15682
15683
15684
15685
15686_LTEOF
15687
15688cat >>"$CONFIG_LT" <<\_LTEOF
15689{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
15690$as_echo "$as_me: creating $ofile" >&6;}
15691
15692
15693 # See if we are running on zsh, and set the options which allow our
15694 # commands through without removal of \ escapes.
15695 if test -n "${ZSH_VERSION+set}" ; then
15696 setopt NO_GLOB_SUBST
15697 fi
15698
15699 cfgfile="${ofile}T"
15700 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
15701 $RM "$cfgfile"
15702
15703 cat <<_LT_EOF >> "$cfgfile"
15704#! $SHELL
15705
15706# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
15707# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
15708# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15709# NOTE: Changes made to this file will be lost: look at ltmain.sh.
15710#
15711# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15712# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
15713# Written by Gordon Matzigkeit, 1996
15714#
15715# This file is part of GNU Libtool.
15716#
15717# GNU Libtool is free software; you can redistribute it and/or
15718# modify it under the terms of the GNU General Public License as
15719# published by the Free Software Foundation; either version 2 of
15720# the License, or (at your option) any later version.
15721#
15722# As a special exception to the GNU General Public License,
15723# if you distribute this file as part of a program or library that
15724# is built using GNU Libtool, you may include this file under the
15725# same distribution terms that you use for the rest of that program.
15726#
15727# GNU Libtool is distributed in the hope that it will be useful,
15728# but WITHOUT ANY WARRANTY; without even the implied warranty of
15729# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15730# GNU General Public License for more details.
15731#
15732# You should have received a copy of the GNU General Public License
15733# along with GNU Libtool; see the file COPYING. If not, a copy
15734# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
15735# obtained by writing to the Free Software Foundation, Inc.,
15736# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15737
15738
15739# The names of the tagged configurations supported by this script.
15740available_tags="CXX "
15741
15742# ### BEGIN LIBTOOL CONFIG
15743
15744# Which release of libtool.m4 was used?
15745macro_version=$macro_version
15746macro_revision=$macro_revision
15747
15748# Whether or not to build shared libraries.
15749build_libtool_libs=$enable_shared
15750
15751# Whether or not to build static libraries.
15752build_old_libs=$enable_static
15753
15754# What type of objects to build.
15755pic_mode=$pic_mode
15756
15757# Whether or not to optimize for fast installation.
15758fast_install=$enable_fast_install
15759
15760# Shell to use when invoking shell scripts.
15761SHELL=$lt_SHELL
15762
15763# An echo program that protects backslashes.
15764ECHO=$lt_ECHO
15765
15766# The host system.
15767host_alias=$host_alias
15768host=$host
15769host_os=$host_os
15770
15771# The build system.
15772build_alias=$build_alias
15773build=$build
15774build_os=$build_os
15775
15776# A sed program that does not truncate output.
15777SED=$lt_SED
15778
15779# Sed that helps us avoid accidentally triggering echo(1) options like -n.
15780Xsed="\$SED -e 1s/^X//"
15781
15782# A grep program that handles long lines.
15783GREP=$lt_GREP
15784
15785# An ERE matcher.
15786EGREP=$lt_EGREP
15787
15788# A literal string matcher.
15789FGREP=$lt_FGREP
15790
15791# A BSD- or MS-compatible name lister.
15792NM=$lt_NM
15793
15794# Whether we need soft or hard links.
15795LN_S=$lt_LN_S
15796
15797# What is the maximum length of a command?
15798max_cmd_len=$max_cmd_len
15799
15800# Object file suffix (normally "o").
15801objext=$ac_objext
15802
15803# Executable file suffix (normally "").
15804exeext=$exeext
15805
15806# whether the shell understands "unset".
15807lt_unset=$lt_unset
15808
15809# turn spaces into newlines.
15810SP2NL=$lt_lt_SP2NL
15811
15812# turn newlines into spaces.
15813NL2SP=$lt_lt_NL2SP
15814
15815# An object symbol dumper.
15816OBJDUMP=$lt_OBJDUMP
15817
15818# Method to check whether dependent libraries are shared objects.
15819deplibs_check_method=$lt_deplibs_check_method
15820
15821# Command to use when deplibs_check_method == "file_magic".
15822file_magic_cmd=$lt_file_magic_cmd
15823
15824# The archiver.
15825AR=$lt_AR
15826AR_FLAGS=$lt_AR_FLAGS
15827
15828# A symbol stripping program.
15829STRIP=$lt_STRIP
15830
15831# Commands used to install an old-style archive.
15832RANLIB=$lt_RANLIB
15833old_postinstall_cmds=$lt_old_postinstall_cmds
15834old_postuninstall_cmds=$lt_old_postuninstall_cmds
15835
15836# Whether to use a lock for old archive extraction.
15837lock_old_archive_extraction=$lock_old_archive_extraction
15838
15839# A C compiler.
15840LTCC=$lt_CC
15841
15842# LTCC compiler flags.
15843LTCFLAGS=$lt_CFLAGS
15844
15845# Take the output of nm and produce a listing of raw symbols and C names.
15846global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
15847
15848# Transform the output of nm in a proper C declaration.
15849global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
15850
15851# Transform the output of nm in a C name address pair.
15852global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
15853
15854# Transform the output of nm in a C name address pair when lib prefix is needed.
15855global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
15856
15857# The name of the directory that contains temporary libtool files.
15858objdir=$objdir
15859
15860# Used to examine libraries when file_magic_cmd begins with "file".
15861MAGIC_CMD=$MAGIC_CMD
15862
15863# Must we lock files when doing compilation?
15864need_locks=$lt_need_locks
15865
15866# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
15867DSYMUTIL=$lt_DSYMUTIL
15868
15869# Tool to change global to local symbols on Mac OS X.
15870NMEDIT=$lt_NMEDIT
15871
15872# Tool to manipulate fat objects and archives on Mac OS X.
15873LIPO=$lt_LIPO
15874
15875# ldd/readelf like tool for Mach-O binaries on Mac OS X.
15876OTOOL=$lt_OTOOL
15877
15878# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
15879OTOOL64=$lt_OTOOL64
15880
15881# Old archive suffix (normally "a").
15882libext=$libext
15883
15884# Shared library suffix (normally ".so").
15885shrext_cmds=$lt_shrext_cmds
15886
15887# The commands to extract the exported symbol list from a shared archive.
15888extract_expsyms_cmds=$lt_extract_expsyms_cmds
15889
15890# Variables whose values should be saved in libtool wrapper scripts and
15891# restored at link time.
15892variables_saved_for_relink=$lt_variables_saved_for_relink
15893
15894# Do we need the "lib" prefix for modules?
15895need_lib_prefix=$need_lib_prefix
15896
15897# Do we need a version for libraries?
15898need_version=$need_version
15899
15900# Library versioning type.
15901version_type=$version_type
15902
15903# Shared library runtime path variable.
15904runpath_var=$runpath_var
15905
15906# Shared library path variable.
15907shlibpath_var=$shlibpath_var
15908
15909# Is shlibpath searched before the hard-coded library search path?
15910shlibpath_overrides_runpath=$shlibpath_overrides_runpath
15911
15912# Format of library name prefix.
15913libname_spec=$lt_libname_spec
15914
15915# List of archive names. First name is the real one, the rest are links.
15916# The last name is the one that the linker finds with -lNAME
15917library_names_spec=$lt_library_names_spec
15918
15919# The coded name of the library, if different from the real name.
15920soname_spec=$lt_soname_spec
15921
15922# Permission mode override for installation of shared libraries.
15923install_override_mode=$lt_install_override_mode
15924
15925# Command to use after installation of a shared archive.
15926postinstall_cmds=$lt_postinstall_cmds
15927
15928# Command to use after uninstallation of a shared archive.
15929postuninstall_cmds=$lt_postuninstall_cmds
15930
15931# Commands used to finish a libtool library installation in a directory.
15932finish_cmds=$lt_finish_cmds
15933
15934# As "finish_cmds", except a single script fragment to be evaled but
15935# not shown.
15936finish_eval=$lt_finish_eval
15937
15938# Whether we should hardcode library paths into libraries.
15939hardcode_into_libs=$hardcode_into_libs
15940
15941# Compile-time system search path for libraries.
15942sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
15943
15944# Run-time system search path for libraries.
15945sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
15946
15947# Whether dlopen is supported.
15948dlopen_support=$enable_dlopen
15949
15950# Whether dlopen of programs is supported.
15951dlopen_self=$enable_dlopen_self
15952
15953# Whether dlopen of statically linked programs is supported.
15954dlopen_self_static=$enable_dlopen_self_static
15955
15956# Commands to strip libraries.
15957old_striplib=$lt_old_striplib
15958striplib=$lt_striplib
15959
15960
15961# The linker used to build libraries.
15962LD=$lt_LD
15963
15964# How to create reloadable object files.
15965reload_flag=$lt_reload_flag
15966reload_cmds=$lt_reload_cmds
15967
15968# Commands used to build an old-style archive.
15969old_archive_cmds=$lt_old_archive_cmds
15970
15971# A language specific compiler.
15972CC=$lt_compiler
15973
15974# Is the compiler the GNU compiler?
15975with_gcc=$GCC
15976
15977# Compiler flag to turn off builtin functions.
15978no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
15979
15980# How to pass a linker flag through the compiler.
15981wl=$lt_lt_prog_compiler_wl
15982
15983# Additional compiler flags for building library objects.
15984pic_flag=$lt_lt_prog_compiler_pic
15985
15986# Compiler flag to prevent dynamic linking.
15987link_static_flag=$lt_lt_prog_compiler_static
15988
15989# Does compiler simultaneously support -c and -o options?
15990compiler_c_o=$lt_lt_cv_prog_compiler_c_o
15991
15992# Whether or not to add -lc for building shared libraries.
15993build_libtool_need_lc=$archive_cmds_need_lc
15994
15995# Whether or not to disallow shared libs when runtime libs are static.
15996allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
15997
15998# Compiler flag to allow reflexive dlopens.
15999export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
16000
16001# Compiler flag to generate shared objects directly from archives.
16002whole_archive_flag_spec=$lt_whole_archive_flag_spec
16003
16004# Whether the compiler copes with passing no objects directly.
16005compiler_needs_object=$lt_compiler_needs_object
16006
16007# Create an old-style archive from a shared archive.
16008old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
16009
16010# Create a temporary old-style archive to link instead of a shared archive.
16011old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
16012
16013# Commands used to build a shared archive.
16014archive_cmds=$lt_archive_cmds
16015archive_expsym_cmds=$lt_archive_expsym_cmds
16016
16017# Commands used to build a loadable module if different from building
16018# a shared archive.
16019module_cmds=$lt_module_cmds
16020module_expsym_cmds=$lt_module_expsym_cmds
16021
16022# Whether we are building with GNU ld or not.
16023with_gnu_ld=$lt_with_gnu_ld
16024
16025# Flag that allows shared libraries with undefined symbols to be built.
16026allow_undefined_flag=$lt_allow_undefined_flag
16027
16028# Flag that enforces no undefined symbols.
16029no_undefined_flag=$lt_no_undefined_flag
16030
16031# Flag to hardcode \$libdir into a binary during linking.
16032# This must work even if \$libdir does not exist
16033hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
16034
16035# If ld is used when linking, flag to hardcode \$libdir into a binary
16036# during linking. This must work even if \$libdir does not exist.
16037hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
16038
16039# Whether we need a single "-rpath" flag with a separated argument.
16040hardcode_libdir_separator=$lt_hardcode_libdir_separator
16041
16042# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16043# DIR into the resulting binary.
16044hardcode_direct=$hardcode_direct
16045
16046# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16047# DIR into the resulting binary and the resulting library dependency is
16048# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
16049# library is relocated.
16050hardcode_direct_absolute=$hardcode_direct_absolute
16051
16052# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
16053# into the resulting binary.
16054hardcode_minus_L=$hardcode_minus_L
16055
16056# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
16057# into the resulting binary.
16058hardcode_shlibpath_var=$hardcode_shlibpath_var
16059
16060# Set to "yes" if building a shared library automatically hardcodes DIR
16061# into the library and all subsequent libraries and executables linked
16062# against it.
16063hardcode_automatic=$hardcode_automatic
16064
16065# Set to yes if linker adds runtime paths of dependent libraries
16066# to runtime path list.
16067inherit_rpath=$inherit_rpath
16068
16069# Whether libtool must link a program against all its dependency libraries.
16070link_all_deplibs=$link_all_deplibs
16071
16072# Fix the shell variable \$srcfile for the compiler.
16073fix_srcfile_path=$lt_fix_srcfile_path
16074
16075# Set to "yes" if exported symbols are required.
16076always_export_symbols=$always_export_symbols
16077
16078# The commands to list exported symbols.
16079export_symbols_cmds=$lt_export_symbols_cmds
16080
16081# Symbols that should not be listed in the preloaded symbols.
16082exclude_expsyms=$lt_exclude_expsyms
16083
16084# Symbols that must always be exported.
16085include_expsyms=$lt_include_expsyms
16086
16087# Commands necessary for linking programs (against libraries) with templates.
16088prelink_cmds=$lt_prelink_cmds
16089
16090# Specify filename containing input files.
16091file_list_spec=$lt_file_list_spec
16092
16093# How to hardcode a shared library path into an executable.
16094hardcode_action=$hardcode_action
16095
16096# The directories searched by this compiler when creating a shared library.
16097compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
16098
16099# Dependencies to place before and after the objects being linked to
16100# create a shared library.
16101predep_objects=$lt_predep_objects
16102postdep_objects=$lt_postdep_objects
16103predeps=$lt_predeps
16104postdeps=$lt_postdeps
16105
16106# The library search path used internally by the compiler when linking
16107# a shared library.
16108compiler_lib_search_path=$lt_compiler_lib_search_path
16109
16110# ### END LIBTOOL CONFIG
16111
16112_LT_EOF
16113
16114 case $host_os in
16115 aix3*)
16116 cat <<\_LT_EOF >> "$cfgfile"
16117# AIX sometimes has problems with the GCC collect2 program. For some
16118# reason, if we set the COLLECT_NAMES environment variable, the problems
16119# vanish in a puff of smoke.
16120if test "X${COLLECT_NAMES+set}" != Xset; then
16121 COLLECT_NAMES=
16122 export COLLECT_NAMES
16123fi
16124_LT_EOF
16125 ;;
16126 esac
16127
16128
16129ltmain="$ac_aux_dir/ltmain.sh"
16130
16131
16132 # We use sed instead of cat because bash on DJGPP gets confused if
16133 # if finds mixed CR/LF and LF-only lines. Since sed operates in
16134 # text mode, it properly converts lines to CR/LF. This bash problem
16135 # is reportedly fixed, but why not run on old versions too?
16136 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
16137 || (rm -f "$cfgfile"; exit 1)
16138
16139 case $xsi_shell in
16140 yes)
16141 cat << \_LT_EOF >> "$cfgfile"
16142
16143# func_dirname file append nondir_replacement
16144# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16145# otherwise set result to NONDIR_REPLACEMENT.
16146func_dirname ()
16147{
16148 case ${1} in
16149 */*) func_dirname_result="${1%/*}${2}" ;;
16150 * ) func_dirname_result="${3}" ;;
16151 esac
16152}
16153
16154# func_basename file
16155func_basename ()
16156{
16157 func_basename_result="${1##*/}"
16158}
16159
16160# func_dirname_and_basename file append nondir_replacement
16161# perform func_basename and func_dirname in a single function
16162# call:
16163# dirname: Compute the dirname of FILE. If nonempty,
16164# add APPEND to the result, otherwise set result
16165# to NONDIR_REPLACEMENT.
16166# value returned in "$func_dirname_result"
16167# basename: Compute filename of FILE.
16168# value retuned in "$func_basename_result"
16169# Implementation must be kept synchronized with func_dirname
16170# and func_basename. For efficiency, we do not delegate to
16171# those functions but instead duplicate the functionality here.
16172func_dirname_and_basename ()
16173{
16174 case ${1} in
16175 */*) func_dirname_result="${1%/*}${2}" ;;
16176 * ) func_dirname_result="${3}" ;;
16177 esac
16178 func_basename_result="${1##*/}"
16179}
16180
16181# func_stripname prefix suffix name
16182# strip PREFIX and SUFFIX off of NAME.
16183# PREFIX and SUFFIX must not contain globbing or regex special
16184# characters, hashes, percent signs, but SUFFIX may contain a leading
16185# dot (in which case that matches only a dot).
16186func_stripname ()
16187{
16188 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
16189 # positional parameters, so assign one to ordinary parameter first.
16190 func_stripname_result=${3}
16191 func_stripname_result=${func_stripname_result#"${1}"}
16192 func_stripname_result=${func_stripname_result%"${2}"}
16193}
16194
16195# func_opt_split
16196func_opt_split ()
16197{
16198 func_opt_split_opt=${1%%=*}
16199 func_opt_split_arg=${1#*=}
16200}
16201
16202# func_lo2o object
16203func_lo2o ()
16204{
16205 case ${1} in
16206 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
16207 *) func_lo2o_result=${1} ;;
16208 esac
16209}
16210
16211# func_xform libobj-or-source
16212func_xform ()
16213{
16214 func_xform_result=${1%.*}.lo
16215}
16216
16217# func_arith arithmetic-term...
16218func_arith ()
16219{
16220 func_arith_result=$(( $* ))
16221}
16222
16223# func_len string
16224# STRING may not start with a hyphen.
16225func_len ()
16226{
16227 func_len_result=${#1}
16228}
16229
16230_LT_EOF
16231 ;;
16232 *) # Bourne compatible functions.
16233 cat << \_LT_EOF >> "$cfgfile"
16234
16235# func_dirname file append nondir_replacement
16236# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16237# otherwise set result to NONDIR_REPLACEMENT.
16238func_dirname ()
16239{
16240 # Extract subdirectory from the argument.
16241 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
16242 if test "X$func_dirname_result" = "X${1}"; then
16243 func_dirname_result="${3}"
16244 else
16245 func_dirname_result="$func_dirname_result${2}"
16246 fi
16247}
16248
16249# func_basename file
16250func_basename ()
16251{
16252 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
16253}
16254
16255
16256# func_stripname prefix suffix name
16257# strip PREFIX and SUFFIX off of NAME.
16258# PREFIX and SUFFIX must not contain globbing or regex special
16259# characters, hashes, percent signs, but SUFFIX may contain a leading
16260# dot (in which case that matches only a dot).
16261# func_strip_suffix prefix name
16262func_stripname ()
16263{
16264 case ${2} in
16265 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
16266 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
16267 esac
16268}
16269
16270# sed scripts:
16271my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
16272my_sed_long_arg='1s/^-[^=]*=//'
16273
16274# func_opt_split
16275func_opt_split ()
16276{
16277 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
16278 func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
16279}
16280
16281# func_lo2o object
16282func_lo2o ()
16283{
16284 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
16285}
16286
16287# func_xform libobj-or-source
16288func_xform ()
16289{
16290 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
16291}
16292
16293# func_arith arithmetic-term...
16294func_arith ()
16295{
16296 func_arith_result=`expr "$@"`
16297}
16298
16299# func_len string
16300# STRING may not start with a hyphen.
16301func_len ()
16302{
16303 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
16304}
16305
16306_LT_EOF
16307esac
16308
16309case $lt_shell_append in
16310 yes)
16311 cat << \_LT_EOF >> "$cfgfile"
16312
16313# func_append var value
16314# Append VALUE to the end of shell variable VAR.
16315func_append ()
16316{
16317 eval "$1+=\$2"
16318}
16319_LT_EOF
16320 ;;
16321 *)
16322 cat << \_LT_EOF >> "$cfgfile"
16323
16324# func_append var value
16325# Append VALUE to the end of shell variable VAR.
16326func_append ()
16327{
16328 eval "$1=\$$1\$2"
16329}
16330
16331_LT_EOF
16332 ;;
16333 esac
16334
16335
16336 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
16337 || (rm -f "$cfgfile"; exit 1)
16338
16339 mv -f "$cfgfile" "$ofile" ||
16340 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
16341 chmod +x "$ofile"
16342
16343
16344 cat <<_LT_EOF >> "$ofile"
16345
16346# ### BEGIN LIBTOOL TAG CONFIG: CXX
16347
16348# The linker used to build libraries.
16349LD=$lt_LD_CXX
16350
16351# How to create reloadable object files.
16352reload_flag=$lt_reload_flag_CXX
16353reload_cmds=$lt_reload_cmds_CXX
16354
16355# Commands used to build an old-style archive.
16356old_archive_cmds=$lt_old_archive_cmds_CXX
16357
16358# A language specific compiler.
16359CC=$lt_compiler_CXX
16360
16361# Is the compiler the GNU compiler?
16362with_gcc=$GCC_CXX
16363
16364# Compiler flag to turn off builtin functions.
16365no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
16366
16367# How to pass a linker flag through the compiler.
16368wl=$lt_lt_prog_compiler_wl_CXX
16369
16370# Additional compiler flags for building library objects.
16371pic_flag=$lt_lt_prog_compiler_pic_CXX
16372
16373# Compiler flag to prevent dynamic linking.
16374link_static_flag=$lt_lt_prog_compiler_static_CXX
16375
16376# Does compiler simultaneously support -c and -o options?
16377compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
16378
16379# Whether or not to add -lc for building shared libraries.
16380build_libtool_need_lc=$archive_cmds_need_lc_CXX
16381
16382# Whether or not to disallow shared libs when runtime libs are static.
16383allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
16384
16385# Compiler flag to allow reflexive dlopens.
16386export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
16387
16388# Compiler flag to generate shared objects directly from archives.
16389whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
16390
16391# Whether the compiler copes with passing no objects directly.
16392compiler_needs_object=$lt_compiler_needs_object_CXX
16393
16394# Create an old-style archive from a shared archive.
16395old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
16396
16397# Create a temporary old-style archive to link instead of a shared archive.
16398old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
16399
16400# Commands used to build a shared archive.
16401archive_cmds=$lt_archive_cmds_CXX
16402archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
16403
16404# Commands used to build a loadable module if different from building
16405# a shared archive.
16406module_cmds=$lt_module_cmds_CXX
16407module_expsym_cmds=$lt_module_expsym_cmds_CXX
16408
16409# Whether we are building with GNU ld or not.
16410with_gnu_ld=$lt_with_gnu_ld_CXX
16411
16412# Flag that allows shared libraries with undefined symbols to be built.
16413allow_undefined_flag=$lt_allow_undefined_flag_CXX
16414
16415# Flag that enforces no undefined symbols.
16416no_undefined_flag=$lt_no_undefined_flag_CXX
16417
16418# Flag to hardcode \$libdir into a binary during linking.
16419# This must work even if \$libdir does not exist
16420hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
16421
16422# If ld is used when linking, flag to hardcode \$libdir into a binary
16423# during linking. This must work even if \$libdir does not exist.
16424hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
16425
16426# Whether we need a single "-rpath" flag with a separated argument.
16427hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
16428
16429# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16430# DIR into the resulting binary.
16431hardcode_direct=$hardcode_direct_CXX
16432
16433# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16434# DIR into the resulting binary and the resulting library dependency is
16435# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
16436# library is relocated.
16437hardcode_direct_absolute=$hardcode_direct_absolute_CXX
16438
16439# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
16440# into the resulting binary.
16441hardcode_minus_L=$hardcode_minus_L_CXX
16442
16443# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
16444# into the resulting binary.
16445hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
16446
16447# Set to "yes" if building a shared library automatically hardcodes DIR
16448# into the library and all subsequent libraries and executables linked
16449# against it.
16450hardcode_automatic=$hardcode_automatic_CXX
16451
16452# Set to yes if linker adds runtime paths of dependent libraries
16453# to runtime path list.
16454inherit_rpath=$inherit_rpath_CXX
16455
16456# Whether libtool must link a program against all its dependency libraries.
16457link_all_deplibs=$link_all_deplibs_CXX
16458
16459# Fix the shell variable \$srcfile for the compiler.
16460fix_srcfile_path=$lt_fix_srcfile_path_CXX
16461
16462# Set to "yes" if exported symbols are required.
16463always_export_symbols=$always_export_symbols_CXX
16464
16465# The commands to list exported symbols.
16466export_symbols_cmds=$lt_export_symbols_cmds_CXX
16467
16468# Symbols that should not be listed in the preloaded symbols.
16469exclude_expsyms=$lt_exclude_expsyms_CXX
16470
16471# Symbols that must always be exported.
16472include_expsyms=$lt_include_expsyms_CXX
16473
16474# Commands necessary for linking programs (against libraries) with templates.
16475prelink_cmds=$lt_prelink_cmds_CXX
16476
16477# Specify filename containing input files.
16478file_list_spec=$lt_file_list_spec_CXX
16479
16480# How to hardcode a shared library path into an executable.
16481hardcode_action=$hardcode_action_CXX
16482
16483# The directories searched by this compiler when creating a shared library.
16484compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
16485
16486# Dependencies to place before and after the objects being linked to
16487# create a shared library.
16488predep_objects=$lt_predep_objects_CXX
16489postdep_objects=$lt_postdep_objects_CXX
16490predeps=$lt_predeps_CXX
16491postdeps=$lt_postdeps_CXX
16492
16493# The library search path used internally by the compiler when linking
16494# a shared library.
16495compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
16496
16497# ### END LIBTOOL TAG CONFIG: CXX
16498_LT_EOF
16499
16500
16501as_fn_exit 0
16502_LTEOF
16503chmod +x "$CONFIG_LT"
16504
16505# configure is writing to config.log, but config.lt does its own redirection,
16506# appending to config.log, which fails on DOS, as config.log is still kept
16507# open by configure. Here we exec the FD to /dev/null, effectively closing
16508# config.log, so it can be properly (re)opened and appended to by config.lt.
16509lt_cl_success=:
16510test "$silent" = yes &&
16511 lt_config_lt_args="$lt_config_lt_args --quiet"
16512exec 5>/dev/null
16513$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
16514exec 5>>config.log
16515$lt_cl_success || as_fn_exit 1
16516
b686ecb5 16517
f74dc267 16518# We require a C++17 compiler. Check if one is available, and if
b686ecb5 16519# necessary, set CXX_DIALECT to some -std=xxx switch.
f74dc267 16520 ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
b686ecb5
JM
16521 ac_ext=cpp
16522ac_cpp='$CXXCPP $CPPFLAGS'
16523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16526 CXX_DIALECT=""
16527 ac_success=no
eb4de404 16528
f74dc267
LS
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
16530$as_echo_n "checking whether $CXX supports C++17 features by default... " >&6; }
16531if ${ax_cv_cxx_compile_cxx17+:} false; then :
81ecdfbb 16532 $as_echo_n "(cached) " >&6
a9322a30 16533else
81ecdfbb
RW
16534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16535/* end confdefs.h. */
81ecdfbb 16536
81ecdfbb 16537
b686ecb5
JM
16538// If the compiler admits that it is not ready for C++11, why torture it?
16539// Hopefully, this will speed up the test.
81ecdfbb 16540
b686ecb5 16541#ifndef __cplusplus
a9322a30 16542
b686ecb5 16543#error "This is not a C++ compiler"
a9322a30 16544
eb4de404
LS
16545// MSVC always sets __cplusplus to 199711L in older versions; newer versions
16546// only set it correctly if /Zc:__cplusplus is specified as well as a
16547// /std:c++NN switch:
16548// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
16549#elif __cplusplus < 201103L && !defined _MSC_VER
a9322a30 16550
b686ecb5 16551#error "This is not a C++11 compiler"
a9322a30 16552
b686ecb5 16553#else
a9322a30 16554
b686ecb5
JM
16555namespace cxx11
16556{
a9322a30 16557
b686ecb5
JM
16558 namespace test_static_assert
16559 {
a9322a30 16560
b686ecb5
JM
16561 template <typename T>
16562 struct check
16563 {
16564 static_assert(sizeof(int) <= sizeof(T), "not big enough");
16565 };
a9322a30 16566
a9322a30 16567 }
a9322a30 16568
b686ecb5
JM
16569 namespace test_final_override
16570 {
a9322a30 16571
b686ecb5
JM
16572 struct Base
16573 {
eb4de404 16574 virtual ~Base() {}
b686ecb5
JM
16575 virtual void f() {}
16576 };
a9322a30 16577
b686ecb5
JM
16578 struct Derived : public Base
16579 {
eb4de404 16580 virtual ~Derived() override {}
b686ecb5
JM
16581 virtual void f() override {}
16582 };
a9322a30 16583
b686ecb5 16584 }
a9322a30 16585
b686ecb5
JM
16586 namespace test_double_right_angle_brackets
16587 {
a9322a30 16588
b686ecb5
JM
16589 template < typename T >
16590 struct check {};
a9322a30 16591
b686ecb5
JM
16592 typedef check<void> single_type;
16593 typedef check<check<void>> double_type;
16594 typedef check<check<check<void>>> triple_type;
16595 typedef check<check<check<check<void>>>> quadruple_type;
a9322a30 16596
b686ecb5 16597 }
a9322a30 16598
b686ecb5
JM
16599 namespace test_decltype
16600 {
6c7a06a3 16601
b686ecb5
JM
16602 int
16603 f()
16604 {
16605 int a = 1;
16606 decltype(a) b = 2;
16607 return a + b;
16608 }
6c7a06a3 16609
b686ecb5 16610 }
6c7a06a3 16611
b686ecb5
JM
16612 namespace test_type_deduction
16613 {
0b03c6f0 16614
b686ecb5
JM
16615 template < typename T1, typename T2 >
16616 struct is_same
16617 {
16618 static const bool value = false;
16619 };
0b03c6f0 16620
b686ecb5
JM
16621 template < typename T >
16622 struct is_same<T, T>
16623 {
16624 static const bool value = true;
16625 };
0b03c6f0 16626
b686ecb5
JM
16627 template < typename T1, typename T2 >
16628 auto
16629 add(T1 a1, T2 a2) -> decltype(a1 + a2)
16630 {
16631 return a1 + a2;
16632 }
d0ac1c44 16633
b686ecb5
JM
16634 int
16635 test(const int c, volatile int v)
16636 {
16637 static_assert(is_same<int, decltype(0)>::value == true, "");
16638 static_assert(is_same<int, decltype(c)>::value == false, "");
16639 static_assert(is_same<int, decltype(v)>::value == false, "");
16640 auto ac = c;
16641 auto av = v;
16642 auto sumi = ac + av + 'x';
16643 auto sumf = ac + av + 1.0;
16644 static_assert(is_same<int, decltype(ac)>::value == true, "");
16645 static_assert(is_same<int, decltype(av)>::value == true, "");
16646 static_assert(is_same<int, decltype(sumi)>::value == true, "");
16647 static_assert(is_same<int, decltype(sumf)>::value == false, "");
16648 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
16649 return (sumf > 0.0) ? sumi : add(c, v);
16650 }
05ea2a05 16651
b686ecb5 16652 }
05ea2a05 16653
b686ecb5
JM
16654 namespace test_noexcept
16655 {
05ea2a05 16656
b686ecb5
JM
16657 int f() { return 0; }
16658 int g() noexcept { return 0; }
05ea2a05 16659
b686ecb5
JM
16660 static_assert(noexcept(f()) == false, "");
16661 static_assert(noexcept(g()) == true, "");
d0ac1c44 16662
b686ecb5 16663 }
05ea2a05 16664
b686ecb5
JM
16665 namespace test_constexpr
16666 {
d0ac1c44 16667
b686ecb5
JM
16668 template < typename CharT >
16669 unsigned long constexpr
16670 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
16671 {
16672 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
16673 }
05ea2a05 16674
b686ecb5
JM
16675 template < typename CharT >
16676 unsigned long constexpr
16677 strlen_c(const CharT *const s) noexcept
16678 {
16679 return strlen_c_r(s, 0UL);
16680 }
05ea2a05 16681
b686ecb5
JM
16682 static_assert(strlen_c("") == 0UL, "");
16683 static_assert(strlen_c("1") == 1UL, "");
16684 static_assert(strlen_c("example") == 7UL, "");
16685 static_assert(strlen_c("another\0example") == 7UL, "");
05ea2a05 16686
b686ecb5 16687 }
05ea2a05 16688
b686ecb5
JM
16689 namespace test_rvalue_references
16690 {
3266f10b 16691
b686ecb5
JM
16692 template < int N >
16693 struct answer
16694 {
16695 static constexpr int value = N;
16696 };
3266f10b 16697
b686ecb5
JM
16698 answer<1> f(int&) { return answer<1>(); }
16699 answer<2> f(const int&) { return answer<2>(); }
16700 answer<3> f(int&&) { return answer<3>(); }
05ea2a05 16701
b686ecb5
JM
16702 void
16703 test()
16704 {
16705 int i = 0;
16706 const int c = 0;
16707 static_assert(decltype(f(i))::value == 1, "");
16708 static_assert(decltype(f(c))::value == 2, "");
16709 static_assert(decltype(f(0))::value == 3, "");
16710 }
e911c666 16711
b686ecb5 16712 }
e911c666 16713
b686ecb5
JM
16714 namespace test_uniform_initialization
16715 {
3266f10b 16716
b686ecb5
JM
16717 struct test
16718 {
16719 static const int zero {};
16720 static const int one {1};
16721 };
3266f10b 16722
b686ecb5
JM
16723 static_assert(test::zero == 0, "");
16724 static_assert(test::one == 1, "");
3266f10b 16725
b686ecb5 16726 }
261b0748 16727
b686ecb5
JM
16728 namespace test_lambdas
16729 {
261b0748 16730
b686ecb5
JM
16731 void
16732 test1()
16733 {
16734 auto lambda1 = [](){};
16735 auto lambda2 = lambda1;
16736 lambda1();
16737 lambda2();
16738 }
261b0748 16739
b686ecb5
JM
16740 int
16741 test2()
16742 {
16743 auto a = [](int i, int j){ return i + j; }(1, 2);
16744 auto b = []() -> int { return '0'; }();
16745 auto c = [=](){ return a + b; }();
16746 auto d = [&](){ return c; }();
16747 auto e = [a, &b](int x) mutable {
16748 const auto identity = [](int y){ return y; };
16749 for (auto i = 0; i < a; ++i)
16750 a += b--;
16751 return x + identity(a + b);
16752 }(0);
16753 return a + b + c + d + e;
16754 }
3266f10b 16755
b686ecb5
JM
16756 int
16757 test3()
16758 {
16759 const auto nullary = [](){ return 0; };
16760 const auto unary = [](int x){ return x; };
16761 using nullary_t = decltype(nullary);
16762 using unary_t = decltype(unary);
16763 const auto higher1st = [](nullary_t f){ return f(); };
16764 const auto higher2nd = [unary](nullary_t f1){
16765 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
16766 };
16767 return higher1st(nullary) + higher2nd(nullary)(unary);
16768 }
3266f10b 16769
b686ecb5 16770 }
3266f10b 16771
b686ecb5
JM
16772 namespace test_variadic_templates
16773 {
3266f10b 16774
b686ecb5
JM
16775 template <int...>
16776 struct sum;
3266f10b 16777
b686ecb5
JM
16778 template <int N0, int... N1toN>
16779 struct sum<N0, N1toN...>
16780 {
16781 static constexpr auto value = N0 + sum<N1toN...>::value;
16782 };
3266f10b 16783
b686ecb5
JM
16784 template <>
16785 struct sum<>
16786 {
16787 static constexpr auto value = 0;
16788 };
3266f10b 16789
b686ecb5
JM
16790 static_assert(sum<>::value == 0, "");
16791 static_assert(sum<1>::value == 1, "");
16792 static_assert(sum<23>::value == 23, "");
16793 static_assert(sum<1, 2>::value == 3, "");
16794 static_assert(sum<5, 5, 11>::value == 21, "");
16795 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
3266f10b 16796
b686ecb5 16797 }
05ea2a05 16798
b686ecb5
JM
16799 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
16800 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
16801 // because of this.
16802 namespace test_template_alias_sfinae
16803 {
3266f10b 16804
b686ecb5 16805 struct foo {};
3266f10b 16806
b686ecb5
JM
16807 template<typename T>
16808 using member = typename T::member_type;
3266f10b 16809
b686ecb5
JM
16810 template<typename T>
16811 void func(...) {}
3266f10b 16812
b686ecb5
JM
16813 template<typename T>
16814 void func(member<T>*) {}
3266f10b 16815
b686ecb5 16816 void test();
3266f10b 16817
b686ecb5 16818 void test() { func<foo>(0); }
3266f10b 16819
b686ecb5 16820 }
3266f10b 16821
b686ecb5 16822} // namespace cxx11
3266f10b 16823
b686ecb5 16824#endif // __cplusplus >= 201103L
05ea2a05 16825
05ea2a05 16826
05ea2a05 16827
f74dc267
LS
16828
16829// If the compiler admits that it is not ready for C++14, why torture it?
16830// Hopefully, this will speed up the test.
16831
16832#ifndef __cplusplus
16833
16834#error "This is not a C++ compiler"
16835
16836#elif __cplusplus < 201402L && !defined _MSC_VER
16837
16838#error "This is not a C++14 compiler"
16839
16840#else
16841
16842namespace cxx14
16843{
16844
16845 namespace test_polymorphic_lambdas
16846 {
16847
16848 int
16849 test()
16850 {
16851 const auto lambda = [](auto&&... args){
16852 const auto istiny = [](auto x){
16853 return (sizeof(x) == 1UL) ? 1 : 0;
16854 };
16855 const int aretiny[] = { istiny(args)... };
16856 return aretiny[0];
16857 };
16858 return lambda(1, 1L, 1.0f, '1');
16859 }
16860
16861 }
16862
16863 namespace test_binary_literals
16864 {
16865
16866 constexpr auto ivii = 0b0000000000101010;
16867 static_assert(ivii == 42, "wrong value");
16868
16869 }
16870
16871 namespace test_generalized_constexpr
16872 {
16873
16874 template < typename CharT >
16875 constexpr unsigned long
16876 strlen_c(const CharT *const s) noexcept
16877 {
16878 auto length = 0UL;
16879 for (auto p = s; *p; ++p)
16880 ++length;
16881 return length;
16882 }
16883
16884 static_assert(strlen_c("") == 0UL, "");
16885 static_assert(strlen_c("x") == 1UL, "");
16886 static_assert(strlen_c("test") == 4UL, "");
16887 static_assert(strlen_c("another\0test") == 7UL, "");
16888
16889 }
16890
16891 namespace test_lambda_init_capture
16892 {
16893
16894 int
16895 test()
16896 {
16897 auto x = 0;
16898 const auto lambda1 = [a = x](int b){ return a + b; };
16899 const auto lambda2 = [a = lambda1(x)](){ return a; };
16900 return lambda2();
16901 }
16902
16903 }
16904
16905 namespace test_digit_separators
16906 {
16907
16908 constexpr auto ten_million = 100'000'000;
16909 static_assert(ten_million == 100000000, "");
16910
16911 }
16912
16913 namespace test_return_type_deduction
16914 {
16915
16916 auto f(int& x) { return x; }
16917 decltype(auto) g(int& x) { return x; }
16918
16919 template < typename T1, typename T2 >
16920 struct is_same
16921 {
16922 static constexpr auto value = false;
16923 };
16924
16925 template < typename T >
16926 struct is_same<T, T>
16927 {
16928 static constexpr auto value = true;
16929 };
16930
16931 int
16932 test()
16933 {
16934 auto x = 0;
16935 static_assert(is_same<int, decltype(f(x))>::value, "");
16936 static_assert(is_same<int&, decltype(g(x))>::value, "");
16937 return x;
16938 }
16939
16940 }
16941
16942} // namespace cxx14
16943
16944#endif // __cplusplus >= 201402L
16945
16946
16947
16948
16949// If the compiler admits that it is not ready for C++17, why torture it?
16950// Hopefully, this will speed up the test.
16951
16952#ifndef __cplusplus
16953
16954#error "This is not a C++ compiler"
16955
16956#elif __cplusplus < 201703L && !defined _MSC_VER
16957
16958#error "This is not a C++17 compiler"
16959
16960#else
16961
16962#include <initializer_list>
16963#include <utility>
16964#include <type_traits>
16965
16966namespace cxx17
16967{
16968
16969 namespace test_constexpr_lambdas
16970 {
16971
16972 constexpr int foo = [](){return 42;}();
16973
16974 }
16975
16976 namespace test::nested_namespace::definitions
16977 {
16978
16979 }
16980
16981 namespace test_fold_expression
16982 {
16983
16984 template<typename... Args>
16985 int multiply(Args... args)
16986 {
16987 return (args * ... * 1);
16988 }
16989
16990 template<typename... Args>
16991 bool all(Args... args)
16992 {
16993 return (args && ...);
16994 }
16995
16996 }
16997
16998 namespace test_extended_static_assert
16999 {
17000
17001 static_assert (true);
17002
17003 }
17004
17005 namespace test_auto_brace_init_list
17006 {
17007
17008 auto foo = {5};
17009 auto bar {5};
17010
17011 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
17012 static_assert(std::is_same<int, decltype(bar)>::value);
17013 }
17014
17015 namespace test_typename_in_template_template_parameter
17016 {
17017
17018 template<template<typename> typename X> struct D;
17019
17020 }
17021
17022 namespace test_fallthrough_nodiscard_maybe_unused_attributes
17023 {
17024
17025 int f1()
17026 {
17027 return 42;
17028 }
17029
17030 [[nodiscard]] int f2()
17031 {
17032 [[maybe_unused]] auto unused = f1();
17033
17034 switch (f1())
17035 {
17036 case 17:
17037 f1();
17038 [[fallthrough]];
17039 case 42:
17040 f1();
17041 }
17042 return f1();
17043 }
17044
17045 }
17046
17047 namespace test_extended_aggregate_initialization
17048 {
17049
17050 struct base1
17051 {
17052 int b1, b2 = 42;
17053 };
17054
17055 struct base2
17056 {
17057 base2() {
17058 b3 = 42;
17059 }
17060 int b3;
17061 };
17062
17063 struct derived : base1, base2
17064 {
17065 int d;
17066 };
17067
17068 derived d1 {{1, 2}, {}, 4}; // full initialization
17069 derived d2 {{}, {}, 4}; // value-initialized bases
17070
17071 }
17072
17073 namespace test_general_range_based_for_loop
17074 {
17075
17076 struct iter
17077 {
17078 int i;
17079
17080 int& operator* ()
17081 {
17082 return i;
17083 }
17084
17085 const int& operator* () const
17086 {
17087 return i;
17088 }
17089
17090 iter& operator++()
17091 {
17092 ++i;
17093 return *this;
17094 }
17095 };
17096
17097 struct sentinel
17098 {
17099 int i;
17100 };
17101
17102 bool operator== (const iter& i, const sentinel& s)
17103 {
17104 return i.i == s.i;
17105 }
17106
17107 bool operator!= (const iter& i, const sentinel& s)
17108 {
17109 return !(i == s);
17110 }
17111
17112 struct range
17113 {
17114 iter begin() const
17115 {
17116 return {0};
17117 }
17118
17119 sentinel end() const
17120 {
17121 return {5};
17122 }
17123 };
17124
17125 void f()
17126 {
17127 range r {};
17128
17129 for (auto i : r)
17130 {
17131 [[maybe_unused]] auto v = i;
17132 }
17133 }
17134
17135 }
17136
17137 namespace test_lambda_capture_asterisk_this_by_value
17138 {
17139
17140 struct t
17141 {
17142 int i;
17143 int foo()
17144 {
17145 return [*this]()
17146 {
17147 return i;
17148 }();
17149 }
17150 };
17151
17152 }
17153
17154 namespace test_enum_class_construction
17155 {
17156
17157 enum class byte : unsigned char
17158 {};
17159
17160 byte foo {42};
17161
17162 }
17163
17164 namespace test_constexpr_if
17165 {
17166
17167 template <bool cond>
17168 int f ()
17169 {
17170 if constexpr(cond)
17171 {
17172 return 13;
17173 }
17174 else
17175 {
17176 return 42;
17177 }
17178 }
17179
17180 }
17181
17182 namespace test_selection_statement_with_initializer
17183 {
17184
17185 int f()
17186 {
17187 return 13;
17188 }
17189
17190 int f2()
17191 {
17192 if (auto i = f(); i > 0)
17193 {
17194 return 3;
17195 }
17196
17197 switch (auto i = f(); i + 4)
17198 {
17199 case 17:
17200 return 2;
17201
17202 default:
17203 return 1;
17204 }
17205 }
17206
17207 }
17208
17209 namespace test_template_argument_deduction_for_class_templates
17210 {
17211
17212 template <typename T1, typename T2>
17213 struct pair
17214 {
17215 pair (T1 p1, T2 p2)
17216 : m1 {p1},
17217 m2 {p2}
17218 {}
17219
17220 T1 m1;
17221 T2 m2;
17222 };
17223
17224 void f()
17225 {
17226 [[maybe_unused]] auto p = pair{13, 42u};
17227 }
17228
17229 }
17230
17231 namespace test_non_type_auto_template_parameters
17232 {
17233
17234 template <auto n>
17235 struct B
17236 {};
17237
17238 B<5> b1;
17239 B<'a'> b2;
17240
17241 }
17242
17243 namespace test_structured_bindings
17244 {
17245
17246 int arr[2] = { 1, 2 };
17247 std::pair<int, int> pr = { 1, 2 };
17248
17249 auto f1() -> int(&)[2]
17250 {
17251 return arr;
17252 }
17253
17254 auto f2() -> std::pair<int, int>&
17255 {
17256 return pr;
17257 }
17258
17259 struct S
17260 {
17261 int x1 : 2;
17262 volatile double y1;
17263 };
17264
17265 S f3()
17266 {
17267 return {};
17268 }
17269
17270 auto [ x1, y1 ] = f1();
17271 auto& [ xr1, yr1 ] = f1();
17272 auto [ x2, y2 ] = f2();
17273 auto& [ xr2, yr2 ] = f2();
17274 const auto [ x3, y3 ] = f3();
17275
17276 }
17277
17278 namespace test_exception_spec_type_system
17279 {
17280
17281 struct Good {};
17282 struct Bad {};
17283
17284 void g1() noexcept;
17285 void g2();
17286
17287 template<typename T>
17288 Bad
17289 f(T*, T*);
17290
17291 template<typename T1, typename T2>
17292 Good
17293 f(T1*, T2*);
17294
17295 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
17296
17297 }
17298
17299 namespace test_inline_variables
17300 {
17301
17302 template<class T> void f(T)
17303 {}
17304
17305 template<class T> inline T g(T)
17306 {
17307 return T{};
17308 }
17309
17310 template<> inline void f<>(int)
17311 {}
17312
17313 template<> int g<>(int)
17314 {
17315 return 5;
17316 }
17317
17318 }
17319
17320} // namespace cxx17
17321
17322#endif // __cplusplus < 201703L && !defined _MSC_VER
17323
17324
17325
17326_ACEOF
17327if ac_fn_cxx_try_compile "$LINENO"; then :
17328 ax_cv_cxx_compile_cxx17=yes
17329else
17330 ax_cv_cxx_compile_cxx17=no
17331fi
17332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17333fi
17334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
17335$as_echo "$ax_cv_cxx_compile_cxx17" >&6; }
17336 if test x$ax_cv_cxx_compile_cxx17 = xyes; then
17337 ac_success=yes
17338 fi
17339
17340 if test x$ac_success = xno; then
17341 for alternative in ${ax_cxx_compile_alternatives}; do
17342 switch="-std=gnu++${alternative}"
17343 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
17345$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
17346if eval \${$cachevar+:} false; then :
17347 $as_echo_n "(cached) " >&6
17348else
17349 ac_save_CXX="$CXX"
17350 CXX="$CXX $switch"
17351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17352/* end confdefs.h. */
17353
17354
17355// If the compiler admits that it is not ready for C++11, why torture it?
17356// Hopefully, this will speed up the test.
17357
17358#ifndef __cplusplus
17359
17360#error "This is not a C++ compiler"
17361
17362// MSVC always sets __cplusplus to 199711L in older versions; newer versions
17363// only set it correctly if /Zc:__cplusplus is specified as well as a
17364// /std:c++NN switch:
17365// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
17366#elif __cplusplus < 201103L && !defined _MSC_VER
17367
17368#error "This is not a C++11 compiler"
17369
17370#else
17371
17372namespace cxx11
17373{
17374
17375 namespace test_static_assert
17376 {
17377
17378 template <typename T>
17379 struct check
17380 {
17381 static_assert(sizeof(int) <= sizeof(T), "not big enough");
17382 };
17383
17384 }
17385
17386 namespace test_final_override
17387 {
17388
17389 struct Base
17390 {
17391 virtual ~Base() {}
17392 virtual void f() {}
17393 };
17394
17395 struct Derived : public Base
17396 {
17397 virtual ~Derived() override {}
17398 virtual void f() override {}
17399 };
17400
17401 }
17402
17403 namespace test_double_right_angle_brackets
17404 {
17405
17406 template < typename T >
17407 struct check {};
17408
17409 typedef check<void> single_type;
17410 typedef check<check<void>> double_type;
17411 typedef check<check<check<void>>> triple_type;
17412 typedef check<check<check<check<void>>>> quadruple_type;
17413
17414 }
17415
17416 namespace test_decltype
17417 {
17418
17419 int
17420 f()
17421 {
17422 int a = 1;
17423 decltype(a) b = 2;
17424 return a + b;
17425 }
17426
17427 }
17428
17429 namespace test_type_deduction
17430 {
17431
17432 template < typename T1, typename T2 >
17433 struct is_same
17434 {
17435 static const bool value = false;
17436 };
17437
17438 template < typename T >
17439 struct is_same<T, T>
17440 {
17441 static const bool value = true;
17442 };
17443
17444 template < typename T1, typename T2 >
17445 auto
17446 add(T1 a1, T2 a2) -> decltype(a1 + a2)
17447 {
17448 return a1 + a2;
17449 }
17450
17451 int
17452 test(const int c, volatile int v)
17453 {
17454 static_assert(is_same<int, decltype(0)>::value == true, "");
17455 static_assert(is_same<int, decltype(c)>::value == false, "");
17456 static_assert(is_same<int, decltype(v)>::value == false, "");
17457 auto ac = c;
17458 auto av = v;
17459 auto sumi = ac + av + 'x';
17460 auto sumf = ac + av + 1.0;
17461 static_assert(is_same<int, decltype(ac)>::value == true, "");
17462 static_assert(is_same<int, decltype(av)>::value == true, "");
17463 static_assert(is_same<int, decltype(sumi)>::value == true, "");
17464 static_assert(is_same<int, decltype(sumf)>::value == false, "");
17465 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
17466 return (sumf > 0.0) ? sumi : add(c, v);
17467 }
17468
17469 }
17470
17471 namespace test_noexcept
17472 {
17473
17474 int f() { return 0; }
17475 int g() noexcept { return 0; }
17476
17477 static_assert(noexcept(f()) == false, "");
17478 static_assert(noexcept(g()) == true, "");
17479
17480 }
17481
17482 namespace test_constexpr
17483 {
17484
17485 template < typename CharT >
17486 unsigned long constexpr
17487 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
17488 {
17489 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
17490 }
17491
17492 template < typename CharT >
17493 unsigned long constexpr
17494 strlen_c(const CharT *const s) noexcept
17495 {
17496 return strlen_c_r(s, 0UL);
17497 }
17498
17499 static_assert(strlen_c("") == 0UL, "");
17500 static_assert(strlen_c("1") == 1UL, "");
17501 static_assert(strlen_c("example") == 7UL, "");
17502 static_assert(strlen_c("another\0example") == 7UL, "");
17503
17504 }
17505
17506 namespace test_rvalue_references
17507 {
17508
17509 template < int N >
17510 struct answer
17511 {
17512 static constexpr int value = N;
17513 };
17514
17515 answer<1> f(int&) { return answer<1>(); }
17516 answer<2> f(const int&) { return answer<2>(); }
17517 answer<3> f(int&&) { return answer<3>(); }
17518
17519 void
17520 test()
17521 {
17522 int i = 0;
17523 const int c = 0;
17524 static_assert(decltype(f(i))::value == 1, "");
17525 static_assert(decltype(f(c))::value == 2, "");
17526 static_assert(decltype(f(0))::value == 3, "");
17527 }
17528
17529 }
17530
17531 namespace test_uniform_initialization
17532 {
17533
17534 struct test
17535 {
17536 static const int zero {};
17537 static const int one {1};
17538 };
17539
17540 static_assert(test::zero == 0, "");
17541 static_assert(test::one == 1, "");
17542
17543 }
17544
17545 namespace test_lambdas
17546 {
17547
17548 void
17549 test1()
17550 {
17551 auto lambda1 = [](){};
17552 auto lambda2 = lambda1;
17553 lambda1();
17554 lambda2();
17555 }
17556
17557 int
17558 test2()
17559 {
17560 auto a = [](int i, int j){ return i + j; }(1, 2);
17561 auto b = []() -> int { return '0'; }();
17562 auto c = [=](){ return a + b; }();
17563 auto d = [&](){ return c; }();
17564 auto e = [a, &b](int x) mutable {
17565 const auto identity = [](int y){ return y; };
17566 for (auto i = 0; i < a; ++i)
17567 a += b--;
17568 return x + identity(a + b);
17569 }(0);
17570 return a + b + c + d + e;
17571 }
17572
17573 int
17574 test3()
17575 {
17576 const auto nullary = [](){ return 0; };
17577 const auto unary = [](int x){ return x; };
17578 using nullary_t = decltype(nullary);
17579 using unary_t = decltype(unary);
17580 const auto higher1st = [](nullary_t f){ return f(); };
17581 const auto higher2nd = [unary](nullary_t f1){
17582 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
17583 };
17584 return higher1st(nullary) + higher2nd(nullary)(unary);
17585 }
17586
17587 }
17588
17589 namespace test_variadic_templates
17590 {
17591
17592 template <int...>
17593 struct sum;
17594
17595 template <int N0, int... N1toN>
17596 struct sum<N0, N1toN...>
17597 {
17598 static constexpr auto value = N0 + sum<N1toN...>::value;
17599 };
17600
17601 template <>
17602 struct sum<>
17603 {
17604 static constexpr auto value = 0;
17605 };
17606
17607 static_assert(sum<>::value == 0, "");
17608 static_assert(sum<1>::value == 1, "");
17609 static_assert(sum<23>::value == 23, "");
17610 static_assert(sum<1, 2>::value == 3, "");
17611 static_assert(sum<5, 5, 11>::value == 21, "");
17612 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
17613
17614 }
17615
17616 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
17617 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
17618 // because of this.
17619 namespace test_template_alias_sfinae
17620 {
17621
17622 struct foo {};
17623
17624 template<typename T>
17625 using member = typename T::member_type;
17626
17627 template<typename T>
17628 void func(...) {}
17629
17630 template<typename T>
17631 void func(member<T>*) {}
17632
17633 void test();
17634
17635 void test() { func<foo>(0); }
17636
17637 }
17638
17639} // namespace cxx11
17640
17641#endif // __cplusplus >= 201103L
17642
17643
17644
17645
17646// If the compiler admits that it is not ready for C++14, why torture it?
17647// Hopefully, this will speed up the test.
17648
17649#ifndef __cplusplus
17650
17651#error "This is not a C++ compiler"
17652
17653#elif __cplusplus < 201402L && !defined _MSC_VER
17654
17655#error "This is not a C++14 compiler"
17656
17657#else
17658
17659namespace cxx14
17660{
17661
17662 namespace test_polymorphic_lambdas
17663 {
17664
17665 int
17666 test()
17667 {
17668 const auto lambda = [](auto&&... args){
17669 const auto istiny = [](auto x){
17670 return (sizeof(x) == 1UL) ? 1 : 0;
17671 };
17672 const int aretiny[] = { istiny(args)... };
17673 return aretiny[0];
17674 };
17675 return lambda(1, 1L, 1.0f, '1');
17676 }
17677
17678 }
17679
17680 namespace test_binary_literals
17681 {
17682
17683 constexpr auto ivii = 0b0000000000101010;
17684 static_assert(ivii == 42, "wrong value");
17685
17686 }
17687
17688 namespace test_generalized_constexpr
17689 {
17690
17691 template < typename CharT >
17692 constexpr unsigned long
17693 strlen_c(const CharT *const s) noexcept
17694 {
17695 auto length = 0UL;
17696 for (auto p = s; *p; ++p)
17697 ++length;
17698 return length;
17699 }
17700
17701 static_assert(strlen_c("") == 0UL, "");
17702 static_assert(strlen_c("x") == 1UL, "");
17703 static_assert(strlen_c("test") == 4UL, "");
17704 static_assert(strlen_c("another\0test") == 7UL, "");
17705
17706 }
17707
17708 namespace test_lambda_init_capture
17709 {
17710
17711 int
17712 test()
17713 {
17714 auto x = 0;
17715 const auto lambda1 = [a = x](int b){ return a + b; };
17716 const auto lambda2 = [a = lambda1(x)](){ return a; };
17717 return lambda2();
17718 }
17719
17720 }
17721
17722 namespace test_digit_separators
17723 {
17724
17725 constexpr auto ten_million = 100'000'000;
17726 static_assert(ten_million == 100000000, "");
17727
17728 }
17729
17730 namespace test_return_type_deduction
17731 {
17732
17733 auto f(int& x) { return x; }
17734 decltype(auto) g(int& x) { return x; }
17735
17736 template < typename T1, typename T2 >
17737 struct is_same
17738 {
17739 static constexpr auto value = false;
17740 };
17741
17742 template < typename T >
17743 struct is_same<T, T>
17744 {
17745 static constexpr auto value = true;
17746 };
17747
17748 int
17749 test()
17750 {
17751 auto x = 0;
17752 static_assert(is_same<int, decltype(f(x))>::value, "");
17753 static_assert(is_same<int&, decltype(g(x))>::value, "");
17754 return x;
17755 }
17756
17757 }
17758
17759} // namespace cxx14
17760
17761#endif // __cplusplus >= 201402L
17762
17763
17764
17765
17766// If the compiler admits that it is not ready for C++17, why torture it?
17767// Hopefully, this will speed up the test.
17768
17769#ifndef __cplusplus
17770
17771#error "This is not a C++ compiler"
17772
17773#elif __cplusplus < 201703L && !defined _MSC_VER
17774
17775#error "This is not a C++17 compiler"
17776
17777#else
17778
17779#include <initializer_list>
17780#include <utility>
17781#include <type_traits>
17782
17783namespace cxx17
17784{
17785
17786 namespace test_constexpr_lambdas
17787 {
17788
17789 constexpr int foo = [](){return 42;}();
17790
17791 }
17792
17793 namespace test::nested_namespace::definitions
17794 {
17795
17796 }
17797
17798 namespace test_fold_expression
17799 {
17800
17801 template<typename... Args>
17802 int multiply(Args... args)
17803 {
17804 return (args * ... * 1);
17805 }
17806
17807 template<typename... Args>
17808 bool all(Args... args)
17809 {
17810 return (args && ...);
17811 }
17812
17813 }
17814
17815 namespace test_extended_static_assert
17816 {
17817
17818 static_assert (true);
17819
17820 }
17821
17822 namespace test_auto_brace_init_list
17823 {
17824
17825 auto foo = {5};
17826 auto bar {5};
17827
17828 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
17829 static_assert(std::is_same<int, decltype(bar)>::value);
17830 }
17831
17832 namespace test_typename_in_template_template_parameter
17833 {
17834
17835 template<template<typename> typename X> struct D;
17836
17837 }
17838
17839 namespace test_fallthrough_nodiscard_maybe_unused_attributes
17840 {
17841
17842 int f1()
17843 {
17844 return 42;
17845 }
17846
17847 [[nodiscard]] int f2()
17848 {
17849 [[maybe_unused]] auto unused = f1();
17850
17851 switch (f1())
17852 {
17853 case 17:
17854 f1();
17855 [[fallthrough]];
17856 case 42:
17857 f1();
17858 }
17859 return f1();
17860 }
17861
17862 }
17863
17864 namespace test_extended_aggregate_initialization
17865 {
17866
17867 struct base1
17868 {
17869 int b1, b2 = 42;
17870 };
17871
17872 struct base2
17873 {
17874 base2() {
17875 b3 = 42;
17876 }
17877 int b3;
17878 };
17879
17880 struct derived : base1, base2
17881 {
17882 int d;
17883 };
17884
17885 derived d1 {{1, 2}, {}, 4}; // full initialization
17886 derived d2 {{}, {}, 4}; // value-initialized bases
17887
17888 }
17889
17890 namespace test_general_range_based_for_loop
17891 {
17892
17893 struct iter
17894 {
17895 int i;
17896
17897 int& operator* ()
17898 {
17899 return i;
17900 }
17901
17902 const int& operator* () const
17903 {
17904 return i;
17905 }
17906
17907 iter& operator++()
17908 {
17909 ++i;
17910 return *this;
17911 }
17912 };
17913
17914 struct sentinel
17915 {
17916 int i;
17917 };
17918
17919 bool operator== (const iter& i, const sentinel& s)
17920 {
17921 return i.i == s.i;
17922 }
17923
17924 bool operator!= (const iter& i, const sentinel& s)
17925 {
17926 return !(i == s);
17927 }
17928
17929 struct range
17930 {
17931 iter begin() const
17932 {
17933 return {0};
17934 }
17935
17936 sentinel end() const
17937 {
17938 return {5};
17939 }
17940 };
17941
17942 void f()
17943 {
17944 range r {};
17945
17946 for (auto i : r)
17947 {
17948 [[maybe_unused]] auto v = i;
17949 }
17950 }
17951
17952 }
17953
17954 namespace test_lambda_capture_asterisk_this_by_value
17955 {
17956
17957 struct t
17958 {
17959 int i;
17960 int foo()
17961 {
17962 return [*this]()
17963 {
17964 return i;
17965 }();
17966 }
17967 };
17968
17969 }
17970
17971 namespace test_enum_class_construction
17972 {
17973
17974 enum class byte : unsigned char
17975 {};
17976
17977 byte foo {42};
17978
17979 }
17980
17981 namespace test_constexpr_if
17982 {
17983
17984 template <bool cond>
17985 int f ()
17986 {
17987 if constexpr(cond)
17988 {
17989 return 13;
17990 }
17991 else
17992 {
17993 return 42;
17994 }
17995 }
17996
17997 }
17998
17999 namespace test_selection_statement_with_initializer
18000 {
18001
18002 int f()
18003 {
18004 return 13;
18005 }
18006
18007 int f2()
18008 {
18009 if (auto i = f(); i > 0)
18010 {
18011 return 3;
18012 }
18013
18014 switch (auto i = f(); i + 4)
18015 {
18016 case 17:
18017 return 2;
18018
18019 default:
18020 return 1;
18021 }
18022 }
18023
18024 }
18025
18026 namespace test_template_argument_deduction_for_class_templates
18027 {
18028
18029 template <typename T1, typename T2>
18030 struct pair
18031 {
18032 pair (T1 p1, T2 p2)
18033 : m1 {p1},
18034 m2 {p2}
18035 {}
18036
18037 T1 m1;
18038 T2 m2;
18039 };
18040
18041 void f()
18042 {
18043 [[maybe_unused]] auto p = pair{13, 42u};
18044 }
18045
18046 }
18047
18048 namespace test_non_type_auto_template_parameters
18049 {
18050
18051 template <auto n>
18052 struct B
18053 {};
18054
18055 B<5> b1;
18056 B<'a'> b2;
18057
18058 }
18059
18060 namespace test_structured_bindings
18061 {
18062
18063 int arr[2] = { 1, 2 };
18064 std::pair<int, int> pr = { 1, 2 };
18065
18066 auto f1() -> int(&)[2]
18067 {
18068 return arr;
18069 }
18070
18071 auto f2() -> std::pair<int, int>&
18072 {
18073 return pr;
18074 }
18075
18076 struct S
18077 {
18078 int x1 : 2;
18079 volatile double y1;
18080 };
18081
18082 S f3()
18083 {
18084 return {};
18085 }
18086
18087 auto [ x1, y1 ] = f1();
18088 auto& [ xr1, yr1 ] = f1();
18089 auto [ x2, y2 ] = f2();
18090 auto& [ xr2, yr2 ] = f2();
18091 const auto [ x3, y3 ] = f3();
18092
18093 }
18094
18095 namespace test_exception_spec_type_system
18096 {
18097
18098 struct Good {};
18099 struct Bad {};
18100
18101 void g1() noexcept;
18102 void g2();
18103
18104 template<typename T>
18105 Bad
18106 f(T*, T*);
18107
18108 template<typename T1, typename T2>
18109 Good
18110 f(T1*, T2*);
18111
18112 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
18113
18114 }
18115
18116 namespace test_inline_variables
18117 {
18118
18119 template<class T> void f(T)
18120 {}
18121
18122 template<class T> inline T g(T)
18123 {
18124 return T{};
18125 }
18126
18127 template<> inline void f<>(int)
18128 {}
18129
18130 template<> int g<>(int)
18131 {
18132 return 5;
18133 }
18134
18135 }
18136
18137} // namespace cxx17
18138
18139#endif // __cplusplus < 201703L && !defined _MSC_VER
18140
18141
18142
b686ecb5
JM
18143_ACEOF
18144if ac_fn_cxx_try_compile "$LINENO"; then :
f74dc267 18145 eval $cachevar=yes
b686ecb5 18146else
f74dc267 18147 eval $cachevar=no
b686ecb5
JM
18148fi
18149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f74dc267 18150 CXX="$ac_save_CXX"
b686ecb5 18151fi
f74dc267
LS
18152eval ac_res=\$$cachevar
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18154$as_echo "$ac_res" >&6; }
18155 if eval test x\$$cachevar = xyes; then
18156 CXX_DIALECT="$switch"
18157 CXX="$CXX $switch"
18158 if test -n "$CXXCPP" ; then
18159 CXXCPP="$CXXCPP $switch"
18160 fi
18161 ac_success=yes
18162 break
18163 fi
18164 done
18165 fi
05ea2a05 18166
b686ecb5 18167 if test x$ac_success = xno; then
f74dc267
LS
18168 for alternative in ${ax_cxx_compile_alternatives}; do
18169 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
18170 if test x"$switch" = xMSVC; then
18171 switch=-std:c++${alternative}
18172 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
18173 else
18174 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
18175 fi
18176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
18177$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
b686ecb5
JM
18178if eval \${$cachevar+:} false; then :
18179 $as_echo_n "(cached) " >&6
18180else
18181 ac_save_CXX="$CXX"
f74dc267
LS
18182 CXX="$CXX $switch"
18183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 18184/* end confdefs.h. */
05ea2a05 18185
3266f10b 18186
b686ecb5
JM
18187// If the compiler admits that it is not ready for C++11, why torture it?
18188// Hopefully, this will speed up the test.
3266f10b 18189
b686ecb5 18190#ifndef __cplusplus
3266f10b 18191
b686ecb5 18192#error "This is not a C++ compiler"
3266f10b 18193
eb4de404
LS
18194// MSVC always sets __cplusplus to 199711L in older versions; newer versions
18195// only set it correctly if /Zc:__cplusplus is specified as well as a
18196// /std:c++NN switch:
18197// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
18198#elif __cplusplus < 201103L && !defined _MSC_VER
05ea2a05 18199
b686ecb5 18200#error "This is not a C++11 compiler"
05ea2a05 18201
b686ecb5 18202#else
05ea2a05 18203
b686ecb5
JM
18204namespace cxx11
18205{
3266f10b 18206
b686ecb5
JM
18207 namespace test_static_assert
18208 {
05ea2a05 18209
b686ecb5
JM
18210 template <typename T>
18211 struct check
18212 {
18213 static_assert(sizeof(int) <= sizeof(T), "not big enough");
18214 };
05ea2a05 18215
b686ecb5 18216 }
05ea2a05 18217
b686ecb5
JM
18218 namespace test_final_override
18219 {
3266f10b 18220
b686ecb5
JM
18221 struct Base
18222 {
eb4de404 18223 virtual ~Base() {}
b686ecb5
JM
18224 virtual void f() {}
18225 };
05ea2a05 18226
b686ecb5
JM
18227 struct Derived : public Base
18228 {
eb4de404 18229 virtual ~Derived() override {}
b686ecb5
JM
18230 virtual void f() override {}
18231 };
3266f10b 18232
b686ecb5 18233 }
05ea2a05 18234
b686ecb5
JM
18235 namespace test_double_right_angle_brackets
18236 {
3266f10b 18237
b686ecb5
JM
18238 template < typename T >
18239 struct check {};
3266f10b 18240
b686ecb5
JM
18241 typedef check<void> single_type;
18242 typedef check<check<void>> double_type;
18243 typedef check<check<check<void>>> triple_type;
18244 typedef check<check<check<check<void>>>> quadruple_type;
3266f10b 18245
b686ecb5 18246 }
3266f10b 18247
b686ecb5
JM
18248 namespace test_decltype
18249 {
3266f10b 18250
b686ecb5
JM
18251 int
18252 f()
18253 {
18254 int a = 1;
18255 decltype(a) b = 2;
18256 return a + b;
18257 }
b2ceabe8 18258
b686ecb5 18259 }
b2ceabe8 18260
b686ecb5
JM
18261 namespace test_type_deduction
18262 {
b2ceabe8 18263
b686ecb5
JM
18264 template < typename T1, typename T2 >
18265 struct is_same
18266 {
18267 static const bool value = false;
18268 };
3266f10b 18269
b686ecb5
JM
18270 template < typename T >
18271 struct is_same<T, T>
18272 {
18273 static const bool value = true;
18274 };
05ea2a05 18275
b686ecb5
JM
18276 template < typename T1, typename T2 >
18277 auto
18278 add(T1 a1, T2 a2) -> decltype(a1 + a2)
18279 {
18280 return a1 + a2;
18281 }
05ea2a05 18282
b686ecb5
JM
18283 int
18284 test(const int c, volatile int v)
18285 {
18286 static_assert(is_same<int, decltype(0)>::value == true, "");
18287 static_assert(is_same<int, decltype(c)>::value == false, "");
18288 static_assert(is_same<int, decltype(v)>::value == false, "");
18289 auto ac = c;
18290 auto av = v;
18291 auto sumi = ac + av + 'x';
18292 auto sumf = ac + av + 1.0;
18293 static_assert(is_same<int, decltype(ac)>::value == true, "");
18294 static_assert(is_same<int, decltype(av)>::value == true, "");
18295 static_assert(is_same<int, decltype(sumi)>::value == true, "");
18296 static_assert(is_same<int, decltype(sumf)>::value == false, "");
18297 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
18298 return (sumf > 0.0) ? sumi : add(c, v);
18299 }
3266f10b 18300
b686ecb5 18301 }
3266f10b 18302
b686ecb5
JM
18303 namespace test_noexcept
18304 {
3266f10b 18305
b686ecb5
JM
18306 int f() { return 0; }
18307 int g() noexcept { return 0; }
3266f10b 18308
b686ecb5
JM
18309 static_assert(noexcept(f()) == false, "");
18310 static_assert(noexcept(g()) == true, "");
3266f10b 18311
b686ecb5 18312 }
3266f10b 18313
b686ecb5
JM
18314 namespace test_constexpr
18315 {
3266f10b 18316
b686ecb5
JM
18317 template < typename CharT >
18318 unsigned long constexpr
18319 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
18320 {
18321 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
18322 }
3266f10b 18323
b686ecb5
JM
18324 template < typename CharT >
18325 unsigned long constexpr
18326 strlen_c(const CharT *const s) noexcept
18327 {
18328 return strlen_c_r(s, 0UL);
18329 }
3266f10b 18330
b686ecb5
JM
18331 static_assert(strlen_c("") == 0UL, "");
18332 static_assert(strlen_c("1") == 1UL, "");
18333 static_assert(strlen_c("example") == 7UL, "");
18334 static_assert(strlen_c("another\0example") == 7UL, "");
3266f10b 18335
b686ecb5 18336 }
3266f10b 18337
b686ecb5
JM
18338 namespace test_rvalue_references
18339 {
5e030278 18340
b686ecb5
JM
18341 template < int N >
18342 struct answer
18343 {
18344 static constexpr int value = N;
18345 };
5e030278 18346
b686ecb5
JM
18347 answer<1> f(int&) { return answer<1>(); }
18348 answer<2> f(const int&) { return answer<2>(); }
18349 answer<3> f(int&&) { return answer<3>(); }
5e030278 18350
b686ecb5
JM
18351 void
18352 test()
18353 {
18354 int i = 0;
18355 const int c = 0;
18356 static_assert(decltype(f(i))::value == 1, "");
18357 static_assert(decltype(f(c))::value == 2, "");
18358 static_assert(decltype(f(0))::value == 3, "");
18359 }
05ea2a05 18360
b686ecb5 18361 }
05ea2a05 18362
b686ecb5
JM
18363 namespace test_uniform_initialization
18364 {
05ea2a05 18365
b686ecb5
JM
18366 struct test
18367 {
18368 static const int zero {};
18369 static const int one {1};
18370 };
05ea2a05 18371
b686ecb5
JM
18372 static_assert(test::zero == 0, "");
18373 static_assert(test::one == 1, "");
5e030278 18374
b686ecb5 18375 }
5e030278 18376
b686ecb5
JM
18377 namespace test_lambdas
18378 {
5e030278 18379
b686ecb5
JM
18380 void
18381 test1()
18382 {
18383 auto lambda1 = [](){};
18384 auto lambda2 = lambda1;
18385 lambda1();
18386 lambda2();
18387 }
5e030278 18388
b686ecb5
JM
18389 int
18390 test2()
18391 {
18392 auto a = [](int i, int j){ return i + j; }(1, 2);
18393 auto b = []() -> int { return '0'; }();
18394 auto c = [=](){ return a + b; }();
18395 auto d = [&](){ return c; }();
18396 auto e = [a, &b](int x) mutable {
18397 const auto identity = [](int y){ return y; };
18398 for (auto i = 0; i < a; ++i)
18399 a += b--;
18400 return x + identity(a + b);
18401 }(0);
18402 return a + b + c + d + e;
18403 }
5e030278 18404
b686ecb5
JM
18405 int
18406 test3()
18407 {
18408 const auto nullary = [](){ return 0; };
18409 const auto unary = [](int x){ return x; };
18410 using nullary_t = decltype(nullary);
18411 using unary_t = decltype(unary);
18412 const auto higher1st = [](nullary_t f){ return f(); };
18413 const auto higher2nd = [unary](nullary_t f1){
18414 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
18415 };
18416 return higher1st(nullary) + higher2nd(nullary)(unary);
18417 }
5e030278 18418
b686ecb5 18419 }
5e030278 18420
b686ecb5
JM
18421 namespace test_variadic_templates
18422 {
5e030278 18423
b686ecb5
JM
18424 template <int...>
18425 struct sum;
5e030278 18426
b686ecb5
JM
18427 template <int N0, int... N1toN>
18428 struct sum<N0, N1toN...>
18429 {
18430 static constexpr auto value = N0 + sum<N1toN...>::value;
18431 };
5e030278 18432
b686ecb5
JM
18433 template <>
18434 struct sum<>
18435 {
18436 static constexpr auto value = 0;
18437 };
5e030278 18438
b686ecb5
JM
18439 static_assert(sum<>::value == 0, "");
18440 static_assert(sum<1>::value == 1, "");
18441 static_assert(sum<23>::value == 23, "");
18442 static_assert(sum<1, 2>::value == 3, "");
18443 static_assert(sum<5, 5, 11>::value == 21, "");
18444 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5e030278 18445
b686ecb5 18446 }
5e030278 18447
b686ecb5
JM
18448 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
18449 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
18450 // because of this.
18451 namespace test_template_alias_sfinae
18452 {
5e030278 18453
b686ecb5 18454 struct foo {};
5e030278 18455
b686ecb5
JM
18456 template<typename T>
18457 using member = typename T::member_type;
5e030278 18458
b686ecb5
JM
18459 template<typename T>
18460 void func(...) {}
5e030278 18461
b686ecb5
JM
18462 template<typename T>
18463 void func(member<T>*) {}
5e030278 18464
b686ecb5 18465 void test();
5e030278 18466
b686ecb5 18467 void test() { func<foo>(0); }
5e030278 18468
b686ecb5 18469 }
5e030278 18470
b686ecb5 18471} // namespace cxx11
5e030278 18472
b686ecb5 18473#endif // __cplusplus >= 201103L
5e030278 18474
5e030278 18475
5e030278 18476
5e030278 18477
f74dc267
LS
18478// If the compiler admits that it is not ready for C++14, why torture it?
18479// Hopefully, this will speed up the test.
18480
18481#ifndef __cplusplus
18482
18483#error "This is not a C++ compiler"
18484
18485#elif __cplusplus < 201402L && !defined _MSC_VER
18486
18487#error "This is not a C++14 compiler"
18488
18489#else
18490
18491namespace cxx14
18492{
18493
18494 namespace test_polymorphic_lambdas
18495 {
18496
18497 int
18498 test()
18499 {
18500 const auto lambda = [](auto&&... args){
18501 const auto istiny = [](auto x){
18502 return (sizeof(x) == 1UL) ? 1 : 0;
18503 };
18504 const int aretiny[] = { istiny(args)... };
18505 return aretiny[0];
18506 };
18507 return lambda(1, 1L, 1.0f, '1');
18508 }
18509
18510 }
18511
18512 namespace test_binary_literals
18513 {
18514
18515 constexpr auto ivii = 0b0000000000101010;
18516 static_assert(ivii == 42, "wrong value");
18517
18518 }
18519
18520 namespace test_generalized_constexpr
18521 {
18522
18523 template < typename CharT >
18524 constexpr unsigned long
18525 strlen_c(const CharT *const s) noexcept
18526 {
18527 auto length = 0UL;
18528 for (auto p = s; *p; ++p)
18529 ++length;
18530 return length;
18531 }
18532
18533 static_assert(strlen_c("") == 0UL, "");
18534 static_assert(strlen_c("x") == 1UL, "");
18535 static_assert(strlen_c("test") == 4UL, "");
18536 static_assert(strlen_c("another\0test") == 7UL, "");
18537
18538 }
18539
18540 namespace test_lambda_init_capture
18541 {
18542
18543 int
18544 test()
18545 {
18546 auto x = 0;
18547 const auto lambda1 = [a = x](int b){ return a + b; };
18548 const auto lambda2 = [a = lambda1(x)](){ return a; };
18549 return lambda2();
18550 }
18551
18552 }
18553
18554 namespace test_digit_separators
18555 {
18556
18557 constexpr auto ten_million = 100'000'000;
18558 static_assert(ten_million == 100000000, "");
18559
18560 }
18561
18562 namespace test_return_type_deduction
18563 {
18564
18565 auto f(int& x) { return x; }
18566 decltype(auto) g(int& x) { return x; }
18567
18568 template < typename T1, typename T2 >
18569 struct is_same
18570 {
18571 static constexpr auto value = false;
18572 };
18573
18574 template < typename T >
18575 struct is_same<T, T>
18576 {
18577 static constexpr auto value = true;
18578 };
18579
18580 int
18581 test()
18582 {
18583 auto x = 0;
18584 static_assert(is_same<int, decltype(f(x))>::value, "");
18585 static_assert(is_same<int&, decltype(g(x))>::value, "");
18586 return x;
18587 }
18588
18589 }
18590
18591} // namespace cxx14
18592
18593#endif // __cplusplus >= 201402L
18594
18595
b9442ec1 18596
b9442ec1 18597
f74dc267 18598// If the compiler admits that it is not ready for C++17, why torture it?
b686ecb5 18599// Hopefully, this will speed up the test.
b9442ec1 18600
b686ecb5 18601#ifndef __cplusplus
5e030278 18602
b686ecb5 18603#error "This is not a C++ compiler"
5e030278 18604
f74dc267 18605#elif __cplusplus < 201703L && !defined _MSC_VER
05ea2a05 18606
f74dc267 18607#error "This is not a C++17 compiler"
05ea2a05 18608
b686ecb5 18609#else
05ea2a05 18610
f74dc267
LS
18611#include <initializer_list>
18612#include <utility>
18613#include <type_traits>
18614
18615namespace cxx17
b686ecb5 18616{
05ea2a05 18617
f74dc267 18618 namespace test_constexpr_lambdas
b686ecb5 18619 {
5e030278 18620
f74dc267 18621 constexpr int foo = [](){return 42;}();
5e030278 18622
b686ecb5 18623 }
5e030278 18624
f74dc267 18625 namespace test::nested_namespace::definitions
b686ecb5 18626 {
5e030278 18627
f74dc267
LS
18628 }
18629
18630 namespace test_fold_expression
18631 {
18632
18633 template<typename... Args>
18634 int multiply(Args... args)
b686ecb5 18635 {
f74dc267
LS
18636 return (args * ... * 1);
18637 }
5e030278 18638
f74dc267
LS
18639 template<typename... Args>
18640 bool all(Args... args)
b686ecb5 18641 {
f74dc267
LS
18642 return (args && ...);
18643 }
5e030278 18644
b686ecb5 18645 }
5e030278 18646
f74dc267 18647 namespace test_extended_static_assert
b686ecb5 18648 {
5e030278 18649
f74dc267 18650 static_assert (true);
5e030278 18651
f74dc267
LS
18652 }
18653
18654 namespace test_auto_brace_init_list
18655 {
5e030278 18656
f74dc267
LS
18657 auto foo = {5};
18658 auto bar {5};
18659
18660 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
18661 static_assert(std::is_same<int, decltype(bar)>::value);
b686ecb5 18662 }
5e030278 18663
f74dc267 18664 namespace test_typename_in_template_template_parameter
b686ecb5 18665 {
5e030278 18666
f74dc267
LS
18667 template<template<typename> typename X> struct D;
18668
18669 }
18670
18671 namespace test_fallthrough_nodiscard_maybe_unused_attributes
18672 {
18673
18674 int f1()
b686ecb5 18675 {
f74dc267
LS
18676 return 42;
18677 }
18678
18679 [[nodiscard]] int f2()
18680 {
18681 [[maybe_unused]] auto unused = f1();
18682
18683 switch (f1())
18684 {
18685 case 17:
18686 f1();
18687 [[fallthrough]];
18688 case 42:
18689 f1();
18690 }
18691 return f1();
b686ecb5 18692 }
5e030278 18693
b686ecb5 18694 }
5e030278 18695
f74dc267 18696 namespace test_extended_aggregate_initialization
b686ecb5 18697 {
5e030278 18698
f74dc267 18699 struct base1
b686ecb5 18700 {
f74dc267 18701 int b1, b2 = 42;
b686ecb5 18702 };
5e030278 18703
f74dc267 18704 struct base2
b686ecb5 18705 {
f74dc267
LS
18706 base2() {
18707 b3 = 42;
18708 }
18709 int b3;
b686ecb5 18710 };
5e030278 18711
f74dc267 18712 struct derived : base1, base2
b686ecb5 18713 {
f74dc267
LS
18714 int d;
18715 };
5e030278 18716
f74dc267
LS
18717 derived d1 {{1, 2}, {}, 4}; // full initialization
18718 derived d2 {{}, {}, 4}; // value-initialized bases
5e030278 18719
b686ecb5 18720 }
5e030278 18721
f74dc267 18722 namespace test_general_range_based_for_loop
b686ecb5 18723 {
5e030278 18724
f74dc267
LS
18725 struct iter
18726 {
18727 int i;
5e030278 18728
f74dc267
LS
18729 int& operator* ()
18730 {
18731 return i;
18732 }
9f1528a1 18733
f74dc267
LS
18734 const int& operator* () const
18735 {
18736 return i;
18737 }
9f1528a1 18738
f74dc267
LS
18739 iter& operator++()
18740 {
18741 ++i;
18742 return *this;
18743 }
18744 };
9f1528a1 18745
f74dc267 18746 struct sentinel
b686ecb5 18747 {
f74dc267
LS
18748 int i;
18749 };
18750
18751 bool operator== (const iter& i, const sentinel& s)
18752 {
18753 return i.i == s.i;
b686ecb5
JM
18754 }
18755
f74dc267 18756 bool operator!= (const iter& i, const sentinel& s)
b686ecb5 18757 {
f74dc267 18758 return !(i == s);
b686ecb5
JM
18759 }
18760
f74dc267
LS
18761 struct range
18762 {
18763 iter begin() const
18764 {
18765 return {0};
18766 }
18767
18768 sentinel end() const
18769 {
18770 return {5};
18771 }
18772 };
18773
18774 void f()
18775 {
18776 range r {};
18777
18778 for (auto i : r)
18779 {
18780 [[maybe_unused]] auto v = i;
18781 }
18782 }
b686ecb5
JM
18783
18784 }
18785
f74dc267 18786 namespace test_lambda_capture_asterisk_this_by_value
b686ecb5
JM
18787 {
18788
f74dc267 18789 struct t
b686ecb5 18790 {
f74dc267
LS
18791 int i;
18792 int foo()
18793 {
18794 return [*this]()
18795 {
18796 return i;
18797 }();
18798 }
b686ecb5
JM
18799 };
18800
f74dc267 18801 }
b686ecb5 18802
f74dc267
LS
18803 namespace test_enum_class_construction
18804 {
18805
18806 enum class byte : unsigned char
18807 {};
18808
18809 byte foo {42};
b686ecb5
JM
18810
18811 }
18812
f74dc267 18813 namespace test_constexpr_if
b686ecb5
JM
18814 {
18815
f74dc267
LS
18816 template <bool cond>
18817 int f ()
b686ecb5 18818 {
f74dc267
LS
18819 if constexpr(cond)
18820 {
18821 return 13;
18822 }
18823 else
18824 {
18825 return 42;
18826 }
18827 }
b686ecb5
JM
18828
18829 }
18830
f74dc267 18831 namespace test_selection_statement_with_initializer
b686ecb5
JM
18832 {
18833
f74dc267 18834 int f()
b686ecb5 18835 {
f74dc267 18836 return 13;
b686ecb5
JM
18837 }
18838
f74dc267 18839 int f2()
b686ecb5 18840 {
f74dc267
LS
18841 if (auto i = f(); i > 0)
18842 {
18843 return 3;
18844 }
18845
18846 switch (auto i = f(); i + 4)
18847 {
18848 case 17:
18849 return 2;
18850
18851 default:
18852 return 1;
18853 }
b686ecb5
JM
18854 }
18855
f74dc267
LS
18856 }
18857
18858 namespace test_template_argument_deduction_for_class_templates
18859 {
18860
18861 template <typename T1, typename T2>
18862 struct pair
b686ecb5 18863 {
f74dc267
LS
18864 pair (T1 p1, T2 p2)
18865 : m1 {p1},
18866 m2 {p2}
18867 {}
18868
18869 T1 m1;
18870 T2 m2;
18871 };
18872
18873 void f()
18874 {
18875 [[maybe_unused]] auto p = pair{13, 42u};
b686ecb5
JM
18876 }
18877
18878 }
18879
f74dc267 18880 namespace test_non_type_auto_template_parameters
b686ecb5
JM
18881 {
18882
f74dc267
LS
18883 template <auto n>
18884 struct B
18885 {};
b686ecb5 18886
f74dc267
LS
18887 B<5> b1;
18888 B<'a'> b2;
18889
18890 }
18891
18892 namespace test_structured_bindings
18893 {
18894
18895 int arr[2] = { 1, 2 };
18896 std::pair<int, int> pr = { 1, 2 };
18897
18898 auto f1() -> int(&)[2]
b686ecb5 18899 {
f74dc267
LS
18900 return arr;
18901 }
b686ecb5 18902
f74dc267 18903 auto f2() -> std::pair<int, int>&
b686ecb5 18904 {
f74dc267
LS
18905 return pr;
18906 }
18907
18908 struct S
18909 {
18910 int x1 : 2;
18911 volatile double y1;
b686ecb5
JM
18912 };
18913
f74dc267
LS
18914 S f3()
18915 {
18916 return {};
18917 }
18918
18919 auto [ x1, y1 ] = f1();
18920 auto& [ xr1, yr1 ] = f1();
18921 auto [ x2, y2 ] = f2();
18922 auto& [ xr2, yr2 ] = f2();
18923 const auto [ x3, y3 ] = f3();
b686ecb5
JM
18924
18925 }
18926
f74dc267 18927 namespace test_exception_spec_type_system
b686ecb5
JM
18928 {
18929
f74dc267
LS
18930 struct Good {};
18931 struct Bad {};
b686ecb5 18932
f74dc267
LS
18933 void g1() noexcept;
18934 void g2();
b686ecb5
JM
18935
18936 template<typename T>
f74dc267
LS
18937 Bad
18938 f(T*, T*);
b686ecb5 18939
f74dc267
LS
18940 template<typename T1, typename T2>
18941 Good
18942 f(T1*, T2*);
b686ecb5 18943
f74dc267 18944 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
b686ecb5 18945
f74dc267
LS
18946 }
18947
18948 namespace test_inline_variables
18949 {
18950
18951 template<class T> void f(T)
18952 {}
18953
18954 template<class T> inline T g(T)
18955 {
18956 return T{};
18957 }
18958
18959 template<> inline void f<>(int)
18960 {}
18961
18962 template<> int g<>(int)
18963 {
18964 return 5;
18965 }
b686ecb5
JM
18966
18967 }
18968
f74dc267 18969} // namespace cxx17
b686ecb5 18970
f74dc267 18971#endif // __cplusplus < 201703L && !defined _MSC_VER
b686ecb5
JM
18972
18973
18974
18975_ACEOF
18976if ac_fn_cxx_try_compile "$LINENO"; then :
18977 eval $cachevar=yes
18978else
18979 eval $cachevar=no
18980fi
18981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18982 CXX="$ac_save_CXX"
18983fi
18984eval ac_res=\$$cachevar
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18986$as_echo "$ac_res" >&6; }
18987 if eval test x\$$cachevar = xyes; then
18988 CXX_DIALECT="$switch"
18989 CXX="$CXX $switch"
18990 if test -n "$CXXCPP" ; then
18991 CXXCPP="$CXXCPP $switch"
18992 fi
18993 ac_success=yes
18994 break
18995 fi
18996 done
18997 if test x$ac_success = xyes; then
18998 break
18999 fi
19000 done
19001 fi
19002 ac_ext=c
19003ac_cpp='$CPP $CPPFLAGS'
19004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19006ac_compiler_gnu=$ac_cv_c_compiler_gnu
19007
f74dc267 19008 if test x$ax_cxx_compile_cxx17_required = xtrue; then
b686ecb5 19009 if test x$ac_success = xno; then
f74dc267 19010 as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
b686ecb5
JM
19011 fi
19012 fi
19013 if test x$ac_success = xno; then
f74dc267
LS
19014 HAVE_CXX17=0
19015 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
19016$as_echo "$as_me: No compiler with C++17 support was found" >&6;}
b686ecb5 19017 else
f74dc267 19018 HAVE_CXX17=1
b686ecb5 19019
f74dc267 19020$as_echo "#define HAVE_CXX17 1" >>confdefs.h
b686ecb5
JM
19021
19022 fi
19023
19024
19025
19026
d5835df2
TV
19027ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
19028if test "x$ac_cv_type_size_t" = xyes; then :
19029
b686ecb5 19030else
d5835df2
TV
19031
19032cat >>confdefs.h <<_ACEOF
19033#define size_t unsigned int
19034_ACEOF
19035
b686ecb5 19036fi
b686ecb5 19037
b686ecb5 19038
b686ecb5
JM
19039
19040
d5835df2
TV
19041 for ac_header in $ac_header_list
19042do :
19043 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19044ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
19045"
19046if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19047 cat >>confdefs.h <<_ACEOF
19048#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19049_ACEOF
b686ecb5 19050
d5835df2 19051fi
b686ecb5 19052
d5835df2 19053done
b686ecb5 19054
b686ecb5 19055
b686ecb5 19056
b686ecb5 19057
b686ecb5 19058
b686ecb5
JM
19059
19060
d5835df2
TV
19061ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
19062if test "x$ac_cv_type_pid_t" = xyes; then :
18b4d073 19063
d5835df2 19064else
18b4d073 19065
d5835df2
TV
19066cat >>confdefs.h <<_ACEOF
19067#define pid_t int
19068_ACEOF
18b4d073 19069
d5835df2 19070fi
18b4d073
SM
19071
19072
d5835df2
TV
19073 if test "X$prefix" = "XNONE"; then
19074 acl_final_prefix="$ac_default_prefix"
19075 else
19076 acl_final_prefix="$prefix"
19077 fi
19078 if test "X$exec_prefix" = "XNONE"; then
19079 acl_final_exec_prefix='${prefix}'
19080 else
19081 acl_final_exec_prefix="$exec_prefix"
19082 fi
19083 acl_save_prefix="$prefix"
19084 prefix="$acl_final_prefix"
19085 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
19086 prefix="$acl_save_prefix"
18b4d073
SM
19087
19088
d5835df2
TV
19089# Check whether --with-gnu-ld was given.
19090if test "${with_gnu_ld+set}" = set; then :
19091 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
18b4d073 19092else
d5835df2
TV
19093 with_gnu_ld=no
19094fi
18b4d073 19095
d5835df2
TV
19096# Prepare PATH_SEPARATOR.
19097# The user is always right.
19098if test "${PATH_SEPARATOR+set}" != set; then
19099 echo "#! /bin/sh" >conf$$.sh
19100 echo "exit 0" >>conf$$.sh
19101 chmod +x conf$$.sh
19102 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19103 PATH_SEPARATOR=';'
19104 else
19105 PATH_SEPARATOR=:
19106 fi
19107 rm -f conf$$.sh
18b4d073 19108fi
d5835df2
TV
19109ac_prog=ld
19110if test "$GCC" = yes; then
19111 # Check if gcc -print-prog-name=ld gives a path.
19112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
19113$as_echo_n "checking for ld used by GCC... " >&6; }
19114 case $host in
19115 *-*-mingw*)
19116 # gcc leaves a trailing carriage return which upsets mingw
19117 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
19118 *)
19119 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
19120 esac
19121 case $ac_prog in
19122 # Accept absolute paths.
19123 [\\/]* | [A-Za-z]:[\\/]*)
19124 re_direlt='/[^/][^/]*/\.\./'
19125 # Canonicalize the path of ld
19126 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
19127 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
19128 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
19129 done
19130 test -z "$LD" && LD="$ac_prog"
19131 ;;
19132 "")
19133 # If it fails, then pretend we aren't using GCC.
19134 ac_prog=ld
19135 ;;
19136 *)
19137 # If it is relative, then search for the first ld in PATH.
19138 with_gnu_ld=unknown
19139 ;;
19140 esac
19141elif test "$with_gnu_ld" = yes; then
19142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
19143$as_echo_n "checking for GNU ld... " >&6; }
18b4d073 19144else
d5835df2
TV
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
19146$as_echo_n "checking for non-GNU ld... " >&6; }
18b4d073 19147fi
d5835df2 19148if ${acl_cv_path_LD+:} false; then :
18b4d073
SM
19149 $as_echo_n "(cached) " >&6
19150else
d5835df2
TV
19151 if test -z "$LD"; then
19152 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
19153 for ac_dir in $PATH; do
19154 test -z "$ac_dir" && ac_dir=.
19155 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
19156 acl_cv_path_LD="$ac_dir/$ac_prog"
19157 # Check to see if the program is GNU ld. I'd rather use --version,
19158 # but apparently some GNU ld's only accept -v.
19159 # Break only if it was the GNU/non-GNU ld that we prefer.
19160 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
19161 test "$with_gnu_ld" != no && break
19162 else
19163 test "$with_gnu_ld" != yes && break
19164 fi
19165 fi
18b4d073 19166 done
d5835df2
TV
19167 IFS="$ac_save_ifs"
19168else
19169 acl_cv_path_LD="$LD" # Let the user override the test with a path.
18b4d073 19170fi
d5835df2
TV
19171fi
19172
19173LD="$acl_cv_path_LD"
19174if test -n "$LD"; then
19175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
19176$as_echo "$LD" >&6; }
18b4d073
SM
19177else
19178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19179$as_echo "no" >&6; }
19180fi
d5835df2
TV
19181test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
19182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
19183$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
19184if ${acl_cv_prog_gnu_ld+:} false; then :
19185 $as_echo_n "(cached) " >&6
18b4d073 19186else
d5835df2
TV
19187 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
19188if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
19189 acl_cv_prog_gnu_ld=yes
19190else
19191 acl_cv_prog_gnu_ld=no
18b4d073 19192fi
18b4d073 19193fi
d5835df2
TV
19194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
19195$as_echo "$acl_cv_prog_gnu_ld" >&6; }
19196with_gnu_ld=$acl_cv_prog_gnu_ld
b686ecb5 19197
b686ecb5 19198
b686ecb5 19199
d5835df2
TV
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
19201$as_echo_n "checking for shared library run path origin... " >&6; }
19202if ${acl_cv_rpath+:} false; then :
862776f2
AA
19203 $as_echo_n "(cached) " >&6
19204else
b686ecb5 19205
d5835df2
TV
19206 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
19207 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
19208 . ./conftest.sh
19209 rm -f ./conftest.sh
19210 acl_cv_rpath=done
b686ecb5
JM
19211
19212fi
d5835df2
TV
19213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
19214$as_echo "$acl_cv_rpath" >&6; }
19215 wl="$acl_cv_wl"
19216 libext="$acl_cv_libext"
19217 shlibext="$acl_cv_shlibext"
19218 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
19219 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
19220 hardcode_direct="$acl_cv_hardcode_direct"
19221 hardcode_minus_L="$acl_cv_hardcode_minus_L"
19222 # Check whether --enable-rpath was given.
19223if test "${enable_rpath+set}" = set; then :
19224 enableval=$enable_rpath; :
19225else
19226 enable_rpath=yes
b686ecb5 19227fi
b686ecb5
JM
19228
19229
19230
d5835df2
TV
19231 # Set the 'development' global.
19232 . $srcdir/../bfd/development.sh
b686ecb5 19233
d5835df2
TV
19234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
19235$as_echo_n "checking for ANSI C header files... " >&6; }
19236if ${ac_cv_header_stdc+:} false; then :
19237 $as_echo_n "(cached) " >&6
19238else
19239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19240/* end confdefs.h. */
19241#include <stdlib.h>
19242#include <stdarg.h>
19243#include <string.h>
19244#include <float.h>
b686ecb5 19245
d5835df2
TV
19246int
19247main ()
19248{
b686ecb5 19249
d5835df2
TV
19250 ;
19251 return 0;
19252}
19253_ACEOF
19254if ac_fn_c_try_compile "$LINENO"; then :
19255 ac_cv_header_stdc=yes
b686ecb5 19256else
d5835df2 19257 ac_cv_header_stdc=no
b686ecb5 19258fi
d5835df2 19259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 19260
d5835df2
TV
19261if test $ac_cv_header_stdc = yes; then
19262 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19264/* end confdefs.h. */
19265#include <string.h>
b686ecb5 19266
d5835df2
TV
19267_ACEOF
19268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19269 $EGREP "memchr" >/dev/null 2>&1; then :
b686ecb5 19270
d5835df2
TV
19271else
19272 ac_cv_header_stdc=no
19273fi
19274rm -f conftest*
b686ecb5 19275
d5835df2 19276fi
b686ecb5 19277
d5835df2
TV
19278if test $ac_cv_header_stdc = yes; then
19279 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19281/* end confdefs.h. */
19282#include <stdlib.h>
b686ecb5 19283
d5835df2
TV
19284_ACEOF
19285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19286 $EGREP "free" >/dev/null 2>&1; then :
b686ecb5 19287
d5835df2
TV
19288else
19289 ac_cv_header_stdc=no
740ce350 19290fi
d5835df2 19291rm -f conftest*
740ce350 19292
b686ecb5
JM
19293fi
19294
d5835df2
TV
19295if test $ac_cv_header_stdc = yes; then
19296 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19297 if test "$cross_compiling" = yes; then :
19298 :
862776f2 19299else
d5835df2
TV
19300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19301/* end confdefs.h. */
19302#include <ctype.h>
19303#include <stdlib.h>
19304#if ((' ' & 0x0FF) == 0x020)
19305# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19306# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19307#else
19308# define ISLOWER(c) \
19309 (('a' <= (c) && (c) <= 'i') \
19310 || ('j' <= (c) && (c) <= 'r') \
19311 || ('s' <= (c) && (c) <= 'z'))
19312# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19313#endif
b686ecb5 19314
d5835df2
TV
19315#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19316int
19317main ()
19318{
19319 int i;
19320 for (i = 0; i < 256; i++)
19321 if (XOR (islower (i), ISLOWER (i))
19322 || toupper (i) != TOUPPER (i))
19323 return 2;
19324 return 0;
19325}
19326_ACEOF
19327if ac_fn_c_try_run "$LINENO"; then :
b686ecb5 19328
862776f2 19329else
d5835df2
TV
19330 ac_cv_header_stdc=no
19331fi
19332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19333 conftest.$ac_objext conftest.beam conftest.$ac_ext
862776f2 19334fi
b686ecb5 19335
b686ecb5 19336fi
d5835df2
TV
19337fi
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
19339$as_echo "$ac_cv_header_stdc" >&6; }
19340if test $ac_cv_header_stdc = yes; then
19341
19342$as_echo "#define STDC_HEADERS 1" >>confdefs.h
b686ecb5 19343
b686ecb5
JM
19344fi
19345
d5835df2
TV
19346 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
19347# for constant arguments. Useless!
19348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
19349$as_echo_n "checking for working alloca.h... " >&6; }
19350if ${ac_cv_working_alloca_h+:} false; then :
862776f2
AA
19351 $as_echo_n "(cached) " >&6
19352else
d5835df2
TV
19353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19354/* end confdefs.h. */
19355#include <alloca.h>
19356int
19357main ()
19358{
19359char *p = (char *) alloca (2 * sizeof (int));
19360 if (p) return 0;
19361 ;
19362 return 0;
19363}
19364_ACEOF
19365if ac_fn_c_try_link "$LINENO"; then :
19366 ac_cv_working_alloca_h=yes
862776f2 19367else
d5835df2 19368 ac_cv_working_alloca_h=no
862776f2 19369fi
d5835df2
TV
19370rm -f core conftest.err conftest.$ac_objext \
19371 conftest$ac_exeext conftest.$ac_ext
862776f2 19372fi
d5835df2
TV
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
19374$as_echo "$ac_cv_working_alloca_h" >&6; }
19375if test $ac_cv_working_alloca_h = yes; then
19376
19377$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
b686ecb5 19378
b686ecb5
JM
19379fi
19380
d5835df2
TV
19381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
19382$as_echo_n "checking for alloca... " >&6; }
19383if ${ac_cv_func_alloca_works+:} false; then :
862776f2
AA
19384 $as_echo_n "(cached) " >&6
19385else
d5835df2
TV
19386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19387/* end confdefs.h. */
19388#ifdef __GNUC__
19389# define alloca __builtin_alloca
19390#else
19391# ifdef _MSC_VER
19392# include <malloc.h>
19393# define alloca _alloca
19394# else
19395# ifdef HAVE_ALLOCA_H
19396# include <alloca.h>
19397# else
19398# ifdef _AIX
19399 #pragma alloca
19400# else
19401# ifndef alloca /* predefined by HP cc +Olibcalls */
19402void *alloca (size_t);
19403# endif
19404# endif
19405# endif
19406# endif
19407#endif
19408
19409int
19410main ()
19411{
19412char *p = (char *) alloca (1);
19413 if (p) return 0;
19414 ;
19415 return 0;
19416}
19417_ACEOF
19418if ac_fn_c_try_link "$LINENO"; then :
19419 ac_cv_func_alloca_works=yes
862776f2 19420else
d5835df2 19421 ac_cv_func_alloca_works=no
862776f2 19422fi
d5835df2
TV
19423rm -f core conftest.err conftest.$ac_objext \
19424 conftest$ac_exeext conftest.$ac_ext
19425fi
19426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
19427$as_echo "$ac_cv_func_alloca_works" >&6; }
b686ecb5 19428
d5835df2 19429if test $ac_cv_func_alloca_works = yes; then
b686ecb5 19430
d5835df2 19431$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
b686ecb5 19432
d5835df2
TV
19433else
19434 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
19435# that cause trouble. Some versions do not even contain alloca or
19436# contain a buggy version. If you still want to use their alloca,
19437# use ar to extract alloca.o from them instead of compiling alloca.c.
b686ecb5 19438
d5835df2 19439ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
b686ecb5 19440
d5835df2 19441$as_echo "#define C_ALLOCA 1" >>confdefs.h
b686ecb5 19442
b686ecb5 19443
d5835df2
TV
19444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
19445$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
19446if ${ac_cv_os_cray+:} false; then :
19447 $as_echo_n "(cached) " >&6
19448else
19449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19450/* end confdefs.h. */
19451#if defined CRAY && ! defined CRAY2
19452webecray
19453#else
19454wenotbecray
19455#endif
b686ecb5 19456
d5835df2
TV
19457_ACEOF
19458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19459 $EGREP "webecray" >/dev/null 2>&1; then :
19460 ac_cv_os_cray=yes
862776f2 19461else
d5835df2 19462 ac_cv_os_cray=no
862776f2 19463fi
d5835df2 19464rm -f conftest*
862776f2 19465
862776f2 19466fi
d5835df2
TV
19467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
19468$as_echo "$ac_cv_os_cray" >&6; }
19469if test $ac_cv_os_cray = yes; then
19470 for ac_func in _getb67 GETB67 getb67; do
19471 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19472ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19473if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19474
19475cat >>confdefs.h <<_ACEOF
19476#define CRAY_STACKSEG_END $ac_func
19477_ACEOF
19478
19479 break
862776f2 19480fi
d5835df2 19481
862776f2 19482 done
862776f2
AA
19483fi
19484
d5835df2
TV
19485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
19486$as_echo_n "checking stack direction for C alloca... " >&6; }
19487if ${ac_cv_c_stack_direction+:} false; then :
862776f2
AA
19488 $as_echo_n "(cached) " >&6
19489else
d5835df2
TV
19490 if test "$cross_compiling" = yes; then :
19491 ac_cv_c_stack_direction=0
862776f2 19492else
d5835df2
TV
19493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19494/* end confdefs.h. */
19495$ac_includes_default
19496int
19497find_stack_direction (int *addr, int depth)
19498{
19499 int dir, dummy = 0;
19500 if (! addr)
19501 addr = &dummy;
19502 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
19503 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
19504 return dir + dummy;
19505}
19506
19507int
19508main (int argc, char **argv)
19509{
19510 return find_stack_direction (0, argc + !argv + 20) < 0;
19511}
19512_ACEOF
19513if ac_fn_c_try_run "$LINENO"; then :
19514 ac_cv_c_stack_direction=1
19515else
19516 ac_cv_c_stack_direction=-1
862776f2 19517fi
d5835df2
TV
19518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19519 conftest.$ac_objext conftest.beam conftest.$ac_ext
862776f2 19520fi
862776f2 19521
d5835df2
TV
19522fi
19523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
19524$as_echo "$ac_cv_c_stack_direction" >&6; }
19525cat >>confdefs.h <<_ACEOF
19526#define STACK_DIRECTION $ac_cv_c_stack_direction
19527_ACEOF
862776f2
AA
19528
19529
862776f2
AA
19530fi
19531
19532
d5835df2
TV
19533 WIN32APILIBS=
19534 case ${host} in
19535 *mingw32*)
862776f2 19536
d5835df2 19537$as_echo "#define USE_WIN32API 1" >>confdefs.h
862776f2 19538
d5835df2
TV
19539 WIN32APILIBS="-lws2_32"
19540 ;;
19541 esac
862776f2
AA
19542
19543
d5835df2
TV
19544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
19545$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
19546if ${am_cv_langinfo_codeset+:} false; then :
19547 $as_echo_n "(cached) " >&6
19548else
19549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19550/* end confdefs.h. */
19551#include <langinfo.h>
19552int
19553main ()
19554{
19555char* cs = nl_langinfo(CODESET);
19556 ;
19557 return 0;
19558}
19559_ACEOF
19560if ac_fn_c_try_link "$LINENO"; then :
19561 am_cv_langinfo_codeset=yes
19562else
19563 am_cv_langinfo_codeset=no
19564fi
19565rm -f core conftest.err conftest.$ac_objext \
19566 conftest$ac_exeext conftest.$ac_ext
862776f2 19567
d5835df2
TV
19568fi
19569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
19570$as_echo "$am_cv_langinfo_codeset" >&6; }
19571 if test $am_cv_langinfo_codeset = yes; then
862776f2 19572
d5835df2 19573$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
862776f2 19574
d5835df2 19575 fi
862776f2 19576
862776f2 19577
11fdaff1
SM
19578for ac_header in \
19579 dlfcn.h \
19580 linux/elf.h \
19581 linux/perf_event.h \
19582 locale.h \
19583 memory.h \
19584 poll.h \
19585 proc_service.h \
19586 signal.h \
19587 sys/poll.h \
19588 sys/resource.h \
19589 sys/select.h \
19590 sys/socket.h \
19591 sys/un.h \
19592 sys/wait.h \
19593 termios.h \
19594 thread_db.h \
19595 wait.h \
19596
d5835df2
TV
19597do :
19598 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19599ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19600if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19601 cat >>confdefs.h <<_ACEOF
19602#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19603_ACEOF
862776f2 19604
d5835df2 19605fi
862776f2 19606
d5835df2 19607done
862776f2 19608
862776f2 19609
862776f2 19610
d5835df2
TV
19611for ac_func in getpagesize
19612do :
19613 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19614if test "x$ac_cv_func_getpagesize" = xyes; then :
19615 cat >>confdefs.h <<_ACEOF
19616#define HAVE_GETPAGESIZE 1
19617_ACEOF
862776f2
AA
19618
19619fi
d5835df2 19620done
862776f2 19621
d5835df2
TV
19622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
19623$as_echo_n "checking for working mmap... " >&6; }
19624if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
19625 $as_echo_n "(cached) " >&6
862776f2 19626else
d5835df2
TV
19627 if test "$cross_compiling" = yes; then :
19628 ac_cv_func_mmap_fixed_mapped=no
19629else
19630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19631/* end confdefs.h. */
19632$ac_includes_default
19633/* malloc might have been renamed as rpl_malloc. */
19634#undef malloc
862776f2 19635
d5835df2
TV
19636/* Thanks to Mike Haertel and Jim Avera for this test.
19637 Here is a matrix of mmap possibilities:
19638 mmap private not fixed
19639 mmap private fixed at somewhere currently unmapped
19640 mmap private fixed at somewhere already mapped
19641 mmap shared not fixed
19642 mmap shared fixed at somewhere currently unmapped
19643 mmap shared fixed at somewhere already mapped
19644 For private mappings, we should verify that changes cannot be read()
19645 back from the file, nor mmap's back from the file at a different
19646 address. (There have been systems where private was not correctly
19647 implemented like the infamous i386 svr4.0, and systems where the
19648 VM page cache was not coherent with the file system buffer cache
19649 like early versions of FreeBSD and possibly contemporary NetBSD.)
19650 For shared mappings, we should conversely verify that changes get
19651 propagated back to all the places they're supposed to be.
862776f2 19652
d5835df2
TV
19653 Grep wants private fixed already mapped.
19654 The main things grep needs to know about mmap are:
19655 * does it exist and is it safe to write into the mmap'd area
19656 * how to use it (BSD variants) */
862776f2 19657
d5835df2
TV
19658#include <fcntl.h>
19659#include <sys/mman.h>
862776f2 19660
d5835df2
TV
19661#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
19662char *malloc ();
19663#endif
862776f2 19664
d5835df2
TV
19665/* This mess was copied from the GNU getpagesize.h. */
19666#ifndef HAVE_GETPAGESIZE
19667# ifdef _SC_PAGESIZE
19668# define getpagesize() sysconf(_SC_PAGESIZE)
19669# else /* no _SC_PAGESIZE */
19670# ifdef HAVE_SYS_PARAM_H
19671# include <sys/param.h>
19672# ifdef EXEC_PAGESIZE
19673# define getpagesize() EXEC_PAGESIZE
19674# else /* no EXEC_PAGESIZE */
19675# ifdef NBPG
19676# define getpagesize() NBPG * CLSIZE
19677# ifndef CLSIZE
19678# define CLSIZE 1
19679# endif /* no CLSIZE */
19680# else /* no NBPG */
19681# ifdef NBPC
19682# define getpagesize() NBPC
19683# else /* no NBPC */
19684# ifdef PAGESIZE
19685# define getpagesize() PAGESIZE
19686# endif /* PAGESIZE */
19687# endif /* no NBPC */
19688# endif /* no NBPG */
19689# endif /* no EXEC_PAGESIZE */
19690# else /* no HAVE_SYS_PARAM_H */
19691# define getpagesize() 8192 /* punt totally */
19692# endif /* no HAVE_SYS_PARAM_H */
19693# endif /* no _SC_PAGESIZE */
862776f2 19694
d5835df2 19695#endif /* no HAVE_GETPAGESIZE */
862776f2 19696
d5835df2
TV
19697int
19698main ()
19699{
19700 char *data, *data2, *data3;
19701 const char *cdata2;
19702 int i, pagesize;
19703 int fd, fd2;
862776f2 19704
d5835df2 19705 pagesize = getpagesize ();
862776f2 19706
d5835df2
TV
19707 /* First, make a file with some known garbage in it. */
19708 data = (char *) malloc (pagesize);
19709 if (!data)
19710 return 1;
19711 for (i = 0; i < pagesize; ++i)
19712 *(data + i) = rand ();
19713 umask (0);
19714 fd = creat ("conftest.mmap", 0600);
19715 if (fd < 0)
19716 return 2;
19717 if (write (fd, data, pagesize) != pagesize)
19718 return 3;
19719 close (fd);
862776f2 19720
d5835df2
TV
19721 /* Next, check that the tail of a page is zero-filled. File must have
19722 non-zero length, otherwise we risk SIGBUS for entire page. */
19723 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
19724 if (fd2 < 0)
19725 return 4;
19726 cdata2 = "";
19727 if (write (fd2, cdata2, 1) != 1)
19728 return 5;
19729 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
19730 if (data2 == MAP_FAILED)
19731 return 6;
19732 for (i = 0; i < pagesize; ++i)
19733 if (*(data2 + i))
19734 return 7;
19735 close (fd2);
19736 if (munmap (data2, pagesize))
19737 return 8;
862776f2 19738
d5835df2
TV
19739 /* Next, try to mmap the file at a fixed address which already has
19740 something else allocated at it. If we can, also make sure that
19741 we see the same garbage. */
19742 fd = open ("conftest.mmap", O_RDWR);
19743 if (fd < 0)
19744 return 9;
19745 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
19746 MAP_PRIVATE | MAP_FIXED, fd, 0L))
19747 return 10;
19748 for (i = 0; i < pagesize; ++i)
19749 if (*(data + i) != *(data2 + i))
19750 return 11;
862776f2 19751
d5835df2
TV
19752 /* Finally, make sure that changes to the mapped area do not
19753 percolate back to the file as seen by read(). (This is a bug on
19754 some variants of i386 svr4.0.) */
19755 for (i = 0; i < pagesize; ++i)
19756 *(data2 + i) = *(data2 + i) + 1;
19757 data3 = (char *) malloc (pagesize);
19758 if (!data3)
19759 return 12;
19760 if (read (fd, data3, pagesize) != pagesize)
19761 return 13;
19762 for (i = 0; i < pagesize; ++i)
19763 if (*(data + i) != *(data3 + i))
19764 return 14;
19765 close (fd);
19766 return 0;
19767}
19768_ACEOF
19769if ac_fn_c_try_run "$LINENO"; then :
19770 ac_cv_func_mmap_fixed_mapped=yes
862776f2 19771else
d5835df2
TV
19772 ac_cv_func_mmap_fixed_mapped=no
19773fi
19774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19775 conftest.$ac_objext conftest.beam conftest.$ac_ext
19776fi
862776f2 19777
d5835df2
TV
19778fi
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
19780$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
19781if test $ac_cv_func_mmap_fixed_mapped = yes; then
862776f2 19782
d5835df2 19783$as_echo "#define HAVE_MMAP 1" >>confdefs.h
862776f2 19784
d5835df2
TV
19785fi
19786rm -f conftest.mmap conftest.txt
862776f2 19787
d5835df2
TV
19788 for ac_header in vfork.h
19789do :
19790 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
19791if test "x$ac_cv_header_vfork_h" = xyes; then :
19792 cat >>confdefs.h <<_ACEOF
19793#define HAVE_VFORK_H 1
19794_ACEOF
862776f2 19795
d5835df2 19796fi
862776f2 19797
d5835df2 19798done
862776f2 19799
d5835df2
TV
19800for ac_func in fork vfork
19801do :
19802 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19803ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19804if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19805 cat >>confdefs.h <<_ACEOF
19806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19807_ACEOF
862776f2 19808
d5835df2
TV
19809fi
19810done
862776f2 19811
d5835df2
TV
19812if test "x$ac_cv_func_fork" = xyes; then
19813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
19814$as_echo_n "checking for working fork... " >&6; }
19815if ${ac_cv_func_fork_works+:} false; then :
862776f2
AA
19816 $as_echo_n "(cached) " >&6
19817else
d5835df2
TV
19818 if test "$cross_compiling" = yes; then :
19819 ac_cv_func_fork_works=cross
19820else
19821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
862776f2 19822/* end confdefs.h. */
d5835df2 19823$ac_includes_default
862776f2
AA
19824int
19825main ()
19826{
d5835df2
TV
19827
19828 /* By Ruediger Kuhlmann. */
19829 return fork () < 0;
19830
862776f2
AA
19831 ;
19832 return 0;
19833}
19834_ACEOF
d5835df2
TV
19835if ac_fn_c_try_run "$LINENO"; then :
19836 ac_cv_func_fork_works=yes
862776f2 19837else
d5835df2 19838 ac_cv_func_fork_works=no
862776f2 19839fi
d5835df2
TV
19840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19841 conftest.$ac_objext conftest.beam conftest.$ac_ext
862776f2 19842fi
862776f2 19843
d5835df2
TV
19844fi
19845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
19846$as_echo "$ac_cv_func_fork_works" >&6; }
862776f2 19847
d5835df2
TV
19848else
19849 ac_cv_func_fork_works=$ac_cv_func_fork
19850fi
19851if test "x$ac_cv_func_fork_works" = xcross; then
19852 case $host in
19853 *-*-amigaos* | *-*-msdosdjgpp*)
19854 # Override, as these systems have only a dummy fork() stub
19855 ac_cv_func_fork_works=no
19856 ;;
19857 *)
19858 ac_cv_func_fork_works=yes
19859 ;;
19860 esac
19861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
19862$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
19863fi
19864ac_cv_func_vfork_works=$ac_cv_func_vfork
19865if test "x$ac_cv_func_vfork" = xyes; then
19866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
19867$as_echo_n "checking for working vfork... " >&6; }
19868if ${ac_cv_func_vfork_works+:} false; then :
862776f2
AA
19869 $as_echo_n "(cached) " >&6
19870else
d5835df2
TV
19871 if test "$cross_compiling" = yes; then :
19872 ac_cv_func_vfork_works=cross
19873else
19874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
862776f2 19875/* end confdefs.h. */
d5835df2
TV
19876/* Thanks to Paul Eggert for this test. */
19877$ac_includes_default
19878#include <sys/wait.h>
19879#ifdef HAVE_VFORK_H
19880# include <vfork.h>
19881#endif
19882/* On some sparc systems, changes by the child to local and incoming
19883 argument registers are propagated back to the parent. The compiler
19884 is told about this with #include <vfork.h>, but some compilers
19885 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
19886 static variable whose address is put into a register that is
19887 clobbered by the vfork. */
19888static void
19889#ifdef __cplusplus
19890sparc_address_test (int arg)
19891# else
19892sparc_address_test (arg) int arg;
19893#endif
19894{
19895 static pid_t child;
19896 if (!child) {
19897 child = vfork ();
19898 if (child < 0) {
19899 perror ("vfork");
19900 _exit(2);
19901 }
19902 if (!child) {
19903 arg = getpid();
19904 write(-1, "", 0);
19905 _exit (arg);
19906 }
19907 }
19908}
19909
862776f2
AA
19910int
19911main ()
19912{
d5835df2
TV
19913 pid_t parent = getpid ();
19914 pid_t child;
862776f2 19915
d5835df2 19916 sparc_address_test (0);
862776f2 19917
d5835df2 19918 child = vfork ();
862776f2 19919
d5835df2
TV
19920 if (child == 0) {
19921 /* Here is another test for sparc vfork register problems. This
19922 test uses lots of local variables, at least as many local
19923 variables as main has allocated so far including compiler
19924 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
19925 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
19926 reuse the register of parent for one of the local variables,
19927 since it will think that parent can't possibly be used any more
19928 in this routine. Assigning to the local variable will thus
19929 munge parent in the parent process. */
19930 pid_t
19931 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19932 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19933 /* Convince the compiler that p..p7 are live; otherwise, it might
19934 use the same hardware register for all 8 local variables. */
19935 if (p != p1 || p != p2 || p != p3 || p != p4
19936 || p != p5 || p != p6 || p != p7)
19937 _exit(1);
862776f2 19938
d5835df2
TV
19939 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19940 from child file descriptors. If the child closes a descriptor
19941 before it execs or exits, this munges the parent's descriptor
19942 as well. Test for this by closing stdout in the child. */
19943 _exit(close(fileno(stdout)) != 0);
19944 } else {
19945 int status;
19946 struct stat st;
862776f2 19947
d5835df2
TV
19948 while (wait(&status) != child)
19949 ;
19950 return (
19951 /* Was there some problem with vforking? */
19952 child < 0
862776f2 19953
d5835df2
TV
19954 /* Did the child fail? (This shouldn't happen.) */
19955 || status
862776f2 19956
d5835df2
TV
19957 /* Did the vfork/compiler bug occur? */
19958 || parent != getpid()
862776f2 19959
d5835df2
TV
19960 /* Did the file descriptor bug occur? */
19961 || fstat(fileno(stdout), &st) != 0
19962 );
19963 }
19964}
19965_ACEOF
19966if ac_fn_c_try_run "$LINENO"; then :
19967 ac_cv_func_vfork_works=yes
19968else
19969 ac_cv_func_vfork_works=no
19970fi
19971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19972 conftest.$ac_objext conftest.beam conftest.$ac_ext
19973fi
862776f2 19974
d5835df2
TV
19975fi
19976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
19977$as_echo "$ac_cv_func_vfork_works" >&6; }
862776f2 19978
d5835df2
TV
19979fi;
19980if test "x$ac_cv_func_fork_works" = xcross; then
19981 ac_cv_func_vfork_works=$ac_cv_func_vfork
19982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
19983$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
19984fi
862776f2 19985
d5835df2 19986if test "x$ac_cv_func_vfork_works" = xyes; then
862776f2 19987
d5835df2 19988$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
862776f2 19989
d5835df2
TV
19990else
19991
19992$as_echo "#define vfork fork" >>confdefs.h
19993
19994fi
19995if test "x$ac_cv_func_fork_works" = xyes; then
19996
19997$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
19998
19999fi
20000
20001 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
20002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
20003$as_echo_n "checking for library containing socketpair... " >&6; }
20004if ${ac_cv_search_socketpair+:} false; then :
862776f2
AA
20005 $as_echo_n "(cached) " >&6
20006else
d5835df2
TV
20007 ac_func_search_save_LIBS=$LIBS
20008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
862776f2
AA
20009/* end confdefs.h. */
20010
d5835df2
TV
20011/* Override any GCC internal prototype to avoid an error.
20012 Use char because int might match the return type of a GCC
20013 builtin and then its argument prototype would still apply. */
20014#ifdef __cplusplus
20015extern "C"
862776f2 20016#endif
d5835df2 20017char socketpair ();
862776f2
AA
20018int
20019main ()
20020{
d5835df2 20021return socketpair ();
862776f2
AA
20022 ;
20023 return 0;
20024}
20025_ACEOF
d5835df2
TV
20026for ac_lib in '' socket; do
20027 if test -z "$ac_lib"; then
20028 ac_res="none required"
20029 else
20030 ac_res=-l$ac_lib
20031 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20032 fi
20033 if ac_fn_c_try_link "$LINENO"; then :
20034 ac_cv_search_socketpair=$ac_res
862776f2
AA
20035fi
20036rm -f core conftest.err conftest.$ac_objext \
d5835df2
TV
20037 conftest$ac_exeext
20038 if ${ac_cv_search_socketpair+:} false; then :
20039 break
862776f2 20040fi
d5835df2
TV
20041done
20042if ${ac_cv_search_socketpair+:} false; then :
862776f2 20043
d5835df2
TV
20044else
20045 ac_cv_search_socketpair=no
20046fi
20047rm conftest.$ac_ext
20048LIBS=$ac_func_search_save_LIBS
20049fi
20050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
20051$as_echo "$ac_cv_search_socketpair" >&6; }
20052ac_res=$ac_cv_search_socketpair
20053if test "$ac_res" != no; then :
20054 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
862776f2 20055
d5835df2 20056fi
862776f2 20057
11fdaff1
SM
20058 for ac_func in \
20059 fdwalk \
20060 getauxval \
20061 getrlimit \
20062 getrusage \
20063 pipe \
20064 pipe2 \
20065 poll \
20066 ptrace64 \
20067 sbrk \
20068 setns \
20069 setpgid \
20070 setpgrp \
20071 sigaction \
20072 sigaltstack \
20073 sigprocmask \
20074 sigtimedwait \
20075 socketpair \
20076
d5835df2
TV
20077do :
20078 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20079ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20080if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20081 cat >>confdefs.h <<_ACEOF
20082#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20083_ACEOF
862776f2 20084
d5835df2
TV
20085fi
20086done
862776f2
AA
20087
20088
d5835df2
TV
20089 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
20090 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
20091 # only in linux/personality.h.
20092 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
20093"
20094if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
20095 ac_have_decl=1
20096else
20097 ac_have_decl=0
20098fi
862776f2 20099
d5835df2
TV
20100cat >>confdefs.h <<_ACEOF
20101#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
20102_ACEOF
862776f2 20103
862776f2 20104
d5835df2
TV
20105 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
20106if test "x$ac_cv_have_decl_strstr" = xyes; then :
20107 ac_have_decl=1
20108else
20109 ac_have_decl=0
20110fi
862776f2 20111
d5835df2
TV
20112cat >>confdefs.h <<_ACEOF
20113#define HAVE_DECL_STRSTR $ac_have_decl
20114_ACEOF
862776f2 20115
862776f2 20116
d5835df2
TV
20117 # ----------------------- #
20118 # Checks for structures. #
20119 # ----------------------- #
862776f2 20120
d5835df2
TV
20121 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
20122if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
862776f2 20123
d5835df2
TV
20124cat >>confdefs.h <<_ACEOF
20125#define HAVE_STRUCT_STAT_ST_BLOCKS 1
862776f2 20126_ACEOF
d5835df2
TV
20127
20128
862776f2 20129fi
d5835df2
TV
20130ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
20131if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
862776f2 20132
d5835df2
TV
20133cat >>confdefs.h <<_ACEOF
20134#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
862776f2 20135_ACEOF
d5835df2 20136
862776f2
AA
20137
20138fi
862776f2 20139
d5835df2
TV
20140
20141 # On FreeBSD we need libutil for the kinfo_get* functions. On
20142 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
20143 # Figure out which one to use.
20144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
20145$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
20146if ${ac_cv_search_kinfo_getfile+:} false; then :
20147 $as_echo_n "(cached) " >&6
862776f2 20148else
d5835df2
TV
20149 ac_func_search_save_LIBS=$LIBS
20150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
862776f2
AA
20151/* end confdefs.h. */
20152
d5835df2
TV
20153/* Override any GCC internal prototype to avoid an error.
20154 Use char because int might match the return type of a GCC
20155 builtin and then its argument prototype would still apply. */
20156#ifdef __cplusplus
20157extern "C"
862776f2 20158#endif
d5835df2 20159char kinfo_getfile ();
862776f2
AA
20160int
20161main ()
20162{
d5835df2 20163return kinfo_getfile ();
862776f2
AA
20164 ;
20165 return 0;
20166}
20167_ACEOF
d5835df2
TV
20168for ac_lib in '' util util-freebsd; do
20169 if test -z "$ac_lib"; then
20170 ac_res="none required"
20171 else
20172 ac_res=-l$ac_lib
20173 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20174 fi
20175 if ac_fn_c_try_link "$LINENO"; then :
20176 ac_cv_search_kinfo_getfile=$ac_res
862776f2 20177fi
d5835df2
TV
20178rm -f core conftest.err conftest.$ac_objext \
20179 conftest$ac_exeext
20180 if ${ac_cv_search_kinfo_getfile+:} false; then :
20181 break
862776f2 20182fi
d5835df2
TV
20183done
20184if ${ac_cv_search_kinfo_getfile+:} false; then :
862776f2 20185
d5835df2
TV
20186else
20187 ac_cv_search_kinfo_getfile=no
862776f2 20188fi
d5835df2
TV
20189rm conftest.$ac_ext
20190LIBS=$ac_func_search_save_LIBS
20191fi
20192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
20193$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
20194ac_res=$ac_cv_search_kinfo_getfile
20195if test "$ac_res" != no; then :
20196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
862776f2 20197
d5835df2 20198fi
862776f2
AA
20199
20200
d5835df2
TV
20201 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
20202 for ac_func in kinfo_getfile
20203do :
20204 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
20205if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
20206 cat >>confdefs.h <<_ACEOF
20207#define HAVE_KINFO_GETFILE 1
20208_ACEOF
862776f2 20209
d5835df2
TV
20210fi
20211done
862776f2
AA
20212
20213
d5835df2
TV
20214 # ----------------------- #
20215 # Check for threading. #
20216 # ----------------------- #
862776f2 20217
d5835df2
TV
20218 # Check whether --enable-threading was given.
20219if test "${enable_threading+set}" = set; then :
20220 enableval=$enable_threading; case "$enableval" in
20221 yes) want_threading=yes ;;
20222 no) want_threading=no ;;
20223 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
20224 esac
20225else
3e09762b 20226 want_threading=auto
d5835df2 20227fi
862776f2 20228
862776f2 20229
d5835df2 20230 # Check for std::thread. This does not work on some platforms, like
3e09762b
PA
20231 # mingw using the win32 threads model with gcc older than 13, and
20232 # DJGPP.
d5835df2
TV
20233 ac_ext=cpp
20234ac_cpp='$CXXCPP $CPPFLAGS'
20235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
862776f2 20238
862776f2 20239
862776f2 20240
862776f2 20241
862776f2 20242
d5835df2
TV
20243ac_ext=c
20244ac_cpp='$CPP $CPPFLAGS'
20245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20247ac_compiler_gnu=$ac_cv_c_compiler_gnu
862776f2 20248
d5835df2 20249ax_pthread_ok=no
862776f2 20250
d5835df2
TV
20251# We used to check for pthread.h first, but this fails if pthread.h
20252# requires special compiler flags (e.g. on Tru64 or Sequent).
20253# It gets checked for in the link test anyway.
862776f2 20254
d5835df2
TV
20255# First of all, check if the user has set any of the PTHREAD_LIBS,
20256# etcetera environment variables, and if threads linking works using
20257# them:
20258if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
20259 ax_pthread_save_CC="$CC"
20260 ax_pthread_save_CFLAGS="$CFLAGS"
20261 ax_pthread_save_LIBS="$LIBS"
20262 if test "x$PTHREAD_CC" != "x"; then :
20263 CC="$PTHREAD_CC"
862776f2 20264fi
d5835df2
TV
20265 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
20266 LIBS="$PTHREAD_LIBS $LIBS"
20267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
20268$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
20269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20270/* end confdefs.h. */
862776f2 20271
d5835df2
TV
20272/* Override any GCC internal prototype to avoid an error.
20273 Use char because int might match the return type of a GCC
20274 builtin and then its argument prototype would still apply. */
20275#ifdef __cplusplus
20276extern "C"
20277#endif
20278char pthread_join ();
20279int
20280main ()
20281{
20282return pthread_join ();
20283 ;
20284 return 0;
20285}
20286_ACEOF
20287if ac_fn_c_try_link "$LINENO"; then :
20288 ax_pthread_ok=yes
20289fi
20290rm -f core conftest.err conftest.$ac_objext \
20291 conftest$ac_exeext conftest.$ac_ext
20292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
20293$as_echo "$ax_pthread_ok" >&6; }
20294 if test "x$ax_pthread_ok" = "xno"; then
20295 PTHREAD_LIBS=""
20296 PTHREAD_CFLAGS=""
862776f2 20297 fi
d5835df2
TV
20298 CC="$ax_pthread_save_CC"
20299 CFLAGS="$ax_pthread_save_CFLAGS"
20300 LIBS="$ax_pthread_save_LIBS"
20301fi
862776f2 20302
d5835df2
TV
20303# We must check for the threads library under a number of different
20304# names; the ordering is very important because some systems
20305# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
20306# libraries is broken (non-POSIX).
862776f2 20307
d5835df2
TV
20308# Create a list of thread flags to try. Items starting with a "-" are
20309# C compiler flags, and other items are library names, except for "none"
20310# which indicates that we try without any flags at all, and "pthread-config"
20311# which is a program returning the flags for the Pth emulation library.
862776f2 20312
d5835df2 20313ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
862776f2 20314
d5835df2
TV
20315# The ordering *is* (sometimes) important. Some notes on the
20316# individual items follow:
862776f2 20317
d5835df2
TV
20318# pthreads: AIX (must check this before -lpthread)
20319# none: in case threads are in libc; should be tried before -Kthread and
20320# other compiler flags to prevent continual compiler warnings
20321# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
20322# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
20323# (Note: HP C rejects this with "bad form for `-t' option")
20324# -pthreads: Solaris/gcc (Note: HP C also rejects)
20325# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
20326# doesn't hurt to check since this sometimes defines pthreads and
20327# -D_REENTRANT too), HP C (must be checked before -lpthread, which
20328# is present but should not be used directly; and before -mthreads,
20329# because the compiler interprets this as "-mt" + "-hreads")
20330# -mthreads: Mingw32/gcc, Lynx/gcc
20331# pthread: Linux, etcetera
20332# --thread-safe: KAI C++
20333# pthread-config: use pthread-config program (for GNU Pth library)
862776f2 20334
d5835df2 20335case $host_os in
862776f2 20336
d5835df2 20337 freebsd*)
862776f2 20338
d5835df2
TV
20339 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
20340 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
862776f2 20341
d5835df2
TV
20342 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
20343 ;;
862776f2 20344
d5835df2 20345 hpux*)
862776f2 20346
d5835df2
TV
20347 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
20348 # multi-threading and also sets -lpthread."
862776f2 20349
d5835df2
TV
20350 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
20351 ;;
862776f2 20352
d5835df2 20353 openedition*)
862776f2 20354
d5835df2
TV
20355 # IBM z/OS requires a feature-test macro to be defined in order to
20356 # enable POSIX threads at all, so give the user a hint if this is
20357 # not set. (We don't define these ourselves, as they can affect
20358 # other portions of the system API in unpredictable ways.)
862776f2 20359
d5835df2 20360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
862776f2
AA
20361/* end confdefs.h. */
20362
d5835df2
TV
20363# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
20364 AX_PTHREAD_ZOS_MISSING
20365# endif
862776f2 20366
862776f2 20367_ACEOF
d5835df2
TV
20368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20369 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
20370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
20371$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
862776f2 20372fi
d5835df2 20373rm -f conftest*
862776f2 20374
d5835df2 20375 ;;
862776f2 20376
d5835df2 20377 solaris*)
862776f2 20378
d5835df2
TV
20379 # On Solaris (at least, for some versions), libc contains stubbed
20380 # (non-functional) versions of the pthreads routines, so link-based
20381 # tests will erroneously succeed. (N.B.: The stubs are missing
20382 # pthread_cleanup_push, or rather a function called by this macro,
20383 # so we could check for that, but who knows whether they'll stub
20384 # that too in a future libc.) So we'll check first for the
20385 # standard Solaris way of linking pthreads (-mt -lpthread).
862776f2 20386
d5835df2
TV
20387 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
20388 ;;
20389esac
862776f2 20390
d5835df2 20391# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
862776f2 20392
d5835df2
TV
20393if test "x$GCC" = "xyes"; then :
20394 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
20395fi
862776f2 20396
d5835df2
TV
20397# The presence of a feature test macro requesting re-entrant function
20398# definitions is, on some systems, a strong hint that pthreads support is
20399# correctly enabled
862776f2 20400
d5835df2
TV
20401case $host_os in
20402 darwin* | hpux* | linux* | osf* | solaris*)
20403 ax_pthread_check_macro="_REENTRANT"
20404 ;;
862776f2 20405
d5835df2
TV
20406 aix*)
20407 ax_pthread_check_macro="_THREAD_SAFE"
20408 ;;
862776f2 20409
d5835df2
TV
20410 *)
20411 ax_pthread_check_macro="--"
20412 ;;
20413esac
20414if test "x$ax_pthread_check_macro" = "x--"; then :
20415 ax_pthread_check_cond=0
20416else
20417 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
20418fi
862776f2 20419
d5835df2 20420# Are we compiling with Clang?
862776f2 20421
d5835df2
TV
20422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
20423$as_echo_n "checking whether $CC is Clang... " >&6; }
20424if ${ax_cv_PTHREAD_CLANG+:} false; then :
20425 $as_echo_n "(cached) " >&6
20426else
20427 ax_cv_PTHREAD_CLANG=no
20428 # Note that Autoconf sets GCC=yes for Clang as well as GCC
20429 if test "x$GCC" = "xyes"; then
20430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20431/* end confdefs.h. */
20432/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
20433# if defined(__clang__) && defined(__llvm__)
20434 AX_PTHREAD_CC_IS_CLANG
20435# endif
862776f2 20436
d5835df2
TV
20437_ACEOF
20438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20439 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
20440 ax_cv_PTHREAD_CLANG=yes
20441fi
20442rm -f conftest*
862776f2 20443
d5835df2 20444 fi
862776f2
AA
20445
20446fi
d5835df2
TV
20447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
20448$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
20449ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
862776f2 20450
d5835df2 20451ax_pthread_clang_warning=no
862776f2 20452
d5835df2
TV
20453# Clang needs special handling, because older versions handle the -pthread
20454# option in a rather... idiosyncratic way
862776f2 20455
d5835df2 20456if test "x$ax_pthread_clang" = "xyes"; then
862776f2 20457
d5835df2 20458 # Clang takes -pthread; it has never supported any other flag
862776f2 20459
d5835df2
TV
20460 # (Note 1: This will need to be revisited if a system that Clang
20461 # supports has POSIX threads in a separate library. This tends not
20462 # to be the way of modern systems, but it's conceivable.)
862776f2 20463
d5835df2
TV
20464 # (Note 2: On some systems, notably Darwin, -pthread is not needed
20465 # to get POSIX threads support; the API is always present and
20466 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
20467 # -pthread does define _REENTRANT, and while the Darwin headers
20468 # ignore this macro, third-party headers might not.)
862776f2 20469
d5835df2
TV
20470 PTHREAD_CFLAGS="-pthread"
20471 PTHREAD_LIBS=
862776f2 20472
d5835df2 20473 ax_pthread_ok=yes
862776f2 20474
d5835df2
TV
20475 # However, older versions of Clang make a point of warning the user
20476 # that, in an invocation where only linking and no compilation is
20477 # taking place, the -pthread option has no effect ("argument unused
20478 # during compilation"). They expect -pthread to be passed in only
20479 # when source code is being compiled.
20480 #
20481 # Problem is, this is at odds with the way Automake and most other
20482 # C build frameworks function, which is that the same flags used in
20483 # compilation (CFLAGS) are also used in linking. Many systems
20484 # supported by AX_PTHREAD require exactly this for POSIX threads
20485 # support, and in fact it is often not straightforward to specify a
20486 # flag that is used only in the compilation phase and not in
20487 # linking. Such a scenario is extremely rare in practice.
20488 #
20489 # Even though use of the -pthread flag in linking would only print
20490 # a warning, this can be a nuisance for well-run software projects
20491 # that build with -Werror. So if the active version of Clang has
20492 # this misfeature, we search for an option to squash it.
862776f2 20493
d5835df2
TV
20494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
20495$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
20496if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
20497 $as_echo_n "(cached) " >&6
862776f2 20498else
d5835df2
TV
20499 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
20500 # Create an alternate version of $ac_link that compiles and
20501 # links in two steps (.c -> .o, .o -> exe) instead of one
20502 # (.c -> exe), because the warning occurs only in the second
20503 # step
20504 ax_pthread_save_ac_link="$ac_link"
20505 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
20506 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
20507 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
20508 ax_pthread_save_CFLAGS="$CFLAGS"
20509 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
20510 if test "x$ax_pthread_try" = "xunknown"; then :
20511 break
862776f2 20512fi
d5835df2
TV
20513 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
20514 ac_link="$ax_pthread_save_ac_link"
20515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20516/* end confdefs.h. */
20517int main(void){return 0;}
20518_ACEOF
20519if ac_fn_c_try_link "$LINENO"; then :
20520 ac_link="$ax_pthread_2step_ac_link"
20521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20522/* end confdefs.h. */
20523int main(void){return 0;}
20524_ACEOF
20525if ac_fn_c_try_link "$LINENO"; then :
20526 break
20527fi
20528rm -f core conftest.err conftest.$ac_objext \
20529 conftest$ac_exeext conftest.$ac_ext
862776f2 20530
862776f2 20531fi
d5835df2
TV
20532rm -f core conftest.err conftest.$ac_objext \
20533 conftest$ac_exeext conftest.$ac_ext
20534 done
20535 ac_link="$ax_pthread_save_ac_link"
20536 CFLAGS="$ax_pthread_save_CFLAGS"
20537 if test "x$ax_pthread_try" = "x"; then :
20538 ax_pthread_try=no
20539fi
20540 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
862776f2 20541
d5835df2
TV
20542fi
20543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
20544$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
862776f2 20545
d5835df2
TV
20546 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
20547 no | unknown) ;;
20548 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
20549 esac
862776f2 20550
d5835df2 20551fi # $ax_pthread_clang = yes
862776f2 20552
d5835df2
TV
20553if test "x$ax_pthread_ok" = "xno"; then
20554for ax_pthread_try_flag in $ax_pthread_flags; do
862776f2 20555
d5835df2
TV
20556 case $ax_pthread_try_flag in
20557 none)
20558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
20559$as_echo_n "checking whether pthreads work without any flags... " >&6; }
20560 ;;
862776f2 20561
d5835df2
TV
20562 -mt,pthread)
20563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
20564$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
20565 PTHREAD_CFLAGS="-mt"
20566 PTHREAD_LIBS="-lpthread"
20567 ;;
862776f2 20568
d5835df2
TV
20569 -*)
20570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
20571$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
20572 PTHREAD_CFLAGS="$ax_pthread_try_flag"
20573 ;;
862776f2 20574
d5835df2
TV
20575 pthread-config)
20576 # Extract the first word of "pthread-config", so it can be a program name with args.
20577set dummy pthread-config; ac_word=$2
20578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20579$as_echo_n "checking for $ac_word... " >&6; }
20580if ${ac_cv_prog_ax_pthread_config+:} false; then :
862776f2
AA
20581 $as_echo_n "(cached) " >&6
20582else
d5835df2
TV
20583 if test -n "$ax_pthread_config"; then
20584 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
20585else
20586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20587for as_dir in $PATH
20588do
20589 IFS=$as_save_IFS
20590 test -z "$as_dir" && as_dir=.
20591 for ac_exec_ext in '' $ac_executable_extensions; do
20592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20593 ac_cv_prog_ax_pthread_config="yes"
20594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20595 break 2
862776f2 20596 fi
d5835df2
TV
20597done
20598 done
20599IFS=$as_save_IFS
20600
20601 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
862776f2 20602fi
862776f2 20603fi
d5835df2
TV
20604ax_pthread_config=$ac_cv_prog_ax_pthread_config
20605if test -n "$ax_pthread_config"; then
20606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
20607$as_echo "$ax_pthread_config" >&6; }
862776f2 20608else
d5835df2
TV
20609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20610$as_echo "no" >&6; }
862776f2
AA
20611fi
20612
20613
d5835df2
TV
20614 if test "x$ax_pthread_config" = "xno"; then :
20615 continue
20616fi
20617 PTHREAD_CFLAGS="`pthread-config --cflags`"
20618 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
20619 ;;
862776f2 20620
d5835df2
TV
20621 *)
20622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
20623$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
20624 PTHREAD_LIBS="-l$ax_pthread_try_flag"
20625 ;;
20626 esac
862776f2 20627
d5835df2
TV
20628 ax_pthread_save_CFLAGS="$CFLAGS"
20629 ax_pthread_save_LIBS="$LIBS"
20630 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
20631 LIBS="$PTHREAD_LIBS $LIBS"
862776f2 20632
d5835df2
TV
20633 # Check for various functions. We must include pthread.h,
20634 # since some functions may be macros. (On the Sequent, we
20635 # need a special flag -Kthread to make this header compile.)
20636 # We check for pthread_join because it is in -lpthread on IRIX
20637 # while pthread_create is in libc. We check for pthread_attr_init
20638 # due to DEC craziness with -lpthreads. We check for
20639 # pthread_cleanup_push because it is one of the few pthread
20640 # functions on Solaris that doesn't have a non-functional libc stub.
20641 # We try pthread_create on general principles.
862776f2 20642
d5835df2
TV
20643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20644/* end confdefs.h. */
20645#include <pthread.h>
20646# if $ax_pthread_check_cond
20647# error "$ax_pthread_check_macro must be defined"
20648# endif
20649 static void routine(void *a) { a = 0; }
20650 static void *start_routine(void *a) { return a; }
20651int
20652main ()
20653{
20654pthread_t th; pthread_attr_t attr;
20655 pthread_create(&th, 0, start_routine, 0);
20656 pthread_join(th, 0);
20657 pthread_attr_init(&attr);
20658 pthread_cleanup_push(routine, 0);
20659 pthread_cleanup_pop(0) /* ; */
20660 ;
20661 return 0;
20662}
862776f2 20663_ACEOF
d5835df2
TV
20664if ac_fn_c_try_link "$LINENO"; then :
20665 ax_pthread_ok=yes
20666fi
20667rm -f core conftest.err conftest.$ac_objext \
20668 conftest$ac_exeext conftest.$ac_ext
862776f2 20669
d5835df2
TV
20670 CFLAGS="$ax_pthread_save_CFLAGS"
20671 LIBS="$ax_pthread_save_LIBS"
862776f2 20672
d5835df2
TV
20673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
20674$as_echo "$ax_pthread_ok" >&6; }
20675 if test "x$ax_pthread_ok" = "xyes"; then :
20676 break
20677fi
862776f2 20678
d5835df2
TV
20679 PTHREAD_LIBS=""
20680 PTHREAD_CFLAGS=""
20681done
862776f2
AA
20682fi
20683
d5835df2
TV
20684# Various other checks:
20685if test "x$ax_pthread_ok" = "xyes"; then
20686 ax_pthread_save_CFLAGS="$CFLAGS"
20687 ax_pthread_save_LIBS="$LIBS"
20688 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
20689 LIBS="$PTHREAD_LIBS $LIBS"
862776f2 20690
d5835df2
TV
20691 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
20693$as_echo_n "checking for joinable pthread attribute... " >&6; }
20694if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
20695 $as_echo_n "(cached) " >&6
20696else
20697 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
20698 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
20699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20700/* end confdefs.h. */
20701#include <pthread.h>
20702int
20703main ()
20704{
20705int attr = $ax_pthread_attr; return attr /* ; */
20706 ;
20707 return 0;
20708}
20709_ACEOF
20710if ac_fn_c_try_link "$LINENO"; then :
20711 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
20712fi
20713rm -f core conftest.err conftest.$ac_objext \
20714 conftest$ac_exeext conftest.$ac_ext
20715 done
862776f2 20716
d5835df2
TV
20717fi
20718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
20719$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
20720 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
20721 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
20722 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
862776f2
AA
20723
20724cat >>confdefs.h <<_ACEOF
d5835df2 20725#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
862776f2
AA
20726_ACEOF
20727
d5835df2 20728 ax_pthread_joinable_attr_defined=yes
862776f2 20729
d5835df2 20730fi
862776f2 20731
d5835df2
TV
20732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
20733$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
20734if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
20735 $as_echo_n "(cached) " >&6
20736else
20737 ax_cv_PTHREAD_SPECIAL_FLAGS=no
20738 case $host_os in
20739 solaris*)
20740 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
20741 ;;
20742 esac
862776f2 20743
d5835df2
TV
20744fi
20745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
20746$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
20747 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
20748 test "x$ax_pthread_special_flags_added" != "xyes"; then :
20749 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
20750 ax_pthread_special_flags_added=yes
20751fi
862776f2 20752
d5835df2
TV
20753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
20754$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
20755if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
20756 $as_echo_n "(cached) " >&6
862776f2 20757else
d5835df2
TV
20758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759/* end confdefs.h. */
20760#include <pthread.h>
20761int
20762main ()
20763{
20764int i = PTHREAD_PRIO_INHERIT;
20765 ;
20766 return 0;
20767}
20768_ACEOF
20769if ac_fn_c_try_link "$LINENO"; then :
20770 ax_cv_PTHREAD_PRIO_INHERIT=yes
20771else
20772 ax_cv_PTHREAD_PRIO_INHERIT=no
862776f2 20773fi
d5835df2
TV
20774rm -f core conftest.err conftest.$ac_objext \
20775 conftest$ac_exeext conftest.$ac_ext
862776f2 20776
d5835df2
TV
20777fi
20778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
20779$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
20780 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
20781 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
862776f2 20782
d5835df2 20783$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
862776f2 20784
d5835df2 20785 ax_pthread_prio_inherit_defined=yes
862776f2 20786
d5835df2 20787fi
862776f2 20788
d5835df2
TV
20789 CFLAGS="$ax_pthread_save_CFLAGS"
20790 LIBS="$ax_pthread_save_LIBS"
862776f2 20791
d5835df2
TV
20792 # More AIX lossage: compile with *_r variant
20793 if test "x$GCC" != "xyes"; then
20794 case $host_os in
20795 aix*)
20796 case "x/$CC" in #(
20797 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
20798 #handle absolute path differently from PATH based program lookup
20799 case "x$CC" in #(
20800 x/*) :
20801 if as_fn_executable_p ${CC}_r; then :
20802 PTHREAD_CC="${CC}_r"
20803fi ;; #(
20804 *) :
20805 for ac_prog in ${CC}_r
20806do
20807 # Extract the first word of "$ac_prog", so it can be a program name with args.
20808set dummy $ac_prog; ac_word=$2
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20810$as_echo_n "checking for $ac_word... " >&6; }
20811if ${ac_cv_prog_PTHREAD_CC+:} false; then :
20812 $as_echo_n "(cached) " >&6
20813else
20814 if test -n "$PTHREAD_CC"; then
20815 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
20816else
20817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20818for as_dir in $PATH
20819do
20820 IFS=$as_save_IFS
20821 test -z "$as_dir" && as_dir=.
20822 for ac_exec_ext in '' $ac_executable_extensions; do
20823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20824 ac_cv_prog_PTHREAD_CC="$ac_prog"
20825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20826 break 2
862776f2 20827 fi
d5835df2
TV
20828done
20829 done
20830IFS=$as_save_IFS
862776f2 20831
d5835df2
TV
20832fi
20833fi
20834PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
20835if test -n "$PTHREAD_CC"; then
20836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
20837$as_echo "$PTHREAD_CC" >&6; }
20838else
20839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20840$as_echo "no" >&6; }
20841fi
862776f2 20842
862776f2 20843
d5835df2
TV
20844 test -n "$PTHREAD_CC" && break
20845done
20846test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
20847 ;;
20848esac ;; #(
20849 *) :
20850 ;;
20851esac
20852 ;;
20853 esac
20854 fi
20855fi
862776f2 20856
d5835df2 20857test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
862776f2
AA
20858
20859
862776f2
AA
20860
20861
862776f2 20862
d5835df2
TV
20863# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
20864if test "x$ax_pthread_ok" = "xyes"; then
20865 threads=yes
20866 :
862776f2 20867else
d5835df2
TV
20868 ax_pthread_ok=no
20869 threads=no
862776f2 20870fi
d5835df2
TV
20871ac_ext=cpp
20872ac_cpp='$CXXCPP $CPPFLAGS'
20873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
862776f2 20876
862776f2 20877
d5835df2
TV
20878 save_LIBS="$LIBS"
20879 LIBS="$PTHREAD_LIBS $LIBS"
20880 save_CXXFLAGS="$CXXFLAGS"
20881 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
20882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
20883$as_echo_n "checking for std::thread... " >&6; }
20884if ${gdb_cv_cxx_std_thread+:} false; then :
20885 $as_echo_n "(cached) " >&6
862776f2 20886else
d5835df2
TV
20887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20888/* end confdefs.h. */
20889 #if defined (__MINGW32__) || defined (__CYGWIN__)
20890 # ifdef _WIN32_WINNT
20891 # if _WIN32_WINNT < 0x0501
20892 # undef _WIN32_WINNT
20893 # define _WIN32_WINNT 0x0501
20894 # endif
20895 # else
20896 # define _WIN32_WINNT 0x0501
20897 # endif
20898 #endif /* __MINGW32__ || __CYGWIN__ */
20899 #include <thread>
45e83f86 20900 #include <mutex>
d5835df2
TV
20901 void callback() { }
20902int
20903main ()
20904{
20905std::thread t(callback);
20906 ;
20907 return 0;
20908}
20909_ACEOF
20910if ac_fn_cxx_try_compile "$LINENO"; then :
20911 gdb_cv_cxx_std_thread=yes
20912else
20913 gdb_cv_cxx_std_thread=no
862776f2 20914fi
d5835df2
TV
20915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20916fi
20917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
20918$as_echo "$gdb_cv_cxx_std_thread" >&6; }
862776f2 20919
d5835df2
TV
20920 if test "$threads" = "yes"; then
20921 # This check must be here, while LIBS includes any necessary
20922 # threading library.
20923 for ac_func in pthread_sigmask pthread_setname_np
20924do :
20925 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20926ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
20927if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20928 cat >>confdefs.h <<_ACEOF
20929#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20930_ACEOF
862776f2 20931
d5835df2
TV
20932fi
20933done
862776f2 20934
d5835df2
TV
20935 fi
20936 LIBS="$save_LIBS"
20937 CXXFLAGS="$save_CXXFLAGS"
862776f2 20938
3e09762b 20939 if test "$want_threading" != "no"; then
d5835df2 20940 if test "$gdb_cv_cxx_std_thread" = "yes"; then
862776f2 20941
d5835df2 20942$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
862776f2 20943
3e09762b
PA
20944 else
20945 if test "$want_threading" = "yes"; then
20946 as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
20947 else
20948 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
20949$as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
20950 fi
d5835df2
TV
20951 fi
20952 fi
20953 ac_ext=c
20954ac_cpp='$CPP $CPPFLAGS'
20955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20957ac_compiler_gnu=$ac_cv_c_compiler_gnu
862776f2
AA
20958
20959
d5835df2
TV
20960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
20961$as_echo_n "checking for sigsetjmp... " >&6; }
20962if ${gdb_cv_func_sigsetjmp+:} false; then :
20963 $as_echo_n "(cached) " >&6
20964else
20965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20966/* end confdefs.h. */
20967#include <setjmp.h>
20968int
20969main ()
20970{
20971sigjmp_buf env;
20972 while (! sigsetjmp (env, 1))
20973 siglongjmp (env, 1);
862776f2 20974
d5835df2
TV
20975 ;
20976 return 0;
20977}
20978_ACEOF
20979if ac_fn_c_try_compile "$LINENO"; then :
20980 gdb_cv_func_sigsetjmp=yes
20981else
20982 gdb_cv_func_sigsetjmp=no
862776f2 20983
b686ecb5 20984fi
d5835df2 20985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 20986
b686ecb5 20987fi
d5835df2
TV
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
20989$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
20990 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
b686ecb5 20991
d5835df2 20992$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
b686ecb5 20993
d5835df2 20994 fi
b686ecb5 20995
d5835df2
TV
20996
20997# Check whether --with-intel_pt was given.
20998if test "${with_intel_pt+set}" = set; then :
20999 withval=$with_intel_pt;
b686ecb5 21000else
d5835df2 21001 with_intel_pt=auto
b686ecb5
JM
21002fi
21003
d5835df2
TV
21004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
21005$as_echo_n "checking whether to use intel pt... " >&6; }
21006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
21007$as_echo "$with_intel_pt" >&6; }
b686ecb5 21008
d5835df2
TV
21009 if test "${with_intel_pt}" = no; then
21010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
21011$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
21012 HAVE_LIBIPT=no
21013 else
21014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21015/* end confdefs.h. */
b686ecb5 21016
d5835df2
TV
21017 #include <linux/perf_event.h>
21018 #ifndef PERF_ATTR_SIZE_VER5
21019 # error
21020 #endif
b686ecb5 21021
b686ecb5 21022_ACEOF
d5835df2
TV
21023if ac_fn_c_try_cpp "$LINENO"; then :
21024 perf_event=yes
21025else
21026 perf_event=no
21027fi
21028rm -f conftest.err conftest.i conftest.$ac_ext
21029 if test "$perf_event" != yes; then
21030 if test "$with_intel_pt" = yes; then
21031 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
21032 else
21033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
21034$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
21035 fi
21036 fi
b686ecb5
JM
21037
21038
b686ecb5 21039
b686ecb5 21040
b686ecb5
JM
21041
21042
21043
b686ecb5 21044
b686ecb5 21045
d5835df2 21046 use_additional=yes
b686ecb5 21047
d5835df2
TV
21048 acl_save_prefix="$prefix"
21049 prefix="$acl_final_prefix"
21050 acl_save_exec_prefix="$exec_prefix"
21051 exec_prefix="$acl_final_exec_prefix"
b686ecb5 21052
d5835df2
TV
21053 eval additional_includedir=\"$includedir\"
21054 eval additional_libdir=\"$libdir\"
b686ecb5 21055
d5835df2
TV
21056 exec_prefix="$acl_save_exec_prefix"
21057 prefix="$acl_save_prefix"
21058
21059
21060# Check whether --with-libipt-prefix was given.
21061if test "${with_libipt_prefix+set}" = set; then :
21062 withval=$with_libipt_prefix;
21063 if test "X$withval" = "Xno"; then
21064 use_additional=no
b686ecb5 21065 else
d5835df2 21066 if test "X$withval" = "X"; then
b686ecb5 21067
d5835df2
TV
21068 acl_save_prefix="$prefix"
21069 prefix="$acl_final_prefix"
21070 acl_save_exec_prefix="$exec_prefix"
21071 exec_prefix="$acl_final_exec_prefix"
b686ecb5 21072
d5835df2
TV
21073 eval additional_includedir=\"$includedir\"
21074 eval additional_libdir=\"$libdir\"
b686ecb5 21075
d5835df2
TV
21076 exec_prefix="$acl_save_exec_prefix"
21077 prefix="$acl_save_prefix"
b686ecb5 21078
d5835df2
TV
21079 else
21080 additional_includedir="$withval/include"
21081 additional_libdir="$withval/lib"
21082 fi
b686ecb5 21083 fi
18b4d073 21084
18b4d073
SM
21085fi
21086
18b4d073 21087
d5835df2
TV
21088# Check whether --with-libipt-type was given.
21089if test "${with_libipt_type+set}" = set; then :
21090 withval=$with_libipt_type; with_libipt_type=$withval
18b4d073 21091else
d5835df2 21092 with_libipt_type=auto
18b4d073
SM
21093fi
21094
d5835df2 21095 lib_type=`eval echo \$with_libipt_type`
18b4d073 21096
d5835df2
TV
21097 LIBIPT=
21098 LTLIBIPT=
21099 INCIPT=
21100 rpathdirs=
21101 ltrpathdirs=
21102 names_already_handled=
21103 names_next_round='ipt '
21104 while test -n "$names_next_round"; do
21105 names_this_round="$names_next_round"
21106 names_next_round=
21107 for name in $names_this_round; do
21108 already_handled=
21109 for n in $names_already_handled; do
21110 if test "$n" = "$name"; then
21111 already_handled=yes
21112 break
21113 fi
21114 done
21115 if test -z "$already_handled"; then
21116 names_already_handled="$names_already_handled $name"
21117 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
21118 eval value=\"\$HAVE_LIB$uppername\"
21119 if test -n "$value"; then
21120 if test "$value" = yes; then
21121 eval value=\"\$LIB$uppername\"
21122 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
21123 eval value=\"\$LTLIB$uppername\"
21124 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
21125 else
21126 :
21127 fi
21128 else
21129 found_dir=
21130 found_la=
21131 found_so=
21132 found_a=
21133 if test $use_additional = yes; then
21134 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
21135 found_dir="$additional_libdir"
21136 found_so="$additional_libdir/lib$name.$shlibext"
21137 if test -f "$additional_libdir/lib$name.la"; then
21138 found_la="$additional_libdir/lib$name.la"
21139 fi
21140 elif test x$lib_type != xshared; then
21141 if test -f "$additional_libdir/lib$name.$libext"; then
21142 found_dir="$additional_libdir"
21143 found_a="$additional_libdir/lib$name.$libext"
21144 if test -f "$additional_libdir/lib$name.la"; then
21145 found_la="$additional_libdir/lib$name.la"
21146 fi
21147 fi
21148 fi
21149 fi
21150 if test "X$found_dir" = "X"; then
21151 for x in $LDFLAGS $LTLIBIPT; do
18b4d073 21152
d5835df2
TV
21153 acl_save_prefix="$prefix"
21154 prefix="$acl_final_prefix"
21155 acl_save_exec_prefix="$exec_prefix"
21156 exec_prefix="$acl_final_exec_prefix"
21157 eval x=\"$x\"
21158 exec_prefix="$acl_save_exec_prefix"
21159 prefix="$acl_save_prefix"
18b4d073 21160
d5835df2
TV
21161 case "$x" in
21162 -L*)
21163 dir=`echo "X$x" | sed -e 's/^X-L//'`
21164 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
21165 found_dir="$dir"
21166 found_so="$dir/lib$name.$shlibext"
21167 if test -f "$dir/lib$name.la"; then
21168 found_la="$dir/lib$name.la"
21169 fi
21170 elif test x$lib_type != xshared; then
21171 if test -f "$dir/lib$name.$libext"; then
21172 found_dir="$dir"
21173 found_a="$dir/lib$name.$libext"
21174 if test -f "$dir/lib$name.la"; then
21175 found_la="$dir/lib$name.la"
21176 fi
21177 fi
21178 fi
21179 ;;
21180 esac
21181 if test "X$found_dir" != "X"; then
21182 break
21183 fi
21184 done
21185 fi
21186 if test "X$found_dir" != "X"; then
21187 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
21188 if test "X$found_so" != "X"; then
21189 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
21190 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
21191 else
21192 haveit=
21193 for x in $ltrpathdirs; do
21194 if test "X$x" = "X$found_dir"; then
21195 haveit=yes
21196 break
21197 fi
21198 done
21199 if test -z "$haveit"; then
21200 ltrpathdirs="$ltrpathdirs $found_dir"
21201 fi
21202 if test "$hardcode_direct" = yes; then
21203 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
21204 else
21205 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
21206 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
21207 haveit=
21208 for x in $rpathdirs; do
21209 if test "X$x" = "X$found_dir"; then
21210 haveit=yes
21211 break
21212 fi
21213 done
21214 if test -z "$haveit"; then
21215 rpathdirs="$rpathdirs $found_dir"
21216 fi
21217 else
21218 haveit=
21219 for x in $LDFLAGS $LIBIPT; do
18b4d073 21220
d5835df2
TV
21221 acl_save_prefix="$prefix"
21222 prefix="$acl_final_prefix"
21223 acl_save_exec_prefix="$exec_prefix"
21224 exec_prefix="$acl_final_exec_prefix"
21225 eval x=\"$x\"
21226 exec_prefix="$acl_save_exec_prefix"
21227 prefix="$acl_save_prefix"
18b4d073 21228
d5835df2
TV
21229 if test "X$x" = "X-L$found_dir"; then
21230 haveit=yes
21231 break
21232 fi
21233 done
21234 if test -z "$haveit"; then
21235 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
21236 fi
21237 if test "$hardcode_minus_L" != no; then
21238 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
21239 else
21240 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
21241 fi
21242 fi
21243 fi
21244 fi
21245 else
21246 if test "X$found_a" != "X"; then
21247 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
21248 else
21249 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
21250 fi
21251 fi
21252 additional_includedir=
21253 case "$found_dir" in
21254 */lib | */lib/)
21255 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
21256 additional_includedir="$basedir/include"
21257 ;;
21258 esac
21259 if test "X$additional_includedir" != "X"; then
21260 if test "X$additional_includedir" != "X/usr/include"; then
21261 haveit=
21262 if test "X$additional_includedir" = "X/usr/local/include"; then
21263 if test -n "$GCC"; then
21264 case $host_os in
21265 linux*) haveit=yes;;
21266 esac
21267 fi
21268 fi
21269 if test -z "$haveit"; then
21270 for x in $CPPFLAGS $INCIPT; do
18b4d073 21271
d5835df2
TV
21272 acl_save_prefix="$prefix"
21273 prefix="$acl_final_prefix"
21274 acl_save_exec_prefix="$exec_prefix"
21275 exec_prefix="$acl_final_exec_prefix"
21276 eval x=\"$x\"
21277 exec_prefix="$acl_save_exec_prefix"
21278 prefix="$acl_save_prefix"
18b4d073 21279
d5835df2
TV
21280 if test "X$x" = "X-I$additional_includedir"; then
21281 haveit=yes
21282 break
21283 fi
21284 done
21285 if test -z "$haveit"; then
21286 if test -d "$additional_includedir"; then
21287 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
21288 fi
21289 fi
21290 fi
21291 fi
21292 fi
21293 if test -n "$found_la"; then
21294 save_libdir="$libdir"
21295 case "$found_la" in
21296 */* | *\\*) . "$found_la" ;;
21297 *) . "./$found_la" ;;
21298 esac
21299 libdir="$save_libdir"
21300 for dep in $dependency_libs; do
21301 case "$dep" in
21302 -L*)
21303 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
21304 if test "X$additional_libdir" != "X/usr/lib"; then
21305 haveit=
21306 if test "X$additional_libdir" = "X/usr/local/lib"; then
21307 if test -n "$GCC"; then
21308 case $host_os in
21309 linux*) haveit=yes;;
21310 esac
21311 fi
21312 fi
21313 if test -z "$haveit"; then
21314 haveit=
21315 for x in $LDFLAGS $LIBIPT; do
18b4d073 21316
d5835df2
TV
21317 acl_save_prefix="$prefix"
21318 prefix="$acl_final_prefix"
21319 acl_save_exec_prefix="$exec_prefix"
21320 exec_prefix="$acl_final_exec_prefix"
21321 eval x=\"$x\"
21322 exec_prefix="$acl_save_exec_prefix"
21323 prefix="$acl_save_prefix"
08d8af48 21324
d5835df2
TV
21325 if test "X$x" = "X-L$additional_libdir"; then
21326 haveit=yes
21327 break
21328 fi
21329 done
21330 if test -z "$haveit"; then
21331 if test -d "$additional_libdir"; then
21332 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
21333 fi
21334 fi
21335 haveit=
21336 for x in $LDFLAGS $LTLIBIPT; do
08d8af48 21337
d5835df2
TV
21338 acl_save_prefix="$prefix"
21339 prefix="$acl_final_prefix"
21340 acl_save_exec_prefix="$exec_prefix"
21341 exec_prefix="$acl_final_exec_prefix"
21342 eval x=\"$x\"
21343 exec_prefix="$acl_save_exec_prefix"
21344 prefix="$acl_save_prefix"
18b4d073 21345
d5835df2
TV
21346 if test "X$x" = "X-L$additional_libdir"; then
21347 haveit=yes
21348 break
21349 fi
21350 done
21351 if test -z "$haveit"; then
21352 if test -d "$additional_libdir"; then
21353 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
21354 fi
21355 fi
21356 fi
21357 fi
21358 ;;
21359 -R*)
21360 dir=`echo "X$dep" | sed -e 's/^X-R//'`
21361 if test "$enable_rpath" != no; then
21362 haveit=
21363 for x in $rpathdirs; do
21364 if test "X$x" = "X$dir"; then
21365 haveit=yes
21366 break
21367 fi
21368 done
21369 if test -z "$haveit"; then
21370 rpathdirs="$rpathdirs $dir"
21371 fi
21372 haveit=
21373 for x in $ltrpathdirs; do
21374 if test "X$x" = "X$dir"; then
21375 haveit=yes
21376 break
21377 fi
21378 done
21379 if test -z "$haveit"; then
21380 ltrpathdirs="$ltrpathdirs $dir"
21381 fi
21382 fi
21383 ;;
21384 -l*)
21385 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
21386 ;;
21387 *.la)
21388 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
21389 ;;
21390 *)
21391 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
21392 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
21393 ;;
21394 esac
21395 done
21396 fi
21397 else
21398 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
21399 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
21400 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
21401 else
21402 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
21403 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
21404 fi
21405 fi
21406 fi
21407 fi
21408 done
21409 done
21410 if test "X$rpathdirs" != "X"; then
21411 if test -n "$hardcode_libdir_separator"; then
21412 alldirs=
21413 for found_dir in $rpathdirs; do
21414 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
21415 done
21416 acl_save_libdir="$libdir"
21417 libdir="$alldirs"
21418 eval flag=\"$hardcode_libdir_flag_spec\"
21419 libdir="$acl_save_libdir"
21420 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
21421 else
21422 for found_dir in $rpathdirs; do
21423 acl_save_libdir="$libdir"
21424 libdir="$found_dir"
21425 eval flag=\"$hardcode_libdir_flag_spec\"
21426 libdir="$acl_save_libdir"
21427 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
21428 done
18b4d073 21429 fi
18b4d073 21430 fi
d5835df2
TV
21431 if test "X$ltrpathdirs" != "X"; then
21432 for found_dir in $ltrpathdirs; do
21433 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
21434 done
21435 fi
18b4d073 21436
b686ecb5 21437
d5835df2 21438 ac_save_CPPFLAGS="$CPPFLAGS"
b686ecb5 21439
d5835df2
TV
21440 for element in $INCIPT; do
21441 haveit=
21442 for x in $CPPFLAGS; do
b686ecb5 21443
d5835df2
TV
21444 acl_save_prefix="$prefix"
21445 prefix="$acl_final_prefix"
21446 acl_save_exec_prefix="$exec_prefix"
21447 exec_prefix="$acl_final_exec_prefix"
21448 eval x=\"$x\"
21449 exec_prefix="$acl_save_exec_prefix"
21450 prefix="$acl_save_prefix"
b686ecb5 21451
d5835df2
TV
21452 if test "X$x" = "X$element"; then
21453 haveit=yes
21454 break
21455 fi
21456 done
21457 if test -z "$haveit"; then
21458 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
21459 fi
21460 done
b686ecb5 21461
b686ecb5 21462
d5835df2
TV
21463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
21464$as_echo_n "checking for libipt... " >&6; }
21465if ${ac_cv_libipt+:} false; then :
21466 $as_echo_n "(cached) " >&6
21467else
b686ecb5 21468
d5835df2
TV
21469 ac_save_LIBS="$LIBS"
21470 LIBS="$LIBS $LIBIPT"
21471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21472/* end confdefs.h. */
21473#include "intel-pt.h"
21474int
21475main ()
21476{
21477pt_insn_alloc_decoder (0);
21478 ;
21479 return 0;
21480}
b686ecb5 21481_ACEOF
d5835df2
TV
21482if ac_fn_c_try_link "$LINENO"; then :
21483 ac_cv_libipt=yes
21484else
21485 ac_cv_libipt=no
21486fi
21487rm -f core conftest.err conftest.$ac_objext \
21488 conftest$ac_exeext conftest.$ac_ext
21489 LIBS="$ac_save_LIBS"
b686ecb5
JM
21490
21491fi
d5835df2
TV
21492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
21493$as_echo "$ac_cv_libipt" >&6; }
21494 if test "$ac_cv_libipt" = yes; then
21495 HAVE_LIBIPT=yes
b686ecb5 21496
d5835df2 21497$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
b686ecb5 21498
d5835df2
TV
21499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
21500$as_echo_n "checking how to link with libipt... " >&6; }
21501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
21502$as_echo "$LIBIPT" >&6; }
21503 else
21504 HAVE_LIBIPT=no
21505 CPPFLAGS="$ac_save_CPPFLAGS"
21506 LIBIPT=
21507 LTLIBIPT=
21508 fi
b686ecb5 21509
b686ecb5 21510
b686ecb5
JM
21511
21512
b686ecb5 21513
d5835df2
TV
21514
21515 if test "$HAVE_LIBIPT" != yes; then
21516 if test "$with_intel_pt" = yes; then
21517 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
21518 else
21519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
21520$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
21521 fi
21522 else
21523 save_LIBS=$LIBS
21524 LIBS="$LIBS $LIBIPT"
21525 for ac_func in pt_insn_event
21526do :
21527 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
21528if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21529 cat >>confdefs.h <<_ACEOF
21530#define HAVE_PT_INSN_EVENT 1
21531_ACEOF
21532
b686ecb5 21533fi
d5835df2 21534done
b686ecb5 21535
d5835df2
TV
21536 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
21537"
21538if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
b686ecb5 21539
d5835df2
TV
21540cat >>confdefs.h <<_ACEOF
21541#define HAVE_STRUCT_PT_INSN_ENABLED 1
21542_ACEOF
b686ecb5 21543
b686ecb5 21544
b686ecb5 21545fi
d5835df2
TV
21546ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
21547"
21548if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
b686ecb5 21549
d5835df2
TV
21550cat >>confdefs.h <<_ACEOF
21551#define HAVE_STRUCT_PT_INSN_RESYNCED 1
21552_ACEOF
b686ecb5 21553
b686ecb5 21554
6be9971c
FW
21555fi
21556
21557 ac_fn_c_check_member "$LINENO" "struct pt_event" "variant.ptwrite" "ac_cv_member_struct_pt_event_variant_ptwrite" "#include <intel-pt.h>
21558"
21559if test "x$ac_cv_member_struct_pt_event_variant_ptwrite" = xyes; then :
21560
21561cat >>confdefs.h <<_ACEOF
21562#define HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE 1
21563_ACEOF
21564
21565
d5835df2 21566fi
28bc4951 21567
d5835df2
TV
21568 LIBS=$save_LIBS
21569 fi
21570 fi
21571
21572 # Check if the compiler and runtime support printing long longs.
21573
21574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
21575$as_echo_n "checking for long long support in printf... " >&6; }
21576if ${gdb_cv_printf_has_long_long+:} false; then :
21577 $as_echo_n "(cached) " >&6
28bc4951 21578else
d5835df2
TV
21579 if test "$cross_compiling" = yes; then :
21580 gdb_cv_printf_has_long_long=no
28bc4951 21581else
28bc4951
AM
21582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583/* end confdefs.h. */
d5835df2 21584$ac_includes_default
28bc4951
AM
21585int
21586main ()
21587{
d5835df2
TV
21588char buf[32];
21589 long long l = 0;
21590 l = (l << 16) + 0x0123;
21591 l = (l << 16) + 0x4567;
21592 l = (l << 16) + 0x89ab;
21593 l = (l << 16) + 0xcdef;
21594 sprintf (buf, "0x%016llx", l);
21595 return (strcmp ("0x0123456789abcdef", buf));
28bc4951
AM
21596 ;
21597 return 0;
21598}
21599_ACEOF
d5835df2
TV
21600if ac_fn_c_try_run "$LINENO"; then :
21601 gdb_cv_printf_has_long_long=yes
28bc4951 21602else
d5835df2 21603 gdb_cv_printf_has_long_long=no
28bc4951 21604fi
d5835df2
TV
21605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21606 conftest.$ac_objext conftest.beam conftest.$ac_ext
28bc4951
AM
21607fi
21608
d5835df2
TV
21609fi
21610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
21611$as_echo "$gdb_cv_printf_has_long_long" >&6; }
21612 if test "$gdb_cv_printf_has_long_long" = yes; then
28bc4951 21613
d5835df2 21614$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
28bc4951 21615
d5835df2 21616 fi
28bc4951 21617
28bc4951 21618
d5835df2 21619$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
28bc4951 21620
d5835df2
TV
21621 for ac_header in sys/procfs.h
21622do :
21623 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
21624if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
21625 cat >>confdefs.h <<_ACEOF
21626#define HAVE_SYS_PROCFS_H 1
21627_ACEOF
28bc4951
AM
21628
21629fi
21630
d5835df2 21631done
28bc4951 21632
d5835df2 21633 if test "$ac_cv_header_sys_procfs_h" = yes; then
b686ecb5 21634
d5835df2
TV
21635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
21636$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
21637 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
21638 $as_echo_n "(cached) " >&6
b686ecb5 21639else
b686ecb5
JM
21640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21641/* end confdefs.h. */
21642
d5835df2
TV
21643#define _SYSCALL32
21644#include <sys/procfs.h>
b686ecb5
JM
21645int
21646main ()
21647{
d5835df2 21648gregset_t avar
b686ecb5
JM
21649 ;
21650 return 0;
21651}
21652_ACEOF
d5835df2
TV
21653if ac_fn_c_try_compile "$LINENO"; then :
21654 bfd_cv_have_sys_procfs_type_gregset_t=yes
b686ecb5 21655else
d5835df2
TV
21656 bfd_cv_have_sys_procfs_type_gregset_t=no
21657
b686ecb5 21658fi
d5835df2 21659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
21660fi
21661
d5835df2 21662 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
b686ecb5 21663
d5835df2 21664$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
b686ecb5 21665
d5835df2
TV
21666 fi
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
21668$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
b686ecb5 21669
b686ecb5 21670
d5835df2
TV
21671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
21672$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
21673 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
21674 $as_echo_n "(cached) " >&6
b686ecb5 21675else
d5835df2
TV
21676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21677/* end confdefs.h. */
b686ecb5 21678
d5835df2
TV
21679#define _SYSCALL32
21680#include <sys/procfs.h>
21681int
21682main ()
21683{
21684fpregset_t avar
21685 ;
21686 return 0;
21687}
21688_ACEOF
21689if ac_fn_c_try_compile "$LINENO"; then :
21690 bfd_cv_have_sys_procfs_type_fpregset_t=yes
21691else
21692 bfd_cv_have_sys_procfs_type_fpregset_t=no
b686ecb5
JM
21693
21694fi
d5835df2 21695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
21696fi
21697
d5835df2 21698 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
b686ecb5 21699
d5835df2 21700$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
b686ecb5 21701
d5835df2
TV
21702 fi
21703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
21704$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
b686ecb5
JM
21705
21706
d5835df2
TV
21707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
21708$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
21709 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
21710 $as_echo_n "(cached) " >&6
21711else
21712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21713/* end confdefs.h. */
b686ecb5 21714
d5835df2
TV
21715#define _SYSCALL32
21716#include <sys/procfs.h>
21717int
21718main ()
21719{
21720prgregset_t avar
21721 ;
21722 return 0;
21723}
b686ecb5 21724_ACEOF
d5835df2
TV
21725if ac_fn_c_try_compile "$LINENO"; then :
21726 bfd_cv_have_sys_procfs_type_prgregset_t=yes
21727else
21728 bfd_cv_have_sys_procfs_type_prgregset_t=no
b686ecb5 21729
d5835df2
TV
21730fi
21731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
21732fi
21733
d5835df2 21734 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
b686ecb5 21735
d5835df2 21736$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
b686ecb5 21737
d5835df2
TV
21738 fi
21739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
21740$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
b686ecb5 21741
b686ecb5 21742
d5835df2
TV
21743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
21744$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
21745 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
21746 $as_echo_n "(cached) " >&6
21747else
21748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21749/* end confdefs.h. */
21750
21751#define _SYSCALL32
21752#include <sys/procfs.h>
21753int
21754main ()
21755{
21756prfpregset_t avar
21757 ;
21758 return 0;
21759}
21760_ACEOF
21761if ac_fn_c_try_compile "$LINENO"; then :
21762 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
21763else
21764 bfd_cv_have_sys_procfs_type_prfpregset_t=no
b686ecb5 21765
d5835df2
TV
21766fi
21767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
21768fi
21769
d5835df2 21770 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b686ecb5 21771
d5835df2 21772$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
b686ecb5 21773
d5835df2
TV
21774 fi
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
21776$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
b686ecb5 21777
b686ecb5 21778
d5835df2
TV
21779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
21780$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
21781 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
21782 $as_echo_n "(cached) " >&6
21783else
21784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21785/* end confdefs.h. */
b686ecb5 21786
d5835df2
TV
21787#define _SYSCALL32
21788#include <sys/procfs.h>
21789int
21790main ()
21791{
21792prgregset32_t avar
21793 ;
21794 return 0;
21795}
21796_ACEOF
21797if ac_fn_c_try_compile "$LINENO"; then :
21798 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
b686ecb5 21799else
d5835df2
TV
21800 bfd_cv_have_sys_procfs_type_prgregset32_t=no
21801
21802fi
21803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
21804fi
21805
d5835df2
TV
21806 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
21807
21808$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
b686ecb5 21809
d5835df2
TV
21810 fi
21811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
21812$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
b686ecb5 21813
b686ecb5 21814
d5835df2
TV
21815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
21816$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
21817 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
b686ecb5
JM
21818 $as_echo_n "(cached) " >&6
21819else
21820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21821/* end confdefs.h. */
d5835df2
TV
21822
21823#define _SYSCALL32
21824#include <sys/procfs.h>
b686ecb5
JM
21825int
21826main ()
21827{
d5835df2 21828lwpid_t avar
b686ecb5
JM
21829 ;
21830 return 0;
21831}
21832_ACEOF
d5835df2
TV
21833if ac_fn_c_try_compile "$LINENO"; then :
21834 bfd_cv_have_sys_procfs_type_lwpid_t=yes
b686ecb5 21835else
d5835df2 21836 bfd_cv_have_sys_procfs_type_lwpid_t=no
b686ecb5
JM
21837
21838fi
d5835df2 21839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 21840fi
b686ecb5 21841
d5835df2 21842 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
b686ecb5 21843
d5835df2
TV
21844$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
21845
21846 fi
21847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
21848$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
21849
21850
21851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
21852$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
21853 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
b686ecb5
JM
21854 $as_echo_n "(cached) " >&6
21855else
21856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21857/* end confdefs.h. */
d5835df2
TV
21858
21859#define _SYSCALL32
21860#include <sys/procfs.h>
b686ecb5
JM
21861int
21862main ()
21863{
d5835df2 21864psaddr_t avar
b686ecb5
JM
21865 ;
21866 return 0;
21867}
21868_ACEOF
d5835df2
TV
21869if ac_fn_c_try_compile "$LINENO"; then :
21870 bfd_cv_have_sys_procfs_type_psaddr_t=yes
b686ecb5 21871else
d5835df2 21872 bfd_cv_have_sys_procfs_type_psaddr_t=no
b686ecb5
JM
21873
21874fi
d5835df2 21875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 21876fi
b686ecb5 21877
d5835df2 21878 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
b686ecb5 21879
d5835df2 21880$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
b686ecb5 21881
d5835df2
TV
21882 fi
21883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
21884$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
21885
21886
21887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
21888$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
21889 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
b686ecb5
JM
21890 $as_echo_n "(cached) " >&6
21891else
21892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21893/* end confdefs.h. */
21894
d5835df2
TV
21895#define _SYSCALL32
21896#include <sys/procfs.h>
b686ecb5
JM
21897int
21898main ()
21899{
d5835df2 21900elf_fpregset_t avar
b686ecb5
JM
21901 ;
21902 return 0;
21903}
21904_ACEOF
21905if ac_fn_c_try_compile "$LINENO"; then :
d5835df2 21906 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
b686ecb5 21907else
d5835df2 21908 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
b686ecb5
JM
21909
21910fi
21911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 21912fi
b686ecb5 21913
d5835df2
TV
21914 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
21915
21916$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
21917
21918 fi
21919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
21920$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
21921
b686ecb5
JM
21922 fi
21923
d5835df2 21924 # Check for xxhash
b686ecb5 21925
d5835df2
TV
21926# Check whether --with-xxhash was given.
21927if test "${with_xxhash+set}" = set; then :
21928 withval=$with_xxhash;
21929else
21930 with_xxhash=auto
b686ecb5
JM
21931fi
21932
21933
d5835df2 21934 if test "x$with_xxhash" != "xno"; then
b686ecb5
JM
21935
21936
21937
b686ecb5 21938
b686ecb5
JM
21939
21940
21941
21942
d5835df2 21943 use_additional=yes
b686ecb5 21944
d5835df2
TV
21945 acl_save_prefix="$prefix"
21946 prefix="$acl_final_prefix"
21947 acl_save_exec_prefix="$exec_prefix"
21948 exec_prefix="$acl_final_exec_prefix"
b686ecb5 21949
d5835df2
TV
21950 eval additional_includedir=\"$includedir\"
21951 eval additional_libdir=\"$libdir\"
b686ecb5 21952
d5835df2
TV
21953 exec_prefix="$acl_save_exec_prefix"
21954 prefix="$acl_save_prefix"
b686ecb5
JM
21955
21956
d5835df2
TV
21957# Check whether --with-libxxhash-prefix was given.
21958if test "${with_libxxhash_prefix+set}" = set; then :
21959 withval=$with_libxxhash_prefix;
21960 if test "X$withval" = "Xno"; then
21961 use_additional=no
21962 else
21963 if test "X$withval" = "X"; then
b686ecb5 21964
d5835df2
TV
21965 acl_save_prefix="$prefix"
21966 prefix="$acl_final_prefix"
21967 acl_save_exec_prefix="$exec_prefix"
21968 exec_prefix="$acl_final_exec_prefix"
b686ecb5 21969
d5835df2
TV
21970 eval additional_includedir=\"$includedir\"
21971 eval additional_libdir=\"$libdir\"
b686ecb5 21972
d5835df2
TV
21973 exec_prefix="$acl_save_exec_prefix"
21974 prefix="$acl_save_prefix"
b686ecb5 21975
d5835df2
TV
21976 else
21977 additional_includedir="$withval/include"
21978 additional_libdir="$withval/lib"
21979 fi
21980 fi
b686ecb5 21981
d5835df2 21982fi
b686ecb5 21983
b686ecb5 21984
d5835df2
TV
21985# Check whether --with-libxxhash-type was given.
21986if test "${with_libxxhash_type+set}" = set; then :
21987 withval=$with_libxxhash_type; with_libxxhash_type=$withval
b686ecb5 21988else
d5835df2 21989 with_libxxhash_type=auto
b686ecb5
JM
21990fi
21991
d5835df2 21992 lib_type=`eval echo \$with_libxxhash_type`
b686ecb5 21993
d5835df2
TV
21994 LIBXXHASH=
21995 LTLIBXXHASH=
21996 INCXXHASH=
21997 rpathdirs=
21998 ltrpathdirs=
21999 names_already_handled=
22000 names_next_round='xxhash '
22001 while test -n "$names_next_round"; do
22002 names_this_round="$names_next_round"
22003 names_next_round=
22004 for name in $names_this_round; do
22005 already_handled=
22006 for n in $names_already_handled; do
22007 if test "$n" = "$name"; then
22008 already_handled=yes
22009 break
22010 fi
22011 done
22012 if test -z "$already_handled"; then
22013 names_already_handled="$names_already_handled $name"
22014 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
22015 eval value=\"\$HAVE_LIB$uppername\"
22016 if test -n "$value"; then
22017 if test "$value" = yes; then
22018 eval value=\"\$LIB$uppername\"
22019 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
22020 eval value=\"\$LTLIB$uppername\"
22021 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
22022 else
22023 :
22024 fi
22025 else
22026 found_dir=
22027 found_la=
22028 found_so=
22029 found_a=
22030 if test $use_additional = yes; then
22031 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
22032 found_dir="$additional_libdir"
22033 found_so="$additional_libdir/lib$name.$shlibext"
22034 if test -f "$additional_libdir/lib$name.la"; then
22035 found_la="$additional_libdir/lib$name.la"
22036 fi
22037 elif test x$lib_type != xshared; then
22038 if test -f "$additional_libdir/lib$name.$libext"; then
22039 found_dir="$additional_libdir"
22040 found_a="$additional_libdir/lib$name.$libext"
22041 if test -f "$additional_libdir/lib$name.la"; then
22042 found_la="$additional_libdir/lib$name.la"
22043 fi
22044 fi
22045 fi
22046 fi
22047 if test "X$found_dir" = "X"; then
22048 for x in $LDFLAGS $LTLIBXXHASH; do
b686ecb5 22049
d5835df2
TV
22050 acl_save_prefix="$prefix"
22051 prefix="$acl_final_prefix"
22052 acl_save_exec_prefix="$exec_prefix"
22053 exec_prefix="$acl_final_exec_prefix"
22054 eval x=\"$x\"
22055 exec_prefix="$acl_save_exec_prefix"
22056 prefix="$acl_save_prefix"
b686ecb5 22057
d5835df2
TV
22058 case "$x" in
22059 -L*)
22060 dir=`echo "X$x" | sed -e 's/^X-L//'`
22061 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
22062 found_dir="$dir"
22063 found_so="$dir/lib$name.$shlibext"
22064 if test -f "$dir/lib$name.la"; then
22065 found_la="$dir/lib$name.la"
22066 fi
22067 elif test x$lib_type != xshared; then
22068 if test -f "$dir/lib$name.$libext"; then
22069 found_dir="$dir"
22070 found_a="$dir/lib$name.$libext"
22071 if test -f "$dir/lib$name.la"; then
22072 found_la="$dir/lib$name.la"
22073 fi
22074 fi
22075 fi
22076 ;;
22077 esac
22078 if test "X$found_dir" != "X"; then
22079 break
22080 fi
22081 done
22082 fi
22083 if test "X$found_dir" != "X"; then
22084 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
22085 if test "X$found_so" != "X"; then
22086 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
22087 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
22088 else
22089 haveit=
22090 for x in $ltrpathdirs; do
22091 if test "X$x" = "X$found_dir"; then
22092 haveit=yes
22093 break
22094 fi
22095 done
22096 if test -z "$haveit"; then
22097 ltrpathdirs="$ltrpathdirs $found_dir"
22098 fi
22099 if test "$hardcode_direct" = yes; then
22100 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
22101 else
22102 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
22103 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
22104 haveit=
22105 for x in $rpathdirs; do
22106 if test "X$x" = "X$found_dir"; then
22107 haveit=yes
22108 break
22109 fi
22110 done
22111 if test -z "$haveit"; then
22112 rpathdirs="$rpathdirs $found_dir"
22113 fi
22114 else
22115 haveit=
22116 for x in $LDFLAGS $LIBXXHASH; do
b686ecb5 22117
d5835df2
TV
22118 acl_save_prefix="$prefix"
22119 prefix="$acl_final_prefix"
22120 acl_save_exec_prefix="$exec_prefix"
22121 exec_prefix="$acl_final_exec_prefix"
22122 eval x=\"$x\"
22123 exec_prefix="$acl_save_exec_prefix"
22124 prefix="$acl_save_prefix"
b686ecb5 22125
d5835df2
TV
22126 if test "X$x" = "X-L$found_dir"; then
22127 haveit=yes
22128 break
22129 fi
22130 done
22131 if test -z "$haveit"; then
22132 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
22133 fi
22134 if test "$hardcode_minus_L" != no; then
22135 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
22136 else
22137 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
22138 fi
22139 fi
22140 fi
22141 fi
22142 else
22143 if test "X$found_a" != "X"; then
22144 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
22145 else
22146 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
22147 fi
22148 fi
22149 additional_includedir=
22150 case "$found_dir" in
22151 */lib | */lib/)
22152 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
22153 additional_includedir="$basedir/include"
22154 ;;
22155 esac
22156 if test "X$additional_includedir" != "X"; then
22157 if test "X$additional_includedir" != "X/usr/include"; then
22158 haveit=
22159 if test "X$additional_includedir" = "X/usr/local/include"; then
22160 if test -n "$GCC"; then
22161 case $host_os in
22162 linux*) haveit=yes;;
22163 esac
22164 fi
22165 fi
22166 if test -z "$haveit"; then
22167 for x in $CPPFLAGS $INCXXHASH; do
b686ecb5 22168
d5835df2
TV
22169 acl_save_prefix="$prefix"
22170 prefix="$acl_final_prefix"
22171 acl_save_exec_prefix="$exec_prefix"
22172 exec_prefix="$acl_final_exec_prefix"
22173 eval x=\"$x\"
22174 exec_prefix="$acl_save_exec_prefix"
22175 prefix="$acl_save_prefix"
b686ecb5 22176
d5835df2
TV
22177 if test "X$x" = "X-I$additional_includedir"; then
22178 haveit=yes
22179 break
22180 fi
22181 done
22182 if test -z "$haveit"; then
22183 if test -d "$additional_includedir"; then
22184 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
22185 fi
22186 fi
22187 fi
22188 fi
22189 fi
22190 if test -n "$found_la"; then
22191 save_libdir="$libdir"
22192 case "$found_la" in
22193 */* | *\\*) . "$found_la" ;;
22194 *) . "./$found_la" ;;
22195 esac
22196 libdir="$save_libdir"
22197 for dep in $dependency_libs; do
22198 case "$dep" in
22199 -L*)
22200 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
22201 if test "X$additional_libdir" != "X/usr/lib"; then
22202 haveit=
22203 if test "X$additional_libdir" = "X/usr/local/lib"; then
22204 if test -n "$GCC"; then
22205 case $host_os in
22206 linux*) haveit=yes;;
22207 esac
22208 fi
22209 fi
22210 if test -z "$haveit"; then
22211 haveit=
22212 for x in $LDFLAGS $LIBXXHASH; do
b686ecb5 22213
d5835df2
TV
22214 acl_save_prefix="$prefix"
22215 prefix="$acl_final_prefix"
22216 acl_save_exec_prefix="$exec_prefix"
22217 exec_prefix="$acl_final_exec_prefix"
22218 eval x=\"$x\"
22219 exec_prefix="$acl_save_exec_prefix"
22220 prefix="$acl_save_prefix"
b686ecb5 22221
d5835df2
TV
22222 if test "X$x" = "X-L$additional_libdir"; then
22223 haveit=yes
22224 break
22225 fi
22226 done
22227 if test -z "$haveit"; then
22228 if test -d "$additional_libdir"; then
22229 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
22230 fi
22231 fi
22232 haveit=
22233 for x in $LDFLAGS $LTLIBXXHASH; do
b686ecb5 22234
d5835df2
TV
22235 acl_save_prefix="$prefix"
22236 prefix="$acl_final_prefix"
22237 acl_save_exec_prefix="$exec_prefix"
22238 exec_prefix="$acl_final_exec_prefix"
22239 eval x=\"$x\"
22240 exec_prefix="$acl_save_exec_prefix"
22241 prefix="$acl_save_prefix"
22242
22243 if test "X$x" = "X-L$additional_libdir"; then
22244 haveit=yes
22245 break
22246 fi
22247 done
22248 if test -z "$haveit"; then
22249 if test -d "$additional_libdir"; then
22250 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
22251 fi
22252 fi
22253 fi
22254 fi
22255 ;;
22256 -R*)
22257 dir=`echo "X$dep" | sed -e 's/^X-R//'`
22258 if test "$enable_rpath" != no; then
22259 haveit=
22260 for x in $rpathdirs; do
22261 if test "X$x" = "X$dir"; then
22262 haveit=yes
22263 break
22264 fi
22265 done
22266 if test -z "$haveit"; then
22267 rpathdirs="$rpathdirs $dir"
22268 fi
22269 haveit=
22270 for x in $ltrpathdirs; do
22271 if test "X$x" = "X$dir"; then
22272 haveit=yes
22273 break
22274 fi
22275 done
22276 if test -z "$haveit"; then
22277 ltrpathdirs="$ltrpathdirs $dir"
22278 fi
22279 fi
22280 ;;
22281 -l*)
22282 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
22283 ;;
22284 *.la)
22285 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
22286 ;;
22287 *)
22288 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
22289 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
22290 ;;
22291 esac
22292 done
22293 fi
22294 else
22295 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
22296 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
22297 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
22298 else
22299 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
22300 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
22301 fi
22302 fi
22303 fi
22304 fi
22305 done
b686ecb5 22306 done
d5835df2
TV
22307 if test "X$rpathdirs" != "X"; then
22308 if test -n "$hardcode_libdir_separator"; then
22309 alldirs=
22310 for found_dir in $rpathdirs; do
22311 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
22312 done
22313 acl_save_libdir="$libdir"
22314 libdir="$alldirs"
22315 eval flag=\"$hardcode_libdir_flag_spec\"
22316 libdir="$acl_save_libdir"
22317 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
22318 else
22319 for found_dir in $rpathdirs; do
22320 acl_save_libdir="$libdir"
22321 libdir="$found_dir"
22322 eval flag=\"$hardcode_libdir_flag_spec\"
22323 libdir="$acl_save_libdir"
22324 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
22325 done
22326 fi
22327 fi
22328 if test "X$ltrpathdirs" != "X"; then
22329 for found_dir in $ltrpathdirs; do
22330 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
22331 done
22332 fi
b686ecb5 22333
b686ecb5 22334
d5835df2 22335 ac_save_CPPFLAGS="$CPPFLAGS"
b686ecb5 22336
d5835df2
TV
22337 for element in $INCXXHASH; do
22338 haveit=
22339 for x in $CPPFLAGS; do
b686ecb5 22340
d5835df2
TV
22341 acl_save_prefix="$prefix"
22342 prefix="$acl_final_prefix"
22343 acl_save_exec_prefix="$exec_prefix"
22344 exec_prefix="$acl_final_exec_prefix"
22345 eval x=\"$x\"
22346 exec_prefix="$acl_save_exec_prefix"
22347 prefix="$acl_save_prefix"
b686ecb5 22348
d5835df2
TV
22349 if test "X$x" = "X$element"; then
22350 haveit=yes
22351 break
22352 fi
22353 done
22354 if test -z "$haveit"; then
22355 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
22356 fi
22357 done
22358
22359
22360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
22361$as_echo_n "checking for libxxhash... " >&6; }
22362if ${ac_cv_libxxhash+:} false; then :
22363 $as_echo_n "(cached) " >&6
22364else
22365
22366 ac_save_LIBS="$LIBS"
22367 LIBS="$LIBS $LIBXXHASH"
22368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22369/* end confdefs.h. */
22370#include <xxhash.h>
22371int
22372main ()
22373{
22374XXH32("foo", 3, 0);
22375
22376 ;
22377 return 0;
22378}
22379_ACEOF
22380if ac_fn_c_try_link "$LINENO"; then :
22381 ac_cv_libxxhash=yes
22382else
22383 ac_cv_libxxhash=no
22384fi
22385rm -f core conftest.err conftest.$ac_objext \
22386 conftest$ac_exeext conftest.$ac_ext
22387 LIBS="$ac_save_LIBS"
22388
22389fi
22390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
22391$as_echo "$ac_cv_libxxhash" >&6; }
22392 if test "$ac_cv_libxxhash" = yes; then
22393 HAVE_LIBXXHASH=yes
22394
22395$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
22396
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
22398$as_echo_n "checking how to link with libxxhash... " >&6; }
22399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
22400$as_echo "$LIBXXHASH" >&6; }
22401 else
22402 HAVE_LIBXXHASH=no
22403 CPPFLAGS="$ac_save_CPPFLAGS"
22404 LIBXXHASH=
22405 LTLIBXXHASH=
22406 fi
22407
22408
22409
22410
22411
22412
22413 if test "$HAVE_LIBXXHASH" != yes; then
22414 if test "$with_xxhash" = yes; then
22415 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
22416 fi
22417 fi
22418 if test "x$with_xxhash" = "xauto"; then
22419 with_xxhash="$HAVE_LIBXXHASH"
22420 fi
22421 fi
22422
22423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
22424$as_echo_n "checking whether to use xxhash... " >&6; }
22425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
22426$as_echo "$with_xxhash" >&6; }
22427
22428
22429# Dependency checking.
22430rm -rf .tst 2>/dev/null
22431mkdir .tst 2>/dev/null
22432if test -d .tst; then
22433 am__leading_dot=.
22434else
22435 am__leading_dot=_
22436fi
22437rmdir .tst 2>/dev/null
22438
22439DEPDIR="${am__leading_dot}deps"
22440
22441ac_config_commands="$ac_config_commands depdir"
22442
22443
22444depcc="$CC" am_compiler_list=
22445
22446am_depcomp=$ac_aux_dir/depcomp
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
22448$as_echo_n "checking dependency style of $depcc... " >&6; }
22449if ${am_cv_CC_dependencies_compiler_type+:} false; then :
22450 $as_echo_n "(cached) " >&6
22451else
22452 if test -f "$am_depcomp"; then
22453 # We make a subdir and do the tests there. Otherwise we can end up
22454 # making bogus files that we don't know about and never remove. For
22455 # instance it was reported that on HP-UX the gcc test will end up
22456 # making a dummy file named `D' -- because `-MD' means `put the output
22457 # in D'.
22458 mkdir conftest.dir
22459 # Copy depcomp to subdir because otherwise we won't find it if we're
22460 # using a relative directory.
22461 cp "$am_depcomp" conftest.dir
22462 cd conftest.dir
22463 # We will build objects and dependencies in a subdirectory because
22464 # it helps to detect inapplicable dependency modes. For instance
22465 # both Tru64's cc and ICC support -MD to output dependencies as a
22466 # side effect of compilation, but ICC will put the dependencies in
22467 # the current directory while Tru64 will put them in the object
22468 # directory.
22469 mkdir sub
22470
22471 am_cv_CC_dependencies_compiler_type=none
22472 if test "$am_compiler_list" = ""; then
22473 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
22474 fi
22475 for depmode in $am_compiler_list; do
22476 if test $depmode = none; then break; fi
22477
22478 $as_echo "$as_me:$LINENO: trying $depmode" >&5
22479 # Setup a source with many dependencies, because some compilers
22480 # like to wrap large dependency lists on column 80 (with \), and
22481 # we should not choose a depcomp mode which is confused by this.
22482 #
22483 # We need to recreate these files for each test, as the compiler may
22484 # overwrite some of them when testing with obscure command lines.
22485 # This happens at least with the AIX C compiler.
22486 : > sub/conftest.c
22487 for i in 1 2 3 4 5 6; do
22488 echo '#include "conftst'$i'.h"' >> sub/conftest.c
22489 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
22490 # Solaris 8's {/usr,}/bin/sh.
22491 touch sub/conftst$i.h
22492 done
22493 echo "include sub/conftest.Po" > confmf
22494
22495 # We check with `-c' and `-o' for the sake of the "dashmstdout"
22496 # mode. It turns out that the SunPro C++ compiler does not properly
22497 # handle `-M -o', and we need to detect this.
22498 depcmd="depmode=$depmode \
22499 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
22500 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
22501 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
22502 echo "| $depcmd" | sed -e 's/ */ /g' >&5
22503 if env $depcmd > conftest.err 2>&1 &&
22504 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
22505 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
22506 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
22507 # icc doesn't choke on unknown options, it will just issue warnings
22508 # or remarks (even with -Werror). So we grep stderr for any message
22509 # that says an option was ignored or not supported.
22510 # When given -MP, icc 7.0 and 7.1 complain thusly:
22511 # icc: Command line warning: ignoring option '-M'; no argument required
22512 # The diagnosis changed in icc 8.0:
22513 # icc: Command line remark: option '-MP' not supported
22514 if (grep 'ignoring option' conftest.err ||
22515 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
22516 am_cv_CC_dependencies_compiler_type=$depmode
22517 $as_echo "$as_me:$LINENO: success" >&5
22518 break
22519 fi
22520 fi
22521 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
22522 sed -e 's/^/| /' < conftest.err >&5
22523 done
22524
22525 cd ..
22526 rm -rf conftest.dir
22527else
22528 am_cv_CC_dependencies_compiler_type=none
22529fi
22530
22531fi
22532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
22533$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
22534if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
22535then as_fn_error $? "no usable dependency style found" "$LINENO" 5
22536else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
22537
22538fi
22539
22540
22541# Since the first call to PKG_CHECK_MODULES may not happen (is guarded by
22542# a condition), we must call PKG_PROG_PKG_CONFIG explicitly to probe for
22543# pkg-config.
22544
22545
22546
22547
22548
22549
22550
22551if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22552 if test -n "$ac_tool_prefix"; then
22553 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22554set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22556$as_echo_n "checking for $ac_word... " >&6; }
22557if ${ac_cv_path_PKG_CONFIG+:} false; then :
22558 $as_echo_n "(cached) " >&6
22559else
22560 case $PKG_CONFIG in
22561 [\\/]* | ?:[\\/]*)
22562 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22563 ;;
22564 *)
22565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22566for as_dir in $PATH
22567do
b686ecb5
JM
22568 IFS=$as_save_IFS
22569 test -z "$as_dir" && as_dir=.
22570 for ac_exec_ext in '' $ac_executable_extensions; do
22571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d5835df2 22572 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b686ecb5
JM
22573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22574 break 2
22575 fi
22576done
22577 done
22578IFS=$as_save_IFS
22579
d5835df2
TV
22580 ;;
22581esac
b686ecb5 22582fi
d5835df2
TV
22583PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22584if test -n "$PKG_CONFIG"; then
22585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22586$as_echo "$PKG_CONFIG" >&6; }
b686ecb5
JM
22587else
22588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22589$as_echo "no" >&6; }
22590fi
22591
22592
22593fi
d5835df2
TV
22594if test -z "$ac_cv_path_PKG_CONFIG"; then
22595 ac_pt_PKG_CONFIG=$PKG_CONFIG
22596 # Extract the first word of "pkg-config", so it can be a program name with args.
22597set dummy pkg-config; ac_word=$2
b686ecb5
JM
22598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22599$as_echo_n "checking for $ac_word... " >&6; }
d5835df2 22600if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
b686ecb5
JM
22601 $as_echo_n "(cached) " >&6
22602else
d5835df2
TV
22603 case $ac_pt_PKG_CONFIG in
22604 [\\/]* | ?:[\\/]*)
22605 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22606 ;;
22607 *)
22608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b686ecb5
JM
22609for as_dir in $PATH
22610do
22611 IFS=$as_save_IFS
22612 test -z "$as_dir" && as_dir=.
22613 for ac_exec_ext in '' $ac_executable_extensions; do
22614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d5835df2 22615 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
b686ecb5
JM
22616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617 break 2
22618 fi
22619done
22620 done
22621IFS=$as_save_IFS
22622
d5835df2
TV
22623 ;;
22624esac
b686ecb5 22625fi
d5835df2
TV
22626ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22627if test -n "$ac_pt_PKG_CONFIG"; then
22628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22629$as_echo "$ac_pt_PKG_CONFIG" >&6; }
b686ecb5
JM
22630else
22631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22632$as_echo "no" >&6; }
22633fi
22634
d5835df2
TV
22635 if test "x$ac_pt_PKG_CONFIG" = x; then
22636 PKG_CONFIG=""
b686ecb5
JM
22637 else
22638 case $cross_compiling:$ac_tool_warned in
22639yes:)
22640{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22641$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22642ac_tool_warned=yes ;;
22643esac
d5835df2 22644 PKG_CONFIG=$ac_pt_PKG_CONFIG
b686ecb5
JM
22645 fi
22646else
d5835df2 22647 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
b686ecb5
JM
22648fi
22649
b686ecb5 22650fi
d5835df2
TV
22651if test -n "$PKG_CONFIG"; then
22652 _pkg_min_version=0.9.0
22653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22654$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22655 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22657$as_echo "yes" >&6; }
22658 else
22659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
b686ecb5 22660$as_echo "no" >&6; }
d5835df2
TV
22661 PKG_CONFIG=""
22662 fi
b686ecb5
JM
22663fi
22664
22665
d5835df2
TV
22666CONFIG_OBS=
22667CONFIG_DEPS=
22668CONFIG_SRCS=
22669ENABLE_CFLAGS=
22670
22671CONFIG_ALL=
22672CONFIG_CLEAN=
22673CONFIG_INSTALL=
22674CONFIG_UNINSTALL=
22675
22676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
22677$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
22678set x ${MAKE-make}
22679ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
22680if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
b686ecb5
JM
22681 $as_echo_n "(cached) " >&6
22682else
d5835df2
TV
22683 cat >conftest.make <<\_ACEOF
22684SHELL = /bin/sh
22685all:
22686 @echo '@@@%%%=$(MAKE)=@@@%%%'
22687_ACEOF
22688# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
22689case `${MAKE-make} -f conftest.make 2>/dev/null` in
22690 *@@@%%%=?*=@@@%%%*)
22691 eval ac_cv_prog_make_${ac_make}_set=yes;;
22692 *)
22693 eval ac_cv_prog_make_${ac_make}_set=no;;
22694esac
22695rm -f conftest.make
b686ecb5 22696fi
d5835df2
TV
22697if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
22698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22699$as_echo "yes" >&6; }
22700 SET_MAKE=
b686ecb5
JM
22701else
22702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22703$as_echo "no" >&6; }
d5835df2 22704 SET_MAKE="MAKE=${MAKE-make}"
b686ecb5
JM
22705fi
22706
d5835df2
TV
22707# Find a good install program. We prefer a C program (faster),
22708# so one script is as good as another. But avoid the broken or
22709# incompatible versions:
22710# SysV /etc/install, /usr/sbin/install
22711# SunOS /usr/etc/install
22712# IRIX /sbin/install
22713# AIX /bin/install
22714# AmigaOS /C/install, which installs bootblocks on floppy discs
22715# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
22716# AFS /usr/afsws/bin/install, which mishandles nonexistent args
22717# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
22718# OS/2's system install, which has a completely different semantic
22719# ./install, which can be erroneously created by make from ./install.sh.
22720# Reject install programs that cannot install multiple files.
22721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
22722$as_echo_n "checking for a BSD-compatible install... " >&6; }
22723if test -z "$INSTALL"; then
22724if ${ac_cv_path_install+:} false; then :
b686ecb5
JM
22725 $as_echo_n "(cached) " >&6
22726else
d5835df2 22727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b686ecb5
JM
22728for as_dir in $PATH
22729do
22730 IFS=$as_save_IFS
22731 test -z "$as_dir" && as_dir=.
d5835df2
TV
22732 # Account for people who put trailing slashes in PATH elements.
22733case $as_dir/ in #((
22734 ./ | .// | /[cC]/* | \
22735 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
22736 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
22737 /usr/ucb/* ) ;;
22738 *)
22739 # OSF1 and SCO ODT 3.0 have their own names for install.
22740 # Don't use installbsd from OSF since it installs stuff as root
22741 # by default.
22742 for ac_prog in ginstall scoinst install; do
22743 for ac_exec_ext in '' $ac_executable_extensions; do
22744 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
22745 if test $ac_prog = install &&
22746 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
22747 # AIX install. It has an incompatible calling convention.
22748 :
22749 elif test $ac_prog = install &&
22750 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
22751 # program-specific install script used by HP pwplus--don't use.
22752 :
22753 else
22754 rm -rf conftest.one conftest.two conftest.dir
22755 echo one > conftest.one
22756 echo two > conftest.two
22757 mkdir conftest.dir
22758 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
22759 test -s conftest.one && test -s conftest.two &&
22760 test -s conftest.dir/conftest.one &&
22761 test -s conftest.dir/conftest.two
22762 then
22763 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
22764 break 3
22765 fi
22766 fi
22767 fi
22768 done
22769 done
22770 ;;
22771esac
22772
b686ecb5
JM
22773 done
22774IFS=$as_save_IFS
22775
d5835df2
TV
22776rm -rf conftest.one conftest.two conftest.dir
22777
b686ecb5 22778fi
d5835df2
TV
22779 if test "${ac_cv_path_install+set}" = set; then
22780 INSTALL=$ac_cv_path_install
22781 else
22782 # As a last resort, use the slow shell script. Don't cache a
22783 # value for INSTALL within a source directory, because that will
22784 # break other packages using the cache if that directory is
22785 # removed, or if the value is a relative name.
22786 INSTALL=$ac_install_sh
22787 fi
b686ecb5 22788fi
d5835df2
TV
22789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
22790$as_echo "$INSTALL" >&6; }
b686ecb5 22791
d5835df2
TV
22792# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
22793# It thinks the first close brace ends the variable substitution.
22794test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
b686ecb5 22795
d5835df2
TV
22796test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
22797
22798test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
22799
22800
22801 MKINSTALLDIRS=
22802 if test -n "$ac_aux_dir"; then
22803 case "$ac_aux_dir" in
22804 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
22805 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
22806 esac
22807 fi
22808 if test -z "$MKINSTALLDIRS"; then
22809 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
b686ecb5 22810 fi
b686ecb5 22811
d5835df2
TV
22812
22813
22814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
22815$as_echo_n "checking whether NLS is requested... " >&6; }
22816 # Check whether --enable-nls was given.
22817if test "${enable_nls+set}" = set; then :
22818 enableval=$enable_nls; USE_NLS=$enableval
b686ecb5 22819else
d5835df2 22820 USE_NLS=yes
b686ecb5
JM
22821fi
22822
d5835df2
TV
22823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
22824$as_echo "$USE_NLS" >&6; }
22825
22826
22827
22828
22829
22830
22831# Prepare PATH_SEPARATOR.
22832# The user is always right.
22833if test "${PATH_SEPARATOR+set}" != set; then
22834 echo "#! /bin/sh" >conf$$.sh
22835 echo "exit 0" >>conf$$.sh
22836 chmod +x conf$$.sh
22837 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22838 PATH_SEPARATOR=';'
b686ecb5 22839 else
d5835df2 22840 PATH_SEPARATOR=:
b686ecb5 22841 fi
d5835df2 22842 rm -f conf$$.sh
b686ecb5
JM
22843fi
22844
d5835df2
TV
22845# Find out how to test for executable files. Don't use a zero-byte file,
22846# as systems may use methods other than mode bits to determine executability.
22847cat >conf$$.file <<_ASEOF
22848#! /bin/sh
22849exit 0
22850_ASEOF
22851chmod +x conf$$.file
22852if test -x conf$$.file >/dev/null 2>&1; then
22853 ac_executable_p="test -x"
22854else
22855 ac_executable_p="test -f"
22856fi
22857rm -f conf$$.file
b686ecb5 22858
d5835df2
TV
22859# Extract the first word of "msgfmt", so it can be a program name with args.
22860set dummy msgfmt; ac_word=$2
b686ecb5
JM
22861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22862$as_echo_n "checking for $ac_word... " >&6; }
d5835df2 22863if ${ac_cv_path_MSGFMT+:} false; then :
b686ecb5
JM
22864 $as_echo_n "(cached) " >&6
22865else
d5835df2
TV
22866 case "$MSGFMT" in
22867 [\\/]* | ?:[\\/]*)
22868 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
22869 ;;
22870 *)
22871 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
22872 for ac_dir in $PATH; do
22873 IFS="$ac_save_IFS"
22874 test -z "$ac_dir" && ac_dir=.
22875 for ac_exec_ext in '' $ac_executable_extensions; do
22876 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
22877 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
22878 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
22879 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
22880 break 2
22881 fi
22882 fi
22883 done
22884 done
22885 IFS="$ac_save_IFS"
22886 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
22887 ;;
22888esac
b686ecb5 22889fi
d5835df2
TV
22890MSGFMT="$ac_cv_path_MSGFMT"
22891if test "$MSGFMT" != ":"; then
22892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
22893$as_echo "$MSGFMT" >&6; }
b686ecb5
JM
22894else
22895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22896$as_echo "no" >&6; }
22897fi
22898
d5835df2
TV
22899 # Extract the first word of "gmsgfmt", so it can be a program name with args.
22900set dummy gmsgfmt; ac_word=$2
b686ecb5
JM
22901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22902$as_echo_n "checking for $ac_word... " >&6; }
d5835df2 22903if ${ac_cv_path_GMSGFMT+:} false; then :
b686ecb5
JM
22904 $as_echo_n "(cached) " >&6
22905else
d5835df2
TV
22906 case $GMSGFMT in
22907 [\\/]* | ?:[\\/]*)
22908 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
22909 ;;
22910 *)
22911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b686ecb5
JM
22912for as_dir in $PATH
22913do
22914 IFS=$as_save_IFS
22915 test -z "$as_dir" && as_dir=.
22916 for ac_exec_ext in '' $ac_executable_extensions; do
22917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d5835df2 22918 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
b686ecb5
JM
22919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22920 break 2
22921 fi
22922done
22923 done
22924IFS=$as_save_IFS
22925
d5835df2
TV
22926 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
22927 ;;
22928esac
b686ecb5 22929fi
d5835df2
TV
22930GMSGFMT=$ac_cv_path_GMSGFMT
22931if test -n "$GMSGFMT"; then
22932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
22933$as_echo "$GMSGFMT" >&6; }
b686ecb5
JM
22934else
22935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22936$as_echo "no" >&6; }
22937fi
22938
d5835df2
TV
22939
22940
22941
22942# Prepare PATH_SEPARATOR.
22943# The user is always right.
22944if test "${PATH_SEPARATOR+set}" != set; then
22945 echo "#! /bin/sh" >conf$$.sh
22946 echo "exit 0" >>conf$$.sh
22947 chmod +x conf$$.sh
22948 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22949 PATH_SEPARATOR=';'
b686ecb5 22950 else
d5835df2 22951 PATH_SEPARATOR=:
b686ecb5 22952 fi
d5835df2
TV
22953 rm -f conf$$.sh
22954fi
22955
22956# Find out how to test for executable files. Don't use a zero-byte file,
22957# as systems may use methods other than mode bits to determine executability.
22958cat >conf$$.file <<_ASEOF
22959#! /bin/sh
22960exit 0
22961_ASEOF
22962chmod +x conf$$.file
22963if test -x conf$$.file >/dev/null 2>&1; then
22964 ac_executable_p="test -x"
b686ecb5 22965else
d5835df2 22966 ac_executable_p="test -f"
b686ecb5 22967fi
d5835df2 22968rm -f conf$$.file
b686ecb5 22969
d5835df2
TV
22970# Extract the first word of "xgettext", so it can be a program name with args.
22971set dummy xgettext; ac_word=$2
22972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22973$as_echo_n "checking for $ac_word... " >&6; }
22974if ${ac_cv_path_XGETTEXT+:} false; then :
22975 $as_echo_n "(cached) " >&6
22976else
22977 case "$XGETTEXT" in
22978 [\\/]* | ?:[\\/]*)
22979 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
22980 ;;
22981 *)
22982 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
22983 for ac_dir in $PATH; do
22984 IFS="$ac_save_IFS"
22985 test -z "$ac_dir" && ac_dir=.
22986 for ac_exec_ext in '' $ac_executable_extensions; do
22987 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
22988 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
22989 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
22990 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
22991 break 2
22992 fi
22993 fi
22994 done
22995 done
22996 IFS="$ac_save_IFS"
22997 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
b686ecb5
JM
22998 ;;
22999esac
d5835df2
TV
23000fi
23001XGETTEXT="$ac_cv_path_XGETTEXT"
23002if test "$XGETTEXT" != ":"; then
23003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
23004$as_echo "$XGETTEXT" >&6; }
23005else
23006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23007$as_echo "no" >&6; }
23008fi
b686ecb5 23009
d5835df2 23010 rm -f messages.po
b686ecb5 23011
b686ecb5 23012
d5835df2
TV
23013# Prepare PATH_SEPARATOR.
23014# The user is always right.
23015if test "${PATH_SEPARATOR+set}" != set; then
23016 echo "#! /bin/sh" >conf$$.sh
23017 echo "exit 0" >>conf$$.sh
23018 chmod +x conf$$.sh
23019 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23020 PATH_SEPARATOR=';'
23021 else
23022 PATH_SEPARATOR=:
23023 fi
23024 rm -f conf$$.sh
23025fi
b686ecb5 23026
d5835df2
TV
23027# Find out how to test for executable files. Don't use a zero-byte file,
23028# as systems may use methods other than mode bits to determine executability.
23029cat >conf$$.file <<_ASEOF
23030#! /bin/sh
23031exit 0
23032_ASEOF
23033chmod +x conf$$.file
23034if test -x conf$$.file >/dev/null 2>&1; then
23035 ac_executable_p="test -x"
b686ecb5 23036else
d5835df2 23037 ac_executable_p="test -f"
b686ecb5 23038fi
d5835df2 23039rm -f conf$$.file
b686ecb5 23040
d5835df2
TV
23041# Extract the first word of "msgmerge", so it can be a program name with args.
23042set dummy msgmerge; ac_word=$2
23043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23044$as_echo_n "checking for $ac_word... " >&6; }
23045if ${ac_cv_path_MSGMERGE+:} false; then :
23046 $as_echo_n "(cached) " >&6
23047else
23048 case "$MSGMERGE" in
23049 [\\/]* | ?:[\\/]*)
23050 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
23051 ;;
23052 *)
23053 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
23054 for ac_dir in $PATH; do
23055 IFS="$ac_save_IFS"
23056 test -z "$ac_dir" && ac_dir=.
23057 for ac_exec_ext in '' $ac_executable_extensions; do
23058 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
23059 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
23060 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
23061 break 2
23062 fi
23063 fi
23064 done
23065 done
23066 IFS="$ac_save_IFS"
23067 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
23068 ;;
23069esac
23070fi
23071MSGMERGE="$ac_cv_path_MSGMERGE"
23072if test "$MSGMERGE" != ":"; then
23073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
23074$as_echo "$MSGMERGE" >&6; }
23075else
23076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23077$as_echo "no" >&6; }
b686ecb5
JM
23078fi
23079
23080
d5835df2
TV
23081 if test "$GMSGFMT" != ":"; then
23082 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
23083 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
23084 : ;
23085 else
23086 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
23087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
23088$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
23089 GMSGFMT=":"
23090 fi
23091 fi
b686ecb5 23092
d5835df2
TV
23093 if test "$XGETTEXT" != ":"; then
23094 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
23095 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
23096 : ;
23097 else
23098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
23099$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
23100 XGETTEXT=":"
23101 fi
23102 rm -f messages.po
b686ecb5 23103 fi
b686ecb5 23104
d5835df2 23105 ac_config_commands="$ac_config_commands default-1"
b686ecb5 23106
b686ecb5
JM
23107
23108
b686ecb5 23109
b686ecb5 23110
b686ecb5 23111
b686ecb5
JM
23112
23113
d5835df2 23114 use_additional=yes
b686ecb5 23115
d5835df2
TV
23116 acl_save_prefix="$prefix"
23117 prefix="$acl_final_prefix"
23118 acl_save_exec_prefix="$exec_prefix"
23119 exec_prefix="$acl_final_exec_prefix"
b686ecb5 23120
d5835df2
TV
23121 eval additional_includedir=\"$includedir\"
23122 eval additional_libdir=\"$libdir\"
b686ecb5 23123
d5835df2
TV
23124 exec_prefix="$acl_save_exec_prefix"
23125 prefix="$acl_save_prefix"
b686ecb5 23126
b686ecb5 23127
d5835df2
TV
23128# Check whether --with-libiconv-prefix was given.
23129if test "${with_libiconv_prefix+set}" = set; then :
23130 withval=$with_libiconv_prefix;
23131 if test "X$withval" = "Xno"; then
23132 use_additional=no
23133 else
23134 if test "X$withval" = "X"; then
b686ecb5 23135
d5835df2
TV
23136 acl_save_prefix="$prefix"
23137 prefix="$acl_final_prefix"
23138 acl_save_exec_prefix="$exec_prefix"
23139 exec_prefix="$acl_final_exec_prefix"
b686ecb5 23140
d5835df2
TV
23141 eval additional_includedir=\"$includedir\"
23142 eval additional_libdir=\"$libdir\"
23143
23144 exec_prefix="$acl_save_exec_prefix"
23145 prefix="$acl_save_prefix"
23146
23147 else
23148 additional_includedir="$withval/include"
23149 additional_libdir="$withval/lib"
23150 fi
23151 fi
b686ecb5 23152
b686ecb5 23153fi
d5835df2
TV
23154
23155
23156# Check whether --with-libiconv-type was given.
23157if test "${with_libiconv_type+set}" = set; then :
23158 withval=$with_libiconv_type; with_libiconv_type=$withval
b686ecb5 23159else
d5835df2 23160 with_libiconv_type=auto
b686ecb5 23161fi
b686ecb5 23162
d5835df2 23163 lib_type=`eval echo \$with_libiconv_type`
b686ecb5 23164
d5835df2
TV
23165 LIBICONV=
23166 LTLIBICONV=
23167 INCICONV=
23168 rpathdirs=
23169 ltrpathdirs=
23170 names_already_handled=
23171 names_next_round='iconv '
23172 while test -n "$names_next_round"; do
23173 names_this_round="$names_next_round"
23174 names_next_round=
23175 for name in $names_this_round; do
23176 already_handled=
23177 for n in $names_already_handled; do
23178 if test "$n" = "$name"; then
23179 already_handled=yes
23180 break
b686ecb5 23181 fi
d5835df2
TV
23182 done
23183 if test -z "$already_handled"; then
23184 names_already_handled="$names_already_handled $name"
23185 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
23186 eval value=\"\$HAVE_LIB$uppername\"
23187 if test -n "$value"; then
23188 if test "$value" = yes; then
23189 eval value=\"\$LIB$uppername\"
23190 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
23191 eval value=\"\$LTLIB$uppername\"
23192 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
23193 else
23194 :
23195 fi
23196 else
23197 found_dir=
23198 found_la=
23199 found_so=
23200 found_a=
23201 if test $use_additional = yes; then
23202 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
23203 found_dir="$additional_libdir"
23204 found_so="$additional_libdir/lib$name.$shlibext"
23205 if test -f "$additional_libdir/lib$name.la"; then
23206 found_la="$additional_libdir/lib$name.la"
23207 fi
23208 elif test x$lib_type != xshared; then
23209 if test -f "$additional_libdir/lib$name.$libext"; then
23210 found_dir="$additional_libdir"
23211 found_a="$additional_libdir/lib$name.$libext"
23212 if test -f "$additional_libdir/lib$name.la"; then
23213 found_la="$additional_libdir/lib$name.la"
23214 fi
23215 fi
23216 fi
23217 fi
23218 if test "X$found_dir" = "X"; then
23219 for x in $LDFLAGS $LTLIBICONV; do
b686ecb5 23220
d5835df2
TV
23221 acl_save_prefix="$prefix"
23222 prefix="$acl_final_prefix"
23223 acl_save_exec_prefix="$exec_prefix"
23224 exec_prefix="$acl_final_exec_prefix"
23225 eval x=\"$x\"
23226 exec_prefix="$acl_save_exec_prefix"
23227 prefix="$acl_save_prefix"
b686ecb5 23228
d5835df2
TV
23229 case "$x" in
23230 -L*)
23231 dir=`echo "X$x" | sed -e 's/^X-L//'`
23232 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
23233 found_dir="$dir"
23234 found_so="$dir/lib$name.$shlibext"
23235 if test -f "$dir/lib$name.la"; then
23236 found_la="$dir/lib$name.la"
23237 fi
23238 elif test x$lib_type != xshared; then
23239 if test -f "$dir/lib$name.$libext"; then
23240 found_dir="$dir"
23241 found_a="$dir/lib$name.$libext"
23242 if test -f "$dir/lib$name.la"; then
23243 found_la="$dir/lib$name.la"
23244 fi
23245 fi
23246 fi
23247 ;;
23248 esac
23249 if test "X$found_dir" != "X"; then
23250 break
23251 fi
23252 done
23253 fi
23254 if test "X$found_dir" != "X"; then
23255 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
23256 if test "X$found_so" != "X"; then
23257 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
23258 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23259 else
23260 haveit=
23261 for x in $ltrpathdirs; do
23262 if test "X$x" = "X$found_dir"; then
23263 haveit=yes
23264 break
23265 fi
23266 done
23267 if test -z "$haveit"; then
23268 ltrpathdirs="$ltrpathdirs $found_dir"
23269 fi
23270 if test "$hardcode_direct" = yes; then
23271 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23272 else
23273 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
23274 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23275 haveit=
23276 for x in $rpathdirs; do
23277 if test "X$x" = "X$found_dir"; then
23278 haveit=yes
23279 break
23280 fi
23281 done
23282 if test -z "$haveit"; then
23283 rpathdirs="$rpathdirs $found_dir"
23284 fi
23285 else
23286 haveit=
23287 for x in $LDFLAGS $LIBICONV; do
b686ecb5 23288
d5835df2
TV
23289 acl_save_prefix="$prefix"
23290 prefix="$acl_final_prefix"
23291 acl_save_exec_prefix="$exec_prefix"
23292 exec_prefix="$acl_final_exec_prefix"
23293 eval x=\"$x\"
23294 exec_prefix="$acl_save_exec_prefix"
23295 prefix="$acl_save_prefix"
862776f2 23296
d5835df2
TV
23297 if test "X$x" = "X-L$found_dir"; then
23298 haveit=yes
23299 break
23300 fi
23301 done
23302 if test -z "$haveit"; then
23303 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
23304 fi
23305 if test "$hardcode_minus_L" != no; then
23306 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23307 else
23308 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23309 fi
23310 fi
23311 fi
23312 fi
23313 else
23314 if test "X$found_a" != "X"; then
23315 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
23316 else
23317 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
23318 fi
23319 fi
23320 additional_includedir=
23321 case "$found_dir" in
23322 */lib | */lib/)
23323 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
23324 additional_includedir="$basedir/include"
23325 ;;
23326 esac
23327 if test "X$additional_includedir" != "X"; then
23328 if test "X$additional_includedir" != "X/usr/include"; then
23329 haveit=
23330 if test "X$additional_includedir" = "X/usr/local/include"; then
23331 if test -n "$GCC"; then
23332 case $host_os in
23333 linux*) haveit=yes;;
23334 esac
23335 fi
23336 fi
23337 if test -z "$haveit"; then
23338 for x in $CPPFLAGS $INCICONV; do
b686ecb5
JM
23339
23340 acl_save_prefix="$prefix"
23341 prefix="$acl_final_prefix"
23342 acl_save_exec_prefix="$exec_prefix"
23343 exec_prefix="$acl_final_exec_prefix"
23344 eval x=\"$x\"
23345 exec_prefix="$acl_save_exec_prefix"
23346 prefix="$acl_save_prefix"
23347
d5835df2
TV
23348 if test "X$x" = "X-I$additional_includedir"; then
23349 haveit=yes
23350 break
23351 fi
23352 done
23353 if test -z "$haveit"; then
23354 if test -d "$additional_includedir"; then
23355 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
23356 fi
23357 fi
23358 fi
23359 fi
23360 fi
23361 if test -n "$found_la"; then
23362 save_libdir="$libdir"
23363 case "$found_la" in
23364 */* | *\\*) . "$found_la" ;;
23365 *) . "./$found_la" ;;
23366 esac
23367 libdir="$save_libdir"
23368 for dep in $dependency_libs; do
23369 case "$dep" in
23370 -L*)
23371 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
23372 if test "X$additional_libdir" != "X/usr/lib"; then
23373 haveit=
23374 if test "X$additional_libdir" = "X/usr/local/lib"; then
23375 if test -n "$GCC"; then
23376 case $host_os in
23377 linux*) haveit=yes;;
23378 esac
23379 fi
23380 fi
23381 if test -z "$haveit"; then
23382 haveit=
23383 for x in $LDFLAGS $LIBICONV; do
23384
23385 acl_save_prefix="$prefix"
23386 prefix="$acl_final_prefix"
23387 acl_save_exec_prefix="$exec_prefix"
23388 exec_prefix="$acl_final_exec_prefix"
23389 eval x=\"$x\"
23390 exec_prefix="$acl_save_exec_prefix"
23391 prefix="$acl_save_prefix"
23392
23393 if test "X$x" = "X-L$additional_libdir"; then
23394 haveit=yes
23395 break
23396 fi
23397 done
23398 if test -z "$haveit"; then
23399 if test -d "$additional_libdir"; then
23400 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
23401 fi
23402 fi
23403 haveit=
23404 for x in $LDFLAGS $LTLIBICONV; do
23405
23406 acl_save_prefix="$prefix"
23407 prefix="$acl_final_prefix"
23408 acl_save_exec_prefix="$exec_prefix"
23409 exec_prefix="$acl_final_exec_prefix"
23410 eval x=\"$x\"
23411 exec_prefix="$acl_save_exec_prefix"
23412 prefix="$acl_save_prefix"
23413
23414 if test "X$x" = "X-L$additional_libdir"; then
23415 haveit=yes
23416 break
23417 fi
23418 done
23419 if test -z "$haveit"; then
23420 if test -d "$additional_libdir"; then
23421 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
23422 fi
23423 fi
23424 fi
23425 fi
23426 ;;
23427 -R*)
23428 dir=`echo "X$dep" | sed -e 's/^X-R//'`
23429 if test "$enable_rpath" != no; then
23430 haveit=
23431 for x in $rpathdirs; do
23432 if test "X$x" = "X$dir"; then
23433 haveit=yes
23434 break
23435 fi
23436 done
23437 if test -z "$haveit"; then
23438 rpathdirs="$rpathdirs $dir"
23439 fi
23440 haveit=
23441 for x in $ltrpathdirs; do
23442 if test "X$x" = "X$dir"; then
23443 haveit=yes
23444 break
23445 fi
23446 done
23447 if test -z "$haveit"; then
23448 ltrpathdirs="$ltrpathdirs $dir"
23449 fi
23450 fi
23451 ;;
23452 -l*)
23453 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
23454 ;;
23455 *.la)
23456 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
23457 ;;
23458 *)
23459 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
23460 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
23461 ;;
23462 esac
23463 done
23464 fi
23465 else
23466 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
23467 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23468 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
23469 else
23470 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
23471 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
23472 fi
23473 fi
23474 fi
23475 fi
23476 done
862776f2 23477 done
d5835df2
TV
23478 if test "X$rpathdirs" != "X"; then
23479 if test -n "$hardcode_libdir_separator"; then
23480 alldirs=
23481 for found_dir in $rpathdirs; do
23482 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
23483 done
23484 acl_save_libdir="$libdir"
23485 libdir="$alldirs"
23486 eval flag=\"$hardcode_libdir_flag_spec\"
23487 libdir="$acl_save_libdir"
23488 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23489 else
23490 for found_dir in $rpathdirs; do
23491 acl_save_libdir="$libdir"
23492 libdir="$found_dir"
23493 eval flag=\"$hardcode_libdir_flag_spec\"
23494 libdir="$acl_save_libdir"
23495 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23496 done
23497 fi
23498 fi
23499 if test "X$ltrpathdirs" != "X"; then
23500 for found_dir in $ltrpathdirs; do
23501 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
23502 done
23503 fi
b686ecb5
JM
23504
23505
d5835df2
TV
23506
23507
23508
23509if test -f ../gettext/uninstalled-config.sh; then
23510 relative_builddir='$(top_builddir)/../gettext'
23511 . ../gettext/uninstalled-config.sh
b686ecb5 23512else
d5835df2
TV
23513 # The sister gettext directory doesn't exist and won't collect information on
23514 # using gettext for us. Call a bundled AM_GNU_GETTEXT.
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
b686ecb5 23534
862776f2 23535
862776f2 23536
d5835df2
TV
23537
23538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
23539$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
23540if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
23541 $as_echo_n "(cached) " >&6
23542else
23543 gt_save_LIBS="$LIBS"
23544 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23546/* end confdefs.h. */
23547#include <CoreFoundation/CFPreferences.h>
b686ecb5
JM
23548int
23549main ()
23550{
d5835df2 23551CFPreferencesCopyAppValue(NULL, NULL)
b686ecb5
JM
23552 ;
23553 return 0;
23554}
23555_ACEOF
23556if ac_fn_c_try_link "$LINENO"; then :
d5835df2
TV
23557 gt_cv_func_CFPreferencesCopyAppValue=yes
23558else
23559 gt_cv_func_CFPreferencesCopyAppValue=no
b686ecb5
JM
23560fi
23561rm -f core conftest.err conftest.$ac_objext \
23562 conftest$ac_exeext conftest.$ac_ext
d5835df2
TV
23563 LIBS="$gt_save_LIBS"
23564fi
23565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
23566$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
23567 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
862776f2 23568
d5835df2 23569$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
862776f2 23570
d5835df2
TV
23571 fi
23572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
23573$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
23574if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
23575 $as_echo_n "(cached) " >&6
23576else
23577 gt_save_LIBS="$LIBS"
23578 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23580/* end confdefs.h. */
23581#include <CoreFoundation/CFLocale.h>
b686ecb5
JM
23582int
23583main ()
23584{
d5835df2 23585CFLocaleCopyPreferredLanguages();
b686ecb5
JM
23586 ;
23587 return 0;
23588}
23589_ACEOF
23590if ac_fn_c_try_link "$LINENO"; then :
d5835df2
TV
23591 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
23592else
23593 gt_cv_func_CFLocaleCopyPreferredLanguages=no
b686ecb5
JM
23594fi
23595rm -f core conftest.err conftest.$ac_objext \
23596 conftest$ac_exeext conftest.$ac_ext
d5835df2 23597 LIBS="$gt_save_LIBS"
b686ecb5 23598fi
d5835df2
TV
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
23600$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
23601 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23602
23603$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
23604
23605 fi
23606 INTL_MACOSX_LIBS=
23607 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
23608 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23609 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
23610 fi
23611
23612
23613
23614
23615
23616
23617 LIBINTL=
23618 LTLIBINTL=
23619 POSUB=
23620
23621 case " $gt_needs " in
23622 *" need-formatstring-macros "*) gt_api_version=3 ;;
23623 *" need-ngettext "*) gt_api_version=2 ;;
23624 *) gt_api_version=1 ;;
23625 esac
23626 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
23627 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
23628
23629 if test "$USE_NLS" = "yes"; then
23630 gt_use_preinstalled_gnugettext=no
23631
23632
23633 if test $gt_api_version -ge 3; then
23634 gt_revision_test_code='
23635#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
23636#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
23637#endif
23638typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
23639'
23640 else
23641 gt_revision_test_code=
23642 fi
23643 if test $gt_api_version -ge 2; then
23644 gt_expression_test_code=' + * ngettext ("", "", 0)'
23645 else
23646 gt_expression_test_code=
23647 fi
23648
23649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
23650$as_echo_n "checking for GNU gettext in libc... " >&6; }
23651if eval \${$gt_func_gnugettext_libc+:} false; then :
23652 $as_echo_n "(cached) " >&6
23653else
23654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23655/* end confdefs.h. */
23656
23657#include <libintl.h>
23658#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
23659extern int _nl_msg_cat_cntr;
23660extern int *_nl_domain_bindings;
23661#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
23662#else
23663#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
23664#endif
23665$gt_revision_test_code
23666
23667int
23668main ()
23669{
23670
23671bindtextdomain ("", "");
23672return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
23673
23674 ;
23675 return 0;
23676}
23677_ACEOF
23678if ac_fn_c_try_link "$LINENO"; then :
23679 eval "$gt_func_gnugettext_libc=yes"
23680else
23681 eval "$gt_func_gnugettext_libc=no"
23682fi
23683rm -f core conftest.err conftest.$ac_objext \
23684 conftest$ac_exeext conftest.$ac_ext
23685fi
23686eval ac_res=\$$gt_func_gnugettext_libc
23687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23688$as_echo "$ac_res" >&6; }
23689
23690 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
23691
23692
23693
23694
23695
23696 am_save_CPPFLAGS="$CPPFLAGS"
23697
23698 for element in $INCICONV; do
23699 haveit=
23700 for x in $CPPFLAGS; do
23701
23702 acl_save_prefix="$prefix"
23703 prefix="$acl_final_prefix"
23704 acl_save_exec_prefix="$exec_prefix"
23705 exec_prefix="$acl_final_exec_prefix"
23706 eval x=\"$x\"
23707 exec_prefix="$acl_save_exec_prefix"
23708 prefix="$acl_save_prefix"
23709
23710 if test "X$x" = "X$element"; then
23711 haveit=yes
23712 break
23713 fi
23714 done
23715 if test -z "$haveit"; then
23716 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
23717 fi
23718 done
23719
23720
23721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
23722$as_echo_n "checking for iconv... " >&6; }
23723if ${am_cv_func_iconv+:} false; then :
23724 $as_echo_n "(cached) " >&6
23725else
23726
23727 am_cv_func_iconv="no, consider installing GNU libiconv"
23728 am_cv_lib_iconv=no
23729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23730/* end confdefs.h. */
23731
23732#include <stdlib.h>
23733#include <iconv.h>
23734
23735int
23736main ()
23737{
23738iconv_t cd = iconv_open("","");
23739 iconv(cd,NULL,NULL,NULL,NULL);
23740 iconv_close(cd);
23741 ;
23742 return 0;
23743}
23744_ACEOF
23745if ac_fn_c_try_link "$LINENO"; then :
23746 am_cv_func_iconv=yes
23747fi
23748rm -f core conftest.err conftest.$ac_objext \
23749 conftest$ac_exeext conftest.$ac_ext
23750 if test "$am_cv_func_iconv" != yes; then
23751 am_save_LIBS="$LIBS"
23752 LIBS="$LIBS $LIBICONV"
23753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23754/* end confdefs.h. */
23755
23756#include <stdlib.h>
23757#include <iconv.h>
23758
23759int
23760main ()
23761{
23762iconv_t cd = iconv_open("","");
23763 iconv(cd,NULL,NULL,NULL,NULL);
23764 iconv_close(cd);
23765 ;
23766 return 0;
23767}
23768_ACEOF
23769if ac_fn_c_try_link "$LINENO"; then :
23770 am_cv_lib_iconv=yes
23771 am_cv_func_iconv=yes
23772fi
23773rm -f core conftest.err conftest.$ac_objext \
23774 conftest$ac_exeext conftest.$ac_ext
23775 LIBS="$am_save_LIBS"
23776 fi
23777
23778fi
23779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
23780$as_echo "$am_cv_func_iconv" >&6; }
23781 if test "$am_cv_func_iconv" = yes; then
23782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
23783$as_echo_n "checking for working iconv... " >&6; }
23784if ${am_cv_func_iconv_works+:} false; then :
23785 $as_echo_n "(cached) " >&6
23786else
b686ecb5 23787
862776f2
AA
23788 am_save_LIBS="$LIBS"
23789 if test $am_cv_lib_iconv = yes; then
23790 LIBS="$LIBS $LIBICONV"
23791 fi
23792 am_cv_func_iconv_works=no
23793 for ac_iconv_const in '' 'const'; do
23794 if test "$cross_compiling" = yes; then :
23795 case "$host_os" in
23796 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
23797 *) am_cv_func_iconv_works="guessing yes" ;;
23798 esac
23799else
23800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23801/* end confdefs.h. */
b686ecb5 23802
862776f2
AA
23803#include <iconv.h>
23804#include <string.h>
b686ecb5 23805
862776f2
AA
23806#ifndef ICONV_CONST
23807# define ICONV_CONST $ac_iconv_const
23808#endif
b686ecb5 23809
862776f2
AA
23810int
23811main ()
23812{
23813int result = 0;
23814 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
23815 successful returns. This is even documented in
23816 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
23817 {
23818 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
23819 if (cd_utf8_to_88591 != (iconv_t)(-1))
23820 {
23821 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
23822 char buf[10];
23823 ICONV_CONST char *inptr = input;
23824 size_t inbytesleft = strlen (input);
23825 char *outptr = buf;
23826 size_t outbytesleft = sizeof (buf);
23827 size_t res = iconv (cd_utf8_to_88591,
23828 &inptr, &inbytesleft,
23829 &outptr, &outbytesleft);
23830 if (res == 0)
23831 result |= 1;
23832 iconv_close (cd_utf8_to_88591);
23833 }
23834 }
23835 /* Test against Solaris 10 bug: Failures are not distinguishable from
23836 successful returns. */
23837 {
23838 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
23839 if (cd_ascii_to_88591 != (iconv_t)(-1))
23840 {
23841 static ICONV_CONST char input[] = "\263";
23842 char buf[10];
23843 ICONV_CONST char *inptr = input;
23844 size_t inbytesleft = strlen (input);
23845 char *outptr = buf;
23846 size_t outbytesleft = sizeof (buf);
23847 size_t res = iconv (cd_ascii_to_88591,
23848 &inptr, &inbytesleft,
23849 &outptr, &outbytesleft);
23850 if (res == 0)
23851 result |= 2;
23852 iconv_close (cd_ascii_to_88591);
23853 }
23854 }
23855 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
23856 {
23857 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
23858 if (cd_88591_to_utf8 != (iconv_t)(-1))
23859 {
23860 static ICONV_CONST char input[] = "\304";
23861 static char buf[2] = { (char)0xDE, (char)0xAD };
23862 ICONV_CONST char *inptr = input;
23863 size_t inbytesleft = 1;
23864 char *outptr = buf;
23865 size_t outbytesleft = 1;
23866 size_t res = iconv (cd_88591_to_utf8,
23867 &inptr, &inbytesleft,
23868 &outptr, &outbytesleft);
23869 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
23870 result |= 4;
23871 iconv_close (cd_88591_to_utf8);
23872 }
23873 }
23874#if 0 /* This bug could be worked around by the caller. */
23875 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
23876 {
23877 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
23878 if (cd_88591_to_utf8 != (iconv_t)(-1))
23879 {
23880 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
23881 char buf[50];
23882 ICONV_CONST char *inptr = input;
23883 size_t inbytesleft = strlen (input);
23884 char *outptr = buf;
23885 size_t outbytesleft = sizeof (buf);
23886 size_t res = iconv (cd_88591_to_utf8,
23887 &inptr, &inbytesleft,
23888 &outptr, &outbytesleft);
23889 if ((int)res > 0)
23890 result |= 8;
23891 iconv_close (cd_88591_to_utf8);
23892 }
23893 }
23894#endif
23895 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
23896 provided. */
23897 {
23898 /* Try standardized names. */
23899 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
23900 /* Try IRIX, OSF/1 names. */
23901 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
23902 /* Try AIX names. */
23903 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
23904 /* Try HP-UX names. */
23905 iconv_t cd4 = iconv_open ("utf8", "eucJP");
23906 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
23907 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
23908 result |= 16;
23909 if (cd1 != (iconv_t)(-1))
23910 iconv_close (cd1);
23911 if (cd2 != (iconv_t)(-1))
23912 iconv_close (cd2);
23913 if (cd3 != (iconv_t)(-1))
23914 iconv_close (cd3);
23915 if (cd4 != (iconv_t)(-1))
23916 iconv_close (cd4);
23917 }
23918 return result;
b686ecb5 23919
862776f2
AA
23920 ;
23921 return 0;
23922}
23923_ACEOF
23924if ac_fn_c_try_run "$LINENO"; then :
23925 am_cv_func_iconv_works=yes
23926fi
23927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23928 conftest.$ac_objext conftest.beam conftest.$ac_ext
23929fi
23930
23931 test "$am_cv_func_iconv_works" = no || break
23932 done
23933 LIBS="$am_save_LIBS"
b686ecb5 23934
862776f2
AA
23935fi
23936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
23937$as_echo "$am_cv_func_iconv_works" >&6; }
23938 case "$am_cv_func_iconv_works" in
23939 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
23940 *) am_func_iconv=yes ;;
23941 esac
23942 else
23943 am_func_iconv=no am_cv_lib_iconv=no
23944 fi
23945 if test "$am_func_iconv" = yes; then
23946
23947$as_echo "#define HAVE_ICONV 1" >>confdefs.h
23948
23949 fi
23950 if test "$am_cv_lib_iconv" = yes; then
b686ecb5
JM
23951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
23952$as_echo_n "checking how to link with libiconv... " >&6; }
23953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
23954$as_echo "$LIBICONV" >&6; }
23955 else
862776f2 23956 CPPFLAGS="$am_save_CPPFLAGS"
b686ecb5
JM
23957 LIBICONV=
23958 LTLIBICONV=
23959 fi
23960
23961
23962
b686ecb5 23963
b686ecb5 23964
b686ecb5 23965
d5835df2 23966 use_additional=yes
b686ecb5 23967
d5835df2
TV
23968 acl_save_prefix="$prefix"
23969 prefix="$acl_final_prefix"
23970 acl_save_exec_prefix="$exec_prefix"
23971 exec_prefix="$acl_final_exec_prefix"
b686ecb5 23972
d5835df2
TV
23973 eval additional_includedir=\"$includedir\"
23974 eval additional_libdir=\"$libdir\"
b686ecb5 23975
d5835df2
TV
23976 exec_prefix="$acl_save_exec_prefix"
23977 prefix="$acl_save_prefix"
862776f2
AA
23978
23979
d5835df2
TV
23980# Check whether --with-libintl-prefix was given.
23981if test "${with_libintl_prefix+set}" = set; then :
23982 withval=$with_libintl_prefix;
23983 if test "X$withval" = "Xno"; then
23984 use_additional=no
862776f2 23985 else
d5835df2 23986 if test "X$withval" = "X"; then
b686ecb5 23987
d5835df2
TV
23988 acl_save_prefix="$prefix"
23989 prefix="$acl_final_prefix"
23990 acl_save_exec_prefix="$exec_prefix"
23991 exec_prefix="$acl_final_exec_prefix"
b686ecb5 23992
d5835df2
TV
23993 eval additional_includedir=\"$includedir\"
23994 eval additional_libdir=\"$libdir\"
b686ecb5 23995
d5835df2
TV
23996 exec_prefix="$acl_save_exec_prefix"
23997 prefix="$acl_save_prefix"
b686ecb5 23998
d5835df2
TV
23999 else
24000 additional_includedir="$withval/include"
24001 additional_libdir="$withval/lib"
24002 fi
24003 fi
b686ecb5 24004
b686ecb5
JM
24005fi
24006
b686ecb5 24007
d5835df2
TV
24008# Check whether --with-libintl-type was given.
24009if test "${with_libintl_type+set}" = set; then :
24010 withval=$with_libintl_type; with_libintl_type=$withval
b686ecb5 24011else
d5835df2 24012 with_libintl_type=auto
b686ecb5 24013fi
b686ecb5 24014
d5835df2 24015 lib_type=`eval echo \$with_libintl_type`
b686ecb5 24016
d5835df2
TV
24017 LIBINTL=
24018 LTLIBINTL=
24019 INCINTL=
24020 rpathdirs=
24021 ltrpathdirs=
24022 names_already_handled=
24023 names_next_round='intl '
24024 while test -n "$names_next_round"; do
24025 names_this_round="$names_next_round"
24026 names_next_round=
24027 for name in $names_this_round; do
24028 already_handled=
24029 for n in $names_already_handled; do
24030 if test "$n" = "$name"; then
24031 already_handled=yes
24032 break
24033 fi
24034 done
24035 if test -z "$already_handled"; then
24036 names_already_handled="$names_already_handled $name"
24037 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
24038 eval value=\"\$HAVE_LIB$uppername\"
24039 if test -n "$value"; then
24040 if test "$value" = yes; then
24041 eval value=\"\$LIB$uppername\"
24042 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
24043 eval value=\"\$LTLIB$uppername\"
24044 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
24045 else
24046 :
24047 fi
24048 else
24049 found_dir=
24050 found_la=
24051 found_so=
24052 found_a=
24053 if test $use_additional = yes; then
24054 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
24055 found_dir="$additional_libdir"
24056 found_so="$additional_libdir/lib$name.$shlibext"
24057 if test -f "$additional_libdir/lib$name.la"; then
24058 found_la="$additional_libdir/lib$name.la"
24059 fi
24060 elif test x$lib_type != xshared; then
24061 if test -f "$additional_libdir/lib$name.$libext"; then
24062 found_dir="$additional_libdir"
24063 found_a="$additional_libdir/lib$name.$libext"
24064 if test -f "$additional_libdir/lib$name.la"; then
24065 found_la="$additional_libdir/lib$name.la"
24066 fi
24067 fi
24068 fi
24069 fi
24070 if test "X$found_dir" = "X"; then
24071 for x in $LDFLAGS $LTLIBINTL; do
b686ecb5 24072
d5835df2
TV
24073 acl_save_prefix="$prefix"
24074 prefix="$acl_final_prefix"
24075 acl_save_exec_prefix="$exec_prefix"
24076 exec_prefix="$acl_final_exec_prefix"
24077 eval x=\"$x\"
24078 exec_prefix="$acl_save_exec_prefix"
24079 prefix="$acl_save_prefix"
4c9066e3 24080
d5835df2
TV
24081 case "$x" in
24082 -L*)
24083 dir=`echo "X$x" | sed -e 's/^X-L//'`
24084 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
24085 found_dir="$dir"
24086 found_so="$dir/lib$name.$shlibext"
24087 if test -f "$dir/lib$name.la"; then
24088 found_la="$dir/lib$name.la"
24089 fi
24090 elif test x$lib_type != xshared; then
24091 if test -f "$dir/lib$name.$libext"; then
24092 found_dir="$dir"
24093 found_a="$dir/lib$name.$libext"
24094 if test -f "$dir/lib$name.la"; then
24095 found_la="$dir/lib$name.la"
24096 fi
24097 fi
24098 fi
24099 ;;
24100 esac
24101 if test "X$found_dir" != "X"; then
24102 break
24103 fi
24104 done
24105 fi
24106 if test "X$found_dir" != "X"; then
24107 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
24108 if test "X$found_so" != "X"; then
24109 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
24110 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24111 else
24112 haveit=
24113 for x in $ltrpathdirs; do
24114 if test "X$x" = "X$found_dir"; then
24115 haveit=yes
24116 break
24117 fi
24118 done
24119 if test -z "$haveit"; then
24120 ltrpathdirs="$ltrpathdirs $found_dir"
24121 fi
24122 if test "$hardcode_direct" = yes; then
24123 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24124 else
24125 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
24126 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24127 haveit=
24128 for x in $rpathdirs; do
24129 if test "X$x" = "X$found_dir"; then
24130 haveit=yes
24131 break
24132 fi
24133 done
24134 if test -z "$haveit"; then
24135 rpathdirs="$rpathdirs $found_dir"
24136 fi
24137 else
24138 haveit=
24139 for x in $LDFLAGS $LIBINTL; do
b686ecb5 24140
d5835df2
TV
24141 acl_save_prefix="$prefix"
24142 prefix="$acl_final_prefix"
24143 acl_save_exec_prefix="$exec_prefix"
24144 exec_prefix="$acl_final_exec_prefix"
24145 eval x=\"$x\"
24146 exec_prefix="$acl_save_exec_prefix"
24147 prefix="$acl_save_prefix"
24148
24149 if test "X$x" = "X-L$found_dir"; then
24150 haveit=yes
24151 break
24152 fi
24153 done
24154 if test -z "$haveit"; then
24155 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
24156 fi
24157 if test "$hardcode_minus_L" != no; then
24158 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24159 else
24160 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
24161 fi
24162 fi
24163 fi
24164 fi
24165 else
24166 if test "X$found_a" != "X"; then
24167 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
24168 else
24169 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
24170 fi
24171 fi
24172 additional_includedir=
24173 case "$found_dir" in
24174 */lib | */lib/)
24175 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
24176 additional_includedir="$basedir/include"
24177 ;;
24178 esac
24179 if test "X$additional_includedir" != "X"; then
24180 if test "X$additional_includedir" != "X/usr/include"; then
24181 haveit=
24182 if test "X$additional_includedir" = "X/usr/local/include"; then
24183 if test -n "$GCC"; then
24184 case $host_os in
24185 linux*) haveit=yes;;
24186 esac
24187 fi
24188 fi
24189 if test -z "$haveit"; then
24190 for x in $CPPFLAGS $INCINTL; do
24191
24192 acl_save_prefix="$prefix"
24193 prefix="$acl_final_prefix"
24194 acl_save_exec_prefix="$exec_prefix"
24195 exec_prefix="$acl_final_exec_prefix"
24196 eval x=\"$x\"
24197 exec_prefix="$acl_save_exec_prefix"
24198 prefix="$acl_save_prefix"
24199
24200 if test "X$x" = "X-I$additional_includedir"; then
24201 haveit=yes
24202 break
24203 fi
24204 done
24205 if test -z "$haveit"; then
24206 if test -d "$additional_includedir"; then
24207 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
24208 fi
24209 fi
24210 fi
24211 fi
24212 fi
24213 if test -n "$found_la"; then
24214 save_libdir="$libdir"
24215 case "$found_la" in
24216 */* | *\\*) . "$found_la" ;;
24217 *) . "./$found_la" ;;
24218 esac
24219 libdir="$save_libdir"
24220 for dep in $dependency_libs; do
24221 case "$dep" in
24222 -L*)
24223 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24224 if test "X$additional_libdir" != "X/usr/lib"; then
24225 haveit=
24226 if test "X$additional_libdir" = "X/usr/local/lib"; then
24227 if test -n "$GCC"; then
24228 case $host_os in
24229 linux*) haveit=yes;;
24230 esac
24231 fi
24232 fi
24233 if test -z "$haveit"; then
24234 haveit=
24235 for x in $LDFLAGS $LIBINTL; do
24236
24237 acl_save_prefix="$prefix"
24238 prefix="$acl_final_prefix"
24239 acl_save_exec_prefix="$exec_prefix"
24240 exec_prefix="$acl_final_exec_prefix"
24241 eval x=\"$x\"
24242 exec_prefix="$acl_save_exec_prefix"
24243 prefix="$acl_save_prefix"
24244
24245 if test "X$x" = "X-L$additional_libdir"; then
24246 haveit=yes
24247 break
24248 fi
24249 done
24250 if test -z "$haveit"; then
24251 if test -d "$additional_libdir"; then
24252 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
24253 fi
24254 fi
24255 haveit=
24256 for x in $LDFLAGS $LTLIBINTL; do
24257
24258 acl_save_prefix="$prefix"
24259 prefix="$acl_final_prefix"
24260 acl_save_exec_prefix="$exec_prefix"
24261 exec_prefix="$acl_final_exec_prefix"
24262 eval x=\"$x\"
24263 exec_prefix="$acl_save_exec_prefix"
24264 prefix="$acl_save_prefix"
24265
24266 if test "X$x" = "X-L$additional_libdir"; then
24267 haveit=yes
24268 break
24269 fi
24270 done
24271 if test -z "$haveit"; then
24272 if test -d "$additional_libdir"; then
24273 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
24274 fi
24275 fi
24276 fi
24277 fi
24278 ;;
24279 -R*)
24280 dir=`echo "X$dep" | sed -e 's/^X-R//'`
24281 if test "$enable_rpath" != no; then
24282 haveit=
24283 for x in $rpathdirs; do
24284 if test "X$x" = "X$dir"; then
24285 haveit=yes
24286 break
24287 fi
24288 done
24289 if test -z "$haveit"; then
24290 rpathdirs="$rpathdirs $dir"
24291 fi
24292 haveit=
24293 for x in $ltrpathdirs; do
24294 if test "X$x" = "X$dir"; then
24295 haveit=yes
24296 break
24297 fi
24298 done
24299 if test -z "$haveit"; then
24300 ltrpathdirs="$ltrpathdirs $dir"
24301 fi
24302 fi
24303 ;;
24304 -l*)
24305 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
24306 ;;
24307 *.la)
24308 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
24309 ;;
24310 *)
24311 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
24312 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
24313 ;;
24314 esac
24315 done
24316 fi
24317 else
24318 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
24319 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
24320 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
24321 else
24322 LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
24323 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
24324 fi
24325 fi
24326 fi
24327 fi
24328 done
24329 done
24330 if test "X$rpathdirs" != "X"; then
24331 if test -n "$hardcode_libdir_separator"; then
24332 alldirs=
24333 for found_dir in $rpathdirs; do
24334 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
24335 done
24336 acl_save_libdir="$libdir"
24337 libdir="$alldirs"
24338 eval flag=\"$hardcode_libdir_flag_spec\"
24339 libdir="$acl_save_libdir"
24340 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
b686ecb5 24341 else
d5835df2
TV
24342 for found_dir in $rpathdirs; do
24343 acl_save_libdir="$libdir"
24344 libdir="$found_dir"
24345 eval flag=\"$hardcode_libdir_flag_spec\"
24346 libdir="$acl_save_libdir"
24347 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
24348 done
b686ecb5
JM
24349 fi
24350 fi
d5835df2
TV
24351 if test "X$ltrpathdirs" != "X"; then
24352 for found_dir in $ltrpathdirs; do
24353 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
24354 done
24355 fi
b686ecb5 24356
d5835df2
TV
24357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
24358$as_echo_n "checking for GNU gettext in libintl... " >&6; }
24359if eval \${$gt_func_gnugettext_libintl+:} false; then :
b686ecb5
JM
24360 $as_echo_n "(cached) " >&6
24361else
d5835df2
TV
24362 gt_save_CPPFLAGS="$CPPFLAGS"
24363 CPPFLAGS="$CPPFLAGS $INCINTL"
24364 gt_save_LIBS="$LIBS"
24365 LIBS="$LIBS $LIBINTL"
24366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5
JM
24367/* end confdefs.h. */
24368
d5835df2
TV
24369#include <libintl.h>
24370#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
24371extern int _nl_msg_cat_cntr;
24372extern
b686ecb5 24373#ifdef __cplusplus
d5835df2 24374"C"
b686ecb5 24375#endif
d5835df2
TV
24376const char *_nl_expand_alias (const char *);
24377#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
24378#else
24379#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
24380#endif
24381$gt_revision_test_code
24382
b686ecb5
JM
24383int
24384main ()
24385{
d5835df2
TV
24386
24387bindtextdomain ("", "");
24388return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
24389
b686ecb5
JM
24390 ;
24391 return 0;
24392}
24393_ACEOF
d5835df2
TV
24394if ac_fn_c_try_link "$LINENO"; then :
24395 eval "$gt_func_gnugettext_libintl=yes"
b686ecb5 24396else
d5835df2 24397 eval "$gt_func_gnugettext_libintl=no"
b686ecb5 24398fi
d5835df2
TV
24399rm -f core conftest.err conftest.$ac_objext \
24400 conftest$ac_exeext conftest.$ac_ext
24401 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
24402 LIBS="$LIBS $LIBICONV"
24403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24404/* end confdefs.h. */
b686ecb5 24405
d5835df2
TV
24406#include <libintl.h>
24407#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
24408extern int _nl_msg_cat_cntr;
24409extern
24410#ifdef __cplusplus
24411"C"
24412#endif
24413const char *_nl_expand_alias (const char *);
24414#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
24415#else
24416#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
24417#endif
24418$gt_revision_test_code
b686ecb5 24419
b686ecb5
JM
24420int
24421main ()
24422{
d5835df2
TV
24423
24424bindtextdomain ("", "");
24425return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
b686ecb5
JM
24426
24427 ;
24428 return 0;
24429}
24430_ACEOF
d5835df2
TV
24431if ac_fn_c_try_link "$LINENO"; then :
24432 LIBINTL="$LIBINTL $LIBICONV"
24433 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
24434 eval "$gt_func_gnugettext_libintl=yes"
b686ecb5
JM
24435
24436fi
d5835df2
TV
24437rm -f core conftest.err conftest.$ac_objext \
24438 conftest$ac_exeext conftest.$ac_ext
24439 fi
24440 CPPFLAGS="$gt_save_CPPFLAGS"
24441 LIBS="$gt_save_LIBS"
b686ecb5 24442fi
d5835df2
TV
24443eval ac_res=\$$gt_func_gnugettext_libintl
24444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24445$as_echo "$ac_res" >&6; }
24446 fi
b686ecb5 24447
d5835df2
TV
24448 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
24449 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
24450 && test "$PACKAGE" != gettext-runtime \
24451 && test "$PACKAGE" != gettext-tools; }; then
24452 gt_use_preinstalled_gnugettext=yes
24453 else
24454 LIBINTL=
24455 LTLIBINTL=
24456 INCINTL=
24457 fi
b686ecb5
JM
24458
24459
24460
d5835df2
TV
24461 if test -n "$INTL_MACOSX_LIBS"; then
24462 if test "$gt_use_preinstalled_gnugettext" = "yes" \
24463 || test "$nls_cv_use_gnu_gettext" = "yes"; then
24464 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
24465 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
24466 fi
24467 fi
b686ecb5 24468
d5835df2
TV
24469 if test "$gt_use_preinstalled_gnugettext" = "yes" \
24470 || test "$nls_cv_use_gnu_gettext" = "yes"; then
b686ecb5 24471
d5835df2 24472$as_echo "#define ENABLE_NLS 1" >>confdefs.h
14d0e681 24473
d5835df2
TV
24474 else
24475 USE_NLS=no
24476 fi
24477 fi
b686ecb5 24478
d5835df2
TV
24479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
24480$as_echo_n "checking whether to use NLS... " >&6; }
24481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
24482$as_echo "$USE_NLS" >&6; }
24483 if test "$USE_NLS" = "yes"; then
24484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
24485$as_echo_n "checking where the gettext function comes from... " >&6; }
24486 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
24487 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
24488 gt_source="external libintl"
24489 else
24490 gt_source="libc"
24491 fi
24492 else
24493 gt_source="included intl directory"
24494 fi
24495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
24496$as_echo "$gt_source" >&6; }
24497 fi
b686ecb5 24498
d5835df2 24499 if test "$USE_NLS" = "yes"; then
b686ecb5 24500
d5835df2
TV
24501 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
24502 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
24503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
24504$as_echo_n "checking how to link with libintl... " >&6; }
24505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
24506$as_echo "$LIBINTL" >&6; }
b686ecb5 24507
d5835df2
TV
24508 for element in $INCINTL; do
24509 haveit=
24510 for x in $CPPFLAGS; do
b686ecb5 24511
d5835df2
TV
24512 acl_save_prefix="$prefix"
24513 prefix="$acl_final_prefix"
24514 acl_save_exec_prefix="$exec_prefix"
24515 exec_prefix="$acl_final_exec_prefix"
24516 eval x=\"$x\"
24517 exec_prefix="$acl_save_exec_prefix"
24518 prefix="$acl_save_prefix"
24519
24520 if test "X$x" = "X$element"; then
24521 haveit=yes
24522 break
24523 fi
24524 done
24525 if test -z "$haveit"; then
24526 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
24527 fi
24528 done
24529
24530 fi
24531
24532
24533$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
24534
24535
24536$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
24537
24538 fi
24539
24540 POSUB=po
24541 fi
24542
24543
24544
24545 INTLLIBS="$LIBINTL"
b686ecb5
JM
24546
24547
b686ecb5
JM
24548
24549
b686ecb5 24550
b686ecb5
JM
24551
24552fi
b686ecb5
JM
24553
24554
24555
b686ecb5
JM
24556
24557
b686ecb5 24558
d5835df2
TV
24559
24560
24561
24562
56f39033 24563
d5835df2
TV
24564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
24565$as_echo_n "checking whether NLS is requested... " >&6; }
24566if test x"$USE_NLS" != xyes; then
24567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24568$as_echo "no" >&6; }
b686ecb5 24569else
d5835df2
TV
24570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24571$as_echo "yes" >&6; }
24572
24573$as_echo "#define ENABLE_NLS 1" >>confdefs.h
24574
24575
24576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
24577$as_echo_n "checking for catalogs to be installed... " >&6; }
24578 # Look for .po and .gmo files in the source directory.
24579 CATALOGS=
24580 XLINGUAS=
24581 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
24582 # If there aren't any .gmo files the shell will give us the
24583 # literal string "../path/to/srcdir/po/*.gmo" which has to be
24584 # weeded out.
24585 case "$cat" in *\**)
24586 continue;;
24587 esac
24588 # The quadruple backslash is collapsed to a double backslash
24589 # by the backticks, then collapsed again by the double quotes,
24590 # leaving us with one backslash in the sed expression (right
24591 # before the dot that mustn't act as a wildcard).
24592 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
24593 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
24594 # The user is allowed to set LINGUAS to a list of languages to
24595 # install catalogs for. If it's empty that means "all of them."
24596 if test "x$LINGUAS" = x; then
24597 CATALOGS="$CATALOGS $cat"
24598 XLINGUAS="$XLINGUAS $lang"
24599 else
24600 case "$LINGUAS" in *$lang*)
24601 CATALOGS="$CATALOGS $cat"
24602 XLINGUAS="$XLINGUAS $lang"
24603 ;;
24604 esac
24605 fi
24606 done
24607 LINGUAS="$XLINGUAS"
24608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
24609$as_echo "$LINGUAS" >&6; }
24610
24611
24612 DATADIRNAME=share
24613
24614 INSTOBJEXT=.mo
24615
24616 GENCAT=gencat
24617
24618 CATOBJEXT=.gmo
b686ecb5
JM
24619
24620fi
b686ecb5 24621
d5835df2
TV
24622localedir='${datadir}/locale'
24623
24624
24625if test x"$USE_NLS" = xyes; then
24626 CONFIG_ALL="$CONFIG_ALL all-po"
24627 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
24628 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
24629 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
24630fi
b686ecb5 24631
d5835df2 24632PACKAGE=gdb
b686ecb5
JM
24633
24634cat >>confdefs.h <<_ACEOF
d5835df2 24635#define PACKAGE "$PACKAGE"
b686ecb5
JM
24636_ACEOF
24637
24638
24639
d5835df2
TV
24640# We never need to detect it in this sub-configure.
24641# But preserve it for config.status --recheck.
b686ecb5 24642
b686ecb5
JM
24643
24644
d5835df2
TV
24645MAKEINFO_EXTRA_FLAGS=""
24646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
24647$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
24648if ${gdb_cv_have_makeinfo_click+:} false; then :
b686ecb5
JM
24649 $as_echo_n "(cached) " >&6
24650else
d5835df2
TV
24651 echo '@clicksequence{a @click{} b}' >conftest.texinfo
24652 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
24653 gdb_cv_have_makeinfo_click=yes
b686ecb5 24654 else
d5835df2 24655 gdb_cv_have_makeinfo_click=no
b686ecb5 24656 fi
b686ecb5 24657fi
d5835df2
TV
24658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
24659$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
24660if test x"$gdb_cv_have_makeinfo_click" = xyes; then
24661 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
b686ecb5
JM
24662fi
24663
24664
24665
24666
d5835df2
TV
24667# Check whether --with-separate-debug-dir was given.
24668if test "${with_separate_debug_dir+set}" = set; then :
24669 withval=$with_separate_debug_dir;
24670 DEBUGDIR=$withval
b686ecb5 24671else
d5835df2 24672 DEBUGDIR=${libdir}/debug
b686ecb5
JM
24673fi
24674
24675
24676 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24677 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
d5835df2 24678 ac_define_dir=`eval echo $DEBUGDIR`
b686ecb5
JM
24679 ac_define_dir=`eval echo $ac_define_dir`
24680
24681cat >>confdefs.h <<_ACEOF
d5835df2 24682#define DEBUGDIR "$ac_define_dir"
b686ecb5
JM
24683_ACEOF
24684
24685
24686
24687
24688 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
24689 if test "x$prefix" = xNONE; then
24690 test_prefix=/usr/local
24691 else
24692 test_prefix=$prefix
24693 fi
24694 else
24695 test_prefix=$exec_prefix
24696 fi
24697 value=0
24698 case ${ac_define_dir} in
24699 "${test_prefix}"|"${test_prefix}/"*|\
24700 '${exec_prefix}'|'${exec_prefix}/'*)
24701 value=1
24702 ;;
24703 esac
24704
24705cat >>confdefs.h <<_ACEOF
d5835df2 24706#define DEBUGDIR_RELOCATABLE $value
b686ecb5
JM
24707_ACEOF
24708
24709
24710
24711
24712
d5835df2
TV
24713# Check whether --with-additional-debug-dirs was given.
24714if test "${with_additional_debug_dirs+set}" = set; then :
24715 withval=$with_additional_debug_dirs;
24716cat >>confdefs.h <<_ACEOF
24717#define ADDITIONAL_DEBUG_DIRS "${withval}"
24718_ACEOF
b686ecb5 24719
d5835df2 24720fi
b686ecb5 24721
b686ecb5 24722
d5835df2
TV
24723# We can't pass paths as command line arguments.
24724# Mingw32 tries to be clever and will convert the paths for us.
24725# For example -DBINDIR="/usr/local/bin" passed on the command line may get
24726# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
24727# This breaks GDB's relocatable path conversions since paths passed in
24728# config.h would not get so translated, the path prefixes no longer match.
b686ecb5 24729
d5835df2
TV
24730 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24731 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24732 ac_define_dir=`eval echo $bindir`
24733 ac_define_dir=`eval echo $ac_define_dir`
b686ecb5 24734
d5835df2
TV
24735cat >>confdefs.h <<_ACEOF
24736#define BINDIR "$ac_define_dir"
24737_ACEOF
b686ecb5
JM
24738
24739
24740
d5835df2 24741# GDB's datadir relocation
b686ecb5
JM
24742
24743
b686ecb5 24744
d5835df2
TV
24745# Check whether --with-gdb-datadir was given.
24746if test "${with_gdb_datadir+set}" = set; then :
24747 withval=$with_gdb_datadir;
24748 GDB_DATADIR=$withval
24749else
24750 GDB_DATADIR=${datadir}/gdb
24751fi
b686ecb5 24752
b686ecb5 24753
d5835df2
TV
24754 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24755 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24756 ac_define_dir=`eval echo $GDB_DATADIR`
24757 ac_define_dir=`eval echo $ac_define_dir`
b686ecb5 24758
d5835df2
TV
24759cat >>confdefs.h <<_ACEOF
24760#define GDB_DATADIR "$ac_define_dir"
24761_ACEOF
b686ecb5 24762
b686ecb5 24763
b686ecb5 24764
b686ecb5 24765
d5835df2
TV
24766 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
24767 if test "x$prefix" = xNONE; then
24768 test_prefix=/usr/local
24769 else
24770 test_prefix=$prefix
24771 fi
24772 else
24773 test_prefix=$exec_prefix
24774 fi
24775 value=0
24776 case ${ac_define_dir} in
24777 "${test_prefix}"|"${test_prefix}/"*|\
24778 '${exec_prefix}'|'${exec_prefix}/'*)
24779 value=1
24780 ;;
24781 esac
24782
24783cat >>confdefs.h <<_ACEOF
24784#define GDB_DATADIR_RELOCATABLE $value
24785_ACEOF
24786
24787
24788
24789
24790
24791# Check whether --with-relocated-sources was given.
24792if test "${with_relocated_sources+set}" = set; then :
24793 withval=$with_relocated_sources; reloc_srcdir="${withval}"
24794
24795 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24796 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24797 ac_define_dir=`eval echo $reloc_srcdir`
24798 ac_define_dir=`eval echo $ac_define_dir`
24799
24800cat >>confdefs.h <<_ACEOF
24801#define RELOC_SRCDIR "$ac_define_dir"
24802_ACEOF
24803
b686ecb5 24804
b686ecb5
JM
24805
24806fi
24807
24808
d5835df2
TV
24809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
24810$as_echo_n "checking for default auto-load directory... " >&6; }
24811
24812# Check whether --with-auto-load-dir was given.
24813if test "${with_auto_load_dir+set}" = set; then :
24814 withval=$with_auto_load_dir;
b686ecb5 24815else
d5835df2 24816 with_auto_load_dir='$debugdir:$datadir/auto-load'
b686ecb5
JM
24817fi
24818
d5835df2 24819escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
b686ecb5 24820
d5835df2
TV
24821 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24822 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24823 ac_define_dir=`eval echo $escape_dir`
24824 ac_define_dir=`eval echo $ac_define_dir`
b686ecb5 24825
d5835df2
TV
24826cat >>confdefs.h <<_ACEOF
24827#define AUTO_LOAD_DIR "$ac_define_dir"
24828_ACEOF
b686ecb5 24829
b686ecb5 24830
d5835df2
TV
24831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
24832$as_echo "$with_auto_load_dir" >&6; }
b686ecb5 24833
d5835df2
TV
24834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
24835$as_echo_n "checking for default auto-load safe-path... " >&6; }
b686ecb5 24836
d5835df2
TV
24837# Check whether --with-auto-load-safe-path was given.
24838if test "${with_auto_load_safe_path+set}" = set; then :
24839 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
24840 with_auto_load_safe_path="/"
24841 fi
24842else
24843 with_auto_load_safe_path="$with_auto_load_dir"
24844fi
b686ecb5 24845
d5835df2 24846escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
b686ecb5 24847
d5835df2
TV
24848 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
24849 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24850 ac_define_dir=`eval echo $escape_dir`
24851 ac_define_dir=`eval echo $ac_define_dir`
b686ecb5 24852
d5835df2
TV
24853cat >>confdefs.h <<_ACEOF
24854#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
24855_ACEOF
b686ecb5 24856
b686ecb5 24857
d5835df2
TV
24858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
24859$as_echo "$with_auto_load_safe_path" >&6; }
b686ecb5
JM
24860
24861
b686ecb5 24862
d5835df2 24863subdirs="$subdirs testsuite"
b686ecb5 24864
b686ecb5 24865
d5835df2
TV
24866# Check whether to support alternative target configurations
24867# Check whether --enable-targets was given.
24868if test "${enable_targets+set}" = set; then :
24869 enableval=$enable_targets; case "${enableval}" in
24870 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
24871 ;;
24872 no) enable_targets= ;;
cd5e8785
AB
24873 *)
24874 enable_targets=$enableval
24875
24876cat >>confdefs.h <<_ACEOF
24877#define ENABLE_TARGETS "$enable_targets"
24878_ACEOF
24879
24880 ;;
d5835df2
TV
24881esac
24882fi
b686ecb5
JM
24883
24884
cd5e8785 24885
5cbfbe42
GL
24886# Check whether to support mdebug/ecoff debug information.
24887# Check whether --enable-gdb-mdebug-support was given.
24888if test "${enable_gdb_mdebug_support+set}" = set; then :
24889 enableval=$enable_gdb_mdebug_support;
24890 case $enableval in
24891 yes | no)
24892 ;;
24893 *)
24894 as_fn_error $? "bad value $enableval for --enable-gdb-mdebug-support" "$LINENO" 5
24895 ;;
24896 esac
24897
24898else
24899 enable_gdb_mdebug_support=yes
24900fi
24901
24902
24903if test "x${enable_gdb_mdebug_support}" != "xno"; then
24904 CONFIG_SRCS="$CONFIG_SRCS mdebugread.c"
24905 CONFIG_OBS="$CONFIG_OBS mdebugread.o"
24906
24907$as_echo "#define MDEBUG_FORMAT_AVAILABLE 1" >>confdefs.h
24908
24909fi
24910
4b42385c
GL
24911# Check whether to support dwarf debug information
24912# Check whether --enable-gdb-dwarf-support was given.
24913if test "${enable_gdb_dwarf_support+set}" = set; then :
24914 enableval=$enable_gdb_dwarf_support;
24915 case $enableval in
24916 yes | no)
24917 ;;
24918 *)
24919 as_fn_error $? "bad value $enableval for --enable-gdb-dwarf-support" "$LINENO" 5
24920 ;;
24921 esac
24922
24923else
24924 enable_gdb_dwarf_support=yes
24925fi
24926
24927
24928if test "x${enable_gdb_dwarf_support}" != "xno"; then
24929
24930$as_echo "#define DWARF_FORMAT_AVAILABLE 1" >>confdefs.h
24931
24932 CONFIG_SRCS="$CONFIG_SRCS \$(DWARF2_SRCS)"
24933 CONFIG_OBS="$CONFIG_OBS \$(DWARF2_OBS)"
24934fi
24935
d9639e09
MR
24936# See whether 64-bit bfd lib has been enabled.
24937OLD_CPPFLAGS=$CPPFLAGS
24938# Put the old CPPFLAGS last, in case the user's CPPFLAGS point somewhere
24939# with bfd, with -I/foo/include. We always want our bfd.
24940CPPFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CPPFLAGS"
24941# Note we cannot cache the result of this check because BFD64 may change
24942# when a secondary target has been added or removed and we have no access
24943# to this information here.
24944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BFD is 64-bit" >&5
24945$as_echo_n "checking whether BFD is 64-bit... " >&6; }
24946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24947/* end confdefs.h. */
24948#include "bfd.h"
24949int
24950main ()
24951{
24952#ifdef BFD64
24953HAVE_BFD64
24954#endif
24955 ;
24956 return 0;
24957}
d5835df2 24958_ACEOF
d9639e09
MR
24959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24960 $EGREP "HAVE_BFD64" >/dev/null 2>&1; then :
24961 have_64_bit_bfd=yes
d5835df2 24962else
d9639e09 24963 have_64_bit_bfd=no
b686ecb5 24964fi
d9639e09 24965rm -f conftest*
b686ecb5 24966
d9639e09
MR
24967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_64_bit_bfd" >&5
24968$as_echo "$have_64_bit_bfd" >&6; }
24969CPPFLAGS=$OLD_CPPFLAGS
b686ecb5 24970
d5835df2
TV
24971# Provide defaults for some variables set by the per-host and per-target
24972# configuration.
24973gdb_host_obs=posix-hdep.o
b686ecb5 24974
d5835df2
TV
24975if test "${target}" = "${host}"; then
24976 gdb_native=yes
24977else
24978 gdb_native=no
24979fi
b686ecb5 24980
d5835df2 24981. $srcdir/configure.host
b686ecb5 24982
d5835df2 24983# Accumulate some settings from configure.tgt over all enabled targets
b686ecb5 24984
d5835df2
TV
24985TARGET_OBS=
24986all_targets=
24987HAVE_NATIVE_GCORE_TARGET=
b686ecb5 24988
d5835df2
TV
24989for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
24990do
24991 if test "$targ_alias" = "all"; then
24992 all_targets=true
24993 else
24994 # Canonicalize the secondary target names.
24995 result=`$ac_config_sub $targ_alias 2>/dev/null`
24996 if test -n "$result"; then
24997 targ=$result
24998 else
24999 targ=$targ_alias
25000 fi
b686ecb5 25001
d5835df2 25002 . ${srcdir}/configure.tgt
b686ecb5 25003
d5835df2
TV
25004 if test -z "${gdb_target_obs}"; then :
25005 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
b686ecb5
JM
25006fi
25007
d5835df2
TV
25008 # Target-specific object files
25009 for i in ${gdb_target_obs}; do
25010 case " $TARGET_OBS " in
25011 *" ${i} "*) ;;
25012 *)
25013 TARGET_OBS="$TARGET_OBS ${i}"
25014 ;;
25015 esac
25016 done
b686ecb5 25017
d5835df2 25018 # Check whether this target needs 64-bit CORE_ADDR
d9639e09 25019 if test x${have_64_bit_bfd} = xno; then
d5835df2
TV
25020 . ${srcdir}/../bfd/config.bfd
25021 fi
25022
25023 # Check whether this target is native and supports gcore.
25024 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
25025 && $gdb_have_gcore; then
25026 HAVE_NATIVE_GCORE_TARGET=1
b686ecb5 25027 fi
b686ecb5
JM
25028 fi
25029done
b686ecb5 25030
d5835df2 25031if test x${all_targets} = xtrue; then
d9639e09 25032 if test x${have_64_bit_bfd} = xyes; then
d5835df2
TV
25033 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
25034 else
d9639e09 25035 TARGET_OBS='$(ALL_TARGET_OBS)'
d5835df2 25036 fi
b686ecb5 25037fi
d5835df2 25038
fb2ded33
KS
25039HAVE_GSTACK=0
25040if test $gdb_native = yes; then
25041 HAVE_GSTACK=1
25042fi
25043
25044
d5835df2
TV
25045# AMD debugger API support.
25046
25047
25048# Check whether --with-amd-dbgapi was given.
25049if test "${with_amd_dbgapi+set}" = set; then :
25050 withval=$with_amd_dbgapi;
25051 case $withval in
25052 yes | no | auto)
25053 ;;
25054 *)
25055 as_fn_error $? "bad value $withval for --with-amd-dbgapi" "$LINENO" 5
25056 ;;
25057 esac
25058
b686ecb5 25059else
d5835df2 25060 with_amd_dbgapi=auto
b686ecb5
JM
25061fi
25062
25063
d5835df2
TV
25064# If the user passes --without-amd-dbgapi but also explicitly enables a target
25065# that requires amd-dbgapi, it is an error.
25066if test "$with_amd_dbgapi" = no -a "$gdb_require_amd_dbgapi" = true; then
25067 as_fn_error $? "an explicitly enabled target requires amd-dbgapi, but amd-dbgapi is explicitly disabled" "$LINENO" 5
25068fi
b686ecb5 25069
d5835df2
TV
25070# Look for amd-dbgapi if:
25071#
25072# - a target architecture requiring it has explicitly been enabled, or
25073# - --enable-targets=all was provided and the user did not explicitly disable
25074# amd-dbgapi support
25075if test "$gdb_require_amd_dbgapi" = true \
25076 -o \( "$all_targets" = true -a "$with_amd_dbgapi" != no \); then
25077 # amd-dbgapi version 0.68 is part of ROCm 5.4. There is no guarantee of API
25078 # stability until amd-dbgapi hits 1.0, but for convenience, still check for
25079 # greater or equal that version. It can be handy when testing with a newer
25080 # version of the library.
b686ecb5 25081
d5835df2 25082pkg_failed=no
37ef6d97
SM
25083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for amd-dbgapi >= 0.75.0" >&5
25084$as_echo_n "checking for amd-dbgapi >= 0.75.0... " >&6; }
d5835df2
TV
25085
25086if test -n "$AMD_DBGAPI_CFLAGS"; then
25087 pkg_cv_AMD_DBGAPI_CFLAGS="$AMD_DBGAPI_CFLAGS"
25088 elif test -n "$PKG_CONFIG"; then
25089 if test -n "$PKG_CONFIG" && \
37ef6d97
SM
25090 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"amd-dbgapi >= 0.75.0\""; } >&5
25091 ($PKG_CONFIG --exists --print-errors "amd-dbgapi >= 0.75.0") 2>&5
d5835df2
TV
25092 ac_status=$?
25093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25094 test $ac_status = 0; }; then
37ef6d97 25095 pkg_cv_AMD_DBGAPI_CFLAGS=`$PKG_CONFIG --cflags "amd-dbgapi >= 0.75.0" 2>/dev/null`
d5835df2
TV
25096 test "x$?" != "x0" && pkg_failed=yes
25097else
25098 pkg_failed=yes
b686ecb5 25099fi
d5835df2
TV
25100 else
25101 pkg_failed=untried
25102fi
25103if test -n "$AMD_DBGAPI_LIBS"; then
25104 pkg_cv_AMD_DBGAPI_LIBS="$AMD_DBGAPI_LIBS"
25105 elif test -n "$PKG_CONFIG"; then
25106 if test -n "$PKG_CONFIG" && \
37ef6d97
SM
25107 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"amd-dbgapi >= 0.75.0\""; } >&5
25108 ($PKG_CONFIG --exists --print-errors "amd-dbgapi >= 0.75.0") 2>&5
d5835df2
TV
25109 ac_status=$?
25110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25111 test $ac_status = 0; }; then
37ef6d97 25112 pkg_cv_AMD_DBGAPI_LIBS=`$PKG_CONFIG --libs "amd-dbgapi >= 0.75.0" 2>/dev/null`
d5835df2 25113 test "x$?" != "x0" && pkg_failed=yes
b686ecb5 25114else
d5835df2
TV
25115 pkg_failed=yes
25116fi
25117 else
25118 pkg_failed=untried
b686ecb5
JM
25119fi
25120
d5835df2
TV
25121if test $pkg_failed = no; then
25122 pkg_save_LDFLAGS="$LDFLAGS"
25123 LDFLAGS="$LDFLAGS $pkg_cv_AMD_DBGAPI_LIBS"
b686ecb5
JM
25124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25125/* end confdefs.h. */
d5835df2 25126
b686ecb5
JM
25127int
25128main ()
25129{
25130
b686ecb5
JM
25131 ;
25132 return 0;
25133}
25134_ACEOF
25135if ac_fn_c_try_link "$LINENO"; then :
d5835df2
TV
25136
25137else
25138 pkg_failed=yes
b686ecb5
JM
25139fi
25140rm -f core conftest.err conftest.$ac_objext \
25141 conftest$ac_exeext conftest.$ac_ext
d5835df2
TV
25142 LDFLAGS=$pkg_save_LDFLAGS
25143fi
b686ecb5 25144
b686ecb5 25145
b686ecb5 25146
d5835df2
TV
25147if test $pkg_failed = yes; then
25148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25149$as_echo "no" >&6; }
25150
25151if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25152 _pkg_short_errors_supported=yes
25153else
25154 _pkg_short_errors_supported=no
25155fi
25156 if test $_pkg_short_errors_supported = yes; then
37ef6d97 25157 AMD_DBGAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "amd-dbgapi >= 0.75.0" 2>&1`
d5835df2 25158 else
37ef6d97 25159 AMD_DBGAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "amd-dbgapi >= 0.75.0" 2>&1`
d5835df2
TV
25160 fi
25161 # Put the nasty error message in config.log where it belongs
25162 echo "$AMD_DBGAPI_PKG_ERRORS" >&5
b686ecb5 25163
d5835df2
TV
25164 has_amd_dbgapi=no
25165elif test $pkg_failed = untried; then
25166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25167$as_echo "no" >&6; }
25168 has_amd_dbgapi=no
25169else
25170 AMD_DBGAPI_CFLAGS=$pkg_cv_AMD_DBGAPI_CFLAGS
25171 AMD_DBGAPI_LIBS=$pkg_cv_AMD_DBGAPI_LIBS
25172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25173$as_echo "yes" >&6; }
25174 has_amd_dbgapi=yes
25175fi
b686ecb5 25176
d5835df2 25177 if test "$has_amd_dbgapi" = "yes"; then
b686ecb5 25178
d5835df2 25179$as_echo "#define HAVE_AMD_DBGAPI 1" >>confdefs.h
b686ecb5 25180
d5835df2 25181 TARGET_OBS="$TARGET_OBS amd-dbgapi-target.o"
b686ecb5 25182
d5835df2
TV
25183 # If --enable-targets=all was provided, use the list of all files depending
25184 # on amd-dbgapi that is hardcoded in the Makefile. Else, the appropriate
25185 # architecture entry in configure.tgt will have added the files to
25186 # gdb_target_obs.
25187 if test "$all_targets" = true; then
25188 TARGET_OBS="$TARGET_OBS \$(ALL_AMD_DBGAPI_TARGET_OBS)"
b686ecb5 25189 fi
d5835df2
TV
25190 elif test "$gdb_require_amd_dbgapi" = true -o "$with_amd_dbgapi" = yes; then
25191 # amd-dbgapi was not found and...
25192 #
25193 # - a target requiring it was explicitly enabled, or
25194 # - the user explicitly wants to enable amd-dbgapi
25195 as_fn_error $? "amd-dbgapi is required, but cannot find an appropriate version: $AMD_DBGAPI_PKG_ERRORS" "$LINENO" 5
b686ecb5
JM
25196 fi
25197fi
25198
25199
b686ecb5 25200
b686ecb5 25201
d5835df2
TV
25202# For other settings, only the main target counts.
25203gdb_sim=
25204gdb_osabi=
25205targ=$target; . ${srcdir}/configure.tgt
b686ecb5 25206
d5835df2
TV
25207# Fetch the default architecture and default target vector from BFD.
25208targ=$target; . $srcdir/../bfd/config.bfd
b686ecb5 25209
d5835df2
TV
25210# We only want the first architecture, so strip off the others if
25211# there is more than one.
25212targ_archs=`echo $targ_archs | sed 's/ .*//'`
b686ecb5 25213
d5835df2 25214if test "x$targ_archs" != x; then
b686ecb5 25215
d5835df2
TV
25216cat >>confdefs.h <<_ACEOF
25217#define DEFAULT_BFD_ARCH $targ_archs
25218_ACEOF
b686ecb5 25219
d5835df2
TV
25220fi
25221if test "x$targ_defvec" != x; then
b686ecb5
JM
25222
25223cat >>confdefs.h <<_ACEOF
d5835df2 25224#define DEFAULT_BFD_VEC $targ_defvec
b686ecb5
JM
25225_ACEOF
25226
d5835df2 25227fi
b686ecb5 25228
d5835df2
TV
25229# Enable TUI.
25230# Check whether --enable-tui was given.
25231if test "${enable_tui+set}" = set; then :
25232 enableval=$enable_tui;
25233 case $enableval in
25234 yes | no | auto)
25235 ;;
25236 *)
25237 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5
25238 ;;
25239 esac
b686ecb5 25240
d5835df2
TV
25241else
25242 enable_tui=auto
25243fi
b686ecb5
JM
25244
25245
d5835df2
TV
25246# Enable gdbtk.
25247# Check whether --enable-gdbtk was given.
25248if test "${enable_gdbtk+set}" = set; then :
25249 enableval=$enable_gdbtk;
25250 case $enableval in
25251 yes | no)
25252 ;;
25253 *)
25254 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5
25255 ;;
25256 esac
b686ecb5 25257
d5835df2
TV
25258else
25259 if test -d "$srcdir/gdbtk"; then
25260 enable_gdbtk=yes
25261 else
25262 enable_gdbtk=no
25263 fi
25264fi
b686ecb5 25265
d5835df2
TV
25266# We unconditionally disable gdbtk tests on selected platforms.
25267case $host_os in
25268 go32* | windows*)
25269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
25270$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
25271 enable_gdbtk=no ;;
25272esac
25273
25274# Handle optional debuginfod support
25275
25276# Handle optional debuginfod support as well as optional section
25277# downloading support.
25278#
25279# Define HAVE_LIBDEBUGINFOD if libdebuginfod is found with version >= 0.179.
25280#
25281# Define HAVE_LIBDEBUGINFOD_FIND_SECTION if libdebuginfod is found with
25282# version >= 0.188.
25283
25284# Check whether --with-debuginfod was given.
25285if test "${with_debuginfod+set}" = set; then :
25286 withval=$with_debuginfod;
25287else
25288 with_debuginfod=auto
25289fi
25290
25291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
25292$as_echo_n "checking whether to use debuginfod... " >&6; }
25293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
25294$as_echo "$with_debuginfod" >&6; }
25295
25296if test "x$with_debuginfod" != xno; then
25297
25298pkg_failed=no
25299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.188" >&5
25300$as_echo_n "checking for libdebuginfod >= 0.188... " >&6; }
25301
25302if test -n "$DEBUGINFOD_CFLAGS"; then
25303 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
25304 elif test -n "$PKG_CONFIG"; then
25305 if test -n "$PKG_CONFIG" && \
25306 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.188\""; } >&5
25307 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.188") 2>&5
25308 ac_status=$?
25309 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25310 test $ac_status = 0; }; then
25311 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.188" 2>/dev/null`
25312 test "x$?" != "x0" && pkg_failed=yes
25313else
25314 pkg_failed=yes
25315fi
25316 else
25317 pkg_failed=untried
25318fi
25319if test -n "$DEBUGINFOD_LIBS"; then
25320 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
25321 elif test -n "$PKG_CONFIG"; then
25322 if test -n "$PKG_CONFIG" && \
25323 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.188\""; } >&5
25324 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.188") 2>&5
25325 ac_status=$?
25326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25327 test $ac_status = 0; }; then
25328 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.188" 2>/dev/null`
25329 test "x$?" != "x0" && pkg_failed=yes
25330else
25331 pkg_failed=yes
25332fi
25333 else
25334 pkg_failed=untried
25335fi
25336
25337if test $pkg_failed = no; then
25338 pkg_save_LDFLAGS="$LDFLAGS"
25339 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
25340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5
JM
25341/* end confdefs.h. */
25342
25343int
25344main ()
25345{
25346
25347 ;
25348 return 0;
25349}
25350_ACEOF
d5835df2 25351if ac_fn_c_try_link "$LINENO"; then :
b686ecb5 25352
b686ecb5 25353else
d5835df2
TV
25354 pkg_failed=yes
25355fi
25356rm -f core conftest.err conftest.$ac_objext \
25357 conftest$ac_exeext conftest.$ac_ext
25358 LDFLAGS=$pkg_save_LDFLAGS
b686ecb5 25359fi
b686ecb5
JM
25360
25361
25362
d5835df2
TV
25363if test $pkg_failed = yes; then
25364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25365$as_echo "no" >&6; }
b686ecb5 25366
d5835df2
TV
25367if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25368 _pkg_short_errors_supported=yes
b686ecb5 25369else
d5835df2 25370 _pkg_short_errors_supported=no
b686ecb5 25371fi
d5835df2
TV
25372 if test $_pkg_short_errors_supported = yes; then
25373 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.188" 2>&1`
25374 else
25375 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.188" 2>&1`
25376 fi
25377 # Put the nasty error message in config.log where it belongs
25378 echo "$DEBUGINFOD_PKG_ERRORS" >&5
b686ecb5 25379
d5835df2
TV
25380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or some features may be unavailable." >&5
25381$as_echo "$as_me: WARNING: libdebuginfod is missing or some features may be unavailable." >&2;}
25382elif test $pkg_failed = untried; then
25383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25384$as_echo "no" >&6; }
25385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or some features may be unavailable." >&5
25386$as_echo "$as_me: WARNING: libdebuginfod is missing or some features may be unavailable." >&2;}
25387else
25388 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
25389 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
25390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25391$as_echo "yes" >&6; }
b686ecb5 25392
d5835df2 25393$as_echo "#define HAVE_LIBDEBUGINFOD_FIND_SECTION 1" >>confdefs.h
b686ecb5 25394
d5835df2 25395fi
b686ecb5
JM
25396
25397
d5835df2
TV
25398pkg_failed=no
25399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
25400$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
b686ecb5 25401
d5835df2
TV
25402if test -n "$DEBUGINFOD_CFLAGS"; then
25403 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
25404 elif test -n "$PKG_CONFIG"; then
25405 if test -n "$PKG_CONFIG" && \
25406 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
25407 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
25408 ac_status=$?
25409 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25410 test $ac_status = 0; }; then
25411 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
25412 test "x$?" != "x0" && pkg_failed=yes
b686ecb5 25413else
d5835df2 25414 pkg_failed=yes
b686ecb5 25415fi
d5835df2
TV
25416 else
25417 pkg_failed=untried
b686ecb5 25418fi
d5835df2
TV
25419if test -n "$DEBUGINFOD_LIBS"; then
25420 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
25421 elif test -n "$PKG_CONFIG"; then
25422 if test -n "$PKG_CONFIG" && \
25423 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
25424 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
25425 ac_status=$?
25426 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25427 test $ac_status = 0; }; then
25428 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
25429 test "x$?" != "x0" && pkg_failed=yes
b686ecb5 25430else
d5835df2
TV
25431 pkg_failed=yes
25432fi
25433 else
25434 pkg_failed=untried
b686ecb5
JM
25435fi
25436
d5835df2
TV
25437if test $pkg_failed = no; then
25438 pkg_save_LDFLAGS="$LDFLAGS"
25439 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
25440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 25441/* end confdefs.h. */
d5835df2 25442
b686ecb5
JM
25443int
25444main ()
25445{
d5835df2 25446
b686ecb5
JM
25447 ;
25448 return 0;
25449}
25450_ACEOF
25451if ac_fn_c_try_link "$LINENO"; then :
d5835df2 25452
b686ecb5 25453else
d5835df2 25454 pkg_failed=yes
b686ecb5
JM
25455fi
25456rm -f core conftest.err conftest.$ac_objext \
25457 conftest$ac_exeext conftest.$ac_ext
d5835df2 25458 LDFLAGS=$pkg_save_LDFLAGS
b686ecb5
JM
25459fi
25460
b686ecb5 25461
b686ecb5 25462
d5835df2
TV
25463if test $pkg_failed = yes; then
25464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25465$as_echo "no" >&6; }
b686ecb5 25466
d5835df2
TV
25467if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
25468 _pkg_short_errors_supported=yes
b686ecb5 25469else
d5835df2 25470 _pkg_short_errors_supported=no
b686ecb5 25471fi
d5835df2
TV
25472 if test $_pkg_short_errors_supported = yes; then
25473 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
25474 else
25475 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
25476 fi
25477 # Put the nasty error message in config.log where it belongs
25478 echo "$DEBUGINFOD_PKG_ERRORS" >&5
b686ecb5 25479
d5835df2
TV
25480 if test "x$with_debuginfod" = xyes; then
25481 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
25482 else
25483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
25484$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
25485 fi
25486elif test $pkg_failed = untried; then
25487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25488$as_echo "no" >&6; }
25489 if test "x$with_debuginfod" = xyes; then
25490 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
25491 else
25492 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
25493$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
25494 fi
25495else
25496 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
25497 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
25498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25499$as_echo "yes" >&6; }
b686ecb5 25500
d5835df2 25501$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
b686ecb5
JM
25502
25503fi
d5835df2
TV
25504else
25505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
25506$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
25507fi
b686ecb5 25508
b686ecb5 25509
d5835df2 25510# Libunwind support for ia64.
b686ecb5 25511
d5835df2
TV
25512# Check whether --with-libunwind-ia64 was given.
25513if test "${with_libunwind_ia64+set}" = set; then :
25514 withval=$with_libunwind_ia64;
25515else
25516 with_libunwind_ia64=auto
25517fi
25518
25519
25520# Backward compatibility option.
25521if test "${with_libunwind+set}" = set; then
25522 if test x"$with_libunwind_ia64" != xauto; then
25523 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
b686ecb5 25524 fi
d5835df2
TV
25525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
25526$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
25527 with_libunwind_ia64="$with_libunwind"
25528fi
25529
25530case "$with_libunwind_ia64" in
25531 yes | no)
25532 ;;
25533 auto)
25534 for ac_header in libunwind-ia64.h
25535do :
25536 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
25537if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
25538 cat >>confdefs.h <<_ACEOF
25539#define HAVE_LIBUNWIND_IA64_H 1
b686ecb5 25540_ACEOF
d5835df2 25541
b686ecb5 25542fi
b686ecb5 25543
d5835df2
TV
25544done
25545
25546 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
25547 ;;
25548 *)
25549 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
25550 ;;
25551esac
b686ecb5 25552
d5835df2
TV
25553if test x"$with_libunwind_ia64" = xyes; then
25554 for ac_header in libunwind-ia64.h
25555do :
25556 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
25557if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
25558 cat >>confdefs.h <<_ACEOF
25559#define HAVE_LIBUNWIND_IA64_H 1
25560_ACEOF
b686ecb5
JM
25561
25562fi
25563
d5835df2 25564done
b686ecb5 25565
d5835df2
TV
25566 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
25567 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
b686ecb5 25568 fi
d5835df2
TV
25569 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
25570 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
25571 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
25572fi
b686ecb5 25573
d5835df2 25574opt_curses=no
b686ecb5 25575
d5835df2
TV
25576# Check whether --with-curses was given.
25577if test "${with_curses+set}" = set; then :
25578 withval=$with_curses; opt_curses=$withval
25579fi
25580
25581
25582prefer_curses=no
25583if test "$opt_curses" = "yes"; then
25584 prefer_curses=yes
25585fi
25586
25587# Profiling support.
25588# Check whether --enable-profiling was given.
25589if test "${enable_profiling+set}" = set; then :
25590 enableval=$enable_profiling;
25591 case $enableval in
25592 yes | no)
25593 ;;
25594 *)
25595 as_fn_error $? "bad value $enableval for --enable-profiling" "$LINENO" 5
25596 ;;
25597 esac
25598
25599else
25600 enable_profiling=no
25601fi
25602
25603
25604for ac_func in monstartup _mcleanup
25605do :
25606 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25607ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25608if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25609 cat >>confdefs.h <<_ACEOF
25610#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25611_ACEOF
25612
25613fi
25614done
25615
25616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
25617$as_echo_n "checking for _etext... " >&6; }
25618if ${ac_cv_var__etext+:} false; then :
25619 $as_echo_n "(cached) " >&6
25620else
25621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 25622/* end confdefs.h. */
d5835df2
TV
25623#include <stdlib.h>
25624 extern char _etext;
b686ecb5
JM
25625int
25626main ()
25627{
d5835df2
TV
25628free (&_etext);
25629
b686ecb5
JM
25630 ;
25631 return 0;
25632}
25633_ACEOF
25634if ac_fn_c_try_link "$LINENO"; then :
d5835df2 25635 ac_cv_var__etext=yes
b686ecb5 25636else
d5835df2
TV
25637 ac_cv_var__etext=no
25638
b686ecb5
JM
25639fi
25640rm -f core conftest.err conftest.$ac_objext \
25641 conftest$ac_exeext conftest.$ac_ext
b686ecb5 25642
d5835df2
TV
25643fi
25644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
25645$as_echo "$ac_cv_var__etext" >&6; }
25646if test "$ac_cv_var__etext" = yes; then
b686ecb5 25647
d5835df2 25648$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
b686ecb5
JM
25649
25650fi
d5835df2
TV
25651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
25652$as_echo_n "checking for etext... " >&6; }
25653if ${ac_cv_var_etext+:} false; then :
b686ecb5
JM
25654 $as_echo_n "(cached) " >&6
25655else
d5835df2
TV
25656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25657/* end confdefs.h. */
25658#include <stdlib.h>
25659 extern char etext;
25660int
25661main ()
25662{
25663free (&etext);
b686ecb5 25664
d5835df2
TV
25665 ;
25666 return 0;
25667}
25668_ACEOF
25669if ac_fn_c_try_link "$LINENO"; then :
25670 ac_cv_var_etext=yes
25671else
25672 ac_cv_var_etext=no
b686ecb5
JM
25673
25674fi
d5835df2
TV
25675rm -f core conftest.err conftest.$ac_objext \
25676 conftest$ac_exeext conftest.$ac_ext
b686ecb5 25677
d5835df2
TV
25678fi
25679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
25680$as_echo "$ac_cv_var_etext" >&6; }
25681if test "$ac_cv_var_etext" = yes; then
b686ecb5 25682
d5835df2 25683$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
b686ecb5 25684
d5835df2
TV
25685fi
25686if test "$enable_profiling" = yes ; then
25687 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
25688 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
25689 fi
25690 PROFILE_CFLAGS=-pg
25691 OLD_CFLAGS="$CFLAGS"
25692 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
b686ecb5 25693
d5835df2
TV
25694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
25695$as_echo_n "checking whether $CC supports -pg... " >&6; }
25696if ${ac_cv_cc_supports_pg+:} false; then :
b686ecb5
JM
25697 $as_echo_n "(cached) " >&6
25698else
d5835df2
TV
25699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25700/* end confdefs.h. */
b686ecb5 25701
d5835df2
TV
25702int
25703main ()
25704{
25705int x;
25706 ;
25707 return 0;
25708}
25709_ACEOF
25710if ac_fn_c_try_compile "$LINENO"; then :
25711 ac_cv_cc_supports_pg=yes
25712else
25713 ac_cv_cc_supports_pg=no
b686ecb5
JM
25714
25715fi
d5835df2 25716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5 25717
d5835df2
TV
25718fi
25719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
25720$as_echo "$ac_cv_cc_supports_pg" >&6; }
b686ecb5 25721
d5835df2
TV
25722 if test "$ac_cv_cc_supports_pg" = no; then
25723 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
25724 fi
b686ecb5 25725
d5835df2
TV
25726 CFLAGS="$OLD_CFLAGS"
25727fi
b686ecb5 25728
d5835df2
TV
25729CODESIGN_CERT=
25730# Check whether --enable-codesign was given.
25731if test "${enable_codesign+set}" = set; then :
25732 enableval=$enable_codesign; CODESIGN_CERT=$enableval
25733fi
b686ecb5 25734
b686ecb5
JM
25735
25736
25737
25738
d5835df2
TV
25739# Check whether --with-pkgversion was given.
25740if test "${with_pkgversion+set}" = set; then :
25741 withval=$with_pkgversion; case "$withval" in
25742 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
25743 no) PKGVERSION= ;;
25744 *) PKGVERSION="($withval) " ;;
25745 esac
b686ecb5 25746else
d5835df2 25747 PKGVERSION="(GDB) "
b686ecb5 25748
b686ecb5
JM
25749fi
25750
b686ecb5 25751
b686ecb5 25752
b686ecb5 25753
b686ecb5 25754
d5835df2
TV
25755# Check whether --with-bugurl was given.
25756if test "${with_bugurl+set}" = set; then :
25757 withval=$with_bugurl; case "$withval" in
25758 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
25759 no) BUGURL=
25760 ;;
25761 *) BUGURL="$withval"
25762 ;;
25763 esac
b686ecb5 25764else
d5835df2 25765 BUGURL="https://www.gnu.org/software/gdb/bugs/"
b686ecb5 25766
b686ecb5
JM
25767fi
25768
d5835df2
TV
25769 case ${BUGURL} in
25770 "")
25771 REPORT_BUGS_TO=
25772 REPORT_BUGS_TEXI=
25773 ;;
25774 *)
25775 REPORT_BUGS_TO="<$BUGURL>"
25776 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
25777 ;;
25778 esac;
b686ecb5 25779
b686ecb5 25780
b686ecb5 25781
b686ecb5 25782
d5835df2
TV
25783cat >>confdefs.h <<_ACEOF
25784#define PKGVERSION "$PKGVERSION"
25785_ACEOF
b686ecb5
JM
25786
25787
d5835df2
TV
25788cat >>confdefs.h <<_ACEOF
25789#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
25790_ACEOF
b686ecb5 25791
b686ecb5 25792
d5835df2
TV
25793# --------------------- #
25794# Checks for programs. #
25795# --------------------- #
b686ecb5 25796
d5835df2
TV
25797for ac_prog in gawk mawk nawk awk
25798do
25799 # Extract the first word of "$ac_prog", so it can be a program name with args.
25800set dummy $ac_prog; ac_word=$2
25801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25802$as_echo_n "checking for $ac_word... " >&6; }
25803if ${ac_cv_prog_AWK+:} false; then :
25804 $as_echo_n "(cached) " >&6
b686ecb5 25805else
d5835df2
TV
25806 if test -n "$AWK"; then
25807 ac_cv_prog_AWK="$AWK" # Let the user override the test.
25808else
25809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25810for as_dir in $PATH
25811do
25812 IFS=$as_save_IFS
25813 test -z "$as_dir" && as_dir=.
25814 for ac_exec_ext in '' $ac_executable_extensions; do
25815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25816 ac_cv_prog_AWK="$ac_prog"
25817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25818 break 2
25819 fi
25820done
25821 done
25822IFS=$as_save_IFS
b686ecb5
JM
25823
25824fi
d5835df2
TV
25825fi
25826AWK=$ac_cv_prog_AWK
25827if test -n "$AWK"; then
25828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
25829$as_echo "$AWK" >&6; }
25830else
25831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25832$as_echo "no" >&6; }
25833fi
b686ecb5
JM
25834
25835
d5835df2
TV
25836 test -n "$AWK" && break
25837done
b686ecb5 25838
b686ecb5 25839
d5835df2
TV
25840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
25841$as_echo_n "checking whether ln -s works... " >&6; }
25842LN_S=$as_ln_s
25843if test "$LN_S" = "ln -s"; then
25844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
b686ecb5 25845$as_echo "yes" >&6; }
d5835df2
TV
25846else
25847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
25848$as_echo "no, using $LN_S" >&6; }
b686ecb5
JM
25849fi
25850
d5835df2
TV
25851if test -n "$ac_tool_prefix"; then
25852 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
25853set dummy ${ac_tool_prefix}ranlib; ac_word=$2
25854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25855$as_echo_n "checking for $ac_word... " >&6; }
25856if ${ac_cv_prog_RANLIB+:} false; then :
b686ecb5
JM
25857 $as_echo_n "(cached) " >&6
25858else
d5835df2
TV
25859 if test -n "$RANLIB"; then
25860 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
25861else
25862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25863for as_dir in $PATH
25864do
25865 IFS=$as_save_IFS
25866 test -z "$as_dir" && as_dir=.
25867 for ac_exec_ext in '' $ac_executable_extensions; do
25868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25869 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
25870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25871 break 2
25872 fi
25873done
25874 done
25875IFS=$as_save_IFS
b686ecb5 25876
d5835df2
TV
25877fi
25878fi
25879RANLIB=$ac_cv_prog_RANLIB
25880if test -n "$RANLIB"; then
25881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
25882$as_echo "$RANLIB" >&6; }
b686ecb5 25883else
d5835df2
TV
25884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25885$as_echo "no" >&6; }
b686ecb5 25886fi
b686ecb5 25887
b686ecb5 25888
b686ecb5 25889fi
d5835df2
TV
25890if test -z "$ac_cv_prog_RANLIB"; then
25891 ac_ct_RANLIB=$RANLIB
25892 # Extract the first word of "ranlib", so it can be a program name with args.
25893set dummy ranlib; ac_word=$2
25894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25895$as_echo_n "checking for $ac_word... " >&6; }
25896if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
25897 $as_echo_n "(cached) " >&6
25898else
25899 if test -n "$ac_ct_RANLIB"; then
25900 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
25901else
25902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25903for as_dir in $PATH
25904do
25905 IFS=$as_save_IFS
25906 test -z "$as_dir" && as_dir=.
25907 for ac_exec_ext in '' $ac_executable_extensions; do
25908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25909 ac_cv_prog_ac_ct_RANLIB="ranlib"
25910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25911 break 2
25912 fi
25913done
25914 done
25915IFS=$as_save_IFS
b686ecb5
JM
25916
25917fi
d5835df2
TV
25918fi
25919ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
25920if test -n "$ac_ct_RANLIB"; then
25921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
25922$as_echo "$ac_ct_RANLIB" >&6; }
b686ecb5 25923else
d5835df2
TV
25924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25925$as_echo "no" >&6; }
b686ecb5 25926fi
b686ecb5 25927
d5835df2
TV
25928 if test "x$ac_ct_RANLIB" = x; then
25929 RANLIB=":"
25930 else
25931 case $cross_compiling:$ac_tool_warned in
25932yes:)
25933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25935ac_tool_warned=yes ;;
25936esac
25937 RANLIB=$ac_ct_RANLIB
25938 fi
25939else
25940 RANLIB="$ac_cv_prog_RANLIB"
b686ecb5
JM
25941fi
25942
d5835df2
TV
25943for ac_prog in 'bison -y' byacc
25944do
25945 # Extract the first word of "$ac_prog", so it can be a program name with args.
25946set dummy $ac_prog; ac_word=$2
25947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25948$as_echo_n "checking for $ac_word... " >&6; }
25949if ${ac_cv_prog_YACC+:} false; then :
25950 $as_echo_n "(cached) " >&6
b686ecb5 25951else
d5835df2
TV
25952 if test -n "$YACC"; then
25953 ac_cv_prog_YACC="$YACC" # Let the user override the test.
b686ecb5 25954else
d5835df2
TV
25955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25956for as_dir in $PATH
25957do
25958 IFS=$as_save_IFS
25959 test -z "$as_dir" && as_dir=.
25960 for ac_exec_ext in '' $ac_executable_extensions; do
25961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25962 ac_cv_prog_YACC="$ac_prog"
25963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25964 break 2
25965 fi
25966done
25967 done
25968IFS=$as_save_IFS
b686ecb5
JM
25969
25970fi
25971fi
d5835df2
TV
25972YACC=$ac_cv_prog_YACC
25973if test -n "$YACC"; then
25974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
25975$as_echo "$YACC" >&6; }
25976else
25977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25978$as_echo "no" >&6; }
b686ecb5
JM
25979fi
25980
b686ecb5 25981
d5835df2 25982 test -n "$YACC" && break
b686ecb5 25983done
d5835df2 25984test -n "$YACC" || YACC="yacc"
b686ecb5
JM
25985
25986
d5835df2
TV
25987if test -n "$ac_tool_prefix"; then
25988 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
25989set dummy ${ac_tool_prefix}ar; ac_word=$2
25990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25991$as_echo_n "checking for $ac_word... " >&6; }
25992if ${ac_cv_prog_AR+:} false; then :
25993 $as_echo_n "(cached) " >&6
25994else
25995 if test -n "$AR"; then
25996 ac_cv_prog_AR="$AR" # Let the user override the test.
25997else
25998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25999for as_dir in $PATH
26000do
26001 IFS=$as_save_IFS
26002 test -z "$as_dir" && as_dir=.
26003 for ac_exec_ext in '' $ac_executable_extensions; do
26004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26005 ac_cv_prog_AR="${ac_tool_prefix}ar"
26006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26007 break 2
26008 fi
b686ecb5 26009done
d5835df2
TV
26010 done
26011IFS=$as_save_IFS
b686ecb5
JM
26012
26013fi
b686ecb5 26014fi
d5835df2
TV
26015AR=$ac_cv_prog_AR
26016if test -n "$AR"; then
26017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
26018$as_echo "$AR" >&6; }
26019else
26020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26021$as_echo "no" >&6; }
b686ecb5
JM
26022fi
26023
b686ecb5
JM
26024
26025fi
d5835df2
TV
26026if test -z "$ac_cv_prog_AR"; then
26027 ac_ct_AR=$AR
26028 # Extract the first word of "ar", so it can be a program name with args.
26029set dummy ar; ac_word=$2
26030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26031$as_echo_n "checking for $ac_word... " >&6; }
26032if ${ac_cv_prog_ac_ct_AR+:} false; then :
b686ecb5
JM
26033 $as_echo_n "(cached) " >&6
26034else
d5835df2
TV
26035 if test -n "$ac_ct_AR"; then
26036 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
b686ecb5 26037else
d5835df2
TV
26038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26039for as_dir in $PATH
26040do
26041 IFS=$as_save_IFS
26042 test -z "$as_dir" && as_dir=.
26043 for ac_exec_ext in '' $ac_executable_extensions; do
26044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26045 ac_cv_prog_ac_ct_AR="ar"
26046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26047 break 2
26048 fi
26049done
26050 done
26051IFS=$as_save_IFS
b686ecb5
JM
26052
26053fi
b686ecb5 26054fi
d5835df2
TV
26055ac_ct_AR=$ac_cv_prog_ac_ct_AR
26056if test -n "$ac_ct_AR"; then
26057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
26058$as_echo "$ac_ct_AR" >&6; }
b686ecb5 26059else
d5835df2
TV
26060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26061$as_echo "no" >&6; }
b686ecb5
JM
26062fi
26063
d5835df2
TV
26064 if test "x$ac_ct_AR" = x; then
26065 AR=""
26066 else
26067 case $cross_compiling:$ac_tool_warned in
26068yes:)
26069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26071ac_tool_warned=yes ;;
26072esac
26073 AR=$ac_ct_AR
26074 fi
b686ecb5 26075else
d5835df2 26076 AR="$ac_cv_prog_AR"
b686ecb5
JM
26077fi
26078
d5835df2
TV
26079if test -n "$ac_tool_prefix"; then
26080 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
26081set dummy ${ac_tool_prefix}dlltool; ac_word=$2
26082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26083$as_echo_n "checking for $ac_word... " >&6; }
26084if ${ac_cv_prog_DLLTOOL+:} false; then :
26085 $as_echo_n "(cached) " >&6
b686ecb5 26086else
d5835df2
TV
26087 if test -n "$DLLTOOL"; then
26088 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
b686ecb5 26089else
d5835df2
TV
26090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26091for as_dir in $PATH
26092do
26093 IFS=$as_save_IFS
26094 test -z "$as_dir" && as_dir=.
26095 for ac_exec_ext in '' $ac_executable_extensions; do
26096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26097 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
26098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26099 break 2
26100 fi
26101done
26102 done
26103IFS=$as_save_IFS
b686ecb5 26104
b686ecb5 26105fi
d5835df2
TV
26106fi
26107DLLTOOL=$ac_cv_prog_DLLTOOL
26108if test -n "$DLLTOOL"; then
26109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
26110$as_echo "$DLLTOOL" >&6; }
b686ecb5 26111else
d5835df2
TV
26112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26113$as_echo "no" >&6; }
b686ecb5
JM
26114fi
26115
b686ecb5 26116
b686ecb5 26117fi
d5835df2
TV
26118if test -z "$ac_cv_prog_DLLTOOL"; then
26119 ac_ct_DLLTOOL=$DLLTOOL
26120 # Extract the first word of "dlltool", so it can be a program name with args.
26121set dummy dlltool; ac_word=$2
26122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26123$as_echo_n "checking for $ac_word... " >&6; }
26124if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
26125 $as_echo_n "(cached) " >&6
b686ecb5 26126else
d5835df2
TV
26127 if test -n "$ac_ct_DLLTOOL"; then
26128 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
b686ecb5 26129else
d5835df2
TV
26130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26131for as_dir in $PATH
26132do
26133 IFS=$as_save_IFS
26134 test -z "$as_dir" && as_dir=.
26135 for ac_exec_ext in '' $ac_executable_extensions; do
26136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26137 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
26138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26139 break 2
26140 fi
26141done
26142 done
26143IFS=$as_save_IFS
b686ecb5 26144
d5835df2
TV
26145fi
26146fi
26147ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
26148if test -n "$ac_ct_DLLTOOL"; then
26149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
26150$as_echo "$ac_ct_DLLTOOL" >&6; }
b686ecb5 26151else
d5835df2
TV
26152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26153$as_echo "no" >&6; }
b686ecb5
JM
26154fi
26155
d5835df2
TV
26156 if test "x$ac_ct_DLLTOOL" = x; then
26157 DLLTOOL=""
26158 else
26159 case $cross_compiling:$ac_tool_warned in
26160yes:)
26161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26163ac_tool_warned=yes ;;
26164esac
26165 DLLTOOL=$ac_ct_DLLTOOL
26166 fi
b686ecb5 26167else
d5835df2 26168 DLLTOOL="$ac_cv_prog_DLLTOOL"
b686ecb5
JM
26169fi
26170
d5835df2
TV
26171if test -n "$ac_tool_prefix"; then
26172 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
26173set dummy ${ac_tool_prefix}windres; ac_word=$2
26174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26175$as_echo_n "checking for $ac_word... " >&6; }
26176if ${ac_cv_prog_WINDRES+:} false; then :
26177 $as_echo_n "(cached) " >&6
26178else
26179 if test -n "$WINDRES"; then
26180 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
26181else
26182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26183for as_dir in $PATH
26184do
26185 IFS=$as_save_IFS
26186 test -z "$as_dir" && as_dir=.
26187 for ac_exec_ext in '' $ac_executable_extensions; do
26188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26189 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
26190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26191 break 2
26192 fi
26193done
26194 done
26195IFS=$as_save_IFS
b686ecb5 26196
d5835df2
TV
26197fi
26198fi
26199WINDRES=$ac_cv_prog_WINDRES
26200if test -n "$WINDRES"; then
26201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
26202$as_echo "$WINDRES" >&6; }
b686ecb5 26203else
d5835df2
TV
26204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26205$as_echo "no" >&6; }
b686ecb5
JM
26206fi
26207
b686ecb5 26208
d5835df2
TV
26209fi
26210if test -z "$ac_cv_prog_WINDRES"; then
26211 ac_ct_WINDRES=$WINDRES
26212 # Extract the first word of "windres", so it can be a program name with args.
26213set dummy windres; ac_word=$2
26214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26215$as_echo_n "checking for $ac_word... " >&6; }
26216if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
b686ecb5
JM
26217 $as_echo_n "(cached) " >&6
26218else
d5835df2
TV
26219 if test -n "$ac_ct_WINDRES"; then
26220 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
b686ecb5 26221else
d5835df2
TV
26222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26223for as_dir in $PATH
26224do
26225 IFS=$as_save_IFS
26226 test -z "$as_dir" && as_dir=.
26227 for ac_exec_ext in '' $ac_executable_extensions; do
26228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26229 ac_cv_prog_ac_ct_WINDRES="windres"
26230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26231 break 2
26232 fi
26233done
26234 done
26235IFS=$as_save_IFS
26236
b686ecb5 26237fi
b686ecb5 26238fi
d5835df2
TV
26239ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
26240if test -n "$ac_ct_WINDRES"; then
26241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
26242$as_echo "$ac_ct_WINDRES" >&6; }
26243else
26244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26245$as_echo "no" >&6; }
26246fi
b686ecb5 26247
d5835df2
TV
26248 if test "x$ac_ct_WINDRES" = x; then
26249 WINDRES=""
26250 else
26251 case $cross_compiling:$ac_tool_warned in
26252yes:)
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26255ac_tool_warned=yes ;;
26256esac
26257 WINDRES=$ac_ct_WINDRES
b686ecb5 26258 fi
d5835df2
TV
26259else
26260 WINDRES="$ac_cv_prog_WINDRES"
26261fi
b686ecb5
JM
26262
26263
d5835df2
TV
26264case $host_os in
26265 gnu*)
26266 # Needed for GNU Hurd hosts.
26267 if test -n "$ac_tool_prefix"; then
26268 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
26269set dummy ${ac_tool_prefix}mig; ac_word=$2
26270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26271$as_echo_n "checking for $ac_word... " >&6; }
26272if ${ac_cv_prog_MIG+:} false; then :
26273 $as_echo_n "(cached) " >&6
26274else
26275 if test -n "$MIG"; then
26276 ac_cv_prog_MIG="$MIG" # Let the user override the test.
26277else
26278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26279for as_dir in $PATH
26280do
26281 IFS=$as_save_IFS
26282 test -z "$as_dir" && as_dir=.
26283 for ac_exec_ext in '' $ac_executable_extensions; do
26284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26285 ac_cv_prog_MIG="${ac_tool_prefix}mig"
26286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26287 break 2
26288 fi
26289done
26290 done
26291IFS=$as_save_IFS
b686ecb5 26292
d5835df2
TV
26293fi
26294fi
26295MIG=$ac_cv_prog_MIG
26296if test -n "$MIG"; then
26297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
26298$as_echo "$MIG" >&6; }
26299else
26300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26301$as_echo "no" >&6; }
26302fi
b686ecb5 26303
b686ecb5 26304
d5835df2
TV
26305fi
26306if test -z "$ac_cv_prog_MIG"; then
26307 ac_ct_MIG=$MIG
26308 # Extract the first word of "mig", so it can be a program name with args.
26309set dummy mig; ac_word=$2
26310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26311$as_echo_n "checking for $ac_word... " >&6; }
26312if ${ac_cv_prog_ac_ct_MIG+:} false; then :
26313 $as_echo_n "(cached) " >&6
26314else
26315 if test -n "$ac_ct_MIG"; then
26316 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
26317else
26318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26319for as_dir in $PATH
26320do
26321 IFS=$as_save_IFS
26322 test -z "$as_dir" && as_dir=.
26323 for ac_exec_ext in '' $ac_executable_extensions; do
26324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26325 ac_cv_prog_ac_ct_MIG="mig"
26326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26327 break 2
26328 fi
26329done
26330 done
26331IFS=$as_save_IFS
b686ecb5 26332
d5835df2
TV
26333fi
26334fi
26335ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
26336if test -n "$ac_ct_MIG"; then
26337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
26338$as_echo "$ac_ct_MIG" >&6; }
26339else
26340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26341$as_echo "no" >&6; }
26342fi
b686ecb5 26343
d5835df2
TV
26344 if test "x$ac_ct_MIG" = x; then
26345 MIG=""
26346 else
26347 case $cross_compiling:$ac_tool_warned in
26348yes:)
26349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26351ac_tool_warned=yes ;;
26352esac
26353 MIG=$ac_ct_MIG
26354 fi
26355else
26356 MIG="$ac_cv_prog_MIG"
b686ecb5
JM
26357fi
26358
d5835df2
TV
26359 if test x"$MIG" = x; then
26360 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
26361 fi
26362 ;;
26363esac
b686ecb5 26364
d5835df2
TV
26365# ---------------------- #
26366# Checks for libraries. #
26367# ---------------------- #
b686ecb5 26368
d5835df2
TV
26369# We might need to link with -lm; most simulators need it.
26370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
26371$as_echo_n "checking for main in -lm... " >&6; }
26372if ${ac_cv_lib_m_main+:} false; then :
b686ecb5
JM
26373 $as_echo_n "(cached) " >&6
26374else
d5835df2
TV
26375 ac_check_lib_save_LIBS=$LIBS
26376LIBS="-lm $LIBS"
26377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5
JM
26378/* end confdefs.h. */
26379
d5835df2 26380
b686ecb5
JM
26381int
26382main ()
26383{
d5835df2 26384return main ();
b686ecb5
JM
26385 ;
26386 return 0;
26387}
26388_ACEOF
d5835df2
TV
26389if ac_fn_c_try_link "$LINENO"; then :
26390 ac_cv_lib_m_main=yes
b686ecb5 26391else
d5835df2 26392 ac_cv_lib_m_main=no
b686ecb5 26393fi
d5835df2
TV
26394rm -f core conftest.err conftest.$ac_objext \
26395 conftest$ac_exeext conftest.$ac_ext
26396LIBS=$ac_check_lib_save_LIBS
b686ecb5 26397fi
d5835df2
TV
26398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
26399$as_echo "$ac_cv_lib_m_main" >&6; }
26400if test "x$ac_cv_lib_m_main" = xyes; then :
26401 cat >>confdefs.h <<_ACEOF
26402#define HAVE_LIBM 1
26403_ACEOF
b686ecb5 26404
d5835df2 26405 LIBS="-lm $LIBS"
b686ecb5
JM
26406
26407fi
26408
d5835df2
TV
26409
26410# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
26411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
26412$as_echo_n "checking for library containing gethostbyname... " >&6; }
26413if ${ac_cv_search_gethostbyname+:} false; then :
b686ecb5
JM
26414 $as_echo_n "(cached) " >&6
26415else
d5835df2
TV
26416 ac_func_search_save_LIBS=$LIBS
26417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 26418/* end confdefs.h. */
b686ecb5 26419
d5835df2
TV
26420/* Override any GCC internal prototype to avoid an error.
26421 Use char because int might match the return type of a GCC
26422 builtin and then its argument prototype would still apply. */
26423#ifdef __cplusplus
26424extern "C"
b686ecb5 26425#endif
d5835df2
TV
26426char gethostbyname ();
26427int
26428main ()
26429{
26430return gethostbyname ();
26431 ;
26432 return 0;
26433}
b686ecb5 26434_ACEOF
d5835df2
TV
26435for ac_lib in '' nsl; do
26436 if test -z "$ac_lib"; then
26437 ac_res="none required"
26438 else
26439 ac_res=-l$ac_lib
26440 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26441 fi
26442 if ac_fn_c_try_link "$LINENO"; then :
26443 ac_cv_search_gethostbyname=$ac_res
26444fi
26445rm -f core conftest.err conftest.$ac_objext \
26446 conftest$ac_exeext
26447 if ${ac_cv_search_gethostbyname+:} false; then :
26448 break
26449fi
26450done
26451if ${ac_cv_search_gethostbyname+:} false; then :
b686ecb5 26452
b686ecb5 26453else
d5835df2
TV
26454 ac_cv_search_gethostbyname=no
26455fi
26456rm conftest.$ac_ext
26457LIBS=$ac_func_search_save_LIBS
26458fi
26459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
26460$as_echo "$ac_cv_search_gethostbyname" >&6; }
26461ac_res=$ac_cv_search_gethostbyname
26462if test "$ac_res" != no; then :
26463 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b686ecb5 26464
d5835df2
TV
26465fi
26466
26467
26468# Link in zlib/zstd if we can. This allows us to read compressed debug
26469# sections.
26470
26471 # Use the system's zlib library.
26472 zlibdir="-L\$(top_builddir)/../zlib"
26473 zlibinc="-I\$(top_srcdir)/../zlib"
26474
26475# Check whether --with-system-zlib was given.
26476if test "${with_system_zlib+set}" = set; then :
26477 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
26478 zlibdir=
26479 zlibinc=
26480 fi
b686ecb5 26481
b686ecb5 26482fi
b686ecb5 26483
b686ecb5 26484
b686ecb5 26485
b686ecb5 26486
d5835df2
TV
26487
26488
26489# Check whether --with-zstd was given.
26490if test "${with_zstd+set}" = set; then :
26491 withval=$with_zstd;
b686ecb5 26492else
d5835df2 26493 with_zstd=auto
b686ecb5 26494fi
b686ecb5 26495
b686ecb5 26496
d5835df2 26497if test "$with_zstd" != no; then :
b686ecb5 26498
d5835df2
TV
26499pkg_failed=no
26500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
26501$as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
b686ecb5 26502
d5835df2
TV
26503if test -n "$ZSTD_CFLAGS"; then
26504 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
26505 elif test -n "$PKG_CONFIG"; then
26506 if test -n "$PKG_CONFIG" && \
26507 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
26508 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
26509 ac_status=$?
26510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26511 test $ac_status = 0; }; then
26512 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
26513 test "x$?" != "x0" && pkg_failed=yes
b686ecb5 26514else
d5835df2 26515 pkg_failed=yes
b686ecb5 26516fi
d5835df2
TV
26517 else
26518 pkg_failed=untried
b686ecb5 26519fi
d5835df2
TV
26520if test -n "$ZSTD_LIBS"; then
26521 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
26522 elif test -n "$PKG_CONFIG"; then
26523 if test -n "$PKG_CONFIG" && \
26524 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
26525 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
26526 ac_status=$?
26527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26528 test $ac_status = 0; }; then
26529 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
26530 test "x$?" != "x0" && pkg_failed=yes
26531else
26532 pkg_failed=yes
26533fi
26534 else
26535 pkg_failed=untried
26536fi
26537
26538if test $pkg_failed = no; then
26539 pkg_save_LDFLAGS="$LDFLAGS"
26540 LDFLAGS="$LDFLAGS $pkg_cv_ZSTD_LIBS"
26541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 26542/* end confdefs.h. */
b686ecb5
JM
26543
26544int
26545main ()
26546{
d5835df2 26547
b686ecb5
JM
26548 ;
26549 return 0;
26550}
26551_ACEOF
d5835df2 26552if ac_fn_c_try_link "$LINENO"; then :
b686ecb5 26553
b686ecb5 26554else
d5835df2 26555 pkg_failed=yes
b686ecb5 26556fi
d5835df2
TV
26557rm -f core conftest.err conftest.$ac_objext \
26558 conftest$ac_exeext conftest.$ac_ext
26559 LDFLAGS=$pkg_save_LDFLAGS
b686ecb5 26560fi
b686ecb5 26561
b686ecb5 26562
b686ecb5 26563
d5835df2
TV
26564if test $pkg_failed = yes; then
26565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26566$as_echo "no" >&6; }
b686ecb5 26567
d5835df2
TV
26568if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
26569 _pkg_short_errors_supported=yes
b686ecb5 26570else
d5835df2 26571 _pkg_short_errors_supported=no
b686ecb5 26572fi
d5835df2
TV
26573 if test $_pkg_short_errors_supported = yes; then
26574 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
26575 else
26576 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
26577 fi
26578 # Put the nasty error message in config.log where it belongs
26579 echo "$ZSTD_PKG_ERRORS" >&5
b686ecb5 26580
b686ecb5 26581
d5835df2
TV
26582 if test "$with_zstd" = yes; then
26583 as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
26584 fi
b686ecb5 26585
d5835df2
TV
26586elif test $pkg_failed = untried; then
26587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26588$as_echo "no" >&6; }
b686ecb5 26589
d5835df2
TV
26590 if test "$with_zstd" = yes; then
26591 as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
26592 fi
b686ecb5
JM
26593
26594else
d5835df2
TV
26595 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
26596 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
26597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26598$as_echo "yes" >&6; }
b686ecb5
JM
26599
26600
d5835df2 26601$as_echo "#define HAVE_ZSTD 1" >>confdefs.h
b686ecb5 26602
b686ecb5
JM
26603
26604fi
26605
d5835df2 26606fi
b686ecb5
JM
26607
26608
26609
26610
26611
26612
b686ecb5 26613
d5835df2 26614 am_save_CPPFLAGS="$CPPFLAGS"
b686ecb5 26615
d5835df2
TV
26616 for element in $INCICONV; do
26617 haveit=
26618 for x in $CPPFLAGS; do
b686ecb5 26619
d5835df2
TV
26620 acl_save_prefix="$prefix"
26621 prefix="$acl_final_prefix"
26622 acl_save_exec_prefix="$exec_prefix"
26623 exec_prefix="$acl_final_exec_prefix"
26624 eval x=\"$x\"
26625 exec_prefix="$acl_save_exec_prefix"
26626 prefix="$acl_save_prefix"
b686ecb5 26627
d5835df2
TV
26628 if test "X$x" = "X$element"; then
26629 haveit=yes
26630 break
26631 fi
26632 done
26633 if test -z "$haveit"; then
26634 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
26635 fi
26636 done
b686ecb5 26637
b686ecb5 26638
d5835df2
TV
26639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
26640$as_echo_n "checking for iconv... " >&6; }
26641if ${am_cv_func_iconv+:} false; then :
b686ecb5
JM
26642 $as_echo_n "(cached) " >&6
26643else
d5835df2
TV
26644
26645 am_cv_func_iconv="no, consider installing GNU libiconv"
26646 am_cv_lib_iconv=no
26647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 26648/* end confdefs.h. */
d5835df2 26649
b686ecb5 26650#include <stdlib.h>
d5835df2 26651#include <iconv.h>
b686ecb5
JM
26652
26653int
26654main ()
26655{
d5835df2
TV
26656iconv_t cd = iconv_open("","");
26657 iconv(cd,NULL,NULL,NULL,NULL);
26658 iconv_close(cd);
b686ecb5
JM
26659 ;
26660 return 0;
26661}
26662_ACEOF
d5835df2
TV
26663if ac_fn_c_try_link "$LINENO"; then :
26664 am_cv_func_iconv=yes
b686ecb5 26665fi
d5835df2
TV
26666rm -f core conftest.err conftest.$ac_objext \
26667 conftest$ac_exeext conftest.$ac_ext
26668 if test "$am_cv_func_iconv" != yes; then
26669 am_save_LIBS="$LIBS"
26670 LIBS="$LIBS $LIBICONV"
26671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 26672/* end confdefs.h. */
b686ecb5 26673
b686ecb5 26674#include <stdlib.h>
d5835df2 26675#include <iconv.h>
b686ecb5 26676
d5835df2
TV
26677int
26678main ()
26679{
26680iconv_t cd = iconv_open("","");
26681 iconv(cd,NULL,NULL,NULL,NULL);
26682 iconv_close(cd);
26683 ;
26684 return 0;
26685}
b686ecb5 26686_ACEOF
d5835df2
TV
26687if ac_fn_c_try_link "$LINENO"; then :
26688 am_cv_lib_iconv=yes
26689 am_cv_func_iconv=yes
26690fi
26691rm -f core conftest.err conftest.$ac_objext \
26692 conftest$ac_exeext conftest.$ac_ext
26693 LIBS="$am_save_LIBS"
26694 fi
b686ecb5
JM
26695
26696fi
d5835df2
TV
26697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
26698$as_echo "$am_cv_func_iconv" >&6; }
26699 if test "$am_cv_func_iconv" = yes; then
26700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
26701$as_echo_n "checking for working iconv... " >&6; }
26702if ${am_cv_func_iconv_works+:} false; then :
26703 $as_echo_n "(cached) " >&6
26704else
b686ecb5 26705
d5835df2
TV
26706 am_save_LIBS="$LIBS"
26707 if test $am_cv_lib_iconv = yes; then
26708 LIBS="$LIBS $LIBICONV"
26709 fi
26710 am_cv_func_iconv_works=no
26711 for ac_iconv_const in '' 'const'; do
26712 if test "$cross_compiling" = yes; then :
26713 case "$host_os" in
26714 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
26715 *) am_cv_func_iconv_works="guessing yes" ;;
26716 esac
b686ecb5
JM
26717else
26718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26719/* end confdefs.h. */
d5835df2
TV
26720
26721#include <iconv.h>
26722#include <string.h>
26723
26724#ifndef ICONV_CONST
26725# define ICONV_CONST $ac_iconv_const
b686ecb5
JM
26726#endif
26727
b686ecb5
JM
26728int
26729main ()
26730{
d5835df2
TV
26731int result = 0;
26732 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
26733 successful returns. This is even documented in
26734 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
26735 {
26736 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
26737 if (cd_utf8_to_88591 != (iconv_t)(-1))
26738 {
26739 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
26740 char buf[10];
26741 ICONV_CONST char *inptr = input;
26742 size_t inbytesleft = strlen (input);
26743 char *outptr = buf;
26744 size_t outbytesleft = sizeof (buf);
26745 size_t res = iconv (cd_utf8_to_88591,
26746 &inptr, &inbytesleft,
26747 &outptr, &outbytesleft);
26748 if (res == 0)
26749 result |= 1;
26750 iconv_close (cd_utf8_to_88591);
26751 }
26752 }
26753 /* Test against Solaris 10 bug: Failures are not distinguishable from
26754 successful returns. */
26755 {
26756 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
26757 if (cd_ascii_to_88591 != (iconv_t)(-1))
26758 {
26759 static ICONV_CONST char input[] = "\263";
26760 char buf[10];
26761 ICONV_CONST char *inptr = input;
26762 size_t inbytesleft = strlen (input);
26763 char *outptr = buf;
26764 size_t outbytesleft = sizeof (buf);
26765 size_t res = iconv (cd_ascii_to_88591,
26766 &inptr, &inbytesleft,
26767 &outptr, &outbytesleft);
26768 if (res == 0)
26769 result |= 2;
26770 iconv_close (cd_ascii_to_88591);
26771 }
26772 }
26773 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
26774 {
26775 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
26776 if (cd_88591_to_utf8 != (iconv_t)(-1))
26777 {
26778 static ICONV_CONST char input[] = "\304";
26779 static char buf[2] = { (char)0xDE, (char)0xAD };
26780 ICONV_CONST char *inptr = input;
26781 size_t inbytesleft = 1;
26782 char *outptr = buf;
26783 size_t outbytesleft = 1;
26784 size_t res = iconv (cd_88591_to_utf8,
26785 &inptr, &inbytesleft,
26786 &outptr, &outbytesleft);
26787 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
26788 result |= 4;
26789 iconv_close (cd_88591_to_utf8);
26790 }
26791 }
26792#if 0 /* This bug could be worked around by the caller. */
26793 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
26794 {
26795 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
26796 if (cd_88591_to_utf8 != (iconv_t)(-1))
26797 {
26798 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
26799 char buf[50];
26800 ICONV_CONST char *inptr = input;
26801 size_t inbytesleft = strlen (input);
26802 char *outptr = buf;
26803 size_t outbytesleft = sizeof (buf);
26804 size_t res = iconv (cd_88591_to_utf8,
26805 &inptr, &inbytesleft,
26806 &outptr, &outbytesleft);
26807 if ((int)res > 0)
26808 result |= 8;
26809 iconv_close (cd_88591_to_utf8);
26810 }
26811 }
26812#endif
26813 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
26814 provided. */
26815 {
26816 /* Try standardized names. */
26817 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
26818 /* Try IRIX, OSF/1 names. */
26819 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
26820 /* Try AIX names. */
26821 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
26822 /* Try HP-UX names. */
26823 iconv_t cd4 = iconv_open ("utf8", "eucJP");
26824 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
26825 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
26826 result |= 16;
26827 if (cd1 != (iconv_t)(-1))
26828 iconv_close (cd1);
26829 if (cd2 != (iconv_t)(-1))
26830 iconv_close (cd2);
26831 if (cd3 != (iconv_t)(-1))
26832 iconv_close (cd3);
26833 if (cd4 != (iconv_t)(-1))
26834 iconv_close (cd4);
26835 }
26836 return result;
26837
26838 ;
b686ecb5
JM
26839 return 0;
26840}
26841_ACEOF
26842if ac_fn_c_try_run "$LINENO"; then :
d5835df2 26843 am_cv_func_iconv_works=yes
b686ecb5
JM
26844fi
26845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26846 conftest.$ac_objext conftest.beam conftest.$ac_ext
26847fi
26848
d5835df2
TV
26849 test "$am_cv_func_iconv_works" = no || break
26850 done
26851 LIBS="$am_save_LIBS"
26852
b686ecb5 26853fi
d5835df2
TV
26854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
26855$as_echo "$am_cv_func_iconv_works" >&6; }
26856 case "$am_cv_func_iconv_works" in
26857 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
26858 *) am_func_iconv=yes ;;
26859 esac
26860 else
26861 am_func_iconv=no am_cv_lib_iconv=no
26862 fi
26863 if test "$am_func_iconv" = yes; then
b686ecb5 26864
d5835df2 26865$as_echo "#define HAVE_ICONV 1" >>confdefs.h
b686ecb5 26866
d5835df2
TV
26867 fi
26868 if test "$am_cv_lib_iconv" = yes; then
26869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
26870$as_echo_n "checking how to link with libiconv... " >&6; }
26871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
26872$as_echo "$LIBICONV" >&6; }
26873 else
26874 CPPFLAGS="$am_save_CPPFLAGS"
26875 LIBICONV=
26876 LTLIBICONV=
26877 fi
b686ecb5 26878
d5835df2
TV
26879
26880
26881 if test "$am_cv_func_iconv" = yes; then
26882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
26883$as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
26884if ${gl_cv_iconv_nonconst+:} false; then :
b686ecb5
JM
26885 $as_echo_n "(cached) " >&6
26886else
26887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26888/* end confdefs.h. */
d5835df2
TV
26889
26890#include <stdlib.h>
26891#include <iconv.h>
26892extern
26893#ifdef __cplusplus
26894"C"
26895#endif
26896size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
26897
b686ecb5
JM
26898int
26899main ()
26900{
d5835df2 26901
b686ecb5
JM
26902 ;
26903 return 0;
26904}
26905_ACEOF
d5835df2
TV
26906if ac_fn_c_try_compile "$LINENO"; then :
26907 gl_cv_iconv_nonconst=yes
b686ecb5 26908else
d5835df2 26909 gl_cv_iconv_nonconst=no
b686ecb5 26910fi
d5835df2
TV
26911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26912
b686ecb5 26913fi
d5835df2
TV
26914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
26915$as_echo "$gl_cv_iconv_nonconst" >&6; }
26916 else
26917 gl_cv_iconv_nonconst=yes
26918 fi
26919 if test $gl_cv_iconv_nonconst = yes; then
26920 iconv_arg1=""
26921 else
26922 iconv_arg1="const"
26923 fi
b686ecb5 26924
d5835df2
TV
26925cat >>confdefs.h <<_ACEOF
26926#define ICONV_CONST $iconv_arg1
26927_ACEOF
b686ecb5 26928
b686ecb5 26929
b686ecb5 26930
d5835df2
TV
26931 if test "$am_func_iconv" = yes; then
26932 if test -n "$LIBICONV"; then
26933 am_cv_func_iconv_summary='yes, in libiconv'
26934 else
26935 am_cv_func_iconv_summary='yes, in libc'
26936 fi
26937 else
26938 if test "$am_cv_func_iconv" = yes; then
26939 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
26940 else
26941 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
26942 fi
26943 fi
b686ecb5
JM
26944
26945
d5835df2
TV
26946# GDB may fork/exec the iconv program to get the list of supported character
26947# sets. Allow the user to specify where to find it.
26948# There are several factors affecting the choice of option name:
26949# - There is already --with-libiconv-prefix but we can't use it, it specifies
26950# the build-time location of libiconv files.
26951# - The program we need to find is iconv, which comes with glibc. The user
26952# doesn't necessarily have libiconv installed. Therefore naming this
26953# --with-libiconv-foo feels wrong.
26954# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
26955# defined to work on directories not files (though it really doesn't know
26956# the difference).
26957# - Calling this --with-iconv-prefix is perceived to cause too much confusion
26958# with --with-libiconv-prefix.
26959# Putting these together is why the option name is --with-iconv-bin.
b686ecb5 26960
b686ecb5 26961
d5835df2
TV
26962# Check whether --with-iconv-bin was given.
26963if test "${with_iconv_bin+set}" = set; then :
26964 withval=$with_iconv_bin; iconv_bin="${withval}"
b686ecb5
JM
26965
26966cat >>confdefs.h <<_ACEOF
d5835df2 26967#define ICONV_BIN "${iconv_bin}"
b686ecb5
JM
26968_ACEOF
26969
b686ecb5 26970
d5835df2
TV
26971 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
26972 if test "x$prefix" = xNONE; then
26973 test_prefix=/usr/local
26974 else
26975 test_prefix=$prefix
26976 fi
26977 else
26978 test_prefix=$exec_prefix
26979 fi
26980 value=0
26981 case ${iconv_bin} in
26982 "${test_prefix}"|"${test_prefix}/"*|\
26983 '${exec_prefix}'|'${exec_prefix}/'*)
26984 value=1
26985 ;;
26986 esac
b686ecb5 26987
b686ecb5 26988cat >>confdefs.h <<_ACEOF
d5835df2 26989#define ICONV_BIN_RELOCATABLE $value
b686ecb5
JM
26990_ACEOF
26991
26992
b686ecb5 26993
d5835df2 26994fi
b686ecb5 26995
b686ecb5 26996
d5835df2
TV
26997# For the TUI, we need enhanced curses functionality.
26998if test x"$enable_tui" != xno; then
26999 prefer_curses=yes
27000fi
b686ecb5 27001
d5835df2
TV
27002curses_found=no
27003if test x"$prefer_curses" = xyes; then
27004 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
27005 # curses library because the latter might not provide all the
27006 # functionality we need. However, this leads to problems on systems
27007 # where the linker searches /usr/local/lib, but the compiler doesn't
27008 # search /usr/local/include, if ncurses is installed in /usr/local. A
27009 # default installation of ncurses on alpha*-dec-osf* will lead to such
27010 # a situation.
27011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
27012$as_echo_n "checking for library containing waddstr... " >&6; }
27013if ${ac_cv_search_waddstr+:} false; then :
b686ecb5
JM
27014 $as_echo_n "(cached) " >&6
27015else
d5835df2
TV
27016 ac_func_search_save_LIBS=$LIBS
27017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 27018/* end confdefs.h. */
d5835df2
TV
27019
27020/* Override any GCC internal prototype to avoid an error.
27021 Use char because int might match the return type of a GCC
27022 builtin and then its argument prototype would still apply. */
27023#ifdef __cplusplus
27024extern "C"
27025#endif
27026char waddstr ();
b686ecb5
JM
27027int
27028main ()
27029{
d5835df2 27030return waddstr ();
b686ecb5
JM
27031 ;
27032 return 0;
27033}
27034_ACEOF
d5835df2
TV
27035for ac_lib in '' ncursesw ncurses cursesX curses; do
27036 if test -z "$ac_lib"; then
27037 ac_res="none required"
27038 else
27039 ac_res=-l$ac_lib
27040 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27041 fi
27042 if ac_fn_c_try_link "$LINENO"; then :
27043 ac_cv_search_waddstr=$ac_res
b686ecb5
JM
27044fi
27045rm -f core conftest.err conftest.$ac_objext \
d5835df2
TV
27046 conftest$ac_exeext
27047 if ${ac_cv_search_waddstr+:} false; then :
27048 break
27049fi
27050done
27051if ${ac_cv_search_waddstr+:} false; then :
b686ecb5 27052
d5835df2
TV
27053else
27054 ac_cv_search_waddstr=no
b686ecb5 27055fi
d5835df2
TV
27056rm conftest.$ac_ext
27057LIBS=$ac_func_search_save_LIBS
27058fi
27059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
27060$as_echo "$ac_cv_search_waddstr" >&6; }
27061ac_res=$ac_cv_search_waddstr
27062if test "$ac_res" != no; then :
27063 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27064 curses_found=yes
b686ecb5 27065
d5835df2 27066$as_echo "#define HAVE_LIBCURSES 1" >>confdefs.h
b686ecb5 27067
b686ecb5 27068
d5835df2 27069fi
b686ecb5
JM
27070
27071fi
27072
d5835df2
TV
27073# Check whether we should enable the TUI, but only do so if we really
27074# can.
27075if test x"$enable_tui" != xno; then
27076 if test "$curses_found" != no; then
27077 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
27078 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
27079 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
27080 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
27081 else
27082 if test x"$enable_tui" = xyes; then
27083 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
27084 else
27085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
27086$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
27087 fi
27088 fi
27089fi
b686ecb5 27090
d5835df2
TV
27091# Since GDB uses Readline, we need termcap functionality. In many
27092# cases this will be provided by the curses library, but some systems
27093# have a separate termcap library, or no curses library at all.
b686ecb5 27094
d5835df2
TV
27095case $host_os in
27096 cygwin*)
27097 if test -d "$srcdir/libtermcap"; then
27098 LIBS="../libtermcap/libtermcap.a $LIBS"
27099 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
27100 fi ;;
27101 go32* | *djgpp*)
27102 ac_cv_search_tgetent="none required"
27103 ;;
27104esac
b686ecb5 27105
d5835df2
TV
27106# These are the libraries checked by Readline.
27107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
27108$as_echo_n "checking for library containing tgetent... " >&6; }
27109if ${ac_cv_search_tgetent+:} false; then :
b686ecb5
JM
27110 $as_echo_n "(cached) " >&6
27111else
d5835df2
TV
27112 ac_func_search_save_LIBS=$LIBS
27113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 27114/* end confdefs.h. */
b686ecb5 27115
d5835df2
TV
27116/* Override any GCC internal prototype to avoid an error.
27117 Use char because int might match the return type of a GCC
27118 builtin and then its argument prototype would still apply. */
27119#ifdef __cplusplus
27120extern "C"
b686ecb5 27121#endif
d5835df2 27122char tgetent ();
b686ecb5
JM
27123int
27124main ()
27125{
d5835df2
TV
27126return tgetent ();
27127 ;
b686ecb5
JM
27128 return 0;
27129}
27130_ACEOF
d5835df2
TV
27131for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
27132 if test -z "$ac_lib"; then
27133 ac_res="none required"
27134 else
27135 ac_res=-l$ac_lib
27136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27137 fi
27138 if ac_fn_c_try_link "$LINENO"; then :
27139 ac_cv_search_tgetent=$ac_res
27140fi
27141rm -f core conftest.err conftest.$ac_objext \
27142 conftest$ac_exeext
27143 if ${ac_cv_search_tgetent+:} false; then :
27144 break
27145fi
27146done
27147if ${ac_cv_search_tgetent+:} false; then :
27148
b686ecb5 27149else
d5835df2 27150 ac_cv_search_tgetent=no
b686ecb5 27151fi
d5835df2
TV
27152rm conftest.$ac_ext
27153LIBS=$ac_func_search_save_LIBS
b686ecb5 27154fi
d5835df2
TV
27155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
27156$as_echo "$ac_cv_search_tgetent" >&6; }
27157ac_res=$ac_cv_search_tgetent
27158if test "$ac_res" != no; then :
27159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b686ecb5
JM
27160
27161fi
b686ecb5 27162
b686ecb5 27163
d5835df2
TV
27164if test "$ac_cv_search_tgetent" = no; then
27165 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
b686ecb5 27166fi
b686ecb5 27167
d5835df2
TV
27168
27169# Check whether --with-system-readline was given.
27170if test "${with_system_readline+set}" = set; then :
27171 withval=$with_system_readline;
27172fi
27173
27174
27175if test "$with_system_readline" = yes; then
27176 for ac_header in readline/readline.h
b686ecb5 27177do :
d5835df2
TV
27178 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
27179if test "x$ac_cv_header_readline_readline_h" = xyes; then :
b686ecb5 27180 cat >>confdefs.h <<_ACEOF
d5835df2 27181#define HAVE_READLINE_READLINE_H 1
b686ecb5 27182_ACEOF
d5835df2
TV
27183 readline_h=yes
27184else
27185 readline_h=no
b686ecb5
JM
27186fi
27187
27188done
27189
d5835df2
TV
27190 if test "$readline_h" = "no"; then
27191 as_fn_error $? "readline development packages are probably missing" "$LINENO" 5
27192 fi
27193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
27194$as_echo_n "checking whether system readline is new enough... " >&6; }
27195if ${gdb_cv_readline_ok+:} false; then :
b686ecb5 27196 $as_echo_n "(cached) " >&6
b686ecb5
JM
27197else
27198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27199/* end confdefs.h. */
d5835df2
TV
27200#include <stdio.h>
27201 #include <readline/readline.h>
b686ecb5
JM
27202int
27203main ()
27204{
d5835df2
TV
27205#if RL_VERSION_MAJOR < 7
27206 # error "readline version 7 required"
27207 #endif
b686ecb5
JM
27208
27209 ;
27210 return 0;
27211}
27212_ACEOF
d5835df2
TV
27213if ac_fn_c_try_compile "$LINENO"; then :
27214 gdb_cv_readline_ok=yes
b686ecb5 27215else
d5835df2
TV
27216 gdb_cv_readline_ok=no
27217
b686ecb5 27218fi
d5835df2 27219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b686ecb5
JM
27220
27221fi
d5835df2
TV
27222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
27223$as_echo "$gdb_cv_readline_ok" >&6; }
27224 if test "$gdb_cv_readline_ok" != yes; then
27225 as_fn_error $? "system readline is not new enough" "$LINENO" 5
27226 fi
b686ecb5 27227
d5835df2
TV
27228 READLINE=-lreadline
27229 READLINE_DEPS=
27230 READLINE_CFLAGS=
27231 READLINE_TEXI_INCFLAG=
27232 READLINE_DOC_SOURCE_INCLUDES='$(READLINE_SYSTEM_DOC_INCLUDES)'
b686ecb5 27233else
d5835df2
TV
27234 READLINE='$(READLINE_DIR)/libreadline.a'
27235 READLINE_DEPS='$(READLINE)'
27236 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
27237 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
27238 READLINE_DOC_SOURCE_INCLUDES='$(READLINE_INTREE_DOC_INCLUDES)'
b686ecb5 27239fi
b686ecb5 27240
b686ecb5 27241
b686ecb5 27242
b686ecb5 27243
b686ecb5 27244
b686ecb5 27245
d5835df2 27246# Generate jit-reader.h
b686ecb5 27247
d5835df2
TV
27248# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
27249TARGET_PTR=
b686ecb5 27250
d5835df2
TV
27251# The cast to long int works around a bug in the HP C Compiler
27252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27254# This bug is HP SR number 8606223364.
27255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
27256$as_echo_n "checking size of unsigned long long... " >&6; }
27257if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
27258 $as_echo_n "(cached) " >&6
27259else
27260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
b686ecb5 27261
b686ecb5 27262else
d5835df2
TV
27263 if test "$ac_cv_type_unsigned_long_long" = yes; then
27264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27266as_fn_error 77 "cannot compute sizeof (unsigned long long)
27267See \`config.log' for more details" "$LINENO" 5; }
27268 else
27269 ac_cv_sizeof_unsigned_long_long=0
27270 fi
b686ecb5
JM
27271fi
27272
27273fi
d5835df2
TV
27274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
27275$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
b686ecb5 27276
b686ecb5 27277
b686ecb5 27278
d5835df2
TV
27279cat >>confdefs.h <<_ACEOF
27280#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
27281_ACEOF
27282
b686ecb5 27283
d5835df2
TV
27284# The cast to long int works around a bug in the HP C Compiler
27285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27287# This bug is HP SR number 8606223364.
27288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
27289$as_echo_n "checking size of unsigned long... " >&6; }
27290if ${ac_cv_sizeof_unsigned_long+:} false; then :
27291 $as_echo_n "(cached) " >&6
b686ecb5 27292else
d5835df2 27293 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
b686ecb5 27294
d5835df2
TV
27295else
27296 if test "$ac_cv_type_unsigned_long" = yes; then
27297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27299as_fn_error 77 "cannot compute sizeof (unsigned long)
27300See \`config.log' for more details" "$LINENO" 5; }
27301 else
27302 ac_cv_sizeof_unsigned_long=0
27303 fi
27304fi
b686ecb5
JM
27305
27306fi
d5835df2
TV
27307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
27308$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
b686ecb5 27309
b686ecb5 27310
5772d798 27311
d5835df2
TV
27312cat >>confdefs.h <<_ACEOF
27313#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
27314_ACEOF
27315
27316
27317# The cast to long int works around a bug in the HP C Compiler
27318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27320# This bug is HP SR number 8606223364.
27321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
27322$as_echo_n "checking size of unsigned __int128... " >&6; }
27323if ${ac_cv_sizeof_unsigned___int128+:} false; then :
5772d798
TT
27324 $as_echo_n "(cached) " >&6
27325else
d5835df2 27326 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
5772d798
TT
27327
27328else
d5835df2
TV
27329 if test "$ac_cv_type_unsigned___int128" = yes; then
27330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27332as_fn_error 77 "cannot compute sizeof (unsigned __int128)
27333See \`config.log' for more details" "$LINENO" 5; }
27334 else
27335 ac_cv_sizeof_unsigned___int128=0
27336 fi
b686ecb5 27337fi
b686ecb5 27338
b686ecb5 27339fi
d5835df2
TV
27340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
27341$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
b686ecb5
JM
27342
27343
b686ecb5
JM
27344
27345cat >>confdefs.h <<_ACEOF
d5835df2 27346#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
b686ecb5
JM
27347_ACEOF
27348
27349
b686ecb5 27350
d5835df2
TV
27351if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
27352 TARGET_PTR="unsigned long"
27353elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
27354 TARGET_PTR="unsigned long long"
27355elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
27356 TARGET_PTR="unsigned __int128"
27357else
27358 TARGET_PTR="unsigned long"
b686ecb5 27359fi
b686ecb5
JM
27360
27361
d5835df2 27362ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
b686ecb5
JM
27363
27364
d5835df2
TV
27365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
27366$as_echo_n "checking for library containing dlopen... " >&6; }
27367if ${ac_cv_search_dlopen+:} false; then :
b686ecb5
JM
27368 $as_echo_n "(cached) " >&6
27369else
27370 ac_func_search_save_LIBS=$LIBS
27371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27372/* end confdefs.h. */
27373
27374/* Override any GCC internal prototype to avoid an error.
27375 Use char because int might match the return type of a GCC
27376 builtin and then its argument prototype would still apply. */
27377#ifdef __cplusplus
27378extern "C"
27379#endif
d5835df2 27380char dlopen ();
b686ecb5
JM
27381int
27382main ()
27383{
d5835df2 27384return dlopen ();
b686ecb5
JM
27385 ;
27386 return 0;
27387}
27388_ACEOF
d5835df2 27389for ac_lib in '' dl; do
b686ecb5
JM
27390 if test -z "$ac_lib"; then
27391 ac_res="none required"
27392 else
27393 ac_res=-l$ac_lib
27394 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27395 fi
27396 if ac_fn_c_try_link "$LINENO"; then :
d5835df2 27397 ac_cv_search_dlopen=$ac_res
b686ecb5
JM
27398fi
27399rm -f core conftest.err conftest.$ac_objext \
27400 conftest$ac_exeext
d5835df2 27401 if ${ac_cv_search_dlopen+:} false; then :
b686ecb5
JM
27402 break
27403fi
27404done
d5835df2 27405if ${ac_cv_search_dlopen+:} false; then :
b686ecb5
JM
27406
27407else
d5835df2 27408 ac_cv_search_dlopen=no
b686ecb5
JM
27409fi
27410rm conftest.$ac_ext
27411LIBS=$ac_func_search_save_LIBS
27412fi
d5835df2
TV
27413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
27414$as_echo "$ac_cv_search_dlopen" >&6; }
27415ac_res=$ac_cv_search_dlopen
b686ecb5
JM
27416if test "$ac_res" != no; then :
27417 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27418
27419fi
27420
27421
b686ecb5 27422
d5835df2
TV
27423
27424# Check whether --with-jit-reader-dir was given.
27425if test "${with_jit_reader_dir+set}" = set; then :
27426 withval=$with_jit_reader_dir;
27427 JIT_READER_DIR=$withval
27428else
27429 JIT_READER_DIR=${libdir}/gdb
b686ecb5 27430fi
b686ecb5
JM
27431
27432
d5835df2
TV
27433 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
27434 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27435 ac_define_dir=`eval echo $JIT_READER_DIR`
27436 ac_define_dir=`eval echo $ac_define_dir`
b686ecb5 27437
d5835df2
TV
27438cat >>confdefs.h <<_ACEOF
27439#define JIT_READER_DIR "$ac_define_dir"
27440_ACEOF
27441
27442
27443
27444
27445 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
27446 if test "x$prefix" = xNONE; then
27447 test_prefix=/usr/local
27448 else
27449 test_prefix=$prefix
27450 fi
27451 else
27452 test_prefix=$exec_prefix
27453 fi
27454 value=0
27455 case ${ac_define_dir} in
27456 "${test_prefix}"|"${test_prefix}/"*|\
27457 '${exec_prefix}'|'${exec_prefix}/'*)
27458 value=1
27459 ;;
27460 esac
27461
27462cat >>confdefs.h <<_ACEOF
27463#define JIT_READER_DIR_RELOCATABLE $value
27464_ACEOF
27465
27466
27467
27468
27469
27470# Check whether --with-expat was given.
27471if test "${with_expat+set}" = set; then :
27472 withval=$with_expat;
b686ecb5 27473else
d5835df2 27474 with_expat=auto
b686ecb5
JM
27475fi
27476
d5835df2
TV
27477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
27478$as_echo_n "checking whether to use expat... " >&6; }
27479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
27480$as_echo "$with_expat" >&6; }
b686ecb5 27481
d5835df2
TV
27482if test "${with_expat}" = no; then
27483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
27484$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
27485 HAVE_LIBEXPAT=no
27486else
b686ecb5
JM
27487
27488
27489
27490
27491
b686ecb5 27492
b686ecb5 27493
b686ecb5 27494
d5835df2 27495 use_additional=yes
b686ecb5 27496
d5835df2
TV
27497 acl_save_prefix="$prefix"
27498 prefix="$acl_final_prefix"
27499 acl_save_exec_prefix="$exec_prefix"
27500 exec_prefix="$acl_final_exec_prefix"
b686ecb5 27501
d5835df2
TV
27502 eval additional_includedir=\"$includedir\"
27503 eval additional_libdir=\"$libdir\"
b686ecb5 27504
d5835df2
TV
27505 exec_prefix="$acl_save_exec_prefix"
27506 prefix="$acl_save_prefix"
b686ecb5 27507
b686ecb5 27508
d5835df2
TV
27509# Check whether --with-libexpat-prefix was given.
27510if test "${with_libexpat_prefix+set}" = set; then :
27511 withval=$with_libexpat_prefix;
27512 if test "X$withval" = "Xno"; then
27513 use_additional=no
27514 else
27515 if test "X$withval" = "X"; then
b686ecb5 27516
d5835df2
TV
27517 acl_save_prefix="$prefix"
27518 prefix="$acl_final_prefix"
27519 acl_save_exec_prefix="$exec_prefix"
27520 exec_prefix="$acl_final_exec_prefix"
b686ecb5 27521
d5835df2
TV
27522 eval additional_includedir=\"$includedir\"
27523 eval additional_libdir=\"$libdir\"
b686ecb5 27524
d5835df2
TV
27525 exec_prefix="$acl_save_exec_prefix"
27526 prefix="$acl_save_prefix"
b686ecb5 27527
d5835df2
TV
27528 else
27529 additional_includedir="$withval/include"
27530 additional_libdir="$withval/lib"
27531 fi
27532 fi
b686ecb5 27533
b686ecb5
JM
27534fi
27535
b686ecb5 27536
d5835df2
TV
27537# Check whether --with-libexpat-type was given.
27538if test "${with_libexpat_type+set}" = set; then :
27539 withval=$with_libexpat_type; with_libexpat_type=$withval
b686ecb5 27540else
d5835df2 27541 with_libexpat_type=auto
b686ecb5
JM
27542fi
27543
d5835df2 27544 lib_type=`eval echo \$with_libexpat_type`
b686ecb5 27545
d5835df2
TV
27546 LIBEXPAT=
27547 LTLIBEXPAT=
27548 INCEXPAT=
27549 rpathdirs=
27550 ltrpathdirs=
27551 names_already_handled=
27552 names_next_round='expat '
27553 while test -n "$names_next_round"; do
27554 names_this_round="$names_next_round"
27555 names_next_round=
27556 for name in $names_this_round; do
27557 already_handled=
27558 for n in $names_already_handled; do
27559 if test "$n" = "$name"; then
27560 already_handled=yes
27561 break
27562 fi
27563 done
27564 if test -z "$already_handled"; then
27565 names_already_handled="$names_already_handled $name"
27566 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
27567 eval value=\"\$HAVE_LIB$uppername\"
27568 if test -n "$value"; then
27569 if test "$value" = yes; then
27570 eval value=\"\$LIB$uppername\"
27571 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
27572 eval value=\"\$LTLIB$uppername\"
27573 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
27574 else
27575 :
27576 fi
27577 else
27578 found_dir=
27579 found_la=
27580 found_so=
27581 found_a=
27582 if test $use_additional = yes; then
27583 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
27584 found_dir="$additional_libdir"
27585 found_so="$additional_libdir/lib$name.$shlibext"
27586 if test -f "$additional_libdir/lib$name.la"; then
27587 found_la="$additional_libdir/lib$name.la"
27588 fi
27589 elif test x$lib_type != xshared; then
27590 if test -f "$additional_libdir/lib$name.$libext"; then
27591 found_dir="$additional_libdir"
27592 found_a="$additional_libdir/lib$name.$libext"
27593 if test -f "$additional_libdir/lib$name.la"; then
27594 found_la="$additional_libdir/lib$name.la"
27595 fi
27596 fi
27597 fi
27598 fi
27599 if test "X$found_dir" = "X"; then
27600 for x in $LDFLAGS $LTLIBEXPAT; do
b686ecb5 27601
d5835df2
TV
27602 acl_save_prefix="$prefix"
27603 prefix="$acl_final_prefix"
27604 acl_save_exec_prefix="$exec_prefix"
27605 exec_prefix="$acl_final_exec_prefix"
27606 eval x=\"$x\"
27607 exec_prefix="$acl_save_exec_prefix"
27608 prefix="$acl_save_prefix"
b686ecb5 27609
d5835df2
TV
27610 case "$x" in
27611 -L*)
27612 dir=`echo "X$x" | sed -e 's/^X-L//'`
27613 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
27614 found_dir="$dir"
27615 found_so="$dir/lib$name.$shlibext"
27616 if test -f "$dir/lib$name.la"; then
27617 found_la="$dir/lib$name.la"
27618 fi
27619 elif test x$lib_type != xshared; then
27620 if test -f "$dir/lib$name.$libext"; then
27621 found_dir="$dir"
27622 found_a="$dir/lib$name.$libext"
27623 if test -f "$dir/lib$name.la"; then
27624 found_la="$dir/lib$name.la"
27625 fi
27626 fi
27627 fi
27628 ;;
27629 esac
27630 if test "X$found_dir" != "X"; then
27631 break
27632 fi
27633 done
27634 fi
27635 if test "X$found_dir" != "X"; then
27636 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
27637 if test "X$found_so" != "X"; then
27638 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
27639 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
27640 else
27641 haveit=
27642 for x in $ltrpathdirs; do
27643 if test "X$x" = "X$found_dir"; then
27644 haveit=yes
27645 break
27646 fi
27647 done
27648 if test -z "$haveit"; then
27649 ltrpathdirs="$ltrpathdirs $found_dir"
27650 fi
27651 if test "$hardcode_direct" = yes; then
27652 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
27653 else
27654 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
27655 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
27656 haveit=
27657 for x in $rpathdirs; do
27658 if test "X$x" = "X$found_dir"; then
27659 haveit=yes
27660 break
27661 fi
27662 done
27663 if test -z "$haveit"; then
27664 rpathdirs="$rpathdirs $found_dir"
27665 fi
27666 else
27667 haveit=
27668 for x in $LDFLAGS $LIBEXPAT; do
b686ecb5 27669
d5835df2
TV
27670 acl_save_prefix="$prefix"
27671 prefix="$acl_final_prefix"
27672 acl_save_exec_prefix="$exec_prefix"
27673 exec_prefix="$acl_final_exec_prefix"
27674 eval x=\"$x\"
27675 exec_prefix="$acl_save_exec_prefix"
27676 prefix="$acl_save_prefix"
b686ecb5 27677
d5835df2
TV
27678 if test "X$x" = "X-L$found_dir"; then
27679 haveit=yes
27680 break
27681 fi
27682 done
27683 if test -z "$haveit"; then
27684 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
27685 fi
27686 if test "$hardcode_minus_L" != no; then
27687 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
27688 else
27689 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
27690 fi
27691 fi
27692 fi
27693 fi
27694 else
27695 if test "X$found_a" != "X"; then
27696 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
27697 else
27698 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
27699 fi
27700 fi
27701 additional_includedir=
27702 case "$found_dir" in
27703 */lib | */lib/)
27704 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
27705 additional_includedir="$basedir/include"
27706 ;;
27707 esac
27708 if test "X$additional_includedir" != "X"; then
27709 if test "X$additional_includedir" != "X/usr/include"; then
27710 haveit=
27711 if test "X$additional_includedir" = "X/usr/local/include"; then
27712 if test -n "$GCC"; then
27713 case $host_os in
27714 linux*) haveit=yes;;
27715 esac
27716 fi
27717 fi
27718 if test -z "$haveit"; then
27719 for x in $CPPFLAGS $INCEXPAT; do
b686ecb5 27720
d5835df2
TV
27721 acl_save_prefix="$prefix"
27722 prefix="$acl_final_prefix"
27723 acl_save_exec_prefix="$exec_prefix"
27724 exec_prefix="$acl_final_exec_prefix"
27725 eval x=\"$x\"
27726 exec_prefix="$acl_save_exec_prefix"
27727 prefix="$acl_save_prefix"
b686ecb5 27728
d5835df2
TV
27729 if test "X$x" = "X-I$additional_includedir"; then
27730 haveit=yes
27731 break
27732 fi
27733 done
27734 if test -z "$haveit"; then
27735 if test -d "$additional_includedir"; then
27736 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
27737 fi
27738 fi
27739 fi
27740 fi
27741 fi
27742 if test -n "$found_la"; then
27743 save_libdir="$libdir"
27744 case "$found_la" in
27745 */* | *\\*) . "$found_la" ;;
27746 *) . "./$found_la" ;;
27747 esac
27748 libdir="$save_libdir"
27749 for dep in $dependency_libs; do
27750 case "$dep" in
27751 -L*)
27752 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
27753 if test "X$additional_libdir" != "X/usr/lib"; then
27754 haveit=
27755 if test "X$additional_libdir" = "X/usr/local/lib"; then
27756 if test -n "$GCC"; then
27757 case $host_os in
27758 linux*) haveit=yes;;
27759 esac
27760 fi
27761 fi
27762 if test -z "$haveit"; then
27763 haveit=
27764 for x in $LDFLAGS $LIBEXPAT; do
b686ecb5 27765
d5835df2
TV
27766 acl_save_prefix="$prefix"
27767 prefix="$acl_final_prefix"
27768 acl_save_exec_prefix="$exec_prefix"
27769 exec_prefix="$acl_final_exec_prefix"
27770 eval x=\"$x\"
27771 exec_prefix="$acl_save_exec_prefix"
27772 prefix="$acl_save_prefix"
b686ecb5 27773
d5835df2
TV
27774 if test "X$x" = "X-L$additional_libdir"; then
27775 haveit=yes
27776 break
27777 fi
27778 done
27779 if test -z "$haveit"; then
27780 if test -d "$additional_libdir"; then
27781 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
27782 fi
27783 fi
27784 haveit=
27785 for x in $LDFLAGS $LTLIBEXPAT; do
b686ecb5 27786
d5835df2
TV
27787 acl_save_prefix="$prefix"
27788 prefix="$acl_final_prefix"
27789 acl_save_exec_prefix="$exec_prefix"
27790 exec_prefix="$acl_final_exec_prefix"
27791 eval x=\"$x\"
27792 exec_prefix="$acl_save_exec_prefix"
27793 prefix="$acl_save_prefix"
b686ecb5 27794
d5835df2
TV
27795 if test "X$x" = "X-L$additional_libdir"; then
27796 haveit=yes
27797 break
27798 fi
27799 done
27800 if test -z "$haveit"; then
27801 if test -d "$additional_libdir"; then
27802 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
27803 fi
27804 fi
27805 fi
27806 fi
27807 ;;
27808 -R*)
27809 dir=`echo "X$dep" | sed -e 's/^X-R//'`
27810 if test "$enable_rpath" != no; then
27811 haveit=
27812 for x in $rpathdirs; do
27813 if test "X$x" = "X$dir"; then
27814 haveit=yes
27815 break
27816 fi
27817 done
27818 if test -z "$haveit"; then
27819 rpathdirs="$rpathdirs $dir"
27820 fi
27821 haveit=
27822 for x in $ltrpathdirs; do
27823 if test "X$x" = "X$dir"; then
27824 haveit=yes
27825 break
27826 fi
27827 done
27828 if test -z "$haveit"; then
27829 ltrpathdirs="$ltrpathdirs $dir"
27830 fi
27831 fi
27832 ;;
27833 -l*)
27834 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
27835 ;;
27836 *.la)
27837 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
27838 ;;
27839 *)
27840 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
27841 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
27842 ;;
27843 esac
27844 done
27845 fi
27846 else
27847 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
27848 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
27849 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
27850 else
27851 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
27852 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
27853 fi
27854 fi
27855 fi
27856 fi
27857 done
27858 done
27859 if test "X$rpathdirs" != "X"; then
27860 if test -n "$hardcode_libdir_separator"; then
27861 alldirs=
27862 for found_dir in $rpathdirs; do
27863 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
27864 done
27865 acl_save_libdir="$libdir"
27866 libdir="$alldirs"
27867 eval flag=\"$hardcode_libdir_flag_spec\"
27868 libdir="$acl_save_libdir"
27869 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
27870 else
27871 for found_dir in $rpathdirs; do
27872 acl_save_libdir="$libdir"
27873 libdir="$found_dir"
27874 eval flag=\"$hardcode_libdir_flag_spec\"
27875 libdir="$acl_save_libdir"
27876 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
27877 done
27878 fi
27879 fi
27880 if test "X$ltrpathdirs" != "X"; then
27881 for found_dir in $ltrpathdirs; do
27882 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
27883 done
27884 fi
b686ecb5 27885
b686ecb5 27886
d5835df2 27887 ac_save_CPPFLAGS="$CPPFLAGS"
b686ecb5 27888
d5835df2
TV
27889 for element in $INCEXPAT; do
27890 haveit=
27891 for x in $CPPFLAGS; do
b686ecb5 27892
d5835df2
TV
27893 acl_save_prefix="$prefix"
27894 prefix="$acl_final_prefix"
27895 acl_save_exec_prefix="$exec_prefix"
27896 exec_prefix="$acl_final_exec_prefix"
27897 eval x=\"$x\"
27898 exec_prefix="$acl_save_exec_prefix"
27899 prefix="$acl_save_prefix"
b686ecb5 27900
d5835df2
TV
27901 if test "X$x" = "X$element"; then
27902 haveit=yes
27903 break
27904 fi
27905 done
27906 if test -z "$haveit"; then
27907 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
27908 fi
27909 done
b686ecb5 27910
b686ecb5 27911
d5835df2
TV
27912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
27913$as_echo_n "checking for libexpat... " >&6; }
27914if ${ac_cv_libexpat+:} false; then :
b686ecb5
JM
27915 $as_echo_n "(cached) " >&6
27916else
b686ecb5 27917
d5835df2
TV
27918 ac_save_LIBS="$LIBS"
27919 LIBS="$LIBS $LIBEXPAT"
27920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 27921/* end confdefs.h. */
d5835df2 27922#include "expat.h"
b686ecb5
JM
27923int
27924main ()
27925{
d5835df2 27926XML_Parser p = XML_ParserCreate (0);
b686ecb5
JM
27927 ;
27928 return 0;
27929}
27930_ACEOF
27931if ac_fn_c_try_link "$LINENO"; then :
d5835df2
TV
27932 ac_cv_libexpat=yes
27933else
27934 ac_cv_libexpat=no
b686ecb5
JM
27935fi
27936rm -f core conftest.err conftest.$ac_objext \
27937 conftest$ac_exeext conftest.$ac_ext
d5835df2 27938 LIBS="$ac_save_LIBS"
b686ecb5 27939
b686ecb5 27940fi
d5835df2
TV
27941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
27942$as_echo "$ac_cv_libexpat" >&6; }
27943 if test "$ac_cv_libexpat" = yes; then
27944 HAVE_LIBEXPAT=yes
b686ecb5 27945
d5835df2 27946$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
b686ecb5 27947
d5835df2
TV
27948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
27949$as_echo_n "checking how to link with libexpat... " >&6; }
27950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
27951$as_echo "$LIBEXPAT" >&6; }
27952 else
27953 HAVE_LIBEXPAT=no
27954 CPPFLAGS="$ac_save_CPPFLAGS"
27955 LIBEXPAT=
27956 LTLIBEXPAT=
27957 fi
27958
27959
27960
27961
27962
27963
27964 if test "$HAVE_LIBEXPAT" != yes; then
27965 if test "$with_expat" = yes; then
27966 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
27967 else
27968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
27969$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
27970 fi
27971 else
27972 save_LIBS=$LIBS
27973 LIBS="$LIBS $LIBEXPAT"
27974 for ac_func in XML_StopParser
27975do :
27976 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
27977if test "x$ac_cv_func_XML_StopParser" = xyes; then :
27978 cat >>confdefs.h <<_ACEOF
27979#define HAVE_XML_STOPPARSER 1
b686ecb5 27980_ACEOF
d5835df2 27981
b686ecb5 27982fi
d5835df2 27983done
b686ecb5 27984
d5835df2
TV
27985 LIBS=$save_LIBS
27986 fi
b686ecb5 27987fi
b686ecb5 27988
b686ecb5 27989
b686ecb5 27990
b686ecb5 27991
d5835df2
TV
27992# --------------------- #
27993# Check for libpython. #
27994# --------------------- #
b686ecb5 27995
b686ecb5 27996
b686ecb5 27997
b686ecb5 27998
b686ecb5 27999
b686ecb5 28000
d5835df2
TV
28001# Check whether --with-python was given.
28002if test "${with_python+set}" = set; then :
28003 withval=$with_python;
28004else
28005 with_python=auto
b686ecb5
JM
28006fi
28007
d5835df2
TV
28008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
28009$as_echo_n "checking whether to use python... " >&6; }
28010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
28011$as_echo "$with_python" >&6; }
b686ecb5 28012
d5835df2
TV
28013if test "${with_python}" = no; then
28014 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
28015$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
28016 have_libpython=no
28017else
28018 case "${with_python}" in
28019 [\\/]* | ?:[\\/]*)
28020 if test -d "${with_python}"; then
28021 # Assume the python binary is ${with_python}/bin/python.
28022 python_prog="${with_python}/bin/python"
28023 python_prefix=
28024 # If python does not exit ${with_python}/bin, then try in
28025 # ${with_python}. On Windows/MinGW, this is where the Python
28026 # executable is.
28027 if test ! -x "${python_prog}"; then
28028 python_prog="${with_python}/python"
28029 python_prefix=
28030 fi
28031 if test ! -x "${python_prog}"; then
ac51afb5 28032 # Fall back to gdb 7.0/7.1 behavior.
d5835df2
TV
28033 python_prog=missing
28034 python_prefix=${with_python}
28035 fi
28036 elif test -x "${with_python}"; then
28037 # While we can't run python compiled for $host (unless host == build),
28038 # the user could write a script that provides the needed information,
28039 # so we support that.
28040 python_prog=${with_python}
28041 python_prefix=
28042 else
28043 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
28044 fi
28045 ;;
28046 */*)
28047 # Disallow --with-python=foo/bar.
28048 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
28049 ;;
28050 *)
28051 # The user has either specified auto, yes, or the name of the python
28052 # program assumed to be in $PATH.
28053 python_prefix=
28054 case "${with_python}" in
28055 yes | auto)
28056 if test "${build}" = "${host}"; then
28057 # Look first for 'python', then 'python3'.
28058 for ac_prog in python python3
b686ecb5
JM
28059do
28060 # Extract the first word of "$ac_prog", so it can be a program name with args.
28061set dummy $ac_prog; ac_word=$2
28062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28063$as_echo_n "checking for $ac_word... " >&6; }
d5835df2 28064if ${ac_cv_path_python_prog_path+:} false; then :
b686ecb5
JM
28065 $as_echo_n "(cached) " >&6
28066else
d5835df2
TV
28067 case $python_prog_path in
28068 [\\/]* | ?:[\\/]*)
28069 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
28070 ;;
28071 *)
28072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b686ecb5
JM
28073for as_dir in $PATH
28074do
28075 IFS=$as_save_IFS
28076 test -z "$as_dir" && as_dir=.
28077 for ac_exec_ext in '' $ac_executable_extensions; do
28078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
d5835df2 28079 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
b686ecb5
JM
28080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28081 break 2
28082 fi
28083done
28084 done
28085IFS=$as_save_IFS
28086
d5835df2
TV
28087 ;;
28088esac
b686ecb5 28089fi
d5835df2
TV
28090python_prog_path=$ac_cv_path_python_prog_path
28091if test -n "$python_prog_path"; then
28092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
28093$as_echo "$python_prog_path" >&6; }
b686ecb5
JM
28094else
28095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28096$as_echo "no" >&6; }
28097fi
28098
28099
d5835df2 28100 test -n "$python_prog_path" && break
b686ecb5 28101done
d5835df2 28102test -n "$python_prog_path" || python_prog_path="missing"
b686ecb5 28103
d5835df2
TV
28104 if test "${python_prog_path}" = missing; then
28105 python_prog=missing
28106 else
28107 python_prog=${python_prog_path}
28108 fi
28109 else
28110 # Not much we can do except assume the cross-compiler will find the
28111 # right files.
28112 python_prog=missing
28113 fi
28114 ;;
28115 *)
28116 # While we can't run python compiled for $host (unless host == build),
28117 # the user could write a script that provides the needed information,
28118 # so we support that.
28119 python_prog="${with_python}"
28120 # Extract the first word of "${python_prog}", so it can be a program name with args.
28121set dummy ${python_prog}; ac_word=$2
28122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28123$as_echo_n "checking for $ac_word... " >&6; }
28124if ${ac_cv_path_python_prog_path+:} false; then :
b686ecb5
JM
28125 $as_echo_n "(cached) " >&6
28126else
d5835df2
TV
28127 case $python_prog_path in
28128 [\\/]* | ?:[\\/]*)
28129 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
28130 ;;
28131 *)
28132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28133for as_dir in $PATH
28134do
28135 IFS=$as_save_IFS
28136 test -z "$as_dir" && as_dir=.
28137 for ac_exec_ext in '' $ac_executable_extensions; do
28138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28139 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
28140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28141 break 2
28142 fi
28143done
28144 done
28145IFS=$as_save_IFS
28146
28147 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
28148 ;;
28149esac
b686ecb5 28150fi
d5835df2
TV
28151python_prog_path=$ac_cv_path_python_prog_path
28152if test -n "$python_prog_path"; then
28153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
28154$as_echo "$python_prog_path" >&6; }
28155else
28156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28157$as_echo "no" >&6; }
b686ecb5 28158fi
b686ecb5 28159
b686ecb5 28160
d5835df2
TV
28161 if test "${python_prog_path}" = missing; then
28162 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
28163 fi
28164 ;;
28165 esac
28166 esac
b686ecb5 28167
d5835df2
TV
28168 if test "${python_prog}" != missing; then
28169 # We have a python program to use, but it may be too old.
28170 # Don't flag an error for --with-python=auto (the default).
28171 have_python_config=yes
28172 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
28173 if test $? != 0; then
28174 have_python_config=failed
28175 if test "${with_python}" != auto; then
28176 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
28177 fi
28178 fi
28179 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
28180 if test $? != 0; then
28181 have_python_config=failed
28182 if test "${with_python}" != auto; then
28183 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
28184 fi
28185 fi
28186 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
28187 if test $? != 0; then
28188 have_python_config=failed
28189 if test "${with_python}" != auto; then
28190 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
28191 fi
28192 fi
28193 else
28194 # We do not have a python executable we can use to determine where
28195 # to find the Python headers and libs. We cannot guess the include
28196 # path from the python_prefix either, because that include path
28197 # depends on the Python version. So, there is nothing much we can
28198 # do except assume that the compiler will be able to find those files.
28199 python_includes=
28200 python_libs=
28201 have_python_config=no
b686ecb5 28202 fi
b686ecb5 28203
d5835df2
TV
28204 # If we have python-config, only try the configuration it provides.
28205 # Otherwise fallback on the old way of trying different versions of
28206 # python in turn.
b686ecb5 28207
d5835df2
TV
28208 have_libpython=no
28209 if test "${have_python_config}" = yes; then
b686ecb5
JM
28210
28211
d5835df2
TV
28212 new_CPPFLAGS=${python_includes}
28213 new_LIBS=${python_libs}
28214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
28215$as_echo_n "checking for python... " >&6; }
28216 save_CPPFLAGS=$CPPFLAGS
28217 save_LIBS=$LIBS
28218 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
28219 LIBS="$new_LIBS $LIBS"
28220 found_usable_python=no
b686ecb5
JM
28221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28222/* end confdefs.h. */
d5835df2 28223#include "Python.h"
b686ecb5
JM
28224int
28225main ()
28226{
d5835df2 28227
d61186d8
TT
28228 #if PY_VERSION_HEX < 0x03040000
28229 # error "Minimum supported Python version is 3.4"
d5835df2
TV
28230 #endif
28231 Py_Initialize ();
b686ecb5
JM
28232
28233 ;
28234 return 0;
28235}
28236_ACEOF
d5835df2
TV
28237if ac_fn_c_try_link "$LINENO"; then :
28238 have_libpython=yes
28239 found_usable_python=yes
28240 PYTHON_CPPFLAGS=$new_CPPFLAGS
28241 PYTHON_LIBS=$new_LIBS
b686ecb5 28242fi
d5835df2
TV
28243rm -f core conftest.err conftest.$ac_objext \
28244 conftest$ac_exeext conftest.$ac_ext
28245 CPPFLAGS=$save_CPPFLAGS
28246 LIBS=$save_LIBS
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
28248$as_echo "${found_usable_python}" >&6; }
b686ecb5
JM
28249
28250 fi
28251
d5835df2
TV
28252 if test "${have_libpython}" = no; then
28253 case "${with_python}" in
28254 yes)
28255 as_fn_error $? "python is missing or unusable" "$LINENO" 5
28256 ;;
28257 auto)
28258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
28259$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
28260 ;;
28261 *)
28262 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
28263 ;;
28264 esac
28265 else
28266 if test -n "${python_prefix}"; then
b686ecb5 28267
d5835df2
TV
28268cat >>confdefs.h <<_ACEOF
28269#define WITH_PYTHON_PATH "${python_prefix}"
28270_ACEOF
b686ecb5 28271
b686ecb5 28272
d5835df2
TV
28273 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
28274 if test "x$prefix" = xNONE; then
28275 test_prefix=/usr/local
28276 else
28277 test_prefix=$prefix
28278 fi
b686ecb5 28279 else
d5835df2
TV
28280 test_prefix=$exec_prefix
28281 fi
28282 value=0
28283 case ${python_prefix} in
28284 "${test_prefix}"|"${test_prefix}/"*|\
28285 '${exec_prefix}'|'${exec_prefix}/'*)
28286 value=1
28287 ;;
28288 esac
b686ecb5 28289
d5835df2
TV
28290cat >>confdefs.h <<_ACEOF
28291#define PYTHON_PATH_RELOCATABLE $value
b686ecb5 28292_ACEOF
d5835df2
TV
28293
28294
b686ecb5 28295 fi
d5835df2
TV
28296 fi
28297fi
b686ecb5
JM
28298
28299
d5835df2
TV
28300# Check whether --with-python-libdir was given.
28301if test "${with_python_libdir+set}" = set; then :
28302 withval=$with_python_libdir;
28303else
b686ecb5 28304
d5835df2
TV
28305 # If no python libdir is specified then select one based on
28306 # python's prefix path.
28307 if test -n "${python_prefix}"; then
28308 with_python_libdir=${python_prefix}/lib
28309 fi
b686ecb5 28310
d5835df2 28311fi
b686ecb5
JM
28312
28313
d5835df2 28314if test "${have_libpython}" != no; then
b686ecb5 28315
d5835df2 28316$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
b686ecb5 28317
d5835df2
TV
28318 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
28319 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
28320 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
28321 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
28322 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
b686ecb5 28323
d5835df2 28324 if test -n "${with_python_libdir}"; then
b686ecb5 28325
d5835df2
TV
28326cat >>confdefs.h <<_ACEOF
28327#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
28328_ACEOF
b686ecb5 28329
b686ecb5 28330
d5835df2
TV
28331 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
28332 if test "x$prefix" = xNONE; then
28333 test_prefix=/usr/local
28334 else
28335 test_prefix=$prefix
28336 fi
28337 else
28338 test_prefix=$exec_prefix
28339 fi
28340 value=0
28341 case ${with_python_libdir} in
28342 "${test_prefix}"|"${test_prefix}/"*|\
28343 '${exec_prefix}'|'${exec_prefix}/'*)
28344 value=1
28345 ;;
28346 esac
b686ecb5 28347
d5835df2
TV
28348cat >>confdefs.h <<_ACEOF
28349#define PYTHON_LIBDIR_RELOCATABLE $value
28350_ACEOF
b686ecb5 28351
b686ecb5 28352
d5835df2 28353 fi
b686ecb5 28354
d5835df2
TV
28355 # Flags needed to compile Python code (taken from python-config --cflags).
28356 # We cannot call python-config directly because it will output whatever was
28357 # used when compiling the Python interpreter itself, including flags which
28358 # would make the python-related objects be compiled differently from the
28359 # rest of GDB (e.g., -O2 and -fPIC).
28360 if test "${GCC}" = yes; then
28361 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
28362 # Python headers recommend -DNDEBUG, but it's unclear if that just
28363 # refers to building Python itself. In release mode, though, it
28364 # doesn't hurt for the Python code in gdb to follow.
28365 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
28366 fi
b686ecb5 28367
d5835df2
TV
28368 if test "x${tentative_python_cflags}" != x; then
28369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
28370$as_echo_n "checking compiler flags for python code... " >&6; }
28371 for flag in ${tentative_python_cflags}; do
28372 # Check that the compiler accepts it
28373 saved_CFLAGS="$CFLAGS"
28374 CFLAGS="$CFLAGS $flag"
28375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28376/* end confdefs.h. */
b686ecb5 28377
d5835df2
TV
28378int
28379main ()
28380{
b686ecb5 28381
d5835df2
TV
28382 ;
28383 return 0;
28384}
28385_ACEOF
28386if ac_fn_c_try_compile "$LINENO"; then :
28387 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
b686ecb5 28388fi
d5835df2
TV
28389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28390 CFLAGS="$saved_CFLAGS"
28391 done
28392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
28393$as_echo "${PYTHON_CFLAGS}" >&6; }
28394 fi
b686ecb5 28395
d5835df2
TV
28396 # On x64 Windows, Python's include headers, and pyconfig.h in
28397 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
28398 # version of Windows. Unfortunately, MS_WIN64 is only defined if
28399 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
28400 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
28401 # The issue was reported to the Python community, but still isn't
28402 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
b686ecb5 28403
d5835df2
TV
28404 case "$gdb_host" in
28405 mingw64)
28406 if test "${GCC}" = yes; then
28407 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
28408 fi
28409 ;;
28410 esac
b686ecb5 28411else
d5835df2
TV
28412 # Even if Python support is not compiled in, we need to have this file
28413 # included so that the "python" command, et.al., still exists.
28414 CONFIG_OBS="$CONFIG_OBS python/python.o"
28415 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
b686ecb5
JM
28416fi
28417
d5835df2
TV
28418# Work around Python http://bugs.python.org/issue10112. See also
28419# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
28420# no effect. Note that the only test after this that uses Python is
28421# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
28422# run without -export-dynamic too.
28423PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
b686ecb5 28424
5e030278 28425
5e030278 28426
5e030278 28427
d5835df2
TV
28428 if test "${have_libpython}" != no; then
28429 HAVE_PYTHON_TRUE=
28430 HAVE_PYTHON_FALSE='#'
28431else
28432 HAVE_PYTHON_TRUE='#'
28433 HAVE_PYTHON_FALSE=
28434fi
5e030278 28435
5e030278 28436
d5835df2
TV
28437# -------------------- #
28438# Check for libguile. #
28439# -------------------- #
5e030278 28440
5e030278 28441
5e030278
TT
28442
28443
5e030278
TT
28444
28445
d5835df2
TV
28446# Check whether --with-guile was given.
28447if test "${with_guile+set}" = set; then :
28448 withval=$with_guile;
28449else
28450 with_guile=auto
28451fi
5e030278 28452
d5835df2
TV
28453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
28454$as_echo_n "checking whether to use guile... " >&6; }
28455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
28456$as_echo "$with_guile" >&6; }
5e030278 28457
d5835df2
TV
28458# Extract the first word of "pkg-config", so it can be a program name with args.
28459set dummy pkg-config; ac_word=$2
28460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28461$as_echo_n "checking for $ac_word... " >&6; }
28462if ${ac_cv_path_pkg_config_prog_path+:} false; then :
28463 $as_echo_n "(cached) " >&6
28464else
28465 case $pkg_config_prog_path in
28466 [\\/]* | ?:[\\/]*)
28467 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
28468 ;;
28469 *)
28470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28471for as_dir in $PATH
28472do
28473 IFS=$as_save_IFS
28474 test -z "$as_dir" && as_dir=.
28475 for ac_exec_ext in '' $ac_executable_extensions; do
28476 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28477 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
28478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28479 break 2
28480 fi
28481done
05ea2a05 28482 done
d5835df2 28483IFS=$as_save_IFS
5e030278 28484
d5835df2
TV
28485 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
28486 ;;
28487esac
28488fi
28489pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
28490if test -n "$pkg_config_prog_path"; then
28491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
28492$as_echo "$pkg_config_prog_path" >&6; }
5e030278 28493else
d5835df2
TV
28494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28495$as_echo "no" >&6; }
28496fi
05ea2a05 28497
d5835df2
TV
28498
28499
28500try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
28501have_libguile=no
28502case "${with_guile}" in
28503no)
28504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
28505$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
28506 ;;
28507auto)
28508 if test "${pkg_config_prog_path}" = "missing"; then
28509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
28510$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
28511 else
28512
28513 pkg_config=${pkg_config_prog_path}
28514 guile_version_list=${try_guile_versions}
28515 flag_errors=no
28516
28517 found_usable_guile=checking
28518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
28519$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
28520 for guile_version in ${guile_version_list}; do
28521 ${pkg_config} --exists ${guile_version} 2>/dev/null
28522 if test $? != 0; then
28523 continue
28524 fi
28525 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
28526 if test $? != 0; then
28527 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
28528 fi
28529 new_LIBS=`${pkg_config} --libs ${guile_version}`
28530 if test $? != 0; then
28531 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
28532 fi
28533 found_usable_guile=${guile_version}
28534 break
28535 done
28536 if test "${found_usable_guile}" = "checking"; then
28537 if test "${flag_errors}" = "yes"; then
28538 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
28539 else
28540 found_usable_guile=no
28541 fi
28542 fi
28543 if test "${found_usable_guile}" != no; then
28544 save_CPPFLAGS=$CPPFLAGS
28545 save_LIBS=$LIBS
28546 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
28547 LIBS="$LIBS $new_LIBS"
05ea2a05 28548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 28549/* end confdefs.h. */
d5835df2 28550#include "libguile.h"
5e030278
TT
28551int
28552main ()
28553{
d5835df2 28554scm_init_guile ();
5e030278
TT
28555 ;
28556 return 0;
28557}
28558_ACEOF
05ea2a05 28559if ac_fn_c_try_link "$LINENO"; then :
d5835df2
TV
28560 have_libguile=yes
28561 GUILE_CPPFLAGS=$new_CPPFLAGS
28562 GUILE_LIBS=$new_LIBS
5e030278 28563else
d5835df2 28564 found_usable_guile=no
5e030278 28565fi
05ea2a05
TT
28566rm -f core conftest.err conftest.$ac_objext \
28567 conftest$ac_exeext conftest.$ac_ext
d5835df2
TV
28568 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
28569if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
21987b9c 28570
d5835df2 28571$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
5e030278 28572
5e030278 28573
05ea2a05 28574fi
05ea2a05 28575
d5835df2
TV
28576 CPPFLAGS=$save_CPPFLAGS
28577 LIBS=$save_LIBS
28578 if test "${found_usable_guile}" = no; then
28579 if test "${flag_errors}" = yes; then
28580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28582as_fn_error $? "linking guile version ${guile_version} test program failed
28583See \`config.log' for more details" "$LINENO" 5; }
28584 fi
28585 fi
28586 fi
28587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
28588$as_echo "${found_usable_guile}" >&6; }
5e030278 28589
d5835df2
TV
28590 fi
28591 ;;
28592yes)
28593 if test "${pkg_config_prog_path}" = "missing"; then
28594 as_fn_error $? "pkg-config not found" "$LINENO" 5
28595 fi
5e030278 28596
d5835df2
TV
28597 pkg_config=${pkg_config_prog_path}
28598 guile_version_list=${try_guile_versions}
28599 flag_errors=yes
05ea2a05 28600
d5835df2
TV
28601 found_usable_guile=checking
28602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
28603$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
28604 for guile_version in ${guile_version_list}; do
28605 ${pkg_config} --exists ${guile_version} 2>/dev/null
28606 if test $? != 0; then
28607 continue
28608 fi
28609 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
28610 if test $? != 0; then
28611 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
28612 fi
28613 new_LIBS=`${pkg_config} --libs ${guile_version}`
28614 if test $? != 0; then
28615 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
28616 fi
28617 found_usable_guile=${guile_version}
28618 break
28619 done
28620 if test "${found_usable_guile}" = "checking"; then
28621 if test "${flag_errors}" = "yes"; then
28622 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
28623 else
28624 found_usable_guile=no
05ea2a05
TT
28625 fi
28626 fi
d5835df2
TV
28627 if test "${found_usable_guile}" != no; then
28628 save_CPPFLAGS=$CPPFLAGS
28629 save_LIBS=$LIBS
28630 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
28631 LIBS="$LIBS $new_LIBS"
28632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5dfe4bfc 28633/* end confdefs.h. */
d5835df2 28634#include "libguile.h"
5dfe4bfc
TT
28635int
28636main ()
28637{
d5835df2 28638scm_init_guile ();
5dfe4bfc
TT
28639 ;
28640 return 0;
28641}
28642_ACEOF
d5835df2
TV
28643if ac_fn_c_try_link "$LINENO"; then :
28644 have_libguile=yes
28645 GUILE_CPPFLAGS=$new_CPPFLAGS
28646 GUILE_LIBS=$new_LIBS
28647else
28648 found_usable_guile=no
5dfe4bfc 28649fi
d5835df2
TV
28650rm -f core conftest.err conftest.$ac_objext \
28651 conftest$ac_exeext conftest.$ac_ext
28652 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
28653if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
c8693053 28654
d5835df2 28655$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
c8693053 28656
c8693053
RO
28657
28658fi
28659
d5835df2
TV
28660 CPPFLAGS=$save_CPPFLAGS
28661 LIBS=$save_LIBS
28662 if test "${found_usable_guile}" = no; then
28663 if test "${flag_errors}" = yes; then
28664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28666as_fn_error $? "linking guile version ${guile_version} test program failed
28667See \`config.log' for more details" "$LINENO" 5; }
28668 fi
28669 fi
28670 fi
28671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
28672$as_echo "${found_usable_guile}" >&6; }
c8693053 28673
d5835df2
TV
28674 ;;
28675[\\/]* | ?:[\\/]*)
28676 if test -x "${with_guile}"; then
c8693053 28677
d5835df2
TV
28678 pkg_config=${with_guile}
28679 guile_version_list=${try_guile_versions}
28680 flag_errors=yes
e9bcb658 28681
d5835df2
TV
28682 found_usable_guile=checking
28683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
28684$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
28685 for guile_version in ${guile_version_list}; do
28686 ${pkg_config} --exists ${guile_version} 2>/dev/null
28687 if test $? != 0; then
28688 continue
28689 fi
28690 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
28691 if test $? != 0; then
28692 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
28693 fi
28694 new_LIBS=`${pkg_config} --libs ${guile_version}`
28695 if test $? != 0; then
28696 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
28697 fi
28698 found_usable_guile=${guile_version}
28699 break
28700 done
28701 if test "${found_usable_guile}" = "checking"; then
28702 if test "${flag_errors}" = "yes"; then
28703 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
28704 else
28705 found_usable_guile=no
28706 fi
28707 fi
28708 if test "${found_usable_guile}" != no; then
28709 save_CPPFLAGS=$CPPFLAGS
28710 save_LIBS=$LIBS
28711 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
28712 LIBS="$LIBS $new_LIBS"
28713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28714/* end confdefs.h. */
28715#include "libguile.h"
e9bcb658
GB
28716int
28717main ()
28718{
d5835df2 28719scm_init_guile ();
e9bcb658
GB
28720 ;
28721 return 0;
28722}
28723_ACEOF
d5835df2
TV
28724if ac_fn_c_try_link "$LINENO"; then :
28725 have_libguile=yes
28726 GUILE_CPPFLAGS=$new_CPPFLAGS
28727 GUILE_LIBS=$new_LIBS
e9bcb658 28728else
d5835df2 28729 found_usable_guile=no
06825bd1 28730fi
d5835df2
TV
28731rm -f core conftest.err conftest.$ac_objext \
28732 conftest$ac_exeext conftest.$ac_ext
28733 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
28734if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
06825bd1 28735
d5835df2 28736$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
a3828db0 28737
06825bd1 28738
d5835df2
TV
28739fi
28740
28741 CPPFLAGS=$save_CPPFLAGS
28742 LIBS=$save_LIBS
28743 if test "${found_usable_guile}" = no; then
28744 if test "${flag_errors}" = yes; then
28745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28747as_fn_error $? "linking guile version ${guile_version} test program failed
28748See \`config.log' for more details" "$LINENO" 5; }
28749 fi
28750 fi
28751 fi
28752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
28753$as_echo "${found_usable_guile}" >&6; }
05ea2a05 28754
d5835df2
TV
28755 else
28756 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
28757 fi
28758 ;;
28759"" | */*)
28760 # Disallow --with=guile="" and --with-guile=foo/bar.
28761 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
28762 ;;
28763*)
28764 # A space separate list of guile versions to try, in order.
28765 if test "${pkg_config_prog_path}" = "missing"; then
28766 as_fn_error $? "pkg-config not found" "$LINENO" 5
28767 fi
c8693053 28768
d5835df2
TV
28769 pkg_config=${pkg_config_prog_path}
28770 guile_version_list=${with_guile}
28771 flag_errors=yes
05ea2a05 28772
d5835df2
TV
28773 found_usable_guile=checking
28774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
28775$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
28776 for guile_version in ${guile_version_list}; do
28777 ${pkg_config} --exists ${guile_version} 2>/dev/null
28778 if test $? != 0; then
28779 continue
28780 fi
28781 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
28782 if test $? != 0; then
28783 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
28784 fi
28785 new_LIBS=`${pkg_config} --libs ${guile_version}`
28786 if test $? != 0; then
28787 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
28788 fi
28789 found_usable_guile=${guile_version}
28790 break
28791 done
28792 if test "${found_usable_guile}" = "checking"; then
28793 if test "${flag_errors}" = "yes"; then
28794 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
28795 else
28796 found_usable_guile=no
28797 fi
28798 fi
28799 if test "${found_usable_guile}" != no; then
28800 save_CPPFLAGS=$CPPFLAGS
28801 save_LIBS=$LIBS
28802 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
28803 LIBS="$LIBS $new_LIBS"
28804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28805/* end confdefs.h. */
28806#include "libguile.h"
bec39cab
AC
28807int
28808main ()
28809{
d5835df2 28810scm_init_guile ();
064ef605
DJ
28811 ;
28812 return 0;
28813}
28814_ACEOF
d5835df2
TV
28815if ac_fn_c_try_link "$LINENO"; then :
28816 have_libguile=yes
28817 GUILE_CPPFLAGS=$new_CPPFLAGS
28818 GUILE_LIBS=$new_LIBS
05ea2a05 28819else
d5835df2 28820 found_usable_guile=no
05ea2a05 28821fi
d5835df2
TV
28822rm -f core conftest.err conftest.$ac_objext \
28823 conftest$ac_exeext conftest.$ac_ext
28824 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
28825if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
05ea2a05 28826
d5835df2 28827$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
05ea2a05 28828
05ea2a05 28829
d5835df2
TV
28830fi
28831
28832 CPPFLAGS=$save_CPPFLAGS
28833 LIBS=$save_LIBS
28834 if test "${found_usable_guile}" = no; then
28835 if test "${flag_errors}" = yes; then
28836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28838as_fn_error $? "linking guile version ${guile_version} test program failed
28839See \`config.log' for more details" "$LINENO" 5; }
28840 fi
28841 fi
28842 fi
28843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
28844$as_echo "${found_usable_guile}" >&6; }
28845
28846 ;;
28847esac
05ea2a05 28848
d5835df2
TV
28849if test "${have_libguile}" != no; then
28850 case "${with_guile}" in
28851 [\\/]* | ?:[\\/]*)
c8693053 28852
d5835df2
TV
28853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
28854$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
28855if ${ac_cv_guild_program_name+:} false; then :
05ea2a05 28856 $as_echo_n "(cached) " >&6
064ef605 28857else
d5835df2 28858 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
05ea2a05 28859
d5835df2
TV
28860 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
28861 # the 'guild' and 'bindir' variables. In that case, try to guess
28862 # what the program name is, at the risk of getting it wrong if
28863 # Guile was configured with '--program-suffix' or similar.
28864 if test "x$ac_cv_guild_program_name" = "x"; then
28865 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
28866 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
28867 fi
05ea2a05 28868
70f9f479 28869fi
d5835df2
TV
28870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
28871$as_echo "$ac_cv_guild_program_name" >&6; }
bec39cab 28872
d5835df2
TV
28873 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
28874 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
28875 fi
70f9f479 28876
d5835df2 28877 GUILD="$ac_cv_guild_program_name"
05ea2a05 28878
05ea2a05 28879
d5835df2
TV
28880 ;;
28881 *)
c8693053 28882
d5835df2
TV
28883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
28884$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
28885if ${ac_cv_guild_program_name+:} false; then :
81ecdfbb 28886 $as_echo_n "(cached) " >&6
bec39cab 28887else
d5835df2 28888 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
05ea2a05 28889
d5835df2
TV
28890 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
28891 # the 'guild' and 'bindir' variables. In that case, try to guess
28892 # what the program name is, at the risk of getting it wrong if
28893 # Guile was configured with '--program-suffix' or similar.
28894 if test "x$ac_cv_guild_program_name" = "x"; then
28895 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
28896 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
28897 fi
064ef605 28898
5c7f2947 28899fi
d5835df2
TV
28900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
28901$as_echo "$ac_cv_guild_program_name" >&6; }
05ea2a05 28902
d5835df2
TV
28903 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
28904 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
28905 fi
05ea2a05 28906
d5835df2 28907 GUILD="$ac_cv_guild_program_name"
c8693053 28908
05ea2a05 28909
d5835df2
TV
28910 ;;
28911 esac
a3828db0 28912
96d7229d 28913
d5835df2
TV
28914 if test "$cross_compiling" = no; then
28915 GUILD_TARGET_FLAG=
28916 else
28917 GUILD_TARGET_FLAG="--target=$host"
28918 fi
78434e59 28919
78434e59 28920
54019719 28921
c8693053 28922
d5835df2
TV
28923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
28924$as_echo_n "checking whether guild supports this host... " >&6; }
28925if ${ac_cv_guild_ok+:} false; then :
81ecdfbb 28926 $as_echo_n "(cached) " >&6
bec39cab 28927else
d5835df2
TV
28928 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
28929 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
28930 ac_cv_guild_ok=yes
28931 else
28932 ac_cv_guild_ok=no
28933 fi
97bf5e38 28934fi
d5835df2
TV
28935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
28936$as_echo "$ac_cv_guild_ok" >&6; }
81ecdfbb 28937
d5835df2
TV
28938 if test "$ac_cv_guild_ok" = no; then
28939 have_libguile=no
28940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
28941$as_echo "$as_me: WARNING: disabling guile support" >&2;}
28942 fi
28943fi
97bf5e38 28944
d5835df2 28945if test "${have_libguile}" != no; then
a3828db0 28946
d5835df2 28947$as_echo "#define HAVE_GUILE 1" >>confdefs.h
c8693053 28948
d5835df2
TV
28949 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
28950 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
28951 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
28952 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
28953 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
a3828db0 28954
d5835df2
TV
28955 save_LIBS="$LIBS"
28956 save_CPPFLAGS="$CPPFLAGS"
28957 LIBS="$GUILE_LIBS"
28958 CPPFLAGS="$GUILE_CPPFLAGS"
28959 for ac_func in scm_new_smob
28960do :
28961 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
28962if test "x$ac_cv_func_scm_new_smob" = xyes; then :
28963 cat >>confdefs.h <<_ACEOF
28964#define HAVE_SCM_NEW_SMOB 1
bec39cab 28965_ACEOF
05ea2a05 28966
c906108c 28967fi
d5835df2
TV
28968done
28969
28970 LIBS="$save_LIBS"
28971 CPPFLAGS="$save_CPPFLAGS"
28972else
28973 # Even if Guile support is not compiled in, we need to have these files
28974 # included.
28975 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
28976 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
c906108c 28977fi
c3f6f71d 28978
c906108c 28979
d5835df2
TV
28980 if test "${have_libguile}" != no; then
28981 HAVE_GUILE_TRUE=
28982 HAVE_GUILE_FALSE='#'
28983else
28984 HAVE_GUILE_TRUE='#'
28985 HAVE_GUILE_FALSE=
28986fi
db1ff28b 28987
05ea2a05 28988
c4375bc5
GL
28989# ---------------------------- #
28990# Check for compile support. #
28991# ---------------------------- #
28992
28993# Check whether --enable-gdb-compile was given.
28994if test "${enable_gdb_compile+set}" = set; then :
28995 enableval=$enable_gdb_compile;
28996 case $enableval in
28997 yes | no)
28998 ;;
28999 *)
29000 as_fn_error $? "bad value $enableval for --enable-gdb-compile" "$LINENO" 5
29001 ;;
29002 esac
29003
29004else
4b42385c 29005 enable_gdb_compile=default
c4375bc5
GL
29006fi
29007
29008
7f1f81d6
GL
29009if test "${enable_gdb_compile}" = "default"; then
29010 enable_gdb_compile=${enable_gdb_dwarf_support}
29011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Defaulting compile support to '${enable_gdb_dwarf_support}'" >&5
29012$as_echo "$as_me: WARNING: Defaulting compile support to '${enable_gdb_dwarf_support}'" >&2;}
29013fi
29014
29015if test "${enable_gdb_compile}" = "yes"; then
29016 if test "${enable_gdb_dwarf_support}" = "no"; then
29017 as_fn_error $? "enabling gdb compile requires dwarf support" "$LINENO" 5
29018 fi
29019
29020$as_echo "#define HAVE_COMPILE 1" >>confdefs.h
29021
29022 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GCC_COMPILE_OBS)"
29023else
c4375bc5
GL
29024 # Even if compile support is not enabled, we need this file to define
29025 # the "compile" command.
29026 CONFIG_OBS="$CONFIG_OBS compile/compile.o"
29027 CONFIG_SRCS="$CONFIG_SRCS compile/compile.c"
7f1f81d6 29028fi
c4375bc5 29029
d5835df2
TV
29030# ---------------------------- #
29031# Check for source highlight. #
29032# ---------------------------- #
c8693053 29033
d5835df2
TV
29034SRCHIGH_LIBS=
29035SRCHIGH_CFLAGS=
05ea2a05 29036
d5835df2
TV
29037# Check whether --enable-source-highlight was given.
29038if test "${enable_source_highlight+set}" = set; then :
29039 enableval=$enable_source_highlight;
29040 case $enableval in
29041 yes | no | auto)
29042 ;;
29043 *)
29044 as_fn_error $? "bad value $enableval for --enable-source-highlight" "$LINENO" 5
29045 ;;
29046 esac
05ea2a05 29047
d5835df2
TV
29048else
29049 enable_source_highlight=auto
db1ff28b 29050fi
db1ff28b 29051
db1ff28b 29052
d5835df2
TV
29053if test "${enable_source_highlight}" != "no"; then
29054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
29055$as_echo_n "checking for the source-highlight library... " >&6; }
29056 if test "${pkg_config_prog_path}" = "missing"; then
29057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
29058$as_echo "no - pkg-config not found" >&6; }
29059 if test "${enable_source_highlight}" = "yes"; then
29060 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
29061 fi
29062 else
29063 if ${pkg_config_prog_path} --exists source-highlight; then
29064 case "$LDFLAGS" in
29065 *static-libstdc*)
29066 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
29067 ;;
29068 esac
db1ff28b 29069
d5835df2
TV
29070 srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
29071 srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight`
05ea2a05 29072
d5835df2
TV
29073 # Now that we have found a source-highlight library, check if we can use
29074 # it. In particular, we're trying to detect the situation that the
29075 # library is using the new libstdc++ library abi ( see
29076 # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
29077 # while the compiler being used to compile gdb is using the old abi.
29078 # Such a situation will result in an undefined reference to
29079 # srchilite::SourceHighlight::SourceHighlight(std::string const&).
29080 # This situation can occur for instance when using a source highlight
29081 # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5.
29082 ac_ext=cpp
29083ac_cpp='$CXXCPP $CPPFLAGS'
29084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
05ea2a05 29087
d5835df2
TV
29088 save_CXXFLAGS="$CXXFLAGS"
29089 save_LIBS="$LIBS"
29090 CXXFLAGS="$CXXFLAGS $srchigh_pkg_cflags"
29091 LIBS="$LIBS $srchigh_pkg_libs"
29092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093/* end confdefs.h. */
29094#include <srchilite/sourcehighlight.h>
29095int
29096main ()
29097{
29098std::string outlang = "esc.outlang";
29099 new srchilite::SourceHighlight (outlang);
29100
29101 ;
29102 return 0;
29103}
29104_ACEOF
29105if ac_fn_cxx_try_link "$LINENO"; then :
29106 have_usable_source_highlight=yes
27ca5dad 29107else
d5835df2
TV
29108 have_usable_source_highlight=no
29109
27ca5dad 29110fi
d5835df2
TV
29111rm -f core conftest.err conftest.$ac_objext \
29112 conftest$ac_exeext conftest.$ac_ext
29113 CXXFLAGS="$save_CXXFLAGS"
29114 LIBS="$save_LIBS"
29115 ac_ext=c
29116ac_cpp='$CPP $CPPFLAGS'
29117ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29118ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29119ac_compiler_gnu=$ac_cv_c_compiler_gnu
b6fb30ed 29120
3862412b 29121
d5835df2 29122 if test "${have_usable_source_highlight}" = "yes"; then
b6fb30ed 29123
d5835df2 29124$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
5164c117 29125
d5835df2
TV
29126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29127$as_echo "yes" >&6; }
29128 SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
29129 SRCHIGH_LIBS="$srchigh_pkg_libs"
29130 else
29131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29132$as_echo "no" >&6; }
29133 if test "${enable_source_highlight}" = "yes"; then
29134 as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
29135 fi
29136 fi
29137 else
29138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29139$as_echo "no" >&6; }
29140 if test "${enable_source_highlight}" = "yes"; then
29141 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
29142 fi
29143 fi
29144 fi
29145fi
5164c117 29146
b6fb30ed 29147
b6fb30ed 29148
d5835df2
TV
29149# ------------------------- #
29150# Checks for header files. #
29151# ------------------------- #
5164c117 29152
d5835df2
TV
29153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
29154$as_echo_n "checking for ANSI C header files... " >&6; }
29155if ${ac_cv_header_stdc+:} false; then :
29156 $as_echo_n "(cached) " >&6
29157else
29158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29159/* end confdefs.h. */
29160#include <stdlib.h>
29161#include <stdarg.h>
29162#include <string.h>
29163#include <float.h>
6fea9e18 29164
d5835df2
TV
29165int
29166main ()
29167{
6fea9e18 29168
d5835df2
TV
29169 ;
29170 return 0;
29171}
29172_ACEOF
29173if ac_fn_c_try_compile "$LINENO"; then :
29174 ac_cv_header_stdc=yes
29175else
29176 ac_cv_header_stdc=no
29177fi
29178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 29179
d5835df2
TV
29180if test $ac_cv_header_stdc = yes; then
29181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
29182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29183/* end confdefs.h. */
29184#include <string.h>
b6fb30ed 29185
d5835df2
TV
29186_ACEOF
29187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29188 $EGREP "memchr" >/dev/null 2>&1; then :
6fea9e18 29189
d5835df2
TV
29190else
29191 ac_cv_header_stdc=no
29192fi
29193rm -f conftest*
6fea9e18 29194
d5835df2 29195fi
6fea9e18 29196
d5835df2
TV
29197if test $ac_cv_header_stdc = yes; then
29198 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
29199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29200/* end confdefs.h. */
29201#include <stdlib.h>
451928c5 29202
d5835df2
TV
29203_ACEOF
29204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29205 $EGREP "free" >/dev/null 2>&1; then :
60ca704f 29206
d5835df2
TV
29207else
29208 ac_cv_header_stdc=no
29209fi
29210rm -f conftest*
05ea2a05 29211
d5835df2 29212fi
05ea2a05 29213
d5835df2
TV
29214if test $ac_cv_header_stdc = yes; then
29215 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
29216 if test "$cross_compiling" = yes; then :
29217 :
29218else
29219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29220/* end confdefs.h. */
29221#include <ctype.h>
29222#include <stdlib.h>
29223#if ((' ' & 0x0FF) == 0x020)
29224# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
29225# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
29226#else
29227# define ISLOWER(c) \
29228 (('a' <= (c) && (c) <= 'i') \
29229 || ('j' <= (c) && (c) <= 'r') \
29230 || ('s' <= (c) && (c) <= 'z'))
29231# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
29232#endif
29233
29234#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
29235int
29236main ()
29237{
29238 int i;
29239 for (i = 0; i < 256; i++)
29240 if (XOR (islower (i), ISLOWER (i))
29241 || toupper (i) != TOUPPER (i))
29242 return 2;
29243 return 0;
29244}
29245_ACEOF
29246if ac_fn_c_try_run "$LINENO"; then :
451928c5 29247
d5835df2
TV
29248else
29249 ac_cv_header_stdc=no
29250fi
29251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29252 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 29253fi
451928c5 29254
d5835df2
TV
29255fi
29256fi
29257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
29258$as_echo "$ac_cv_header_stdc" >&6; }
29259if test $ac_cv_header_stdc = yes; then
29260
29261$as_echo "#define STDC_HEADERS 1" >>confdefs.h
05ea2a05 29262
05ea2a05 29263fi
60ca704f 29264
11fdaff1 29265for ac_header in \
2a9d7b4a
AL
29266 IOKit/serial/ioss.h \
29267 asm/termios.h \
11fdaff1
SM
29268 machine/reg.h \
29269 nlist.h \
29270 ptrace.h \
29271 sys/debugreg.h \
29272 sys/file.h \
29273 sys/filio.h \
29274 sys/ioctl.h \
29275 sys/param.h \
29276 sys/procctl.h \
29277 sys/ptrace.h \
29278 sys/reg.h \
29279 sys/resource.h \
29280 termios.h \
29281 thread_db.h \
29282
d5835df2
TV
29283do :
29284 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29285ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29286if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29287 cat >>confdefs.h <<_ACEOF
29288#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29289_ACEOF
451928c5 29290
d5835df2 29291fi
5593a99a 29292
d5835df2 29293done
d45fe813 29294
11fdaff1 29295
d5835df2
TV
29296for ac_header in sys/user.h
29297do :
29298 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
29299# include <sys/param.h>
29300#endif
bec39cab 29301
d5835df2
TV
29302"
29303if test "x$ac_cv_header_sys_user_h" = xyes; then :
29304 cat >>confdefs.h <<_ACEOF
29305#define HAVE_SYS_USER_H 1
29306_ACEOF
d45fe813 29307
d5835df2 29308fi
c906108c 29309
d5835df2 29310done
43b7e92b 29311
43b7e92b 29312
11fdaff1
SM
29313for ac_header in \
29314 curses.h \
29315 cursesX.h \
29316 ncurses.h \
29317 ncurses/ncurses.h \
29318 ncurses/term.h \
29319 ncursesw/ncurses.h \
29320
d5835df2
TV
29321do :
29322 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29323ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29324if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29325 cat >>confdefs.h <<_ACEOF
29326#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29327_ACEOF
29328
29329fi
29330
29331done
29332
11fdaff1 29333
d5835df2
TV
29334for ac_header in term.h
29335do :
29336 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
29337# include <curses.h>
29338#endif
29339
29340"
29341if test "x$ac_cv_header_term_h" = xyes; then :
29342 cat >>confdefs.h <<_ACEOF
29343#define HAVE_TERM_H 1
29344_ACEOF
29345
29346fi
29347
29348done
29349
29350
29351for ac_header in sys/socket.h
29352do :
29353 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
29354if test "x$ac_cv_header_sys_socket_h" = xyes; then :
29355 cat >>confdefs.h <<_ACEOF
29356#define HAVE_SYS_SOCKET_H 1
29357_ACEOF
29358
29359fi
29360
29361done
29362
29363for ac_header in ws2tcpip.h
29364do :
29365 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
29366if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
29367 cat >>confdefs.h <<_ACEOF
29368#define HAVE_WS2TCPIP_H 1
29369_ACEOF
29370
29371fi
29372
29373done
29374
29375for ac_header in execinfo.h
29376do :
29377 ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
29378if test "x$ac_cv_header_execinfo_h" = xyes; then :
29379 cat >>confdefs.h <<_ACEOF
29380#define HAVE_EXECINFO_H 1
29381_ACEOF
29382
29383fi
29384
29385done
29386
29387
29388# ------------------------- #
29389# Checks for declarations. #
29390# ------------------------- #
29391
d5835df2
TV
29392ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
29393if test "x$ac_cv_have_decl_ffs" = xyes; then :
29394 ac_have_decl=1
29395else
29396 ac_have_decl=0
29397fi
29398
29399cat >>confdefs.h <<_ACEOF
29400#define HAVE_DECL_FFS $ac_have_decl
29401_ACEOF
908ff469 29402
d5835df2
TV
29403ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
29404if test "x$ac_cv_have_decl_asprintf" = xyes; then :
29405 ac_have_decl=1
29406else
29407 ac_have_decl=0
29408fi
29409
29410cat >>confdefs.h <<_ACEOF
29411#define HAVE_DECL_ASPRINTF $ac_have_decl
29412_ACEOF
908ff469 29413
d5835df2
TV
29414ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
29415if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
29416 ac_have_decl=1
29417else
29418 ac_have_decl=0
29419fi
29420
29421cat >>confdefs.h <<_ACEOF
29422#define HAVE_DECL_VASPRINTF $ac_have_decl
29423_ACEOF
908ff469 29424
d5835df2
TV
29425ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
29426if test "x$ac_cv_have_decl_snprintf" = xyes; then :
29427 ac_have_decl=1
29428else
29429 ac_have_decl=0
29430fi
29431
29432cat >>confdefs.h <<_ACEOF
29433#define HAVE_DECL_SNPRINTF $ac_have_decl
29434_ACEOF
908ff469 29435
d5835df2
TV
29436ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
29437if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
29438 ac_have_decl=1
29439else
29440 ac_have_decl=0
29441fi
29442
29443cat >>confdefs.h <<_ACEOF
29444#define HAVE_DECL_VSNPRINTF $ac_have_decl
29445_ACEOF
29446
908ff469 29447ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d5835df2
TV
29448if test "x$ac_cv_have_decl_strtol" = xyes; then :
29449 ac_have_decl=1
29450else
29451 ac_have_decl=0
29452fi
29453
29454cat >>confdefs.h <<_ACEOF
29455#define HAVE_DECL_STRTOL $ac_have_decl
29456_ACEOF
908ff469 29457
d5835df2
TV
29458ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
29459if test "x$ac_cv_have_decl_strtoul" = xyes; then :
29460 ac_have_decl=1
29461else
29462 ac_have_decl=0
29463fi
29464
29465cat >>confdefs.h <<_ACEOF
29466#define HAVE_DECL_STRTOUL $ac_have_decl
29467_ACEOF
908ff469 29468
d5835df2
TV
29469ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
29470if test "x$ac_cv_have_decl_strtoll" = xyes; then :
29471 ac_have_decl=1
29472else
29473 ac_have_decl=0
29474fi
29475
29476cat >>confdefs.h <<_ACEOF
29477#define HAVE_DECL_STRTOLL $ac_have_decl
29478_ACEOF
908ff469 29479
d5835df2
TV
29480ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
29481if test "x$ac_cv_have_decl_strtoull" = xyes; then :
29482 ac_have_decl=1
29483else
29484 ac_have_decl=0
29485fi
29486
29487cat >>confdefs.h <<_ACEOF
29488#define HAVE_DECL_STRTOULL $ac_have_decl
29489_ACEOF
29490
908ff469 29491ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d5835df2
TV
29492if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
29493 ac_have_decl=1
29494else
29495 ac_have_decl=0
29496fi
29497
29498cat >>confdefs.h <<_ACEOF
29499#define HAVE_DECL_STRVERSCMP $ac_have_decl
29500_ACEOF
29501
761ed61e 29502 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
908ff469
MF
29503if test "x$ac_cv_type_long_long" = xyes; then :
29504
29505cat >>confdefs.h <<_ACEOF
29506#define HAVE_LONG_LONG 1
29507_ACEOF
29508
29509# The cast to long int works around a bug in the HP C Compiler
29510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29512# This bug is HP SR number 8606223364.
29513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
29514$as_echo_n "checking size of long long... " >&6; }
29515if ${ac_cv_sizeof_long_long+:} false; then :
29516 $as_echo_n "(cached) " >&6
29517else
29518 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
29519
29520else
29521 if test "$ac_cv_type_long_long" = yes; then
29522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29524as_fn_error 77 "cannot compute sizeof (long long)
29525See \`config.log' for more details" "$LINENO" 5; }
29526 else
29527 ac_cv_sizeof_long_long=0
29528 fi
29529fi
29530
29531fi
29532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
29533$as_echo "$ac_cv_sizeof_long_long" >&6; }
29534
29535
29536
29537cat >>confdefs.h <<_ACEOF
29538#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
29539_ACEOF
29540
29541
29542fi
29543
29544
29545 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
29546ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
29547if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
29548 ac_have_decl=1
29549else
29550 ac_have_decl=0
29551fi
29552
29553cat >>confdefs.h <<_ACEOF
29554#define HAVE_DECL_BASENAME $ac_have_decl
29555_ACEOF
29556
29557
29558
29559
29560
d5835df2
TV
29561
29562ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
29563if test "x$ac_cv_have_decl_snprintf" = xyes; then :
29564 ac_have_decl=1
29565else
29566 ac_have_decl=0
29567fi
29568
29569cat >>confdefs.h <<_ACEOF
29570#define HAVE_DECL_SNPRINTF $ac_have_decl
29571_ACEOF
29572
29573
29574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
29575$as_echo_n "checking for LC_MESSAGES... " >&6; }
29576if ${am_cv_val_LC_MESSAGES+:} false; then :
29577 $as_echo_n "(cached) " >&6
29578else
29579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29580/* end confdefs.h. */
29581#include <locale.h>
29582int
29583main ()
29584{
29585return LC_MESSAGES
29586 ;
29587 return 0;
29588}
29589_ACEOF
29590if ac_fn_c_try_link "$LINENO"; then :
29591 am_cv_val_LC_MESSAGES=yes
29592else
29593 am_cv_val_LC_MESSAGES=no
29594fi
29595rm -f core conftest.err conftest.$ac_objext \
29596 conftest$ac_exeext conftest.$ac_ext
29597fi
29598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
29599$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
29600 if test $am_cv_val_LC_MESSAGES = yes; then
29601
29602$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
29603
29604 fi
29605
29606
29607# ------------------ #
29608# Checks for types. #
29609# ------------------ #
29610
29611ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
29612#if HAVE_SYS_SOCKET_H
29613# include <sys/socket.h>
29614#elif HAVE_WS2TCPIP_H
29615# include <ws2tcpip.h>
29616#endif
29617
29618"
29619if test "x$ac_cv_type_socklen_t" = xyes; then :
29620
29621cat >>confdefs.h <<_ACEOF
29622#define HAVE_SOCKLEN_T 1
29623_ACEOF
29624
29625
29626fi
29627
29628
29629# ------------------------------------- #
29630# Checks for compiler characteristics. #
29631# ------------------------------------- #
29632
29633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
29634$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
29635if ${ac_cv_c_const+:} false; then :
29636 $as_echo_n "(cached) " >&6
29637else
29638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29639/* end confdefs.h. */
29640
29641int
29642main ()
29643{
29644
29645#ifndef __cplusplus
29646 /* Ultrix mips cc rejects this sort of thing. */
29647 typedef int charset[2];
29648 const charset cs = { 0, 0 };
29649 /* SunOS 4.1.1 cc rejects this. */
29650 char const *const *pcpcc;
29651 char **ppc;
29652 /* NEC SVR4.0.2 mips cc rejects this. */
29653 struct point {int x, y;};
29654 static struct point const zero = {0,0};
29655 /* AIX XL C 1.02.0.0 rejects this.
29656 It does not let you subtract one const X* pointer from another in
29657 an arm of an if-expression whose if-part is not a constant
29658 expression */
29659 const char *g = "string";
29660 pcpcc = &g + (g ? g-g : 0);
29661 /* HPUX 7.0 cc rejects these. */
29662 ++pcpcc;
29663 ppc = (char**) pcpcc;
29664 pcpcc = (char const *const *) ppc;
29665 { /* SCO 3.2v4 cc rejects this sort of thing. */
29666 char tx;
29667 char *t = &tx;
29668 char const *s = 0 ? (char *) 0 : (char const *) 0;
29669
29670 *t++ = 0;
29671 if (s) return 0;
29672 }
29673 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
29674 int x[] = {25, 17};
29675 const int *foo = &x[0];
29676 ++foo;
29677 }
29678 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
29679 typedef const int *iptr;
29680 iptr p = 0;
29681 ++p;
29682 }
29683 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
29684 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
29685 struct s { int j; const int *ap[3]; } bx;
29686 struct s *b = &bx; b->j = 5;
29687 }
29688 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
29689 const int foo = 10;
29690 if (!foo) return 0;
29691 }
29692 return !cs[0] && !zero.x;
29693#endif
29694
29695 ;
29696 return 0;
29697}
29698_ACEOF
29699if ac_fn_c_try_compile "$LINENO"; then :
29700 ac_cv_c_const=yes
29701else
29702 ac_cv_c_const=no
29703fi
29704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29705fi
29706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
29707$as_echo "$ac_cv_c_const" >&6; }
29708if test $ac_cv_c_const = no; then
29709
29710$as_echo "#define const /**/" >>confdefs.h
29711
29712fi
29713
29714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
29715$as_echo_n "checking for inline... " >&6; }
29716if ${ac_cv_c_inline+:} false; then :
29717 $as_echo_n "(cached) " >&6
29718else
29719 ac_cv_c_inline=no
29720for ac_kw in inline __inline__ __inline; do
29721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29722/* end confdefs.h. */
29723#ifndef __cplusplus
29724typedef int foo_t;
29725static $ac_kw foo_t static_foo () {return 0; }
29726$ac_kw foo_t foo () {return 0; }
29727#endif
29728
29729_ACEOF
29730if ac_fn_c_try_compile "$LINENO"; then :
29731 ac_cv_c_inline=$ac_kw
29732fi
29733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29734 test "$ac_cv_c_inline" != no && break
29735done
29736
29737fi
29738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
29739$as_echo "$ac_cv_c_inline" >&6; }
29740
29741case $ac_cv_c_inline in
29742 inline | yes) ;;
29743 *)
29744 case $ac_cv_c_inline in
29745 no) ac_val=;;
29746 *) ac_val=$ac_cv_c_inline;;
29747 esac
29748 cat >>confdefs.h <<_ACEOF
29749#ifndef __cplusplus
29750#define inline $ac_val
29751#endif
29752_ACEOF
29753 ;;
29754esac
29755
29756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29757$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29758if ${ac_cv_c_bigendian+:} false; then :
29759 $as_echo_n "(cached) " >&6
29760else
29761 ac_cv_c_bigendian=unknown
29762 # See if we're dealing with a universal compiler.
29763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29764/* end confdefs.h. */
29765#ifndef __APPLE_CC__
29766 not a universal capable compiler
29767 #endif
29768 typedef int dummy;
29769
29770_ACEOF
29771if ac_fn_c_try_compile "$LINENO"; then :
29772
29773 # Check for potential -arch flags. It is not universal unless
29774 # there are at least two -arch flags with different values.
29775 ac_arch=
29776 ac_prev=
29777 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29778 if test -n "$ac_prev"; then
29779 case $ac_word in
29780 i?86 | x86_64 | ppc | ppc64)
29781 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29782 ac_arch=$ac_word
29783 else
29784 ac_cv_c_bigendian=universal
29785 break
29786 fi
29787 ;;
29788 esac
29789 ac_prev=
29790 elif test "x$ac_word" = "x-arch"; then
29791 ac_prev=arch
29792 fi
29793 done
29794fi
29795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29796 if test $ac_cv_c_bigendian = unknown; then
29797 # See if sys/param.h defines the BYTE_ORDER macro.
29798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29799/* end confdefs.h. */
29800#include <sys/types.h>
29801 #include <sys/param.h>
29802
29803int
29804main ()
29805{
29806#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29807 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29808 && LITTLE_ENDIAN)
29809 bogus endian macros
29810 #endif
29811
29812 ;
29813 return 0;
29814}
29815_ACEOF
29816if ac_fn_c_try_compile "$LINENO"; then :
29817 # It does; now see whether it defined to BIG_ENDIAN or not.
29818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29819/* end confdefs.h. */
29820#include <sys/types.h>
29821 #include <sys/param.h>
29822
29823int
29824main ()
29825{
29826#if BYTE_ORDER != BIG_ENDIAN
29827 not big endian
29828 #endif
29829
29830 ;
29831 return 0;
29832}
29833_ACEOF
29834if ac_fn_c_try_compile "$LINENO"; then :
29835 ac_cv_c_bigendian=yes
29836else
29837 ac_cv_c_bigendian=no
29838fi
29839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29840fi
29841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29842 fi
29843 if test $ac_cv_c_bigendian = unknown; then
29844 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29846/* end confdefs.h. */
29847#include <limits.h>
29848
29849int
29850main ()
29851{
29852#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29853 bogus endian macros
29854 #endif
29855
29856 ;
29857 return 0;
29858}
29859_ACEOF
29860if ac_fn_c_try_compile "$LINENO"; then :
29861 # It does; now see whether it defined to _BIG_ENDIAN or not.
29862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29863/* end confdefs.h. */
29864#include <limits.h>
29865
29866int
29867main ()
29868{
29869#ifndef _BIG_ENDIAN
29870 not big endian
29871 #endif
29872
29873 ;
29874 return 0;
29875}
29876_ACEOF
29877if ac_fn_c_try_compile "$LINENO"; then :
29878 ac_cv_c_bigendian=yes
29879else
29880 ac_cv_c_bigendian=no
29881fi
29882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29883fi
29884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29885 fi
29886 if test $ac_cv_c_bigendian = unknown; then
29887 # Compile a test program.
29888 if test "$cross_compiling" = yes; then :
29889 # Try to guess by grepping values from an object file.
29890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29891/* end confdefs.h. */
29892short int ascii_mm[] =
29893 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29894 short int ascii_ii[] =
29895 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29896 int use_ascii (int i) {
29897 return ascii_mm[i] + ascii_ii[i];
29898 }
29899 short int ebcdic_ii[] =
29900 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29901 short int ebcdic_mm[] =
29902 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29903 int use_ebcdic (int i) {
29904 return ebcdic_mm[i] + ebcdic_ii[i];
29905 }
29906 extern int foo;
29907
29908int
29909main ()
29910{
29911return use_ascii (foo) == use_ebcdic (foo);
29912 ;
29913 return 0;
29914}
29915_ACEOF
29916if ac_fn_c_try_compile "$LINENO"; then :
29917 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29918 ac_cv_c_bigendian=yes
29919 fi
29920 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29921 if test "$ac_cv_c_bigendian" = unknown; then
29922 ac_cv_c_bigendian=no
29923 else
29924 # finding both strings is unlikely to happen, but who knows?
29925 ac_cv_c_bigendian=unknown
29926 fi
29927 fi
29928fi
29929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29930else
29931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29932/* end confdefs.h. */
29933$ac_includes_default
29934int
29935main ()
29936{
05ea2a05 29937
d5835df2
TV
29938 /* Are we little or big endian? From Harbison&Steele. */
29939 union
29940 {
29941 long int l;
29942 char c[sizeof (long int)];
29943 } u;
29944 u.l = 1;
29945 return u.c[sizeof (long int) - 1] == 1;
43b7e92b 29946
d5835df2
TV
29947 ;
29948 return 0;
29949}
29950_ACEOF
29951if ac_fn_c_try_run "$LINENO"; then :
29952 ac_cv_c_bigendian=no
29953else
29954 ac_cv_c_bigendian=yes
29955fi
29956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29957 conftest.$ac_objext conftest.beam conftest.$ac_ext
29958fi
43b7e92b 29959
8b35ed1f 29960 fi
d5835df2
TV
29961fi
29962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29963$as_echo "$ac_cv_c_bigendian" >&6; }
29964 case $ac_cv_c_bigendian in #(
29965 yes)
29966 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
29967;; #(
29968 no)
29969 ;; #(
29970 universal)
05ea2a05 29971
d5835df2 29972$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
43b7e92b 29973
d5835df2
TV
29974 ;; #(
29975 *)
29976 as_fn_error $? "unknown endianness
29977 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
29978 esac
43b7e92b 29979
8b35ed1f 29980
d5835df2
TV
29981# ------------------------------ #
29982# Checks for library functions. #
29983# ------------------------------ #
c906108c 29984
11fdaff1
SM
29985for ac_func in \
29986 btowc \
29987 getgid \
29988 getpgid \
29989 getrlimit \
29990 getuid \
29991 iconvlist \
29992 libiconvlist \
29993 posix_madvise \
29994 pread \
29995 pread64 \
29996 pwrite \
29997 resize_term \
29998 setlocale \
29999 setrlimit \
30000 setsid \
30001 sigsetmask \
30002 ttrace \
30003 use_default_colors \
11fdaff1
SM
30004 wresize \
30005
d5835df2
TV
30006do :
30007 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
30008ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
30009if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
30010 cat >>confdefs.h <<_ACEOF
30011#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
30012_ACEOF
30013
30014fi
30015done
05ea2a05 30016
c906108c 30017
11fdaff1 30018
d5835df2
TV
30019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
30020$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
30021if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 30022 $as_echo_n "(cached) " >&6
97bf5e38 30023else
d5835df2 30024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30025/* end confdefs.h. */
d5835df2 30026#include <langinfo.h>
bec39cab
AC
30027int
30028main ()
30029{
d5835df2 30030char* cs = nl_langinfo(CODESET);
bec39cab
AC
30031 ;
30032 return 0;
30033}
30034_ACEOF
8b35ed1f 30035if ac_fn_c_try_link "$LINENO"; then :
d5835df2 30036 am_cv_langinfo_codeset=yes
97bf5e38 30037else
d5835df2 30038 am_cv_langinfo_codeset=no
97bf5e38 30039fi
8b35ed1f
SM
30040rm -f core conftest.err conftest.$ac_objext \
30041 conftest$ac_exeext conftest.$ac_ext
8b35ed1f 30042
97bf5e38 30043fi
d5835df2
TV
30044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
30045$as_echo "$am_cv_langinfo_codeset" >&6; }
30046 if test $am_cv_langinfo_codeset = yes; then
97bf5e38 30047
d5835df2 30048$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
c906108c 30049
8b35ed1f 30050 fi
97bf5e38 30051
97bf5e38 30052
8b35ed1f
SM
30053# Check the return and argument types of ptrace.
30054
30055
30056for ac_header in sys/ptrace.h ptrace.h
30057do :
30058 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30059ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30060if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30061 cat >>confdefs.h <<_ACEOF
30062#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 30063_ACEOF
81ecdfbb 30064
c906108c 30065fi
bc8bcb4b 30066
8b35ed1f 30067done
97bf5e38 30068
97bf5e38 30069
8b35ed1f
SM
30070gdb_ptrace_headers='
30071#include <sys/types.h>
30072#if HAVE_SYS_PTRACE_H
30073# include <sys/ptrace.h>
30074#endif
30075#if HAVE_UNISTD_H
30076# include <unistd.h>
30077#endif
30078'
97bf5e38 30079
8b35ed1f
SM
30080# Check return type. Varargs (used on GNU/Linux) conflict with the
30081# empty argument list, so check for that explicitly.
30082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
30083$as_echo_n "checking return type of ptrace... " >&6; }
30084if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 30085 $as_echo_n "(cached) " >&6
97bf5e38 30086else
81ecdfbb 30087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30088/* end confdefs.h. */
8b35ed1f 30089 $gdb_ptrace_headers
bc8bcb4b
MK
30090int
30091main ()
30092{
8b35ed1f
SM
30093extern long ptrace (enum __ptrace_request, ...);
30094
bc8bcb4b
MK
30095 ;
30096 return 0;
97bf5e38 30097}
bec39cab 30098_ACEOF
8b35ed1f
SM
30099if ac_fn_c_try_compile "$LINENO"; then :
30100 gdb_cv_func_ptrace_ret='long'
438013df 30101else
8b35ed1f 30102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30103/* end confdefs.h. */
8b35ed1f 30104$gdb_ptrace_headers
bec39cab
AC
30105int
30106main ()
30107{
8b35ed1f
SM
30108extern int ptrace ();
30109
bec39cab
AC
30110 ;
30111 return 0;
30112}
30113_ACEOF
8b35ed1f
SM
30114if ac_fn_c_try_compile "$LINENO"; then :
30115 gdb_cv_func_ptrace_ret='int'
81ecdfbb 30116else
8b35ed1f 30117 gdb_cv_func_ptrace_ret='long'
5593a99a 30118
438013df 30119fi
8b35ed1f 30120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
438013df 30121
bec39cab 30122fi
8b35ed1f
SM
30123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30124
30125fi
30126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
30127$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
30128
30129
30130cat >>confdefs.h <<_ACEOF
30131#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
30132_ACEOF
438013df 30133
f6528abd 30134
8b35ed1f
SM
30135# Check argument types.
30136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
30137$as_echo_n "checking types of arguments for ptrace... " >&6; }
30138if ${gdb_cv_func_ptrace_args+:} false; then :
30139 $as_echo_n "(cached) " >&6
30140else
30141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30142/* end confdefs.h. */
30143$gdb_ptrace_headers
f6528abd
JK
30144int
30145main ()
30146{
8b35ed1f 30147extern long ptrace (enum __ptrace_request, ...);
f6528abd
JK
30148
30149 ;
30150 return 0;
30151}
30152_ACEOF
8b35ed1f
SM
30153if ac_fn_c_try_compile "$LINENO"; then :
30154 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
f6528abd 30155else
8b35ed1f
SM
30156 for gdb_arg1 in 'int' 'long'; do
30157 for gdb_arg2 in 'pid_t' 'int' 'long'; do
30158 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
30159 for gdb_arg4 in 'int' 'long' 'void *'; do
30160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3bebe2f2 30161/* end confdefs.h. */
8b35ed1f 30162$gdb_ptrace_headers
3bebe2f2
JK
30163int
30164main ()
30165{
8b35ed1f
SM
30166extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
30167
3bebe2f2
JK
30168 ;
30169 return 0;
30170}
30171_ACEOF
8b35ed1f
SM
30172if ac_fn_c_try_compile "$LINENO"; then :
30173 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
30174 break 4;
3bebe2f2 30175
f6528abd 30176fi
8b35ed1f 30177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f6528abd 30178
8b35ed1f
SM
30179 for gdb_arg5 in 'int *' 'int' 'long'; do
30180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6aa4f97c 30181/* end confdefs.h. */
8b35ed1f 30182$gdb_ptrace_headers
6aa4f97c
AB
30183int
30184main ()
30185{
8b35ed1f 30186extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
6aa4f97c
AB
30187
30188 ;
30189 return 0;
30190}
30191_ACEOF
8b35ed1f
SM
30192if ac_fn_c_try_compile "$LINENO"; then :
30193 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
30194 break 5;
30195
6aa4f97c 30196fi
8b35ed1f
SM
30197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30198 done
30199 done
30200 done
30201 done
30202 done
30203 # Provide a safe default value.
30204 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
30205
6aa4f97c 30206fi
8b35ed1f 30207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6aa4f97c 30208
8b35ed1f
SM
30209fi
30210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
30211$as_echo "$gdb_cv_func_ptrace_args" >&6; }
30212
30213ac_save_IFS=$IFS; IFS=','
30214set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
30215IFS=$ac_save_IFS
30216shift
30217
30218cat >>confdefs.h <<_ACEOF
30219#define PTRACE_TYPE_ARG1 $1
30220_ACEOF
30221
30222
30223cat >>confdefs.h <<_ACEOF
30224#define PTRACE_TYPE_ARG3 $3
30225_ACEOF
30226
30227
30228cat >>confdefs.h <<_ACEOF
30229#define PTRACE_TYPE_ARG4 $4
30230_ACEOF
30231
30232if test -n "$5"; then
30233
30234cat >>confdefs.h <<_ACEOF
30235#define PTRACE_TYPE_ARG5 $5
30236_ACEOF
6aa4f97c
AB
30237
30238fi
30239
f6528abd 30240
8b35ed1f
SM
30241if test "$cross_compiling" = no; then
30242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
30243$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
30244if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 30245 $as_echo_n "(cached) " >&6
8b35ed1f
SM
30246else
30247 if test "$cross_compiling" = yes; then :
30248 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 30249else
81ecdfbb 30250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30251/* end confdefs.h. */
8b35ed1f 30252$ac_includes_default
bec39cab
AC
30253int
30254main ()
30255{
8b35ed1f
SM
30256/* If this system has a BSD-style setpgrp which takes arguments,
30257 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
30258 exit successfully. */
30259 return setpgrp (1,1) != -1;
bec39cab
AC
30260 ;
30261 return 0;
30262}
30263_ACEOF
8b35ed1f
SM
30264if ac_fn_c_try_run "$LINENO"; then :
30265 ac_cv_func_setpgrp_void=no
d92419e5 30266else
8b35ed1f 30267 ac_cv_func_setpgrp_void=yes
d92419e5 30268fi
8b35ed1f
SM
30269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30270 conftest.$ac_objext conftest.beam conftest.$ac_ext
d92419e5
JB
30271fi
30272
d645e32e 30273fi
8b35ed1f
SM
30274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
30275$as_echo "$ac_cv_func_setpgrp_void" >&6; }
30276if test $ac_cv_func_setpgrp_void = yes; then
d645e32e 30277
8b35ed1f 30278$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
bec39cab 30279
c906108c 30280fi
8b35ed1f
SM
30281
30282else
30283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
30284$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
30285if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 30286 $as_echo_n "(cached) " >&6
bec39cab 30287else
81ecdfbb 30288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30289/* end confdefs.h. */
8b35ed1f 30290#include <unistd.h>
bec39cab
AC
30291int
30292main ()
30293{
8b35ed1f
SM
30294if (setpgrp(1,1) == -1)
30295 exit (0);
30296 else
30297 exit (1);
5593a99a 30298
bec39cab
AC
30299 ;
30300 return 0;
30301}
30302_ACEOF
81ecdfbb 30303if ac_fn_c_try_compile "$LINENO"; then :
8b35ed1f 30304 ac_cv_func_setpgrp_void=no
3f47be5c 30305else
8b35ed1f 30306 ac_cv_func_setpgrp_void=yes
bec39cab 30307
3f47be5c 30308fi
81ecdfbb 30309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 30310
bec39cab 30311fi
8b35ed1f
SM
30312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
30313$as_echo "$ac_cv_func_setpgrp_void" >&6; }
30314if test "$ac_cv_func_setpgrp_void" = yes; then
30315 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
5593a99a 30316
8b35ed1f
SM
30317fi
30318fi
30319
30320# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
30321ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
30322#include <sys/proc.h>
30323
30324"
30325if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
30326
30327cat >>confdefs.h <<_ACEOF
30328#define HAVE_STRUCT_THREAD_TD_PCB 1
30329_ACEOF
30330
30331
30332fi
30333
30334
30335# See if <sys/lwp.h> defines `struct lwp`.
30336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
30337$as_echo_n "checking for struct lwp... " >&6; }
30338if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 30339 $as_echo_n "(cached) " >&6
59f80f10 30340else
81ecdfbb 30341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10 30342/* end confdefs.h. */
8b35ed1f
SM
30343#include <sys/param.h>
30344 #define _KMEMUSER
30345 #include <sys/lwp.h>
59f80f10
DJ
30346int
30347main ()
30348{
8b35ed1f 30349struct lwp l;
5593a99a 30350
59f80f10
DJ
30351 ;
30352 return 0;
30353}
30354_ACEOF
81ecdfbb 30355if ac_fn_c_try_compile "$LINENO"; then :
8b35ed1f 30356 gdb_cv_struct_lwp=yes
59f80f10 30357else
8b35ed1f 30358 gdb_cv_struct_lwp=no
59f80f10
DJ
30359
30360fi
81ecdfbb 30361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
30362
30363fi
8b35ed1f
SM
30364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
30365$as_echo "$gdb_cv_struct_lwp" >&6; }
30366if test "$gdb_cv_struct_lwp" = yes; then
5593a99a 30367
8b35ed1f
SM
30368$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
30369
30370fi
30371
30372# See if <machine/reg.h> degines `struct reg'.
30373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
30374$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
30375if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 30376 $as_echo_n "(cached) " >&6
59f80f10 30377else
81ecdfbb 30378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10 30379/* end confdefs.h. */
8b35ed1f
SM
30380#include <sys/types.h>
30381 #include <machine/reg.h>
59f80f10
DJ
30382int
30383main ()
30384{
8b35ed1f 30385struct reg r;
5593a99a 30386
59f80f10
DJ
30387 ;
30388 return 0;
30389}
30390_ACEOF
81ecdfbb 30391if ac_fn_c_try_compile "$LINENO"; then :
8b35ed1f 30392 gdb_cv_struct_reg=yes
59f80f10 30393else
8b35ed1f 30394 gdb_cv_struct_reg=no
59f80f10
DJ
30395
30396fi
81ecdfbb 30397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
30398
30399fi
8b35ed1f
SM
30400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
30401$as_echo "$gdb_cv_struct_reg" >&6; }
30402if test "$gdb_cv_struct_reg" = yes; then
59f80f10 30403
8b35ed1f 30404$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
59f80f10 30405
3f47be5c
EZ
30406fi
30407
8b35ed1f
SM
30408# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
30409# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
30410ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
30411#include <machine/reg.h>
30412"
30413if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
fb40c209 30414
92e4e97a 30415cat >>confdefs.h <<_ACEOF
8b35ed1f 30416#define HAVE_STRUCT_REG_R_FS 1
92e4e97a
AB
30417_ACEOF
30418
30419
f83d8a90 30420fi
8b35ed1f
SM
30421ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
30422#include <machine/reg.h>
30423"
30424if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
030292b7 30425
f83d8a90 30426cat >>confdefs.h <<_ACEOF
8b35ed1f 30427#define HAVE_STRUCT_REG_R_GS 1
f83d8a90 30428_ACEOF
bec39cab 30429
030292b7 30430
8b35ed1f 30431fi
b14b1491 30432
f83d8a90 30433
8b35ed1f
SM
30434# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
30435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
30436$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
30437if ${gdb_cv_have_ptrace_getregs+:} false; then :
30438 $as_echo_n "(cached) " >&6
30439else
30440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30441/* end confdefs.h. */
30442#include <sys/ptrace.h>
30443int
30444main ()
30445{
30446PTRACE_GETREGS;
30447 ;
30448 return 0;
30449}
f83d8a90 30450_ACEOF
8b35ed1f
SM
30451if ac_fn_c_try_compile "$LINENO"; then :
30452 gdb_cv_have_ptrace_getregs=yes
30453else
30454 gdb_cv_have_ptrace_getregs=no
030292b7 30455
8b35ed1f
SM
30456fi
30457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
030292b7 30458
8b35ed1f 30459fi
030292b7 30460
8b35ed1f
SM
30461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
30462$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
30463if test "$gdb_cv_have_ptrace_getregs" = yes; then
16e7150e 30464
8b35ed1f 30465$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16e7150e 30466
81ecdfbb
RW
30467fi
30468
8b35ed1f
SM
30469# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
30470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
30471$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
30472if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
30473 $as_echo_n "(cached) " >&6
30474else
30475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30476/* end confdefs.h. */
30477#include <sys/ptrace.h>
30478int
30479main ()
30480{
30481PTRACE_GETFPXREGS;
30482 ;
30483 return 0;
30484}
30485_ACEOF
30486if ac_fn_c_try_compile "$LINENO"; then :
30487 gdb_cv_have_ptrace_getfpxregs=yes
30488else
30489 gdb_cv_have_ptrace_getfpxregs=no
16e7150e 30490
8b35ed1f
SM
30491fi
30492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16e7150e 30493
8b35ed1f 30494fi
16e7150e 30495
8b35ed1f
SM
30496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
30497$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
30498if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16e7150e 30499
8b35ed1f 30500$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16e7150e 30501
8b35ed1f 30502fi
0c4a4063 30503
8b35ed1f
SM
30504# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
30505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
30506$as_echo_n "checking for PT_GETDBREGS... " >&6; }
30507if ${gdb_cv_have_pt_getdbregs+:} false; then :
30508 $as_echo_n "(cached) " >&6
30509else
30510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30511/* end confdefs.h. */
30512#include <sys/types.h>
30513 #include <sys/ptrace.h>
30514int
30515main ()
30516{
30517PT_GETDBREGS;
16e7150e 30518
8b35ed1f
SM
30519 ;
30520 return 0;
30521}
16e7150e 30522_ACEOF
8b35ed1f
SM
30523if ac_fn_c_try_compile "$LINENO"; then :
30524 gdb_cv_have_pt_getdbregs=yes
30525else
30526 gdb_cv_have_pt_getdbregs=no
16e7150e 30527
8b35ed1f
SM
30528fi
30529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b14b1491 30530
8b35ed1f 30531fi
16e7150e 30532
8b35ed1f
SM
30533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
30534$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
30535if test "$gdb_cv_have_pt_getdbregs" = yes; then
0c4a4063 30536
8b35ed1f 30537$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
b835bb52 30538
ed2a2229
CB
30539fi
30540
8b35ed1f
SM
30541# See if <sys/ptrace.h> supports LWP names on FreeBSD
30542# Older FreeBSD versions don't have the pl_tdname member of
30543# `struct ptrace_lwpinfo'.
30544ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
30545"
30546if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
ed2a2229
CB
30547
30548cat >>confdefs.h <<_ACEOF
8b35ed1f 30549#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
ed2a2229
CB
30550_ACEOF
30551
30552
8b35ed1f 30553fi
ed2a2229
CB
30554
30555
8b35ed1f
SM
30556# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
30557# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
30558# FreeBSD 10.3.
30559ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
30560"
30561if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
ed2a2229
CB
30562
30563cat >>confdefs.h <<_ACEOF
8b35ed1f 30564#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
ed2a2229
CB
30565_ACEOF
30566
30567
8b35ed1f 30568fi
ed2a2229
CB
30569
30570
8b35ed1f 30571# Check if the compiler supports the `long long' type.
ed2a2229 30572
8b35ed1f
SM
30573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
30574$as_echo_n "checking for long long support in compiler... " >&6; }
30575if ${gdb_cv_c_long_long+:} false; then :
4b74833d
AB
30576 $as_echo_n "(cached) " >&6
30577else
8b35ed1f 30578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4b74833d 30579/* end confdefs.h. */
8b35ed1f 30580extern long long foo;
4b74833d
AB
30581int
30582main ()
30583{
8b35ed1f 30584switch (foo & 2) { case 0: return 1; }
4b74833d
AB
30585 ;
30586 return 0;
30587}
30588_ACEOF
30589if ac_fn_c_try_compile "$LINENO"; then :
8b35ed1f
SM
30590 gdb_cv_c_long_long=yes
30591else
30592 gdb_cv_c_long_long=no
4b74833d
AB
30593fi
30594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8b35ed1f
SM
30595fi
30596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
30597$as_echo "$gdb_cv_c_long_long" >&6; }
30598if test "$gdb_cv_c_long_long" != yes; then
30599 # libdecnumber requires long long.
30600 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
30601fi
4b74833d 30602
8b35ed1f 30603# Check if the compiler and runtime support printing decfloats.
4b74833d 30604
8b35ed1f
SM
30605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
30606$as_echo_n "checking for decfloat support in printf... " >&6; }
30607if ${gdb_cv_printf_has_decfloat+:} false; then :
30608 $as_echo_n "(cached) " >&6
30609else
30610 if test "$cross_compiling" = yes; then :
30611 gdb_cv_printf_has_decfloat=no
30612else
30613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30614/* end confdefs.h. */
30615$ac_includes_default
4b74833d
AB
30616int
30617main ()
30618{
8b35ed1f
SM
30619char buf[64];
30620 _Decimal32 d32 = 1.2345df;
30621 _Decimal64 d64 = 1.2345dd;
30622 _Decimal128 d128 = 1.2345dl;
30623 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
30624 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
4b74833d
AB
30625 ;
30626 return 0;
30627}
30628_ACEOF
8b35ed1f
SM
30629if ac_fn_c_try_run "$LINENO"; then :
30630 gdb_cv_printf_has_decfloat=yes
30631else
30632 gdb_cv_printf_has_decfloat=no
4b74833d 30633fi
8b35ed1f
SM
30634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30635 conftest.$ac_objext conftest.beam conftest.$ac_ext
4b74833d 30636fi
4b74833d 30637
8b35ed1f
SM
30638fi
30639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
30640$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
30641if test "$gdb_cv_printf_has_decfloat" = yes; then
4b74833d 30642
8b35ed1f 30643$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
4b74833d 30644
81ecdfbb
RW
30645fi
30646
8b35ed1f
SM
30647# Check if the compiler supports the `long double' type. We can't use
30648# AC_C_LONG_DOUBLE because that one does additional checks on the
30649# constants defined in <float.h> that fail on some systems,
30650# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
094a342e 30651
8b35ed1f
SM
30652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
30653$as_echo_n "checking for long double support in compiler... " >&6; }
30654if ${gdb_cv_c_long_double+:} false; then :
30655 $as_echo_n "(cached) " >&6
30656else
30657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30658/* end confdefs.h. */
30659long double foo;
30660_ACEOF
30661if ac_fn_c_try_compile "$LINENO"; then :
30662 gdb_cv_c_long_double=yes
30663else
30664 gdb_cv_c_long_double=no
094a342e 30665fi
8b35ed1f 30666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
094a342e 30667fi
8b35ed1f
SM
30668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
30669$as_echo "$gdb_cv_c_long_double" >&6; }
30670if test "$gdb_cv_c_long_double" = yes; then
094a342e 30671
8b35ed1f 30672$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
3bc3d82a 30673
4b74833d
AB
30674fi
30675
8b35ed1f 30676# Check if the compiler and runtime support printing long doubles.
3526781e 30677
8b35ed1f
SM
30678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
30679$as_echo_n "checking for long double support in printf... " >&6; }
30680if ${gdb_cv_printf_has_long_double+:} false; then :
30681 $as_echo_n "(cached) " >&6
30682else
30683 if test "$cross_compiling" = yes; then :
30684 gdb_cv_printf_has_long_double=no
30685else
30686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30687/* end confdefs.h. */
30688$ac_includes_default
30689int
30690main ()
30691{
30692char buf[16];
30693 long double f = 3.141592653;
30694 sprintf (buf, "%Lg", f);
30695 return (strncmp ("3.14159", buf, 7));
30696 ;
30697 return 0;
30698}
30699_ACEOF
30700if ac_fn_c_try_run "$LINENO"; then :
30701 gdb_cv_printf_has_long_double=yes
30702else
30703 gdb_cv_printf_has_long_double=no
81ecdfbb 30704fi
8b35ed1f
SM
30705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30706 conftest.$ac_objext conftest.beam conftest.$ac_ext
3b851bce 30707fi
8b35ed1f 30708
81ecdfbb 30709fi
8b35ed1f
SM
30710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
30711$as_echo "$gdb_cv_printf_has_long_double" >&6; }
30712if test "$gdb_cv_printf_has_long_double" = yes; then
3bc3d82a 30713
8b35ed1f 30714$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
3bc3d82a 30715
8b35ed1f 30716fi
3bc3d82a 30717
8b35ed1f 30718# Check if the compiler and runtime support scanning long doubles.
7544db95 30719
8b35ed1f
SM
30720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
30721$as_echo_n "checking for long double support in scanf... " >&6; }
30722if ${gdb_cv_scanf_has_long_double+:} false; then :
30723 $as_echo_n "(cached) " >&6
30724else
30725 if test "$cross_compiling" = yes; then :
30726 gdb_cv_scanf_has_long_double=no
30727else
30728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a0de763e 30729/* end confdefs.h. */
8b35ed1f 30730#include <stdio.h>
a0de763e
TT
30731int
30732main ()
30733{
8b35ed1f
SM
30734char *buf = "3.141592653";
30735 long double f = 0;
30736 sscanf (buf, "%Lg", &f);
30737 return !(f > 3.14159 && f < 3.14160);
a0de763e
TT
30738 ;
30739 return 0;
30740}
30741_ACEOF
8b35ed1f
SM
30742if ac_fn_c_try_run "$LINENO"; then :
30743 gdb_cv_scanf_has_long_double=yes
30744else
30745 gdb_cv_scanf_has_long_double=no
a0de763e 30746fi
8b35ed1f
SM
30747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30748 conftest.$ac_objext conftest.beam conftest.$ac_ext
30749fi
30750
30751fi
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
30753$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
30754if test "$gdb_cv_scanf_has_long_double" = yes; then
30755
30756$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
30757
30758fi
30759
30760case ${host_os} in
30761aix*)
30762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
30763$as_echo_n "checking for -bbigtoc option... " >&6; }
30764if ${gdb_cv_bigtoc+:} false; then :
30765 $as_echo_n "(cached) " >&6
30766else
30767 SAVE_LDFLAGS=$LDFLAGS
30768
30769 case $GCC in
30770 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
30771 *) gdb_cv_bigtoc=-bbigtoc ;;
30772 esac
30773
30774 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
30775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30776/* end confdefs.h. */
4536bbc6 30777
bec39cab
AC
30778int
30779main ()
30780{
8b35ed1f 30781int i;
bec39cab
AC
30782 ;
30783 return 0;
30784}
30785_ACEOF
8b35ed1f 30786if ac_fn_c_try_link "$LINENO"; then :
c906108c 30787
8b35ed1f
SM
30788else
30789 gdb_cv_bigtoc=
c906108c 30790
8b35ed1f
SM
30791fi
30792rm -f core conftest.err conftest.$ac_objext \
30793 conftest$ac_exeext conftest.$ac_ext
30794 LDFLAGS="${SAVE_LDFLAGS}"
104c1213 30795
8b35ed1f
SM
30796fi
30797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
30798$as_echo "$gdb_cv_bigtoc" >&6; }
30799 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
30800 ;;
30801esac
3bc3d82a 30802
8b35ed1f
SM
30803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
30804$as_echo_n "checking for the dynamic export flag... " >&6; }
30805dynamic_list=false
30806if test "${gdb_native}" = yes; then
30807 # The dynamically loaded libthread_db needs access to symbols in the gdb
30808 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
30809 # may not be supported there.
30810 old_LDFLAGS="$LDFLAGS"
30811 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
30812 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
30813 LDFLAGS="$LDFLAGS $RDYNAMIC"
30814 if test "${have_libpython}" = no; then
30815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30816/* end confdefs.h. */
3bc3d82a 30817
8b35ed1f
SM
30818int
30819main ()
30820{
b835bb52 30821
8b35ed1f
SM
30822 ;
30823 return 0;
30824}
30825_ACEOF
30826if ac_fn_c_try_link "$LINENO"; then :
30827 dynamic_list=true
30828fi
30829rm -f core conftest.err conftest.$ac_objext \
30830 conftest$ac_exeext conftest.$ac_ext
30831 else
30832 # Workaround http://bugs.python.org/issue4434 where static
30833 # libpythonX.Y.a would get its symbols required for
30834 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
30835 # Problem does not happen for the recommended libpythonX.Y.so linkage.
30836
30837 # Note the workaround for Python
30838 # http://bugs.python.org/issue10112 earlier has removed
30839 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
30840 # here too, as otherwise it'd make this -Wl,--dynamic-list test
30841 # always pass.
30842 old_CFLAGS="$CFLAGS"
30843 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
30844 old_LIBS="$LIBS"
30845 LIBS="$LIBS $PYTHON_LIBS"
30846 old_CPPFLAGS="$CPPFLAGS"
30847 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
30848 if test "$cross_compiling" = yes; then :
30849 true
f35d5ade 30850else
8b35ed1f
SM
30851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30852/* end confdefs.h. */
30853#include "Python.h"
30854int
30855main ()
30856{
30857int err;
30858 Py_Initialize ();
30859 err = PyRun_SimpleString ("import ctypes\n");
30860 Py_Finalize ();
30861 return err == 0 ? 0 : 1;
30862 ;
30863 return 0;
30864}
30865_ACEOF
30866if ac_fn_c_try_run "$LINENO"; then :
30867 dynamic_list=true
30868fi
30869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30870 conftest.$ac_objext conftest.beam conftest.$ac_ext
f35d5ade
TT
30871fi
30872
8b35ed1f
SM
30873 LIBS="$old_LIBS"
30874 CFLAGS="$old_CFLAGS"
30875 CPPFLAGS="$old_CPPFLAGS"
30876 fi
30877 LDFLAGS="$old_LDFLAGS"
f35d5ade 30878fi
8b35ed1f
SM
30879if $dynamic_list; then
30880 found="-Wl,--dynamic-list"
30881 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
30882else
30883 found="-rdynamic"
30884 RDYNAMIC="-rdynamic"
30885fi
30886
30887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
30888$as_echo "$found" >&6; }
f35d5ade 30889
8b35ed1f
SM
30890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5
30891$as_echo_n "checking whether execinfo.h backtrace is available... " >&6; }
30892if ${gdb_cv_execinfo_backtrace+:} false; then :
30893 $as_echo_n "(cached) " >&6
30894else
30895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f35d5ade
TT
30896/* end confdefs.h. */
30897
8b35ed1f
SM
30898 #include <execinfo.h>
30899
f35d5ade
TT
30900int
30901main ()
30902{
30903
8b35ed1f
SM
30904 int f;
30905 void *b[2];
30906 f = backtrace (b, 2);
30907 backtrace_symbols_fd (b, f, 2);
30908
f35d5ade
TT
30909 ;
30910 return 0;
30911}
30912_ACEOF
8b35ed1f
SM
30913if ac_fn_c_try_link "$LINENO"; then :
30914 gdb_cv_execinfo_backtrace=yes
f35d5ade 30915else
8b35ed1f 30916 gdb_cv_execinfo_backtrace=no
f35d5ade
TT
30917fi
30918rm -f core conftest.err conftest.$ac_objext \
30919 conftest$ac_exeext conftest.$ac_ext
f35d5ade 30920fi
8b35ed1f
SM
30921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5
30922$as_echo "$gdb_cv_execinfo_backtrace" >&6; }
30923if test "$gdb_cv_execinfo_backtrace" = yes; then
f35d5ade 30924
8b35ed1f 30925$as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h
f35d5ade 30926
8b35ed1f 30927fi
f35d5ade 30928
8b35ed1f
SM
30929
30930if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
30931 case ${host_os} in
30932 aix*)
30933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
30934$as_echo_n "checking for AiX thread debugging library... " >&6; }
30935 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 30936 $as_echo_n "(cached) " >&6
bec39cab 30937else
81ecdfbb 30938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 30939/* end confdefs.h. */
8b35ed1f
SM
30940#include <sys/pthdebug.h>
30941int
30942main ()
30943{
30944#ifndef PTHDB_VERSION_3
30945 #error
30946 #endif
7a292a7a 30947
8b35ed1f
SM
30948 ;
30949 return 0;
30950}
bec39cab 30951_ACEOF
8b35ed1f
SM
30952if ac_fn_c_try_compile "$LINENO"; then :
30953 gdb_cv_have_aix_thread_debug=yes
7a292a7a 30954else
8b35ed1f 30955 gdb_cv_have_aix_thread_debug=no
7a292a7a
SS
30956
30957fi
8b35ed1f 30958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
aff38e61 30959
8b35ed1f 30960fi
aff38e61 30961
8b35ed1f
SM
30962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
30963$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
30964 if test "$gdb_cv_have_aix_thread_debug" = yes; then
30965 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
30966 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
30967 LIBS="$LIBS -lpthdebug"
aff38e61 30968
8b35ed1f
SM
30969 # Older versions of AIX do not provide the declaration for
30970 # the getthrds function (it appears that it was introduced
30971 # with AIX 6.x).
30972 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
30973"
30974if test "x$ac_cv_have_decl_getthrds" = xyes; then :
30975 ac_have_decl=1
30976else
30977 ac_have_decl=0
cd0fc7c3 30978fi
c906108c 30979
8b35ed1f
SM
30980cat >>confdefs.h <<_ACEOF
30981#define HAVE_DECL_GETTHRDS $ac_have_decl
30982_ACEOF
7a292a7a 30983
8b35ed1f
SM
30984 fi
30985 ;;
30986 esac
def63ff0 30987
8b35ed1f
SM
30988fi
30989
30990if test "x$ac_cv_header_thread_db_h" = "xyes"; then
30991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
30992$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
30993if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 30994 $as_echo_n "(cached) " >&6
31d99776 30995else
81ecdfbb 30996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776 30997/* end confdefs.h. */
8b35ed1f 30998#include <thread_db.h>
31d99776
DJ
30999int
31000main ()
31001{
8b35ed1f 31002int i = TD_NOTALLOC;
294f2697 31003
31d99776
DJ
31004 ;
31005 return 0;
31006}
31007_ACEOF
8b35ed1f
SM
31008if ac_fn_c_try_compile "$LINENO"; then :
31009 gdb_cv_thread_db_h_has_td_notalloc=yes
31d99776 31010else
8b35ed1f 31011 gdb_cv_thread_db_h_has_td_notalloc=no
294f2697 31012
31d99776 31013fi
8b35ed1f 31014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
294f2697 31015
31d99776 31016fi
8b35ed1f
SM
31017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
31018$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
31d99776 31019
8b35ed1f
SM
31020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
31021$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
31022if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
a48b32c0
L
31023 $as_echo_n "(cached) " >&6
31024else
8b35ed1f 31025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a48b32c0 31026/* end confdefs.h. */
8b35ed1f 31027#include <thread_db.h>
a48b32c0
L
31028int
31029main ()
31030{
8b35ed1f
SM
31031int i = TD_VERSION;
31032
a48b32c0
L
31033 ;
31034 return 0;
31035}
31036_ACEOF
8b35ed1f
SM
31037if ac_fn_c_try_compile "$LINENO"; then :
31038 gdb_cv_thread_db_h_has_td_version=yes
a48b32c0 31039else
8b35ed1f 31040 gdb_cv_thread_db_h_has_td_version=no
a48b32c0
L
31041
31042fi
8b35ed1f 31043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a48b32c0 31044
31d99776 31045fi
8b35ed1f
SM
31046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
31047$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
31d99776 31048
8b35ed1f
SM
31049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
31050$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
31051if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
4f05add4 31052 $as_echo_n "(cached) " >&6
8b35ed1f
SM
31053else
31054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31055/* end confdefs.h. */
31056#include <thread_db.h>
4f05add4
TT
31057int
31058main ()
31059{
8b35ed1f 31060int i = TD_NOTLS;
294f2697 31061
4f05add4
TT
31062 ;
31063 return 0;
31064}
31065_ACEOF
8b35ed1f
SM
31066if ac_fn_c_try_compile "$LINENO"; then :
31067 gdb_cv_thread_db_h_has_td_notls=yes
4f05add4 31068else
8b35ed1f 31069 gdb_cv_thread_db_h_has_td_notls=no
294f2697 31070
4f05add4 31071fi
8b35ed1f 31072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
294f2697 31073
4f05add4 31074fi
8b35ed1f
SM
31075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
31076$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
4f05add4 31077fi
8b35ed1f 31078if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
4f05add4 31079
8b35ed1f 31080$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
608e2dbb 31081
608e2dbb 31082fi
8b35ed1f 31083if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
608e2dbb 31084
8b35ed1f 31085$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
608e2dbb 31086
8b35ed1f
SM
31087fi
31088if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
608e2dbb 31089
8b35ed1f 31090$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
608e2dbb 31091
8b35ed1f 31092fi
608e2dbb 31093
8b35ed1f
SM
31094case $host_os in
31095 go32* | *djgpp*)
31096 gdbinit=gdb.ini
31097 ;;
31098 *)
31099 gdbinit=.gdbinit
31100 ;;
31101esac
608e2dbb 31102
8b35ed1f
SM
31103cat >>confdefs.h <<_ACEOF
31104#define GDBINIT "$gdbinit"
31105_ACEOF
608e2dbb 31106
608e2dbb 31107
608e2dbb 31108
8b35ed1f
SM
31109cat >>confdefs.h <<_ACEOF
31110#define GDBEARLYINIT ".gdbearlyinit"
31111_ACEOF
608e2dbb 31112
608e2dbb 31113
608e2dbb 31114
8b35ed1f
SM
31115# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
31116# except that the argument to --with-sysroot is optional.
31117# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
31118if test "x$with_sysroot" = xyes; then
31119 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
608e2dbb
TT
31120fi
31121
8b35ed1f
SM
31122# Check whether --with-sysroot was given.
31123if test "${with_sysroot+set}" = set; then :
31124 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
9f1528a1 31125else
8b35ed1f 31126 TARGET_SYSTEM_ROOT=
9f1528a1
AB
31127fi
31128
9f1528a1 31129
8b35ed1f
SM
31130 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
31131 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31132 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
31133 ac_define_dir=`eval echo $ac_define_dir`
608e2dbb 31134
8b35ed1f
SM
31135cat >>confdefs.h <<_ACEOF
31136#define TARGET_SYSTEM_ROOT "$ac_define_dir"
31137_ACEOF
608e2dbb 31138
608e2dbb 31139
608e2dbb 31140
608e2dbb 31141
8b35ed1f
SM
31142 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
31143 if test "x$prefix" = xNONE; then
31144 test_prefix=/usr/local
31145 else
31146 test_prefix=$prefix
31147 fi
31148 else
31149 test_prefix=$exec_prefix
31150 fi
31151 value=0
31152 case ${ac_define_dir} in
31153 "${test_prefix}"|"${test_prefix}/"*|\
31154 '${exec_prefix}'|'${exec_prefix}/'*)
31155 value=1
31156 ;;
31157 esac
31158
31159cat >>confdefs.h <<_ACEOF
31160#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
31161_ACEOF
31162
31163
608e2dbb 31164
608e2dbb 31165
608e2dbb 31166
8b35ed1f
SM
31167# Check whether --with-system-gdbinit was given.
31168if test "${with_system_gdbinit+set}" = set; then :
31169 withval=$with_system_gdbinit;
31170 SYSTEM_GDBINIT=$withval
31171else
31172 SYSTEM_GDBINIT=
31173fi
608e2dbb 31174
608e2dbb 31175
8b35ed1f
SM
31176 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
31177 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31178 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
31179 ac_define_dir=`eval echo $ac_define_dir`
31180
31181cat >>confdefs.h <<_ACEOF
31182#define SYSTEM_GDBINIT "$ac_define_dir"
31183_ACEOF
31184
31185
31186
31187
31188 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
31189 if test "x$prefix" = xNONE; then
31190 test_prefix=/usr/local
31191 else
31192 test_prefix=$prefix
31193 fi
31194 else
31195 test_prefix=$exec_prefix
608e2dbb 31196 fi
8b35ed1f
SM
31197 value=0
31198 case ${ac_define_dir} in
31199 "${test_prefix}"|"${test_prefix}/"*|\
31200 '${exec_prefix}'|'${exec_prefix}/'*)
31201 value=1
31202 ;;
31203 esac
31204
31205cat >>confdefs.h <<_ACEOF
31206#define SYSTEM_GDBINIT_RELOCATABLE $value
31207_ACEOF
31208
31209
31210
31211
31212
31213# Check whether --with-system-gdbinit-dir was given.
31214if test "${with_system_gdbinit_dir+set}" = set; then :
31215 withval=$with_system_gdbinit_dir;
31216 SYSTEM_GDBINIT_DIR=$withval
31217else
31218 SYSTEM_GDBINIT_DIR=
31219fi
31220
31221
31222 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
31223 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31224 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
31225 ac_define_dir=`eval echo $ac_define_dir`
31226
31227cat >>confdefs.h <<_ACEOF
31228#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
31229_ACEOF
31230
31231
31232
31233
31234 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
31235 if test "x$prefix" = xNONE; then
31236 test_prefix=/usr/local
31237 else
31238 test_prefix=$prefix
31239 fi
31240 else
31241 test_prefix=$exec_prefix
608e2dbb 31242 fi
8b35ed1f
SM
31243 value=0
31244 case ${ac_define_dir} in
31245 "${test_prefix}"|"${test_prefix}/"*|\
31246 '${exec_prefix}'|'${exec_prefix}/'*)
31247 value=1
31248 ;;
31249 esac
608e2dbb 31250
8b35ed1f
SM
31251cat >>confdefs.h <<_ACEOF
31252#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
31253_ACEOF
608e2dbb 31254
608e2dbb 31255
608e2dbb 31256
608e2dbb 31257
608e2dbb
TT
31258
31259
8b35ed1f
SM
31260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
31261$as_echo_n "checking the compiler type... " >&6; }
31262if ${gdb_cv_compiler_type+:} false; then :
608e2dbb
TT
31263 $as_echo_n "(cached) " >&6
31264else
8b35ed1f
SM
31265 gdb_cv_compiler_type=unknown
31266 if test "$gdb_cv_compiler_type" = unknown; then
31267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31268/* end confdefs.h. */
608e2dbb 31269
8b35ed1f
SM
31270int
31271main ()
31272{
31273
31274 #if !defined __GNUC__ || defined __clang__
31275 #error not gcc
31276 #endif
31277
31278 ;
31279 return 0;
31280}
31281_ACEOF
31282if ac_fn_c_try_compile "$LINENO"; then :
31283 gdb_cv_compiler_type=gcc
31284fi
31285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31286 fi
31287
31288 if test "$gdb_cv_compiler_type" = unknown; then
31289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31290/* end confdefs.h. */
31291
31292int
31293main ()
31294{
31295
31296 #ifndef __clang__
31297 #error not clang
31298 #endif
31299
31300 ;
31301 return 0;
31302}
31303_ACEOF
31304if ac_fn_c_try_compile "$LINENO"; then :
31305 gdb_cv_compiler_type=clang
31306fi
31307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31308 fi
31309
31310fi
31311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
31312$as_echo "$gdb_cv_compiler_type" >&6; }
31313
31314 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
31315
31316
31317# Check whether --enable-werror was given.
31318if test "${enable_werror+set}" = set; then :
31319 enableval=$enable_werror; case "${enableval}" in
31320 yes | y) ERROR_ON_WARNING="yes" ;;
31321 no | n) ERROR_ON_WARNING="no" ;;
31322 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
31323 esac
31324fi
31325
31326
31327# Enable -Werror by default when using gcc. Turn it off for releases.
31328if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
31329 ERROR_ON_WARNING=yes
31330fi
31331
31332WERROR_CFLAGS=""
31333if test "${ERROR_ON_WARNING}" = yes ; then
31334 WERROR_CFLAGS="-Werror"
31335fi
31336
31337# The options we'll try to enable.
df3eb64a
SM
31338build_warnings=" \
31339-Wall \
8b35ed1f
SM
31340-Wdeprecated-copy \
31341-Wdeprecated-copy-dtor \
df3eb64a
SM
31342-Wduplicated-cond \
31343-Wempty-body \
31344-Wimplicit-fallthrough=5 \
8b35ed1f 31345-Wmissing-declarations \
df3eb64a
SM
31346-Wno-char-subscripts \
31347-Wno-error=deprecated-register \
31348-Wno-mismatched-tags \
31349-Wno-sign-compare -Wno-error=maybe-uninitialized \
31350-Wno-switch \
31351-Wno-unused \
31352-Wpointer-arith \
31353-Wredundant-move \
31354-Wshadow=local \
8b35ed1f 31355-Wstrict-null-sentinel \
df3eb64a
SM
31356-Wsuggest-override \
31357-Wunused-but-set-parameter \
31358-Wunused-but-set-variable \
6fca4d96 31359-Wunused-const-variable=1 \
df3eb64a 31360-Wunused-function \
6fca4d96
SM
31361-Wunused-label \
31362-Wunused-lambda-capture \
31363-Wunused-local-typedefs \
31364-Wunused-member-function \
31365-Wunused-private-field \
df3eb64a
SM
31366-Wunused-value \
31367-Wunused-variable \
3145bf08 31368-Wvla \
8b35ed1f
SM
31369"
31370
31371# The -Wmissing-prototypes flag will be accepted by GCC, but results
31372# in a warning being printed about the flag not being valid for C++,
31373# this is something to do with using ccache, and argument ordering.
31374if test "$GDB_COMPILER_TYPE" != gcc; then
31375 build_warnings="$build_warnings -Wmissing-prototypes"
31376fi
31377
31378case "${host}" in
31379 *-*-mingw32*)
31380 # Enable -Wno-format by default when using gcc on mingw since many
31381 # GCC versions complain about %I64.
31382 build_warnings="$build_warnings -Wno-format" ;;
31383 *-*-solaris*)
31384 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
31385 # doesn't understand.
31386 build_warnings="$build_warnings -Wno-unknown-pragmas"
31387 # Solaris 11 <unistd.h> marks vfork deprecated.
31388 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
31389 *)
31390 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
31391 # but there's a special case for this below.
31392 build_warnings="$build_warnings -Wformat-nonliteral" ;;
31393esac
31394
31395# Check whether --enable-build-warnings was given.
31396if test "${enable_build_warnings+set}" = set; then :
31397 enableval=$enable_build_warnings; case "${enableval}" in
31398 yes) ;;
31399 no) build_warnings="-w";;
31400 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
31401 build_warnings="${build_warnings} ${t}";;
31402 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
31403 build_warnings="${t} ${build_warnings}";;
31404 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
31405esac
31406if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
31407 echo "Setting compiler warning flags = $build_warnings" 6>&1
31408fi
31409fi
31410# Check whether --enable-gdb-build-warnings was given.
31411if test "${enable_gdb_build_warnings+set}" = set; then :
31412 enableval=$enable_gdb_build_warnings; case "${enableval}" in
31413 yes) ;;
31414 no) build_warnings="-w";;
31415 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
31416 build_warnings="${build_warnings} ${t}";;
31417 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
31418 build_warnings="${t} ${build_warnings}";;
31419 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
31420esac
31421if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
31422 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
31423fi
31424fi
31425
31426# The set of warnings supported by a C++ compiler is not the same as
31427# of the C compiler.
31428ac_ext=cpp
31429ac_cpp='$CXXCPP $CPPFLAGS'
31430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31433
31434
31435WARN_CFLAGS=""
31436if test "x${build_warnings}" != x -a "x$GCC" = xyes
31437then
31438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
31439$as_echo_n "checking compiler warning flags... " >&6; }
31440 # Separate out the -Werror flag as some files just cannot be
31441 # compiled with it enabled.
31442 for w in ${build_warnings}; do
31443 # GCC does not complain about -Wno-unknown-warning. Invert
31444 # and test -Wunknown-warning instead.
31445 case $w in
31446 -Wno-*)
31447 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
31448 -Wformat-nonliteral)
31449 # gcc requires -Wformat before -Wformat-nonliteral
31450 # will work, so stick them together.
31451 w="-Wformat $w"
31452 wtest="$w"
31453 ;;
31454 *)
31455 wtest=$w ;;
31456 esac
31457
31458 case $w in
31459 -Werr*) WERROR_CFLAGS=-Werror ;;
31460 *)
31461 # Check whether GCC accepts it.
31462 saved_CFLAGS="$CFLAGS"
31463 CFLAGS="$CFLAGS -Werror $wtest"
31464 saved_CXXFLAGS="$CXXFLAGS"
31465 CXXFLAGS="$CXXFLAGS -Werror $wtest"
31466 if test "x$w" = "x-Wunused-variable"; then
31467 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
31468 # fixed in GCC 4.9. This test is derived from the gdb
31469 # source code that triggered this bug in GCC.
31470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
608e2dbb 31471/* end confdefs.h. */
8b35ed1f
SM
31472struct scoped_restore_base {};
31473 struct scoped_restore_tmpl : public scoped_restore_base {
31474 ~scoped_restore_tmpl() {}
31475 };
608e2dbb
TT
31476int
31477main ()
31478{
8b35ed1f
SM
31479const scoped_restore_base &b = scoped_restore_tmpl();
31480
608e2dbb
TT
31481 ;
31482 return 0;
31483}
31484_ACEOF
8b35ed1f
SM
31485if ac_fn_cxx_try_compile "$LINENO"; then :
31486 WARN_CFLAGS="${WARN_CFLAGS} $w"
608e2dbb 31487fi
8b35ed1f
SM
31488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31489 else
31490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31491/* end confdefs.h. */
608e2dbb 31492
8b35ed1f
SM
31493int
31494main ()
31495{
608e2dbb 31496
8b35ed1f
SM
31497 ;
31498 return 0;
31499}
31500_ACEOF
31501if ac_fn_cxx_try_compile "$LINENO"; then :
31502 WARN_CFLAGS="${WARN_CFLAGS} $w"
31503fi
31504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31505 fi
31506 CFLAGS="$saved_CFLAGS"
31507 CXXFLAGS="$saved_CXXFLAGS"
31508 esac
31509 done
31510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
31511$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
31512fi
608e2dbb 31513
608e2dbb
TT
31514
31515
8b35ed1f
SM
31516ac_ext=c
31517ac_cpp='$CPP $CPPFLAGS'
31518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31520ac_compiler_gnu=$ac_cv_c_compiler_gnu
608e2dbb
TT
31521
31522
31523
8b35ed1f
SM
31524# Check whether --enable-ubsan was given.
31525if test "${enable_ubsan+set}" = set; then :
31526 enableval=$enable_ubsan;
31527else
31528 enable_ubsan=no
31529fi
608e2dbb 31530
8b35ed1f
SM
31531if test "x$enable_ubsan" = xauto; then
31532 if $development; then
31533 enable_ubsan=yes
608e2dbb
TT
31534 fi
31535fi
8b35ed1f
SM
31536ac_ext=cpp
31537ac_cpp='$CXXCPP $CPPFLAGS'
31538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
608e2dbb 31541
8b35ed1f
SM
31542if test "x$enable_ubsan" = xyes; then
31543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
31544$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
31545 saved_CXXFLAGS="$CXXFLAGS"
31546 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
31547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31548/* end confdefs.h. */
3fc11d3e 31549
8b35ed1f
SM
31550int
31551main ()
31552{
d1c3b63a 31553
8b35ed1f
SM
31554 ;
31555 return 0;
31556}
31557_ACEOF
31558if ac_fn_cxx_try_link "$LINENO"; then :
31559 enable_ubsan=yes
31560else
31561 enable_ubsan=no
bec39cab 31562
8b35ed1f
SM
31563fi
31564rm -f core conftest.err conftest.$ac_objext \
31565 conftest$ac_exeext conftest.$ac_ext
31566 CXXFLAGS="$saved_CXXFLAGS"
31567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
31568$as_echo "$enable_ubsan" >&6; }
31569 if test "x$enable_ubsan" = xyes; then
31570 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
31571 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
31572 fi
31573fi
31574ac_ext=c
31575ac_cpp='$CPP $CPPFLAGS'
31576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31578ac_compiler_gnu=$ac_cv_c_compiler_gnu
3fc11d3e 31579
bec39cab 31580
81ecdfbb 31581
8b35ed1f
SM
31582# In the Cygwin environment, we need some additional flags.
31583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
31584$as_echo_n "checking for cygwin... " >&6; }
31585if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 31586 $as_echo_n "(cached) " >&6
3fc11d3e 31587else
8b35ed1f
SM
31588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31589/* end confdefs.h. */
bec39cab 31590
8b35ed1f
SM
31591#if defined (__CYGWIN__) || defined (__CYGWIN32__)
31592lose
31593#endif
31594_ACEOF
31595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31596 $EGREP "^lose$" >/dev/null 2>&1; then :
31597 gdb_cv_os_cygwin=yes
31598else
31599 gdb_cv_os_cygwin=no
31600fi
31601rm -f conftest*
3fc11d3e 31602
8b35ed1f
SM
31603fi
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
31605$as_echo "$gdb_cv_os_cygwin" >&6; }
5062cc19 31606
3fc11d3e 31607
8b35ed1f
SM
31608SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
31609case ${host} in
31610 *go32* ) SER_HARDWIRE=ser-go32.o ;;
31611 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
31612 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
31613 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
31614esac
bec39cab 31615
3fc11d3e 31616
8b35ed1f
SM
31617# libreadline needs libuser32.a in a cygwin environment
31618WIN32LIBS=
31619if test x"$gdb_cv_os_cygwin" = xyes; then
31620 WIN32LIBS="-luser32"
31621 case "${target}" in
31622 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
31623 ;;
31624 esac
31625fi
5062cc19 31626
8b35ed1f
SM
31627# The ser-tcp.c module requires sockets.
31628# Note that WIN32APILIBS is set by GDB_AC_COMMON.
31629WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
3fc11d3e 31630
8b35ed1f 31631# Add ELF support to GDB, but only if BFD includes ELF support.
bec39cab 31632
8b35ed1f
SM
31633 OLD_CFLAGS=$CFLAGS
31634 OLD_LDFLAGS=$LDFLAGS
31635 OLD_LIBS=$LIBS
31636 OLD_CC=$CC
31637 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
31638 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
31639 # always want our bfd.
31640 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5fc6b6d4 31641 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
862776f2
AA
31642 # LTLIBINTL because we use libtool as CC below.
31643 intl="$(echo "$LTLIBINTL" | sed 's,\$[{(]top_builddir[)}]/,,')"
8b35ed1f
SM
31644 LIBS="-lbfd -liberty $intl $LIBS"
31645 CC="./libtool --quiet --mode=link $CC"
31646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
31647$as_echo_n "checking for ELF support in BFD... " >&6; }
31648if ${gdb_cv_var_elf+:} false; then :
31649 $as_echo_n "(cached) " >&6
31650else
31651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31652/* end confdefs.h. */
31653#include <stdlib.h>
31654 #include <string.h>
31655 #include "bfd.h"
31656 #include "elf-bfd.h"
31657int
31658main ()
31659{
31660return bfd_get_elf_phdr_upper_bound (NULL);
bec39cab 31661
8b35ed1f
SM
31662 ;
31663 return 0;
31664}
31665_ACEOF
31666if ac_fn_c_try_link "$LINENO"; then :
31667 gdb_cv_var_elf=yes
31668else
31669 gdb_cv_var_elf=no
3fc11d3e 31670
8b35ed1f
SM
31671fi
31672rm -f core conftest.err conftest.$ac_objext \
31673 conftest$ac_exeext conftest.$ac_ext
bec39cab 31674
81ecdfbb 31675fi
8b35ed1f
SM
31676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
31677$as_echo "$gdb_cv_var_elf" >&6; }
31678 CC=$OLD_CC
31679 CFLAGS=$OLD_CFLAGS
31680 LDFLAGS=$OLD_LDFLAGS
31681 LIBS=$OLD_LIBS
31682if test "$gdb_cv_var_elf" = yes; then
31683 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
31684 gcore-elf.o elf-none-tdep.o"
81ecdfbb 31685
8b35ed1f
SM
31686$as_echo "#define HAVE_ELF 1" >>confdefs.h
31687
1305119a 31688 # -ldl is provided by bfd/Makefile.am (LIBDL) <PLUGINS>.
8b35ed1f
SM
31689 if test "$plugins" = "yes"; then
31690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
31691$as_echo_n "checking for library containing dlopen... " >&6; }
31692if ${ac_cv_search_dlopen+:} false; then :
81ecdfbb 31693 $as_echo_n "(cached) " >&6
bec39cab 31694else
8b35ed1f
SM
31695 ac_func_search_save_LIBS=$LIBS
31696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31697/* end confdefs.h. */
31698
31699/* Override any GCC internal prototype to avoid an error.
31700 Use char because int might match the return type of a GCC
31701 builtin and then its argument prototype would still apply. */
31702#ifdef __cplusplus
31703extern "C"
31704#endif
31705char dlopen ();
31706int
31707main ()
31708{
31709return dlopen ();
31710 ;
31711 return 0;
31712}
31713_ACEOF
31714for ac_lib in '' dl; do
31715 if test -z "$ac_lib"; then
31716 ac_res="none required"
31717 else
31718 ac_res=-l$ac_lib
31719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
31720 fi
31721 if ac_fn_c_try_link "$LINENO"; then :
31722 ac_cv_search_dlopen=$ac_res
31723fi
31724rm -f core conftest.err conftest.$ac_objext \
31725 conftest$ac_exeext
31726 if ${ac_cv_search_dlopen+:} false; then :
31727 break
31728fi
31729done
31730if ${ac_cv_search_dlopen+:} false; then :
31731
31732else
31733 ac_cv_search_dlopen=no
31734fi
31735rm conftest.$ac_ext
31736LIBS=$ac_func_search_save_LIBS
31737fi
31738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
31739$as_echo "$ac_cv_search_dlopen" >&6; }
31740ac_res=$ac_cv_search_dlopen
31741if test "$ac_res" != no; then :
31742 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3fc11d3e 31743
8b35ed1f 31744fi
3fc11d3e 31745
8b35ed1f
SM
31746 fi
31747fi
3fc11d3e 31748
8b35ed1f 31749# Add macho support to GDB, but only if BFD includes it.
5062cc19 31750
8b35ed1f
SM
31751 OLD_CFLAGS=$CFLAGS
31752 OLD_LDFLAGS=$LDFLAGS
31753 OLD_LIBS=$LIBS
31754 OLD_CC=$CC
31755 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
31756 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
31757 # always want our bfd.
31758 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5fc6b6d4 31759 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
862776f2
AA
31760 # LTLIBINTL because we use libtool as CC below.
31761 intl="$(echo "$LTLIBINTL" | sed 's,\$[{(]top_builddir[)}]/,,')"
8b35ed1f
SM
31762 LIBS="-lbfd -liberty $intl $LIBS"
31763 CC="./libtool --quiet --mode=link $CC"
31764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
31765$as_echo_n "checking for Mach-O support in BFD... " >&6; }
31766if ${gdb_cv_var_macho+:} false; then :
31767 $as_echo_n "(cached) " >&6
31768else
31769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31770/* end confdefs.h. */
31771#include <stdlib.h>
31772 #include <string.h>
31773 #include "bfd.h"
31774 #include "mach-o.h"
31775int
31776main ()
31777{
31778return bfd_mach_o_lookup_command (NULL, 0, NULL);
5062cc19 31779
8b35ed1f
SM
31780 ;
31781 return 0;
31782}
31783_ACEOF
31784if ac_fn_c_try_link "$LINENO"; then :
31785 gdb_cv_var_macho=yes
31786else
31787 gdb_cv_var_macho=no
3fc11d3e 31788
3fc11d3e 31789fi
8b35ed1f
SM
31790rm -f core conftest.err conftest.$ac_objext \
31791 conftest$ac_exeext conftest.$ac_ext
3fc11d3e 31792
8b35ed1f
SM
31793fi
31794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
31795$as_echo "$gdb_cv_var_macho" >&6; }
31796 CC=$OLD_CC
31797 CFLAGS=$OLD_CFLAGS
31798 LDFLAGS=$OLD_LDFLAGS
31799 LIBS=$OLD_LIBS
31800if test "$gdb_cv_var_macho" = yes; then
31801 CONFIG_OBS="$CONFIG_OBS machoread.o"
31802fi
3fc11d3e 31803
8b35ed1f
SM
31804# Add any host-specific objects to GDB.
31805CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
dd2504ab 31806
8b35ed1f
SM
31807# If building on ELF, look for lzma support for embedded compressed debug info.
31808if test "$gdb_cv_var_elf" = yes; then
85541719 31809
8b35ed1f
SM
31810# Check whether --with-lzma was given.
31811if test "${with_lzma+set}" = set; then :
31812 withval=$with_lzma;
31813else
31814 with_lzma=auto
31815fi
85541719 31816
8b35ed1f
SM
31817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
31818$as_echo_n "checking whether to use lzma... " >&6; }
31819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
31820$as_echo "$with_lzma" >&6; }
85541719 31821
8b35ed1f 31822 if test "${with_lzma}" != no; then
85541719 31823
85541719 31824
85541719
DE
31825
31826
31827
31828
31829
31830
8b35ed1f 31831 use_additional=yes
85541719 31832
8b35ed1f
SM
31833 acl_save_prefix="$prefix"
31834 prefix="$acl_final_prefix"
31835 acl_save_exec_prefix="$exec_prefix"
31836 exec_prefix="$acl_final_exec_prefix"
85541719 31837
8b35ed1f
SM
31838 eval additional_includedir=\"$includedir\"
31839 eval additional_libdir=\"$libdir\"
85541719 31840
8b35ed1f
SM
31841 exec_prefix="$acl_save_exec_prefix"
31842 prefix="$acl_save_prefix"
85541719
DE
31843
31844
8b35ed1f
SM
31845# Check whether --with-liblzma-prefix was given.
31846if test "${with_liblzma_prefix+set}" = set; then :
31847 withval=$with_liblzma_prefix;
31848 if test "X$withval" = "Xno"; then
31849 use_additional=no
31850 else
31851 if test "X$withval" = "X"; then
85541719 31852
8b35ed1f
SM
31853 acl_save_prefix="$prefix"
31854 prefix="$acl_final_prefix"
31855 acl_save_exec_prefix="$exec_prefix"
31856 exec_prefix="$acl_final_exec_prefix"
85541719 31857
8b35ed1f
SM
31858 eval additional_includedir=\"$includedir\"
31859 eval additional_libdir=\"$libdir\"
85541719 31860
8b35ed1f
SM
31861 exec_prefix="$acl_save_exec_prefix"
31862 prefix="$acl_save_prefix"
85541719 31863
8b35ed1f
SM
31864 else
31865 additional_includedir="$withval/include"
31866 additional_libdir="$withval/lib"
31867 fi
31868 fi
85541719 31869
8b35ed1f 31870fi
85541719 31871
85541719 31872
8b35ed1f
SM
31873# Check whether --with-liblzma-type was given.
31874if test "${with_liblzma_type+set}" = set; then :
31875 withval=$with_liblzma_type; with_liblzma_type=$withval
31876else
31877 with_liblzma_type=auto
31878fi
85541719 31879
8b35ed1f 31880 lib_type=`eval echo \$with_liblzma_type`
85541719 31881
8b35ed1f
SM
31882 LIBLZMA=
31883 LTLIBLZMA=
31884 INCLZMA=
31885 rpathdirs=
31886 ltrpathdirs=
31887 names_already_handled=
31888 names_next_round='lzma '
31889 while test -n "$names_next_round"; do
31890 names_this_round="$names_next_round"
31891 names_next_round=
31892 for name in $names_this_round; do
31893 already_handled=
31894 for n in $names_already_handled; do
31895 if test "$n" = "$name"; then
31896 already_handled=yes
31897 break
85541719 31898 fi
8b35ed1f
SM
31899 done
31900 if test -z "$already_handled"; then
31901 names_already_handled="$names_already_handled $name"
31902 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
31903 eval value=\"\$HAVE_LIB$uppername\"
31904 if test -n "$value"; then
31905 if test "$value" = yes; then
31906 eval value=\"\$LIB$uppername\"
31907 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
31908 eval value=\"\$LTLIB$uppername\"
31909 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
31910 else
31911 :
31912 fi
31913 else
31914 found_dir=
31915 found_la=
31916 found_so=
31917 found_a=
31918 if test $use_additional = yes; then
31919 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
31920 found_dir="$additional_libdir"
31921 found_so="$additional_libdir/lib$name.$shlibext"
31922 if test -f "$additional_libdir/lib$name.la"; then
31923 found_la="$additional_libdir/lib$name.la"
31924 fi
31925 elif test x$lib_type != xshared; then
31926 if test -f "$additional_libdir/lib$name.$libext"; then
31927 found_dir="$additional_libdir"
31928 found_a="$additional_libdir/lib$name.$libext"
31929 if test -f "$additional_libdir/lib$name.la"; then
31930 found_la="$additional_libdir/lib$name.la"
31931 fi
31932 fi
31933 fi
31934 fi
31935 if test "X$found_dir" = "X"; then
31936 for x in $LDFLAGS $LTLIBLZMA; do
31937
31938 acl_save_prefix="$prefix"
31939 prefix="$acl_final_prefix"
31940 acl_save_exec_prefix="$exec_prefix"
31941 exec_prefix="$acl_final_exec_prefix"
31942 eval x=\"$x\"
31943 exec_prefix="$acl_save_exec_prefix"
31944 prefix="$acl_save_prefix"
31945
31946 case "$x" in
31947 -L*)
31948 dir=`echo "X$x" | sed -e 's/^X-L//'`
31949 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
31950 found_dir="$dir"
31951 found_so="$dir/lib$name.$shlibext"
31952 if test -f "$dir/lib$name.la"; then
31953 found_la="$dir/lib$name.la"
31954 fi
31955 elif test x$lib_type != xshared; then
31956 if test -f "$dir/lib$name.$libext"; then
31957 found_dir="$dir"
31958 found_a="$dir/lib$name.$libext"
31959 if test -f "$dir/lib$name.la"; then
31960 found_la="$dir/lib$name.la"
31961 fi
31962 fi
31963 fi
31964 ;;
31965 esac
31966 if test "X$found_dir" != "X"; then
31967 break
31968 fi
31969 done
31970 fi
31971 if test "X$found_dir" != "X"; then
31972 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
31973 if test "X$found_so" != "X"; then
31974 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
31975 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
31976 else
31977 haveit=
31978 for x in $ltrpathdirs; do
31979 if test "X$x" = "X$found_dir"; then
31980 haveit=yes
31981 break
31982 fi
31983 done
31984 if test -z "$haveit"; then
31985 ltrpathdirs="$ltrpathdirs $found_dir"
31986 fi
31987 if test "$hardcode_direct" = yes; then
31988 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
31989 else
31990 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
31991 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
31992 haveit=
31993 for x in $rpathdirs; do
31994 if test "X$x" = "X$found_dir"; then
31995 haveit=yes
31996 break
31997 fi
31998 done
31999 if test -z "$haveit"; then
32000 rpathdirs="$rpathdirs $found_dir"
32001 fi
32002 else
32003 haveit=
32004 for x in $LDFLAGS $LIBLZMA; do
85541719 32005
8b35ed1f
SM
32006 acl_save_prefix="$prefix"
32007 prefix="$acl_final_prefix"
32008 acl_save_exec_prefix="$exec_prefix"
32009 exec_prefix="$acl_final_exec_prefix"
32010 eval x=\"$x\"
32011 exec_prefix="$acl_save_exec_prefix"
32012 prefix="$acl_save_prefix"
85541719 32013
8b35ed1f
SM
32014 if test "X$x" = "X-L$found_dir"; then
32015 haveit=yes
32016 break
32017 fi
32018 done
32019 if test -z "$haveit"; then
32020 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
32021 fi
32022 if test "$hardcode_minus_L" != no; then
32023 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
32024 else
32025 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
32026 fi
32027 fi
32028 fi
32029 fi
32030 else
32031 if test "X$found_a" != "X"; then
32032 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
32033 else
32034 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
32035 fi
32036 fi
32037 additional_includedir=
32038 case "$found_dir" in
32039 */lib | */lib/)
32040 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
32041 additional_includedir="$basedir/include"
32042 ;;
32043 esac
32044 if test "X$additional_includedir" != "X"; then
32045 if test "X$additional_includedir" != "X/usr/include"; then
32046 haveit=
32047 if test "X$additional_includedir" = "X/usr/local/include"; then
32048 if test -n "$GCC"; then
32049 case $host_os in
32050 linux*) haveit=yes;;
32051 esac
32052 fi
32053 fi
32054 if test -z "$haveit"; then
32055 for x in $CPPFLAGS $INCLZMA; do
85541719 32056
8b35ed1f
SM
32057 acl_save_prefix="$prefix"
32058 prefix="$acl_final_prefix"
32059 acl_save_exec_prefix="$exec_prefix"
32060 exec_prefix="$acl_final_exec_prefix"
32061 eval x=\"$x\"
32062 exec_prefix="$acl_save_exec_prefix"
32063 prefix="$acl_save_prefix"
85541719 32064
8b35ed1f
SM
32065 if test "X$x" = "X-I$additional_includedir"; then
32066 haveit=yes
32067 break
32068 fi
32069 done
32070 if test -z "$haveit"; then
32071 if test -d "$additional_includedir"; then
32072 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
32073 fi
32074 fi
32075 fi
32076 fi
32077 fi
32078 if test -n "$found_la"; then
32079 save_libdir="$libdir"
32080 case "$found_la" in
32081 */* | *\\*) . "$found_la" ;;
32082 *) . "./$found_la" ;;
32083 esac
32084 libdir="$save_libdir"
32085 for dep in $dependency_libs; do
32086 case "$dep" in
32087 -L*)
32088 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
32089 if test "X$additional_libdir" != "X/usr/lib"; then
32090 haveit=
32091 if test "X$additional_libdir" = "X/usr/local/lib"; then
32092 if test -n "$GCC"; then
32093 case $host_os in
32094 linux*) haveit=yes;;
32095 esac
32096 fi
32097 fi
32098 if test -z "$haveit"; then
32099 haveit=
32100 for x in $LDFLAGS $LIBLZMA; do
85541719 32101
8b35ed1f
SM
32102 acl_save_prefix="$prefix"
32103 prefix="$acl_final_prefix"
32104 acl_save_exec_prefix="$exec_prefix"
32105 exec_prefix="$acl_final_exec_prefix"
32106 eval x=\"$x\"
32107 exec_prefix="$acl_save_exec_prefix"
32108 prefix="$acl_save_prefix"
dd2504ab 32109
8b35ed1f
SM
32110 if test "X$x" = "X-L$additional_libdir"; then
32111 haveit=yes
32112 break
32113 fi
32114 done
32115 if test -z "$haveit"; then
32116 if test -d "$additional_libdir"; then
32117 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
32118 fi
32119 fi
32120 haveit=
32121 for x in $LDFLAGS $LTLIBLZMA; do
bec39cab 32122
8b35ed1f
SM
32123 acl_save_prefix="$prefix"
32124 prefix="$acl_final_prefix"
32125 acl_save_exec_prefix="$exec_prefix"
32126 exec_prefix="$acl_final_exec_prefix"
32127 eval x=\"$x\"
32128 exec_prefix="$acl_save_exec_prefix"
32129 prefix="$acl_save_prefix"
5062cc19 32130
8b35ed1f
SM
32131 if test "X$x" = "X-L$additional_libdir"; then
32132 haveit=yes
32133 break
32134 fi
32135 done
32136 if test -z "$haveit"; then
32137 if test -d "$additional_libdir"; then
32138 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
32139 fi
32140 fi
32141 fi
32142 fi
32143 ;;
32144 -R*)
32145 dir=`echo "X$dep" | sed -e 's/^X-R//'`
32146 if test "$enable_rpath" != no; then
32147 haveit=
32148 for x in $rpathdirs; do
32149 if test "X$x" = "X$dir"; then
32150 haveit=yes
32151 break
32152 fi
32153 done
32154 if test -z "$haveit"; then
32155 rpathdirs="$rpathdirs $dir"
32156 fi
32157 haveit=
32158 for x in $ltrpathdirs; do
32159 if test "X$x" = "X$dir"; then
32160 haveit=yes
32161 break
32162 fi
32163 done
32164 if test -z "$haveit"; then
32165 ltrpathdirs="$ltrpathdirs $dir"
32166 fi
32167 fi
32168 ;;
32169 -l*)
32170 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
32171 ;;
32172 *.la)
32173 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
32174 ;;
32175 *)
32176 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
32177 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
32178 ;;
32179 esac
32180 done
32181 fi
32182 else
32183 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
32184 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
32185 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
32186 else
32187 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
32188 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
32189 fi
32190 fi
32191 fi
32192 fi
32193 done
32194 done
32195 if test "X$rpathdirs" != "X"; then
32196 if test -n "$hardcode_libdir_separator"; then
32197 alldirs=
32198 for found_dir in $rpathdirs; do
32199 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
32200 done
32201 acl_save_libdir="$libdir"
32202 libdir="$alldirs"
32203 eval flag=\"$hardcode_libdir_flag_spec\"
32204 libdir="$acl_save_libdir"
32205 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
32206 else
32207 for found_dir in $rpathdirs; do
32208 acl_save_libdir="$libdir"
32209 libdir="$found_dir"
32210 eval flag=\"$hardcode_libdir_flag_spec\"
32211 libdir="$acl_save_libdir"
32212 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
32213 done
3fc11d3e 32214 fi
8b35ed1f
SM
32215 fi
32216 if test "X$ltrpathdirs" != "X"; then
32217 for found_dir in $ltrpathdirs; do
32218 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
32219 done
32220 fi
bec39cab
AC
32221
32222
8b35ed1f 32223 ac_save_CPPFLAGS="$CPPFLAGS"
bec39cab 32224
8b35ed1f
SM
32225 for element in $INCLZMA; do
32226 haveit=
32227 for x in $CPPFLAGS; do
bec39cab 32228
8b35ed1f
SM
32229 acl_save_prefix="$prefix"
32230 prefix="$acl_final_prefix"
32231 acl_save_exec_prefix="$exec_prefix"
32232 exec_prefix="$acl_final_exec_prefix"
32233 eval x=\"$x\"
32234 exec_prefix="$acl_save_exec_prefix"
32235 prefix="$acl_save_prefix"
3fc11d3e 32236
8b35ed1f
SM
32237 if test "X$x" = "X$element"; then
32238 haveit=yes
32239 break
32240 fi
32241 done
32242 if test -z "$haveit"; then
32243 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
32244 fi
32245 done
3fc11d3e 32246
bec39cab 32247
8b35ed1f
SM
32248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
32249$as_echo_n "checking for liblzma... " >&6; }
32250if ${ac_cv_liblzma+:} false; then :
32251 $as_echo_n "(cached) " >&6
32252else
bec39cab 32253
8b35ed1f
SM
32254 ac_save_LIBS="$LIBS"
32255 LIBS="$LIBS $LIBLZMA"
32256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32257/* end confdefs.h. */
32258#include "lzma.h"
32259int
32260main ()
32261{
32262lzma_index_iter iter;
32263 lzma_index_iter_init (&iter, 0);
32264 lzma_mf_is_supported (LZMA_MF_HC3);
32265 ;
32266 return 0;
32267}
32268_ACEOF
32269if ac_fn_c_try_link "$LINENO"; then :
32270 ac_cv_liblzma=yes
32271else
32272 ac_cv_liblzma=no
32273fi
32274rm -f core conftest.err conftest.$ac_objext \
32275 conftest$ac_exeext conftest.$ac_ext
32276 LIBS="$ac_save_LIBS"
3fc11d3e 32277
8b35ed1f
SM
32278fi
32279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
32280$as_echo "$ac_cv_liblzma" >&6; }
32281 if test "$ac_cv_liblzma" = yes; then
32282 HAVE_LIBLZMA=yes
3fc11d3e 32283
8b35ed1f 32284$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
bec39cab 32285
8b35ed1f
SM
32286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
32287$as_echo_n "checking how to link with liblzma... " >&6; }
32288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
32289$as_echo "$LIBLZMA" >&6; }
3fc11d3e 32290 else
8b35ed1f
SM
32291 HAVE_LIBLZMA=no
32292 CPPFLAGS="$ac_save_CPPFLAGS"
32293 LIBLZMA=
32294 LTLIBLZMA=
3fc11d3e 32295 fi
3fc11d3e 32296
3fc11d3e 32297
4226a5a5 32298
3fc11d3e 32299
ffc6a242 32300
3ace7edb 32301
8b35ed1f
SM
32302 if test "$HAVE_LIBLZMA" != yes; then
32303 if test "$with_lzma" = yes; then
32304 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
32305 fi
85541719 32306 fi
8b35ed1f 32307 fi
3fc11d3e
JM
32308fi
32309
8b35ed1f
SM
32310LIBGUI="../libgui/src/libgui.a"
32311GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
3fc11d3e
JM
32312
32313
32314
8b35ed1f 32315WIN32LDAPP=
3fc11d3e
JM
32316
32317
32318
8b35ed1f
SM
32319case "${host}" in
32320*-*-cygwin* | *-*-mingw* )
32321 configdir="win"
32322 ;;
32323*)
32324 configdir="unix"
32325 ;;
32326esac
3fc11d3e 32327
8b35ed1f
SM
32328GDBTKLIBS=
32329if test "${enable_gdbtk}" = "yes"; then
bec39cab 32330
8b35ed1f
SM
32331 # Gdbtk must have an absolute path to srcdir in order to run
32332 # properly when not installed.
32333 here=`pwd`
32334 cd ${srcdir}
32335 GDBTK_SRC_DIR=`pwd`
32336 cd $here
c906108c 32337
c906108c 32338
8b35ed1f
SM
32339 #
32340 # Ok, lets find the tcl configuration
32341 # First, look for one uninstalled.
32342 # the alternative search directory is invoked by --with-tcl
32343 #
c906108c 32344
8b35ed1f
SM
32345 if test x"${no_tcl}" = x ; then
32346 # we reset no_tcl in case something fails here
32347 no_tcl=true
32348
32349# Check whether --with-tcl was given.
32350if test "${with_tcl+set}" = set; then :
32351 withval=$with_tcl; with_tclconfig=${withval}
32352fi
b686ecb5 32353
8b35ed1f
SM
32354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
32355$as_echo_n "checking for Tcl configuration... " >&6; }
32356 if ${ac_cv_c_tclconfig+:} false; then :
32357 $as_echo_n "(cached) " >&6
32358else
b686ecb5 32359
b686ecb5 32360
8b35ed1f
SM
32361 # First check to see if --with-tcl was specified.
32362 case "${host}" in
32363 *-*-cygwin*) platDir="win" ;;
32364 *) platDir="unix" ;;
32365 esac
32366 if test x"${with_tclconfig}" != x ; then
32367 if test -f "${with_tclconfig}/tclConfig.sh" ; then
32368 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
32369 else
32370 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
32371 fi
32372 fi
b686ecb5 32373
8b35ed1f
SM
32374 # then check for a private Tcl installation
32375 if test x"${ac_cv_c_tclconfig}" = x ; then
32376 for i in \
32377 ../tcl \
32378 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
32379 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
32380 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
32381 ../../tcl \
32382 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
32383 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
32384 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
32385 ../../../tcl \
32386 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
32387 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
32388 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
32389 if test -f "$i/$platDir/tclConfig.sh" ; then
32390 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
32391 break
32392 fi
32393 done
32394 fi
b686ecb5 32395
8b35ed1f
SM
32396 # on Darwin, check in Framework installation locations
32397 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
32398 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
32399 `ls -d /Library/Frameworks 2>/dev/null` \
32400 `ls -d /Network/Library/Frameworks 2>/dev/null` \
32401 `ls -d /System/Library/Frameworks 2>/dev/null` \
32402 ; do
32403 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
32404 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
32405 break
32406 fi
32407 done
32408 fi
b686ecb5 32409
8b35ed1f
SM
32410 # check in a few common install locations
32411 if test x"${ac_cv_c_tclconfig}" = x ; then
32412 for i in `ls -d ${libdir} 2>/dev/null` \
32413 `ls -d ${exec_prefix}/lib 2>/dev/null` \
32414 `ls -d ${prefix}/lib 2>/dev/null` \
32415 `ls -d /usr/local/lib 2>/dev/null` \
32416 `ls -d /usr/contrib/lib 2>/dev/null` \
32417 `ls -d /usr/lib 2>/dev/null` \
32418 ; do
32419 if test -f "$i/tclConfig.sh" ; then
32420 ac_cv_c_tclconfig=`(cd $i; pwd)`
32421 break
32422 fi
32423 done
32424 fi
32425
32426 # check in a few other private locations
32427 if test x"${ac_cv_c_tclconfig}" = x ; then
32428 for i in \
32429 ${srcdir}/../tcl \
32430 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
32431 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
32432 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
32433 if test -f "$i/$platDir/tclConfig.sh" ; then
32434 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
32435 break
32436 fi
32437 done
32438 fi
b686ecb5 32439
b686ecb5 32440fi
b686ecb5 32441
8b35ed1f
SM
32442
32443 if test x"${ac_cv_c_tclconfig}" = x ; then
32444 TCL_BIN_DIR="# no Tcl configs found"
32445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
32446$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
32447 else
32448 no_tcl=
32449 TCL_BIN_DIR=${ac_cv_c_tclconfig}
32450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
32451$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
32452 fi
b686ecb5 32453 fi
b686ecb5 32454
b686ecb5 32455
8b35ed1f
SM
32456 # If $no_tk is nonempty, then we can't do Tk, and there is no
32457 # point to doing Tcl.
b686ecb5 32458
8b35ed1f
SM
32459 #
32460 # Ok, lets find the tk configuration
32461 # First, look for one uninstalled.
32462 # the alternative search directory is invoked by --with-tk
32463 #
b686ecb5 32464
8b35ed1f
SM
32465 if test x"${no_tk}" = x ; then
32466 # we reset no_tk in case something fails here
32467 no_tk=true
32468
32469# Check whether --with-tk was given.
32470if test "${with_tk+set}" = set; then :
32471 withval=$with_tk; with_tkconfig=${withval}
b686ecb5
JM
32472fi
32473
8b35ed1f
SM
32474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
32475$as_echo_n "checking for Tk configuration... " >&6; }
32476 if ${ac_cv_c_tkconfig+:} false; then :
32477 $as_echo_n "(cached) " >&6
32478else
b686ecb5 32479
b686ecb5 32480
8b35ed1f
SM
32481 # First check to see if --with-tkconfig was specified.
32482 if test x"${with_tkconfig}" != x ; then
32483 if test -f "${with_tkconfig}/tkConfig.sh" ; then
32484 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
32485 else
32486 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
32487 fi
32488 fi
b686ecb5 32489
8b35ed1f
SM
32490 # then check for a private Tk library
32491 case "${host}" in
32492 *-*-cygwin*) platDir="win" ;;
32493 *) platDir="unix" ;;
32494 esac
32495 if test x"${ac_cv_c_tkconfig}" = x ; then
32496 for i in \
32497 ../tk \
32498 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
32499 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
32500 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
32501 ../../tk \
32502 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
32503 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
32504 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
32505 ../../../tk \
32506 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
32507 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
32508 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
32509 if test -f "$i/$platDir/tkConfig.sh" ; then
32510 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
32511 break
32512 fi
32513 done
32514 fi
b686ecb5 32515
8b35ed1f
SM
32516 # on Darwin, check in Framework installation locations
32517 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
32518 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
32519 `ls -d /Library/Frameworks 2>/dev/null` \
32520 `ls -d /Network/Library/Frameworks 2>/dev/null` \
32521 `ls -d /System/Library/Frameworks 2>/dev/null` \
32522 ; do
32523 if test -f "$i/Tk.framework/tkConfig.sh" ; then
32524 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
32525 break
32526 fi
32527 done
32528 fi
32529
32530 # check in a few common install locations
32531 if test x"${ac_cv_c_tkconfig}" = x ; then
32532 for i in `ls -d ${libdir} 2>/dev/null` \
32533 `ls -d ${exec_prefix}/lib 2>/dev/null` \
32534 `ls -d ${prefix}/lib 2>/dev/null` \
32535 `ls -d /usr/local/lib 2>/dev/null` \
32536 `ls -d /usr/contrib/lib 2>/dev/null` \
32537 `ls -d /usr/lib 2>/dev/null` \
32538 ; do
32539 if test -f "$i/tkConfig.sh" ; then
32540 ac_cv_c_tkconfig=`(cd $i; pwd)`
32541 break
32542 fi
32543 done
32544 fi
32545 # check in a few other private locations
32546 if test x"${ac_cv_c_tkconfig}" = x ; then
32547 for i in \
32548 ${srcdir}/../tk \
32549 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
32550 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
32551 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
32552 if test -f "$i/$platDir/tkConfig.sh" ; then
32553 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
32554 break
32555 fi
32556 done
32557 fi
b686ecb5 32558
b686ecb5
JM
32559fi
32560
32561
8b35ed1f
SM
32562 if test x"${ac_cv_c_tkconfig}" = x ; then
32563 TK_BIN_DIR="# no Tk configs found"
32564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
32565$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
32566 else
32567 no_tk=
32568 TK_BIN_DIR=${ac_cv_c_tkconfig}
32569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
32570$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
32571 fi
32572 fi
b686ecb5
JM
32573
32574
8b35ed1f 32575 if test -z "${no_tcl}" -a -z "${no_tk}"; then
b686ecb5 32576
8b35ed1f
SM
32577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
32578$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
b686ecb5 32579
8b35ed1f
SM
32580 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
32581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
32582$as_echo "loading" >&6; }
32583 . ${TCL_BIN_DIR}/tclConfig.sh
32584 else
32585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
32586$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
32587 fi
b686ecb5 32588
8b35ed1f
SM
32589 # eval is required to do the TCL_DBGX substitution
32590 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
32591 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
b686ecb5 32592
8b35ed1f
SM
32593 # If the TCL_BIN_DIR is the build directory (not the install directory),
32594 # then set the common variable name to the value of the build variables.
32595 # For example, the variable TCL_LIB_SPEC will be set to the value
32596 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
32597 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
32598 # installed and uninstalled version of Tcl.
32599 if test -f "${TCL_BIN_DIR}/Makefile" ; then
32600 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
32601 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
32602 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
32603 elif test "`uname -s`" = "Darwin"; then
32604 # If Tcl was built as a framework, attempt to use the libraries
32605 # from the framework at the given location so that linking works
32606 # against Tcl.framework installed in an arbitrary location.
32607 case ${TCL_DEFS} in
32608 *TCL_FRAMEWORK*)
32609 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
32610 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
32611 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
32612 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
32613 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
32614 break
32615 fi
32616 done
32617 fi
32618 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
32619 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
32620 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
32621 fi
32622 ;;
32623 esac
32624 fi
b686ecb5 32625
8b35ed1f
SM
32626 # eval is required to do the TCL_DBGX substitution
32627 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
32628 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
32629 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
32630 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
b686ecb5
JM
32631
32632
32633
32634
32635
b686ecb5 32636
b686ecb5
JM
32637
32638
b686ecb5
JM
32639
32640
b686ecb5
JM
32641
32642
b686ecb5
JM
32643
32644
b686ecb5 32645
8b35ed1f
SM
32646 # Check for in-tree tcl
32647 here=`pwd`
32648 cd ${srcdir}/..
32649 topdir=`pwd`
32650 cd ${here}
b686ecb5 32651
8b35ed1f
SM
32652 intree="no"
32653 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
32654 intree="yes"
32655 fi
b686ecb5 32656
8b35ed1f
SM
32657 # Find Tcl private headers
32658 if test x"${intree}" = xno; then
b686ecb5 32659
8b35ed1f
SM
32660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
32661$as_echo_n "checking for Tcl private headers... " >&6; }
32662 private_dir=""
32663 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
32664 if test -f ${dir}/tclInt.h ; then
32665 private_dir=${dir}
32666 fi
b686ecb5 32667
8b35ed1f
SM
32668 if test x"${private_dir}" = x; then
32669 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
32670 else
32671 TCL_PRIVATE_INCLUDE="-I${private_dir}"
32672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
32673$as_echo "${private_dir}" >&6; }
32674 fi
b686ecb5 32675
8b35ed1f
SM
32676 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
32677 TCL_LIBRARY="${TCL_LIB_SPEC}"
32678 TCL_DEPS=""
32679 else
32680 # If building tcl in the same src tree, private headers
32681 # are not needed, but we need to be sure to use the right
32682 # headers library
32683 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
32684 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
32685 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
32686 fi
b686ecb5
JM
32687
32688
32689
32690
32691
8b35ed1f
SM
32692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
32693$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
b686ecb5 32694
8b35ed1f
SM
32695 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
32696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
32697$as_echo "loading" >&6; }
32698 . ${TK_BIN_DIR}/tkConfig.sh
32699 else
32700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
32701$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
32702 fi
b686ecb5 32703
8b35ed1f
SM
32704 # eval is required to do the TK_DBGX substitution
32705 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
32706 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
b686ecb5 32707
8b35ed1f
SM
32708 # If the TK_BIN_DIR is the build directory (not the install directory),
32709 # then set the common variable name to the value of the build variables.
32710 # For example, the variable TK_LIB_SPEC will be set to the value
32711 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
32712 # instead of TK_BUILD_LIB_SPEC since it will work with both an
32713 # installed and uninstalled version of Tcl.
32714 if test -f "${TK_BIN_DIR}/Makefile" ; then
32715 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
32716 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
32717 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
32718 elif test "`uname -s`" = "Darwin"; then
32719 # If Tk was built as a framework, attempt to use the libraries
32720 # from the framework at the given location so that linking works
32721 # against Tk.framework installed in an arbitrary location.
32722 case ${TK_DEFS} in
32723 *TK_FRAMEWORK*)
32724 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
32725 for i in "`cd ${TK_BIN_DIR}; pwd`" \
32726 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
32727 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
32728 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
32729 break
32730 fi
32731 done
32732 fi
32733 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
32734 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
32735 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
32736 fi
32737 ;;
32738 esac
32739 fi
b686ecb5 32740
8b35ed1f
SM
32741 # eval is required to do the TK_DBGX substitution
32742 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
32743 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
32744 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
32745 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
b686ecb5 32746
bec39cab 32747
bec39cab 32748
bec39cab 32749
bec39cab 32750
bec39cab 32751
bec39cab 32752
bec39cab 32753
b686ecb5 32754
c906108c 32755
b686ecb5 32756
b686ecb5
JM
32757
32758
32759
8b35ed1f
SM
32760 # Check for in-tree Tk
32761 intree="no"
32762 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
32763 intree="yes"
32764 fi
b686ecb5 32765
8b35ed1f
SM
32766 # Find Tk private headers
32767 if test x"${intree}" = xno; then
b686ecb5 32768
8b35ed1f
SM
32769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
32770$as_echo_n "checking for Tk private headers... " >&6; }
32771 private_dir=""
32772 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
32773 if test -f ${dir}/tkInt.h; then
32774 private_dir=${dir}
32775 fi
b686ecb5 32776
8b35ed1f
SM
32777 if test x"${private_dir}" = x; then
32778 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
32779 else
32780 TK_PRIVATE_INCLUDE="-I${private_dir}"
32781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
32782$as_echo "${private_dir}" >&6; }
32783 fi
b686ecb5 32784
8b35ed1f
SM
32785 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
32786 TK_LIBRARY=${TK_LIB_SPEC}
32787 TK_DEPS=""
32788 else
32789 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
32790 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
32791 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
32792 fi
b686ecb5 32793
b686ecb5 32794
b686ecb5 32795
b686ecb5 32796
b686ecb5 32797
8b35ed1f 32798 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
b686ecb5 32799
8b35ed1f
SM
32800 # Include some libraries that Tcl and Tk want.
32801 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
32802 # Yes, the ordering seems wrong here. But it isn't.
32803 # TK_LIBS is the list of libraries that need to be linked
32804 # after Tcl/Tk. Note that this isn't put into LIBS. If it
32805 # were in LIBS then any link tests after this point would
32806 # try to include things like `$(LIBGUI)', which wouldn't work.
32807 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
b686ecb5 32808
8b35ed1f
SM
32809 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
32810 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
32811 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
32812 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
32813 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
32814 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
32815 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
b686ecb5 32816
8b35ed1f
SM
32817 if test x"$gdb_cv_os_cygwin" = xyes; then
32818 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
32819 WIN32LDAPP="-Wl,--subsystem,console"
32820 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
32821 fi
b686ecb5 32822
8b35ed1f 32823 subdirs="$subdirs gdbtk"
b686ecb5 32824
c906108c 32825 fi
c906108c
SS
32826fi
32827
7a292a7a 32828
7a292a7a 32829
60ca704f 32830
976102cd 32831
976102cd 32832
b686ecb5 32833
b686ecb5 32834
8b35ed1f
SM
32835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
32836$as_echo_n "checking for X... " >&6; }
32837
32838
32839# Check whether --with-x was given.
32840if test "${with_x+set}" = set; then :
32841 withval=$with_x;
32842fi
32843
32844# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
32845if test "x$with_x" = xno; then
32846 # The user explicitly disabled X.
32847 have_x=disabled
32848else
32849 case $x_includes,$x_libraries in #(
32850 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
32851 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
32852 $as_echo_n "(cached) " >&6
32853else
32854 # One or both of the vars are not set, and there is no cached value.
32855ac_x_includes=no ac_x_libraries=no
32856rm -f -r conftest.dir
32857if mkdir conftest.dir; then
32858 cd conftest.dir
32859 cat >Imakefile <<'_ACEOF'
32860incroot:
32861 @echo incroot='${INCROOT}'
32862usrlibdir:
32863 @echo usrlibdir='${USRLIBDIR}'
32864libdir:
32865 @echo libdir='${LIBDIR}'
32866_ACEOF
32867 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
32868 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
32869 for ac_var in incroot usrlibdir libdir; do
32870 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
b686ecb5 32871 done
8b35ed1f
SM
32872 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
32873 for ac_extension in a so sl dylib la dll; do
32874 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
32875 test -f "$ac_im_libdir/libX11.$ac_extension"; then
32876 ac_im_usrlibdir=$ac_im_libdir; break
32877 fi
b686ecb5 32878 done
8b35ed1f
SM
32879 # Screen out bogus values from the imake configuration. They are
32880 # bogus both because they are the default anyway, and because
32881 # using them would break gcc on systems where it needs fixed includes.
32882 case $ac_im_incroot in
32883 /usr/include) ac_x_includes= ;;
32884 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
32885 esac
32886 case $ac_im_usrlibdir in
32887 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
32888 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
32889 esac
9b624dbe 32890 fi
8b35ed1f
SM
32891 cd ..
32892 rm -f -r conftest.dir
32893fi
dfcd3bfb 32894
8b35ed1f
SM
32895# Standard set of common directories for X headers.
32896# Check X11 before X11Rn because it is often a symlink to the current release.
32897ac_x_header_dirs='
32898/usr/X11/include
32899/usr/X11R7/include
32900/usr/X11R6/include
32901/usr/X11R5/include
32902/usr/X11R4/include
e56ac5c3 32903
8b35ed1f
SM
32904/usr/include/X11
32905/usr/include/X11R7
32906/usr/include/X11R6
32907/usr/include/X11R5
32908/usr/include/X11R4
e56ac5c3 32909
8b35ed1f
SM
32910/usr/local/X11/include
32911/usr/local/X11R7/include
32912/usr/local/X11R6/include
32913/usr/local/X11R5/include
32914/usr/local/X11R4/include
b3a90332 32915
8b35ed1f
SM
32916/usr/local/include/X11
32917/usr/local/include/X11R7
32918/usr/local/include/X11R6
32919/usr/local/include/X11R5
32920/usr/local/include/X11R4
b3a90332 32921
8b35ed1f
SM
32922/usr/X386/include
32923/usr/x386/include
32924/usr/XFree86/include/X11
32925
32926/usr/include
32927/usr/local/include
32928/usr/unsupported/include
32929/usr/athena/include
32930/usr/local/x11r5/include
32931/usr/lpp/Xamples/include
bec39cab 32932
8b35ed1f
SM
32933/usr/openwin/include
32934/usr/openwin/share/include'
c35f4ffc 32935
8b35ed1f
SM
32936if test "$ac_x_includes" = no; then
32937 # Guess where to find include files, by looking for Xlib.h.
32938 # First, try using that file with no special directory specified.
32939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32940/* end confdefs.h. */
32941#include <X11/Xlib.h>
32942_ACEOF
32943if ac_fn_c_try_cpp "$LINENO"; then :
32944 # We can compile using X headers with no special include directory.
32945ac_x_includes=
b686ecb5 32946else
8b35ed1f
SM
32947 for ac_dir in $ac_x_header_dirs; do
32948 if test -r "$ac_dir/X11/Xlib.h"; then
32949 ac_x_includes=$ac_dir
32950 break
32951 fi
32952done
32953fi
32954rm -f conftest.err conftest.i conftest.$ac_ext
32955fi # $ac_x_includes = no
bec39cab 32956
8b35ed1f
SM
32957if test "$ac_x_libraries" = no; then
32958 # Check for the libraries.
32959 # See if we find them without any special options.
32960 # Don't add to $LIBS permanently.
32961 ac_save_LIBS=$LIBS
32962 LIBS="-lX11 $LIBS"
32963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b686ecb5 32964/* end confdefs.h. */
8b35ed1f 32965#include <X11/Xlib.h>
b686ecb5
JM
32966int
32967main ()
32968{
8b35ed1f 32969XrmInitialize ()
b686ecb5
JM
32970 ;
32971 return 0;
32972}
bec39cab 32973_ACEOF
b686ecb5 32974if ac_fn_c_try_link "$LINENO"; then :
8b35ed1f
SM
32975 LIBS=$ac_save_LIBS
32976# We can link X programs with no special library path.
32977ac_x_libraries=
b686ecb5 32978else
8b35ed1f
SM
32979 LIBS=$ac_save_LIBS
32980for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
32981do
32982 # Don't even attempt the hair of trying to link an X program!
32983 for ac_extension in a so sl dylib la dll; do
32984 if test -r "$ac_dir/libX11.$ac_extension"; then
32985 ac_x_libraries=$ac_dir
32986 break 2
32987 fi
32988 done
32989done
c906108c 32990fi
b686ecb5
JM
32991rm -f core conftest.err conftest.$ac_objext \
32992 conftest$ac_exeext conftest.$ac_ext
8b35ed1f
SM
32993fi # $ac_x_libraries = no
32994
32995case $ac_x_includes,$ac_x_libraries in #(
32996 no,* | *,no | *\'*)
32997 # Didn't find X, or a directory has "'" in its name.
32998 ac_cv_have_x="have_x=no";; #(
32999 *)
33000 # Record where we found X for the cache.
33001 ac_cv_have_x="have_x=yes\
33002 ac_x_includes='$ac_x_includes'\
33003 ac_x_libraries='$ac_x_libraries'"
33004esac
33005fi
33006;; #(
33007 *) have_x=yes;;
33008 esac
33009 eval "$ac_cv_have_x"
33010fi # $with_x != no
c906108c 33011
8b35ed1f
SM
33012if test "$have_x" != yes; then
33013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
33014$as_echo "$have_x" >&6; }
33015 no_x=yes
33016else
33017 # If each of the values was on the command line, it overrides each guess.
33018 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
33019 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
33020 # Update the cache value to reflect the command line values.
33021 ac_cv_have_x="have_x=yes\
33022 ac_x_includes='$x_includes'\
33023 ac_x_libraries='$x_libraries'"
33024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
33025$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c 33026fi
c906108c 33027
c906108c 33028
8b35ed1f
SM
33029# Unlike the sim directory, whether a simulator is linked is controlled by
33030# presence of a gdb_sim definition in the target configure.tgt entry.
33031# This code just checks for a few cases where we'd like to ignore those
33032# definitions, even when they're present in the '.mt' file. These cases
33033# are when --disable-sim is specified, or if the simulator directory is
33034# not part of the source tree.
33035#
33036# Check whether --enable-sim was given.
33037if test "${enable_sim+set}" = set; then :
ff69d6e9
AB
33038 enableval=$enable_sim; { $as_echo "$as_me:${as_lineno-$LINENO}: enable_sim = $enable_sim" >&5
33039$as_echo "$as_me: enable_sim = $enable_sim" >&6;};
36192c2b 33040 { $as_echo "$as_me:${as_lineno-$LINENO}: enableval = ${enableval}" >&5
ff69d6e9 33041$as_echo "$as_me: enableval = ${enableval}" >&6;};
36192c2b
AB
33042 case "${enableval}" in
33043 yes) ignore_sim=false ;;
33044 no) ignore_sim=true ;;
33045 *) ignore_sim=false ;;
33046 esac
8b35ed1f
SM
33047else
33048 ignore_sim=false
33049fi
33050
33051
33052if test ! -d "${srcdir}/../sim"; then
33053 ignore_sim=true
33054fi
33055
33056SIM=
33057SIM_OBS=
33058if test "${ignore_sim}" = "false"; then
33059 if test x"${gdb_sim}" != x ; then
33060 SIM="${gdb_sim}"
33061 SIM_OBS="remote-sim.o"
33062
33063 # Some tdep code should only be compiled in when the ppc sim is
33064 # built. PR sim/13418.
33065 case $target in
33066 powerpc*-*-*)
33067
33068$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
33069
33070 ;;
33071 esac
b686ecb5 33072 fi
8b35ed1f
SM
33073fi
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088# List of host floatformats.
33089
33090cat >>confdefs.h <<_ACEOF
33091#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
33092_ACEOF
33093
33094
33095cat >>confdefs.h <<_ACEOF
33096#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
33097_ACEOF
33098
33099
33100cat >>confdefs.h <<_ACEOF
33101#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
33102_ACEOF
33103
33104
33105# target_subdir is used by the testsuite to find the target libraries.
33106target_subdir=
33107if test "${host}" != "${target}"; then
33108 target_subdir="${target_alias}/"
33109fi
33110
33111
33112# Import nat definitions.
33113nat_makefile_frag=/dev/null
33114if test "${gdb_native}" = "yes"; then
33115 . ${srcdir}/configure.nat
33116 nativefile=$NAT_FILE
33117fi
c906108c
SS
33118
33119
21ea5acd
SDJ
33120
33121
33122
33123
33124
8b35ed1f
SM
33125
33126
33127
33128
33129if test x"${gdb_osabi}" != x ; then
33130
33131cat >>confdefs.h <<_ACEOF
33132#define GDB_OSABI_DEFAULT $gdb_osabi
33133_ACEOF
33134
b00a8037
DJ
33135fi
33136
8b35ed1f
SM
33137# Setup possible use of libbacktrace.
33138# Check whether --enable-libbacktrace was given.
33139if test "${enable_libbacktrace+set}" = set; then :
33140 enableval=$enable_libbacktrace;
33141 case $enableval in
33142 yes | no)
33143 ;;
33144 *)
33145 as_fn_error $? "bad value $enableval for --enable-libbacktrace" "$LINENO" 5
33146 ;;
33147 esac
4fd404c2 33148
abbbd4a3 33149else
8b35ed1f 33150 enable_libbacktrace=yes
abbbd4a3
AB
33151fi
33152
33153
8b35ed1f
SM
33154if test "${enable_libbacktrace}" = "yes"; then
33155 LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"
33156 LIBBACKTRACE_LIB=../libbacktrace/libbacktrace.la
33157
33158$as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h
abbbd4a3
AB
33159
33160else
8b35ed1f
SM
33161 LIBBACKTRACE_INC=
33162 LIBBACKTRACE_LIB=
abbbd4a3
AB
33163fi
33164
33165
33166
33167
8b35ed1f
SM
33168# Check for babeltrace and babeltrace-ctf
33169
33170# Check whether --with-babeltrace was given.
33171if test "${with_babeltrace+set}" = set; then :
33172 withval=$with_babeltrace;
393fd4c3 33173else
8b35ed1f 33174 with_babeltrace=auto
393fd4c3
YQ
33175fi
33176
8b35ed1f
SM
33177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
33178$as_echo_n "checking whether to use babeltrace... " >&6; }
33179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
33180$as_echo "$with_babeltrace" >&6; }
393fd4c3 33181
8b35ed1f 33182if test "x$with_babeltrace" = "xno"; then
a42c1824
TT
33183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace support disabled; GDB is unable to read CTF data." >&5
33184$as_echo "$as_me: WARNING: babeltrace support disabled; GDB is unable to read CTF data." >&2;}
8b35ed1f
SM
33185else
33186 # Append -Werror to CFLAGS so that configure can catch the warning
33187 # "assignment from incompatible pointer type", which is related to
33188 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
33189 # in GDB, while babeltrace 1.0.3 is broken.
33190 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
33191 # safe to save and restore CFLAGS here.
33192 saved_CFLAGS=$CFLAGS
33193 CFLAGS="$CFLAGS -Werror"
393fd4c3
YQ
33194
33195
33196
33197
33198
33199
33200
33201
33202 use_additional=yes
33203
33204 acl_save_prefix="$prefix"
33205 prefix="$acl_final_prefix"
33206 acl_save_exec_prefix="$exec_prefix"
33207 exec_prefix="$acl_final_exec_prefix"
33208
33209 eval additional_includedir=\"$includedir\"
33210 eval additional_libdir=\"$libdir\"
33211
33212 exec_prefix="$acl_save_exec_prefix"
33213 prefix="$acl_save_prefix"
33214
33215
8b35ed1f
SM
33216# Check whether --with-libbabeltrace-prefix was given.
33217if test "${with_libbabeltrace_prefix+set}" = set; then :
33218 withval=$with_libbabeltrace_prefix;
393fd4c3
YQ
33219 if test "X$withval" = "Xno"; then
33220 use_additional=no
33221 else
33222 if test "X$withval" = "X"; then
33223
33224 acl_save_prefix="$prefix"
33225 prefix="$acl_final_prefix"
33226 acl_save_exec_prefix="$exec_prefix"
33227 exec_prefix="$acl_final_exec_prefix"
33228
33229 eval additional_includedir=\"$includedir\"
33230 eval additional_libdir=\"$libdir\"
33231
33232 exec_prefix="$acl_save_exec_prefix"
33233 prefix="$acl_save_prefix"
33234
33235 else
33236 additional_includedir="$withval/include"
33237 additional_libdir="$withval/lib"
33238 fi
33239 fi
33240
33241fi
33242
9f1528a1 33243
8b35ed1f
SM
33244# Check whether --with-libbabeltrace-type was given.
33245if test "${with_libbabeltrace_type+set}" = set; then :
33246 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
9f1528a1 33247else
8b35ed1f 33248 with_libbabeltrace_type=auto
9f1528a1
AB
33249fi
33250
8b35ed1f 33251 lib_type=`eval echo \$with_libbabeltrace_type`
9f1528a1 33252
8b35ed1f
SM
33253 LIBBABELTRACE=
33254 LTLIBBABELTRACE=
33255 INCBABELTRACE=
393fd4c3
YQ
33256 rpathdirs=
33257 ltrpathdirs=
33258 names_already_handled=
8b35ed1f 33259 names_next_round='babeltrace babeltrace-ctf'
393fd4c3
YQ
33260 while test -n "$names_next_round"; do
33261 names_this_round="$names_next_round"
33262 names_next_round=
33263 for name in $names_this_round; do
33264 already_handled=
33265 for n in $names_already_handled; do
33266 if test "$n" = "$name"; then
33267 already_handled=yes
33268 break
33269 fi
33270 done
33271 if test -z "$already_handled"; then
33272 names_already_handled="$names_already_handled $name"
33273 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
33274 eval value=\"\$HAVE_LIB$uppername\"
33275 if test -n "$value"; then
33276 if test "$value" = yes; then
33277 eval value=\"\$LIB$uppername\"
8b35ed1f 33278 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
393fd4c3 33279 eval value=\"\$LTLIB$uppername\"
8b35ed1f 33280 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
393fd4c3
YQ
33281 else
33282 :
33283 fi
33284 else
33285 found_dir=
33286 found_la=
33287 found_so=
33288 found_a=
33289 if test $use_additional = yes; then
9f1528a1 33290 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
33291 found_dir="$additional_libdir"
33292 found_so="$additional_libdir/lib$name.$shlibext"
33293 if test -f "$additional_libdir/lib$name.la"; then
33294 found_la="$additional_libdir/lib$name.la"
33295 fi
9f1528a1 33296 elif test x$lib_type != xshared; then
393fd4c3
YQ
33297 if test -f "$additional_libdir/lib$name.$libext"; then
33298 found_dir="$additional_libdir"
33299 found_a="$additional_libdir/lib$name.$libext"
33300 if test -f "$additional_libdir/lib$name.la"; then
33301 found_la="$additional_libdir/lib$name.la"
33302 fi
33303 fi
33304 fi
33305 fi
33306 if test "X$found_dir" = "X"; then
8b35ed1f 33307 for x in $LDFLAGS $LTLIBBABELTRACE; do
393fd4c3
YQ
33308
33309 acl_save_prefix="$prefix"
33310 prefix="$acl_final_prefix"
33311 acl_save_exec_prefix="$exec_prefix"
33312 exec_prefix="$acl_final_exec_prefix"
33313 eval x=\"$x\"
33314 exec_prefix="$acl_save_exec_prefix"
33315 prefix="$acl_save_prefix"
33316
33317 case "$x" in
33318 -L*)
33319 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 33320 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
33321 found_dir="$dir"
33322 found_so="$dir/lib$name.$shlibext"
33323 if test -f "$dir/lib$name.la"; then
33324 found_la="$dir/lib$name.la"
33325 fi
9f1528a1 33326 elif test x$lib_type != xshared; then
393fd4c3
YQ
33327 if test -f "$dir/lib$name.$libext"; then
33328 found_dir="$dir"
33329 found_a="$dir/lib$name.$libext"
33330 if test -f "$dir/lib$name.la"; then
33331 found_la="$dir/lib$name.la"
33332 fi
33333 fi
33334 fi
33335 ;;
33336 esac
33337 if test "X$found_dir" != "X"; then
33338 break
33339 fi
33340 done
33341 fi
33342 if test "X$found_dir" != "X"; then
8b35ed1f 33343 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
393fd4c3
YQ
33344 if test "X$found_so" != "X"; then
33345 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8b35ed1f 33346 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
393fd4c3
YQ
33347 else
33348 haveit=
33349 for x in $ltrpathdirs; do
33350 if test "X$x" = "X$found_dir"; then
33351 haveit=yes
33352 break
33353 fi
33354 done
33355 if test -z "$haveit"; then
33356 ltrpathdirs="$ltrpathdirs $found_dir"
33357 fi
33358 if test "$hardcode_direct" = yes; then
8b35ed1f 33359 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
393fd4c3
YQ
33360 else
33361 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8b35ed1f 33362 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
393fd4c3
YQ
33363 haveit=
33364 for x in $rpathdirs; do
33365 if test "X$x" = "X$found_dir"; then
33366 haveit=yes
33367 break
33368 fi
33369 done
33370 if test -z "$haveit"; then
33371 rpathdirs="$rpathdirs $found_dir"
33372 fi
33373 else
33374 haveit=
8b35ed1f 33375 for x in $LDFLAGS $LIBBABELTRACE; do
393fd4c3
YQ
33376
33377 acl_save_prefix="$prefix"
33378 prefix="$acl_final_prefix"
33379 acl_save_exec_prefix="$exec_prefix"
33380 exec_prefix="$acl_final_exec_prefix"
33381 eval x=\"$x\"
33382 exec_prefix="$acl_save_exec_prefix"
33383 prefix="$acl_save_prefix"
33384
33385 if test "X$x" = "X-L$found_dir"; then
33386 haveit=yes
33387 break
33388 fi
33389 done
33390 if test -z "$haveit"; then
8b35ed1f 33391 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
393fd4c3
YQ
33392 fi
33393 if test "$hardcode_minus_L" != no; then
8b35ed1f 33394 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
393fd4c3 33395 else
8b35ed1f 33396 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
393fd4c3
YQ
33397 fi
33398 fi
33399 fi
33400 fi
33401 else
33402 if test "X$found_a" != "X"; then
8b35ed1f 33403 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
393fd4c3 33404 else
8b35ed1f 33405 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
393fd4c3
YQ
33406 fi
33407 fi
33408 additional_includedir=
33409 case "$found_dir" in
33410 */lib | */lib/)
33411 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
33412 additional_includedir="$basedir/include"
33413 ;;
33414 esac
33415 if test "X$additional_includedir" != "X"; then
33416 if test "X$additional_includedir" != "X/usr/include"; then
33417 haveit=
33418 if test "X$additional_includedir" = "X/usr/local/include"; then
33419 if test -n "$GCC"; then
33420 case $host_os in
33421 linux*) haveit=yes;;
33422 esac
33423 fi
33424 fi
33425 if test -z "$haveit"; then
8b35ed1f 33426 for x in $CPPFLAGS $INCBABELTRACE; do
393fd4c3
YQ
33427
33428 acl_save_prefix="$prefix"
33429 prefix="$acl_final_prefix"
33430 acl_save_exec_prefix="$exec_prefix"
33431 exec_prefix="$acl_final_exec_prefix"
33432 eval x=\"$x\"
33433 exec_prefix="$acl_save_exec_prefix"
33434 prefix="$acl_save_prefix"
33435
33436 if test "X$x" = "X-I$additional_includedir"; then
33437 haveit=yes
33438 break
33439 fi
33440 done
33441 if test -z "$haveit"; then
33442 if test -d "$additional_includedir"; then
8b35ed1f 33443 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
393fd4c3
YQ
33444 fi
33445 fi
33446 fi
33447 fi
33448 fi
33449 if test -n "$found_la"; then
33450 save_libdir="$libdir"
33451 case "$found_la" in
33452 */* | *\\*) . "$found_la" ;;
33453 *) . "./$found_la" ;;
33454 esac
33455 libdir="$save_libdir"
33456 for dep in $dependency_libs; do
33457 case "$dep" in
33458 -L*)
33459 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33460 if test "X$additional_libdir" != "X/usr/lib"; then
33461 haveit=
33462 if test "X$additional_libdir" = "X/usr/local/lib"; then
33463 if test -n "$GCC"; then
33464 case $host_os in
33465 linux*) haveit=yes;;
33466 esac
33467 fi
33468 fi
33469 if test -z "$haveit"; then
33470 haveit=
8b35ed1f 33471 for x in $LDFLAGS $LIBBABELTRACE; do
393fd4c3
YQ
33472
33473 acl_save_prefix="$prefix"
33474 prefix="$acl_final_prefix"
33475 acl_save_exec_prefix="$exec_prefix"
33476 exec_prefix="$acl_final_exec_prefix"
33477 eval x=\"$x\"
33478 exec_prefix="$acl_save_exec_prefix"
33479 prefix="$acl_save_prefix"
33480
33481 if test "X$x" = "X-L$additional_libdir"; then
33482 haveit=yes
33483 break
33484 fi
33485 done
33486 if test -z "$haveit"; then
33487 if test -d "$additional_libdir"; then
8b35ed1f 33488 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
393fd4c3
YQ
33489 fi
33490 fi
33491 haveit=
8b35ed1f 33492 for x in $LDFLAGS $LTLIBBABELTRACE; do
393fd4c3
YQ
33493
33494 acl_save_prefix="$prefix"
33495 prefix="$acl_final_prefix"
33496 acl_save_exec_prefix="$exec_prefix"
33497 exec_prefix="$acl_final_exec_prefix"
33498 eval x=\"$x\"
33499 exec_prefix="$acl_save_exec_prefix"
33500 prefix="$acl_save_prefix"
33501
33502 if test "X$x" = "X-L$additional_libdir"; then
33503 haveit=yes
33504 break
33505 fi
33506 done
33507 if test -z "$haveit"; then
33508 if test -d "$additional_libdir"; then
8b35ed1f 33509 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
393fd4c3
YQ
33510 fi
33511 fi
33512 fi
33513 fi
33514 ;;
33515 -R*)
33516 dir=`echo "X$dep" | sed -e 's/^X-R//'`
33517 if test "$enable_rpath" != no; then
33518 haveit=
33519 for x in $rpathdirs; do
33520 if test "X$x" = "X$dir"; then
33521 haveit=yes
33522 break
33523 fi
33524 done
33525 if test -z "$haveit"; then
33526 rpathdirs="$rpathdirs $dir"
33527 fi
33528 haveit=
33529 for x in $ltrpathdirs; do
33530 if test "X$x" = "X$dir"; then
33531 haveit=yes
33532 break
33533 fi
33534 done
33535 if test -z "$haveit"; then
33536 ltrpathdirs="$ltrpathdirs $dir"
33537 fi
33538 fi
33539 ;;
33540 -l*)
33541 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
33542 ;;
33543 *.la)
33544 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
33545 ;;
33546 *)
8b35ed1f
SM
33547 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
33548 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
393fd4c3
YQ
33549 ;;
33550 esac
33551 done
33552 fi
33553 else
9f1528a1 33554 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8b35ed1f
SM
33555 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
33556 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
9f1528a1 33557 else
8b35ed1f
SM
33558 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
33559 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
9f1528a1 33560 fi
393fd4c3
YQ
33561 fi
33562 fi
33563 fi
33564 done
33565 done
33566 if test "X$rpathdirs" != "X"; then
33567 if test -n "$hardcode_libdir_separator"; then
33568 alldirs=
33569 for found_dir in $rpathdirs; do
33570 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
33571 done
33572 acl_save_libdir="$libdir"
33573 libdir="$alldirs"
33574 eval flag=\"$hardcode_libdir_flag_spec\"
33575 libdir="$acl_save_libdir"
8b35ed1f 33576 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
393fd4c3
YQ
33577 else
33578 for found_dir in $rpathdirs; do
33579 acl_save_libdir="$libdir"
33580 libdir="$found_dir"
33581 eval flag=\"$hardcode_libdir_flag_spec\"
33582 libdir="$acl_save_libdir"
8b35ed1f 33583 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
393fd4c3
YQ
33584 done
33585 fi
33586 fi
b686ecb5
JM
33587 if test "X$ltrpathdirs" != "X"; then
33588 for found_dir in $ltrpathdirs; do
8b35ed1f 33589 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
b686ecb5
JM
33590 done
33591 fi
33592
33593
33594 ac_save_CPPFLAGS="$CPPFLAGS"
33595
8b35ed1f 33596 for element in $INCBABELTRACE; do
b686ecb5
JM
33597 haveit=
33598 for x in $CPPFLAGS; do
33599
33600 acl_save_prefix="$prefix"
33601 prefix="$acl_final_prefix"
33602 acl_save_exec_prefix="$exec_prefix"
33603 exec_prefix="$acl_final_exec_prefix"
33604 eval x=\"$x\"
33605 exec_prefix="$acl_save_exec_prefix"
33606 prefix="$acl_save_prefix"
33607
33608 if test "X$x" = "X$element"; then
33609 haveit=yes
33610 break
33611 fi
33612 done
33613 if test -z "$haveit"; then
33614 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
33615 fi
33616 done
33617
33618
8b35ed1f
SM
33619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
33620$as_echo_n "checking for libbabeltrace... " >&6; }
33621if ${ac_cv_libbabeltrace+:} false; then :
b686ecb5
JM
33622 $as_echo_n "(cached) " >&6
33623else
33624
33625 ac_save_LIBS="$LIBS"
8b35ed1f 33626 LIBS="$LIBS $LIBBABELTRACE"
b686ecb5
JM
33627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33628/* end confdefs.h. */
8b35ed1f
SM
33629#include <babeltrace/babeltrace.h>
33630 #include <babeltrace/ctf/events.h>
33631 #include <babeltrace/ctf/iterator.h>
b686ecb5
JM
33632int
33633main ()
33634{
8b35ed1f
SM
33635struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
33636 struct bt_ctf_event *event = NULL;
33637 const struct bt_definition *scope;
33638
33639 pos->type = BT_SEEK_BEGIN;
33640 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
33641 scope = bt_ctf_get_top_level_scope (event,
33642 BT_STREAM_EVENT_HEADER);
33643 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
b686ecb5
JM
33644
33645 ;
33646 return 0;
33647}
33648_ACEOF
33649if ac_fn_c_try_link "$LINENO"; then :
8b35ed1f 33650 ac_cv_libbabeltrace=yes
b686ecb5 33651else
8b35ed1f 33652 ac_cv_libbabeltrace=no
b686ecb5
JM
33653fi
33654rm -f core conftest.err conftest.$ac_objext \
33655 conftest$ac_exeext conftest.$ac_ext
33656 LIBS="$ac_save_LIBS"
33657
33658fi
8b35ed1f
SM
33659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
33660$as_echo "$ac_cv_libbabeltrace" >&6; }
33661 if test "$ac_cv_libbabeltrace" = yes; then
33662 HAVE_LIBBABELTRACE=yes
b686ecb5 33663
8b35ed1f 33664$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
b686ecb5 33665
8b35ed1f
SM
33666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
33667$as_echo_n "checking how to link with libbabeltrace... " >&6; }
33668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
33669$as_echo "$LIBBABELTRACE" >&6; }
b686ecb5 33670 else
8b35ed1f 33671 HAVE_LIBBABELTRACE=no
b686ecb5 33672 CPPFLAGS="$ac_save_CPPFLAGS"
8b35ed1f
SM
33673 LIBBABELTRACE=
33674 LTLIBBABELTRACE=
b686ecb5
JM
33675 fi
33676
33677
33678
33679
33680
33681
8b35ed1f
SM
33682 CFLAGS=$saved_CFLAGS
33683
33684 if test "$HAVE_LIBBABELTRACE" != yes; then
33685 if test "$with_babeltrace" = yes; then
33686 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
33687 else
33688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
33689$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
33690 fi
b686ecb5
JM
33691 fi
33692fi
33693
8b35ed1f
SM
33694 # Check whether --enable-libctf was given.
33695if test "${enable_libctf+set}" = set; then :
33696 enableval=$enable_libctf;
33697 case "$enableval" in
33698 yes|no) ;;
33699 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
33700 esac
33701
33702else
33703 enable_libctf=yes
33704fi
33705
33706
33707if test "${enable_libctf}" = yes; then
33708
33709$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
33710
33711 LIBCTF="../libctf/libctf.la"
33712 CTF_DEPS="../libctf/libctf.la"
33713else
33714 LIBCTF=
33715 CTF_DEPS=
33716fi
33717
33718
33719
33720# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
33721# empty version.
b686ecb5
JM
33722
33723NM_H=
33724rm -f nm.h
33725if test "${nativefile}" != ""; then
33726 case "${nativefile}" in
33727 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
33728 * ) GDB_NM_FILE="${nativefile}"
33729 esac
33730 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
33731
33732
33733cat >>confdefs.h <<_ACEOF
33734#define GDB_NM_FILE "${GDB_NM_FILE}"
33735_ACEOF
33736
33737 NM_H=nm.h
33738fi
33739
33740
33741
33742for ac_prog in xsltproc
33743do
33744 # Extract the first word of "$ac_prog", so it can be a program name with args.
33745set dummy $ac_prog; ac_word=$2
33746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747$as_echo_n "checking for $ac_word... " >&6; }
33748if ${ac_cv_path_XSLTPROC+:} false; then :
33749 $as_echo_n "(cached) " >&6
33750else
33751 case $XSLTPROC in
33752 [\\/]* | ?:[\\/]*)
33753 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
33754 ;;
33755 *)
33756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757for as_dir in $PATH
33758do
33759 IFS=$as_save_IFS
33760 test -z "$as_dir" && as_dir=.
33761 for ac_exec_ext in '' $ac_executable_extensions; do
33762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
33764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765 break 2
33766 fi
33767done
33768 done
33769IFS=$as_save_IFS
33770
33771 ;;
33772esac
33773fi
33774XSLTPROC=$ac_cv_path_XSLTPROC
33775if test -n "$XSLTPROC"; then
33776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
33777$as_echo "$XSLTPROC" >&6; }
33778else
33779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780$as_echo "no" >&6; }
33781fi
33782
33783
33784 test -n "$XSLTPROC" && break
33785done
33786test -n "$XSLTPROC" || XSLTPROC="missing"
33787
33788if test "x$USE_MAINTAINER_MODE" = xyes; then
33789 if test "${XSLTPROC}" = missing; then
33790 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
33791 fi
33792fi
33793
33794
33795
33796
33797
33798$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
33799
33800
33801
33802# Check whether we will enable the inclusion of unit tests when
33803# compiling GDB.
33804#
33805# The default value of this option changes depending whether we're on
33806# development mode (in which case it's "true") or not (in which case
33807# it's "false"). The $development variable is set by the GDB_AC_COMMON
33808# macro, which must therefore be used before GDB_AC_SELFTEST.
33809
33810if test "x$development" != xtrue && test "x$development" != xfalse; then :
33811 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
33812fi
33813
33814# Check whether --enable-unit-tests was given.
33815if test "${enable_unit_tests+set}" = set; then :
33816 enableval=$enable_unit_tests; case "${enableval}" in
33817 yes) enable_unittests=true ;;
33818 no) enable_unittests=false ;;
33819 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
33820esac
33821else
33822 enable_unittests=$development
33823fi
33824
33825
33826if $enable_unittests; then
33827
33828$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
33829
33830
33831 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
33832 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
33833
33834fi
33835
33836
33837
33838 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
33839 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
33840 if test "x$GDB_TRANSFORM_NAME" = x; then
33841 GDB_TRANSFORM_NAME=gdb
33842 fi
33843
33844
33845
33846 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
33847 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
33848 if test "x$GCORE_TRANSFORM_NAME" = x; then
33849 GCORE_TRANSFORM_NAME=gcore
393fd4c3
YQ
33850 fi
33851
33852
56252b7c 33853ac_config_files="$ac_config_files gcore.in:gcore-1.in"
393fd4c3 33854
fb2ded33
KS
33855ac_config_files="$ac_config_files gstack.in:gstack-1.in"
33856
71f193a5
AB
33857ac_config_files="$ac_config_files gdb-add-index.in:contrib/gdb-add-index.sh"
33858
b686ecb5 33859ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
393fd4c3 33860
393fd4c3 33861
b686ecb5
JM
33862cat >confcache <<\_ACEOF
33863# This file is a shell script that caches the results of configure
33864# tests run on this system so they can be shared between configure
33865# scripts and configure runs, see configure's option --config-cache.
33866# It is not useful on other systems. If it contains results you don't
33867# want to keep, you may remove or edit it.
33868#
33869# config.status only pays attention to the cache file if you give it
33870# the --recheck option to rerun configure.
33871#
33872# `ac_cv_env_foo' variables (set or unset) will be overridden when
33873# loading this file, other *unset* `ac_cv_foo' will be assigned the
33874# following values.
33875
33876_ACEOF
33877
33878# The following way of writing the cache mishandles newlines in values,
33879# but we know of no workaround that is simple, portable, and efficient.
33880# So, we kill variables containing newlines.
33881# Ultrix sh set writes to stderr and can't be redirected directly,
33882# and sets the high bit in the cache file unless we assign to the vars.
33883(
33884 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33885 eval ac_val=\$$ac_var
33886 case $ac_val in #(
33887 *${as_nl}*)
33888 case $ac_var in #(
33889 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33890$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33891 esac
33892 case $ac_var in #(
33893 _ | IFS | as_nl) ;; #(
33894 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33895 *) { eval $ac_var=; unset $ac_var;} ;;
33896 esac ;;
33897 esac
33898 done
33899
33900 (set) 2>&1 |
33901 case $as_nl`(ac_space=' '; set) 2>&1` in #(
33902 *${as_nl}ac_space=\ *)
33903 # `set' does not quote correctly, so add quotes: double-quote
33904 # substitution turns \\\\ into \\, and sed turns \\ into \.
33905 sed -n \
33906 "s/'/'\\\\''/g;
33907 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33908 ;; #(
33909 *)
33910 # `set' quotes correctly as required by POSIX, so do not add quotes.
33911 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33912 ;;
33913 esac |
33914 sort
33915) |
33916 sed '
33917 /^ac_cv_env_/b end
33918 t clear
33919 :clear
33920 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33921 t end
33922 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33923 :end' >>confcache
33924if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33925 if test -w "$cache_file"; then
33926 if test "x$cache_file" != "x/dev/null"; then
33927 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33928$as_echo "$as_me: updating cache $cache_file" >&6;}
33929 if test ! -f "$cache_file" || test -h "$cache_file"; then
33930 cat confcache >"$cache_file"
33931 else
33932 case $cache_file in #(
33933 */* | ?:*)
33934 mv -f confcache "$cache_file"$$ &&
33935 mv -f "$cache_file"$$ "$cache_file" ;; #(
33936 *)
33937 mv -f confcache "$cache_file" ;;
33938 esac
393fd4c3 33939 fi
393fd4c3 33940 fi
b686ecb5
JM
33941 else
33942 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33943$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33944 fi
33945fi
33946rm -f confcache
33947
33948test "x$prefix" = xNONE && prefix=$ac_default_prefix
33949# Let make expand exec_prefix.
33950test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33951
33952DEFS=-DHAVE_CONFIG_H
33953
33954ac_libobjs=
33955ac_ltlibobjs=
33956U=
33957for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33958 # 1. Remove the extension, and $U if already installed.
33959 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33960 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33961 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
33962 # will be set to the directory where LIBOBJS objects are built.
33963 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33964 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33965done
33966LIBOBJS=$ac_libobjs
33967
33968LTLIBOBJS=$ac_ltlibobjs
33969
33970
33971if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
33972 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
33973Usually this means the macro was only invoked conditionally." "$LINENO" 5
33974fi
b686ecb5
JM
33975if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
33976 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
33977Usually this means the macro was only invoked conditionally." "$LINENO" 5
33978fi
33979if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
33980 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
33981Usually this means the macro was only invoked conditionally." "$LINENO" 5
33982fi
33983
33984
33985: "${CONFIG_STATUS=./config.status}"
33986ac_write_fail=0
33987ac_clean_files_save=$ac_clean_files
33988ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33989{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33990$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33991as_write_fail=0
33992cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33993#! $SHELL
33994# Generated by $as_me.
33995# Run this file to recreate the current configuration.
33996# Compiler output produced by configure, useful for debugging
33997# configure, is in config.log if it exists.
33998
33999debug=false
34000ac_cs_recheck=false
34001ac_cs_silent=false
34002
34003SHELL=\${CONFIG_SHELL-$SHELL}
34004export SHELL
34005_ASEOF
34006cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
34007## -------------------- ##
34008## M4sh Initialization. ##
34009## -------------------- ##
34010
34011# Be more Bourne compatible
34012DUALCASE=1; export DUALCASE # for MKS sh
34013if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
34014 emulate sh
34015 NULLCMD=:
34016 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34017 # is contrary to our usage. Disable this feature.
34018 alias -g '${1+"$@"}'='"$@"'
34019 setopt NO_GLOB_SUBST
34020else
34021 case `(set -o) 2>/dev/null` in #(
34022 *posix*) :
34023 set -o posix ;; #(
34024 *) :
34025 ;;
34026esac
34027fi
34028
34029
34030as_nl='
34031'
34032export as_nl
34033# Printing a long string crashes Solaris 7 /usr/bin/printf.
34034as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34035as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34036as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34037# Prefer a ksh shell builtin over an external printf program on Solaris,
34038# but without wasting forks for bash or zsh.
34039if test -z "$BASH_VERSION$ZSH_VERSION" \
34040 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
34041 as_echo='print -r --'
34042 as_echo_n='print -rn --'
34043elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34044 as_echo='printf %s\n'
34045 as_echo_n='printf %s'
34046else
34047 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34048 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34049 as_echo_n='/usr/ucb/echo -n'
34050 else
34051 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34052 as_echo_n_body='eval
34053 arg=$1;
34054 case $arg in #(
34055 *"$as_nl"*)
34056 expr "X$arg" : "X\\(.*\\)$as_nl";
34057 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34058 esac;
34059 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34060 '
34061 export as_echo_n_body
34062 as_echo_n='sh -c $as_echo_n_body as_echo'
34063 fi
34064 export as_echo_body
34065 as_echo='sh -c $as_echo_body as_echo'
34066fi
393fd4c3 34067
b686ecb5
JM
34068# The user is always right.
34069if test "${PATH_SEPARATOR+set}" != set; then
34070 PATH_SEPARATOR=:
34071 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34072 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34073 PATH_SEPARATOR=';'
34074 }
34075fi
393fd4c3 34076
393fd4c3 34077
b686ecb5
JM
34078# IFS
34079# We need space, tab and new line, in precisely that order. Quoting is
34080# there to prevent editors from complaining about space-tab.
34081# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34082# splitting by setting IFS to empty value.)
34083IFS=" "" $as_nl"
393fd4c3 34084
b686ecb5
JM
34085# Find who we are. Look in the path if we contain no directory separator.
34086as_myself=
34087case $0 in #((
34088 *[\\/]* ) as_myself=$0 ;;
34089 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34090for as_dir in $PATH
34091do
34092 IFS=$as_save_IFS
34093 test -z "$as_dir" && as_dir=.
34094 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34095 done
34096IFS=$as_save_IFS
393fd4c3 34097
b686ecb5
JM
34098 ;;
34099esac
34100# We did not find ourselves, most probably we were run as `sh COMMAND'
34101# in which case we are not to be found in the path.
34102if test "x$as_myself" = x; then
34103 as_myself=$0
393fd4c3 34104fi
b686ecb5
JM
34105if test ! -f "$as_myself"; then
34106 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34107 exit 1
393fd4c3 34108fi
393fd4c3 34109
b686ecb5
JM
34110# Unset variables that we do not need and which cause bugs (e.g. in
34111# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
34112# suppresses any "Segmentation fault" message there. '((' could
34113# trigger a bug in pdksh 5.2.14.
34114for as_var in BASH_ENV ENV MAIL MAILPATH
34115do eval test x\${$as_var+set} = xset \
34116 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34117done
34118PS1='$ '
34119PS2='> '
34120PS4='+ '
393fd4c3 34121
b686ecb5
JM
34122# NLS nuisances.
34123LC_ALL=C
34124export LC_ALL
34125LANGUAGE=C
34126export LANGUAGE
393fd4c3 34127
b686ecb5
JM
34128# CDPATH.
34129(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
393fd4c3
YQ
34130
34131
b686ecb5
JM
34132# as_fn_error STATUS ERROR [LINENO LOG_FD]
34133# ----------------------------------------
34134# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34135# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34136# script with STATUS, using 1 if that was 0.
34137as_fn_error ()
34138{
34139 as_status=$1; test $as_status -eq 0 && as_status=1
34140 if test "$4"; then
34141 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34142 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34143 fi
34144 $as_echo "$as_me: error: $2" >&2
34145 as_fn_exit $as_status
34146} # as_fn_error
34147
393fd4c3 34148
b686ecb5
JM
34149# as_fn_set_status STATUS
34150# -----------------------
34151# Set $? to STATUS, without forking.
34152as_fn_set_status ()
34153{
34154 return $1
34155} # as_fn_set_status
393fd4c3 34156
b686ecb5
JM
34157# as_fn_exit STATUS
34158# -----------------
34159# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34160as_fn_exit ()
34161{
34162 set +e
34163 as_fn_set_status $1
34164 exit $1
34165} # as_fn_exit
393fd4c3 34166
b686ecb5
JM
34167# as_fn_unset VAR
34168# ---------------
34169# Portably unset VAR.
34170as_fn_unset ()
34171{
34172 { eval $1=; unset $1;}
34173}
34174as_unset=as_fn_unset
34175# as_fn_append VAR VALUE
34176# ----------------------
34177# Append the text in VALUE to the end of the definition contained in VAR. Take
34178# advantage of any shell optimizations that allow amortized linear growth over
34179# repeated appends, instead of the typical quadratic growth present in naive
34180# implementations.
34181if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34182 eval 'as_fn_append ()
34183 {
34184 eval $1+=\$2
34185 }'
34186else
34187 as_fn_append ()
34188 {
34189 eval $1=\$$1\$2
34190 }
34191fi # as_fn_append
393fd4c3 34192
b686ecb5
JM
34193# as_fn_arith ARG...
34194# ------------------
34195# Perform arithmetic evaluation on the ARGs, and store the result in the
34196# global $as_val. Take advantage of shells that can avoid forks. The arguments
34197# must be portable across $(()) and expr.
34198if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34199 eval 'as_fn_arith ()
34200 {
34201 as_val=$(( $* ))
34202 }'
34203else
34204 as_fn_arith ()
34205 {
34206 as_val=`expr "$@" || test $? -eq 1`
34207 }
34208fi # as_fn_arith
393fd4c3 34209
ccb1ba62 34210
b686ecb5
JM
34211if expr a : '\(a\)' >/dev/null 2>&1 &&
34212 test "X`expr 00001 : '.*\(...\)'`" = X001; then
34213 as_expr=expr
ccb1ba62 34214else
b686ecb5 34215 as_expr=false
ccb1ba62
CB
34216fi
34217
b686ecb5
JM
34218if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34219 as_basename=basename
34220else
34221 as_basename=false
34222fi
ccb1ba62 34223
b686ecb5
JM
34224if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34225 as_dirname=dirname
1776e3e5 34226else
b686ecb5 34227 as_dirname=false
1776e3e5
NA
34228fi
34229
b686ecb5
JM
34230as_me=`$as_basename -- "$0" ||
34231$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34232 X"$0" : 'X\(//\)$' \| \
34233 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34234$as_echo X/"$0" |
34235 sed '/^.*\/\([^/][^/]*\)\/*$/{
34236 s//\1/
34237 q
34238 }
34239 /^X\/\(\/\/\)$/{
34240 s//\1/
34241 q
34242 }
34243 /^X\/\(\/\).*/{
34244 s//\1/
34245 q
34246 }
34247 s/.*/./; q'`
34248
34249# Avoid depending upon Character Ranges.
34250as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34251as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34252as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34253as_cr_digits='0123456789'
34254as_cr_alnum=$as_cr_Letters$as_cr_digits
34255
34256ECHO_C= ECHO_N= ECHO_T=
34257case `echo -n x` in #(((((
34258-n*)
34259 case `echo 'xy\c'` in
34260 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
34261 xy) ECHO_C='\c';;
34262 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
34263 ECHO_T=' ';;
34264 esac;;
34265*)
34266 ECHO_N='-n';;
34267esac
1776e3e5 34268
b686ecb5
JM
34269rm -f conf$$ conf$$.exe conf$$.file
34270if test -d conf$$.dir; then
34271 rm -f conf$$.dir/conf$$.file
1776e3e5 34272else
b686ecb5
JM
34273 rm -f conf$$.dir
34274 mkdir conf$$.dir 2>/dev/null
1776e3e5 34275fi
b686ecb5
JM
34276if (echo >conf$$.file) 2>/dev/null; then
34277 if ln -s conf$$.file conf$$ 2>/dev/null; then
34278 as_ln_s='ln -s'
34279 # ... but there are two gotchas:
34280 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34281 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34282 # In both cases, we have to default to `cp -pR'.
34283 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34284 as_ln_s='cp -pR'
34285 elif ln conf$$.file conf$$ 2>/dev/null; then
34286 as_ln_s=ln
34287 else
34288 as_ln_s='cp -pR'
34289 fi
1776e3e5 34290else
b686ecb5 34291 as_ln_s='cp -pR'
1776e3e5 34292fi
b686ecb5
JM
34293rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34294rmdir conf$$.dir 2>/dev/null
1776e3e5
NA
34295
34296
b686ecb5
JM
34297# as_fn_mkdir_p
34298# -------------
34299# Create "$as_dir" as a directory, including parents if necessary.
34300as_fn_mkdir_p ()
34301{
1776e3e5 34302
b686ecb5
JM
34303 case $as_dir in #(
34304 -*) as_dir=./$as_dir;;
34305 esac
34306 test -d "$as_dir" || eval $as_mkdir_p || {
34307 as_dirs=
34308 while :; do
34309 case $as_dir in #(
34310 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34311 *) as_qdir=$as_dir;;
34312 esac
34313 as_dirs="'$as_qdir' $as_dirs"
34314 as_dir=`$as_dirname -- "$as_dir" ||
34315$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34316 X"$as_dir" : 'X\(//\)[^/]' \| \
34317 X"$as_dir" : 'X\(//\)$' \| \
34318 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34319$as_echo X"$as_dir" |
34320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34321 s//\1/
34322 q
34323 }
34324 /^X\(\/\/\)[^/].*/{
34325 s//\1/
34326 q
34327 }
34328 /^X\(\/\/\)$/{
34329 s//\1/
34330 q
34331 }
34332 /^X\(\/\).*/{
34333 s//\1/
34334 q
34335 }
34336 s/.*/./; q'`
34337 test -d "$as_dir" && break
34338 done
34339 test -z "$as_dirs" || eval "mkdir $as_dirs"
34340 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
ccb1ba62 34341
9f1528a1 34342
b686ecb5
JM
34343} # as_fn_mkdir_p
34344if mkdir -p . 2>/dev/null; then
34345 as_mkdir_p='mkdir -p "$as_dir"'
9f1528a1 34346else
b686ecb5
JM
34347 test -d ./-p && rmdir ./-p
34348 as_mkdir_p=false
9f1528a1
AB
34349fi
34350
ccb1ba62 34351
b686ecb5
JM
34352# as_fn_executable_p FILE
34353# -----------------------
34354# Test if FILE is an executable regular file.
34355as_fn_executable_p ()
34356{
34357 test -f "$1" && test -x "$1"
34358} # as_fn_executable_p
34359as_test_x='test -x'
34360as_executable_p=as_fn_executable_p
ccb1ba62 34361
b686ecb5
JM
34362# Sed expression to map a string onto a valid CPP name.
34363as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ccb1ba62 34364
b686ecb5
JM
34365# Sed expression to map a string onto a valid variable name.
34366as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ccb1ba62 34367
ccb1ba62 34368
b686ecb5
JM
34369exec 6>&1
34370## ----------------------------------- ##
34371## Main body of $CONFIG_STATUS script. ##
34372## ----------------------------------- ##
34373_ASEOF
34374test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
ccb1ba62 34375
b686ecb5
JM
34376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34377# Save the log message, to keep $0 and so on meaningful, and to
34378# report actual input values of CONFIG_FILES etc. instead of their
34379# values after options handling.
34380ac_log="
34381This file was extended by $as_me, which was
34382generated by GNU Autoconf 2.69. Invocation command line was
ccb1ba62 34383
b686ecb5
JM
34384 CONFIG_FILES = $CONFIG_FILES
34385 CONFIG_HEADERS = $CONFIG_HEADERS
34386 CONFIG_LINKS = $CONFIG_LINKS
34387 CONFIG_COMMANDS = $CONFIG_COMMANDS
34388 $ $0 $@
ccb1ba62 34389
b686ecb5
JM
34390on `(hostname || uname -n) 2>/dev/null | sed 1q`
34391"
ccb1ba62 34392
b686ecb5
JM
34393_ACEOF
34394
34395case $ac_config_files in *"
34396"*) set x $ac_config_files; shift; ac_config_files=$*;;
34397esac
34398
34399case $ac_config_headers in *"
34400"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34401esac
34402
34403
34404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34405# Files that config.status was made for.
34406config_files="$ac_config_files"
34407config_headers="$ac_config_headers"
34408config_links="$ac_config_links"
34409config_commands="$ac_config_commands"
34410
34411_ACEOF
ccb1ba62 34412
b686ecb5
JM
34413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34414ac_cs_usage="\
34415\`$as_me' instantiates files and other configuration actions
34416from templates according to the current configuration. Unless the files
34417and actions are specified as TAGs, all are instantiated by default.
ccb1ba62 34418
b686ecb5 34419Usage: $0 [OPTION]... [TAG]...
ccb1ba62 34420
b686ecb5
JM
34421 -h, --help print this help, then exit
34422 -V, --version print version number and configuration settings, then exit
34423 --config print configuration, then exit
34424 -q, --quiet, --silent
34425 do not print progress messages
34426 -d, --debug don't remove temporary files
34427 --recheck update $as_me by reconfiguring in the same conditions
34428 --file=FILE[:TEMPLATE]
34429 instantiate the configuration file FILE
34430 --header=FILE[:TEMPLATE]
34431 instantiate the configuration header FILE
ccb1ba62 34432
b686ecb5
JM
34433Configuration files:
34434$config_files
ccb1ba62 34435
b686ecb5
JM
34436Configuration headers:
34437$config_headers
ccb1ba62 34438
b686ecb5
JM
34439Configuration links:
34440$config_links
ccb1ba62 34441
b686ecb5
JM
34442Configuration commands:
34443$config_commands
ccb1ba62 34444
b686ecb5 34445Report bugs to the package provider."
ccb1ba62 34446
ccb1ba62 34447_ACEOF
b686ecb5
JM
34448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34449ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34450ac_cs_version="\\
34451config.status
34452configured by $0, generated by GNU Autoconf 2.69,
34453 with options \\"\$ac_cs_config\\"
ccb1ba62 34454
b686ecb5
JM
34455Copyright (C) 2012 Free Software Foundation, Inc.
34456This config.status script is free software; the Free Software Foundation
34457gives unlimited permission to copy, distribute and modify it."
ccb1ba62 34458
b686ecb5
JM
34459ac_pwd='$ac_pwd'
34460srcdir='$srcdir'
34461INSTALL='$INSTALL'
34462AWK='$AWK'
34463test -n "\$AWK" || AWK=awk
34464_ACEOF
ccb1ba62 34465
b686ecb5
JM
34466cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34467# The default lists apply if the user does not specify any file.
34468ac_need_defaults=:
34469while test $# != 0
34470do
34471 case $1 in
34472 --*=?*)
34473 ac_option=`expr "X$1" : 'X\([^=]*\)='`
34474 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34475 ac_shift=:
34476 ;;
34477 --*=)
34478 ac_option=`expr "X$1" : 'X\([^=]*\)='`
34479 ac_optarg=
34480 ac_shift=:
34481 ;;
34482 *)
34483 ac_option=$1
34484 ac_optarg=$2
34485 ac_shift=shift
34486 ;;
34487 esac
ccb1ba62 34488
b686ecb5
JM
34489 case $ac_option in
34490 # Handling of the options.
34491 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34492 ac_cs_recheck=: ;;
34493 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34494 $as_echo "$ac_cs_version"; exit ;;
34495 --config | --confi | --conf | --con | --co | --c )
34496 $as_echo "$ac_cs_config"; exit ;;
34497 --debug | --debu | --deb | --de | --d | -d )
34498 debug=: ;;
34499 --file | --fil | --fi | --f )
34500 $ac_shift
34501 case $ac_optarg in
34502 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34503 '') as_fn_error $? "missing file argument" ;;
34504 esac
34505 as_fn_append CONFIG_FILES " '$ac_optarg'"
34506 ac_need_defaults=false;;
34507 --header | --heade | --head | --hea )
34508 $ac_shift
34509 case $ac_optarg in
34510 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34511 esac
34512 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34513 ac_need_defaults=false;;
34514 --he | --h)
34515 # Conflict between --help and --header
34516 as_fn_error $? "ambiguous option: \`$1'
34517Try \`$0 --help' for more information.";;
34518 --help | --hel | -h )
34519 $as_echo "$ac_cs_usage"; exit ;;
34520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34521 | -silent | --silent | --silen | --sile | --sil | --si | --s)
34522 ac_cs_silent=: ;;
ccb1ba62 34523
b686ecb5
JM
34524 # This is an error.
34525 -*) as_fn_error $? "unrecognized option: \`$1'
34526Try \`$0 --help' for more information." ;;
ccb1ba62 34527
b686ecb5
JM
34528 *) as_fn_append ac_config_targets " $1"
34529 ac_need_defaults=false ;;
ccb1ba62 34530
b686ecb5
JM
34531 esac
34532 shift
34533done
ccb1ba62 34534
b686ecb5 34535ac_configure_extra_args=
ccb1ba62 34536
b686ecb5
JM
34537if $ac_cs_silent; then
34538 exec 6>/dev/null
34539 ac_configure_extra_args="$ac_configure_extra_args --silent"
ccb1ba62
CB
34540fi
34541
b686ecb5
JM
34542_ACEOF
34543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34544if \$ac_cs_recheck; then
34545 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34546 shift
34547 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34548 CONFIG_SHELL='$SHELL'
34549 export CONFIG_SHELL
34550 exec "\$@"
34551fi
a0a461e5 34552
b686ecb5
JM
34553_ACEOF
34554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34555exec 5>>config.log
34556{
34557 echo
34558 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34559## Running $as_me. ##
34560_ASBOX
34561 $as_echo "$ac_log"
34562} >&5
60ca704f 34563
bec39cab 34564_ACEOF
b686ecb5
JM
34565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34566#
34567# INIT-COMMANDS
34568#
5a2402b8 34569
5a2402b8 34570
b686ecb5
JM
34571# The HP-UX ksh and POSIX shell print the target directory to stdout
34572# if CDPATH is set.
34573(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5a2402b8 34574
b686ecb5
JM
34575sed_quote_subst='$sed_quote_subst'
34576double_quote_subst='$double_quote_subst'
34577delay_variable_subst='$delay_variable_subst'
34578macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
34579macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
34580enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
34581enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
34582pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
34583enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
34584SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
34585ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
34586host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
34587host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
34588host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
34589build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
34590build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
34591build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
34592SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
34593Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
34594GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
34595EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
34596FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
34597LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
34598NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
34599LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
34600max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
34601ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
34602exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
34603lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
34604lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
34605lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
34606reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
34607reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
34608OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
34609deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
34610file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
34611AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
34612AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
34613STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
34614RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
34615old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
34616old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
34617old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
34618lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
34619CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
34620CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
34621compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
34622GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
34623lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
34624lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
34625lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
34626lt_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"`'
34627objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
34628MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
34629lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
34630lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
34631lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
34632lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
34633lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
34634need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
34635DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
34636NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
34637LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
34638OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
34639OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
34640libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
34641shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
34642extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
34643archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
34644enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
34645export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
34646whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
34647compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
34648old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
34649old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
34650archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
34651archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
34652module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
34653module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
34654with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
34655allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
34656no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
34657hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
34658hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
34659hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
34660hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
34661hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
34662hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
34663hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
34664hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
34665inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
34666link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
34667fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
34668always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
34669export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
34670exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
34671include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
34672prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
34673file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
34674variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
34675need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
34676need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
34677version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
34678runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
34679shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
34680shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
34681libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
34682library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
34683soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
34684install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
34685postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
34686postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
34687finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
34688finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
34689hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
34690sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
34691sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
34692hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
34693enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
34694enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
34695enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
34696old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
34697striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
34698compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
34699predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
34700postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
34701predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
34702postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
34703compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
34704LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
34705reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
34706reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34707old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34708compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
34709GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
34710lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
34711lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
34712lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
34713lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
34714lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
34715archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
34716enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
34717export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
34718whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
34719compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
34720old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34721old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34722archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34723archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34724module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34725module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34726with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
34727allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
34728no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
34729hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
34730hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
34731hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
34732hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
34733hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
34734hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
34735hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
34736hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
34737inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
34738link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
34739fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`'
34740always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
34741export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34742exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
34743include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
34744prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
34745file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
34746hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
34747compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
34748predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
34749postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
34750predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
34751postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
34752compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
34753
34754LTCC='$LTCC'
34755LTCFLAGS='$LTCFLAGS'
34756compiler='$compiler_DEFAULT'
34757
34758# A function that is used when there is no print builtin or printf.
34759func_fallback_echo ()
34760{
34761 eval 'cat <<_LTECHO_EOF
34762\$1
34763_LTECHO_EOF'
34764}
a0a461e5 34765
b686ecb5
JM
34766# Quote evaled strings.
34767for var in SHELL \
34768ECHO \
34769SED \
34770GREP \
34771EGREP \
34772FGREP \
34773LD \
34774NM \
34775LN_S \
34776lt_SP2NL \
34777lt_NL2SP \
34778reload_flag \
34779OBJDUMP \
34780deplibs_check_method \
34781file_magic_cmd \
34782AR \
34783AR_FLAGS \
34784STRIP \
34785RANLIB \
34786CC \
34787CFLAGS \
34788compiler \
34789lt_cv_sys_global_symbol_pipe \
34790lt_cv_sys_global_symbol_to_cdecl \
34791lt_cv_sys_global_symbol_to_c_name_address \
34792lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
34793lt_prog_compiler_no_builtin_flag \
34794lt_prog_compiler_wl \
34795lt_prog_compiler_pic \
34796lt_prog_compiler_static \
34797lt_cv_prog_compiler_c_o \
34798need_locks \
34799DSYMUTIL \
34800NMEDIT \
34801LIPO \
34802OTOOL \
34803OTOOL64 \
34804shrext_cmds \
34805export_dynamic_flag_spec \
34806whole_archive_flag_spec \
34807compiler_needs_object \
34808with_gnu_ld \
34809allow_undefined_flag \
34810no_undefined_flag \
34811hardcode_libdir_flag_spec \
34812hardcode_libdir_flag_spec_ld \
34813hardcode_libdir_separator \
34814fix_srcfile_path \
34815exclude_expsyms \
34816include_expsyms \
34817file_list_spec \
34818variables_saved_for_relink \
34819libname_spec \
34820library_names_spec \
34821soname_spec \
34822install_override_mode \
34823finish_eval \
34824old_striplib \
34825striplib \
34826compiler_lib_search_dirs \
34827predep_objects \
34828postdep_objects \
34829predeps \
34830postdeps \
34831compiler_lib_search_path \
34832LD_CXX \
34833reload_flag_CXX \
34834compiler_CXX \
34835lt_prog_compiler_no_builtin_flag_CXX \
34836lt_prog_compiler_wl_CXX \
34837lt_prog_compiler_pic_CXX \
34838lt_prog_compiler_static_CXX \
34839lt_cv_prog_compiler_c_o_CXX \
34840export_dynamic_flag_spec_CXX \
34841whole_archive_flag_spec_CXX \
34842compiler_needs_object_CXX \
34843with_gnu_ld_CXX \
34844allow_undefined_flag_CXX \
34845no_undefined_flag_CXX \
34846hardcode_libdir_flag_spec_CXX \
34847hardcode_libdir_flag_spec_ld_CXX \
34848hardcode_libdir_separator_CXX \
34849fix_srcfile_path_CXX \
34850exclude_expsyms_CXX \
34851include_expsyms_CXX \
34852file_list_spec_CXX \
34853compiler_lib_search_dirs_CXX \
34854predep_objects_CXX \
34855postdep_objects_CXX \
34856predeps_CXX \
34857postdeps_CXX \
34858compiler_lib_search_path_CXX; do
34859 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
34860 *[\\\\\\\`\\"\\\$]*)
34861 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
34862 ;;
34863 *)
34864 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
34865 ;;
34866 esac
34867done
34868
34869# Double-quote double-evaled strings.
34870for var in reload_cmds \
34871old_postinstall_cmds \
34872old_postuninstall_cmds \
34873old_archive_cmds \
34874extract_expsyms_cmds \
34875old_archive_from_new_cmds \
34876old_archive_from_expsyms_cmds \
34877archive_cmds \
34878archive_expsym_cmds \
34879module_cmds \
34880module_expsym_cmds \
34881export_symbols_cmds \
34882prelink_cmds \
34883postinstall_cmds \
34884postuninstall_cmds \
34885finish_cmds \
34886sys_lib_search_path_spec \
34887sys_lib_dlsearch_path_spec \
34888reload_cmds_CXX \
34889old_archive_cmds_CXX \
34890old_archive_from_new_cmds_CXX \
34891old_archive_from_expsyms_cmds_CXX \
34892archive_cmds_CXX \
34893archive_expsym_cmds_CXX \
34894module_cmds_CXX \
34895module_expsym_cmds_CXX \
34896export_symbols_cmds_CXX \
34897prelink_cmds_CXX; do
34898 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
34899 *[\\\\\\\`\\"\\\$]*)
34900 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
34901 ;;
34902 *)
34903 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
34904 ;;
34905 esac
e3487908 34906done
e3487908 34907
b686ecb5
JM
34908ac_aux_dir='$ac_aux_dir'
34909xsi_shell='$xsi_shell'
34910lt_shell_append='$lt_shell_append'
34911
34912# See if we are running on zsh, and set the options which allow our
34913# commands through without removal of \ escapes INIT.
34914if test -n "\${ZSH_VERSION+set}" ; then
34915 setopt NO_GLOB_SUBST
e3487908
GKB
34916fi
34917
34918
b686ecb5
JM
34919 PACKAGE='$PACKAGE'
34920 VERSION='$VERSION'
34921 TIMESTAMP='$TIMESTAMP'
34922 RM='$RM'
34923 ofile='$ofile'
34924
e3487908 34925
e3487908 34926
5218fa9e 34927ac_aux_dir='$ac_aux_dir'
e3487908 34928
c906108c 34929
b686ecb5 34930ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
862776f2
AA
34931# Capture the value of obsolete ALL_LINGUAS because we need it to compute
34932 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
34933 # from automake.
34934 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
34935 # Capture the value of LINGUAS because we need it to compute CATALOGS.
34936 LINGUAS="${LINGUAS-%UNSET%}"
34937
b686ecb5 34938GDB_NM_FILE=$GDB_NM_FILE
c906108c 34939
b686ecb5 34940_ACEOF
c906108c 34941
b686ecb5 34942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 34943
b686ecb5
JM
34944# Handling of arguments.
34945for ac_config_target in $ac_config_targets
34946do
34947 case $ac_config_target in
34948 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
34949 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
34950 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
862776f2 34951 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
b686ecb5
JM
34952 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
34953 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
56252b7c 34954 "gcore.in") CONFIG_FILES="$CONFIG_FILES gcore.in:gcore-1.in" ;;
fb2ded33 34955 "gstack.in") CONFIG_FILES="$CONFIG_FILES gstack.in:gstack-1.in" ;;
71f193a5 34956 "gdb-add-index.in") CONFIG_FILES="$CONFIG_FILES gdb-add-index.in:contrib/gdb-add-index.sh" ;;
b686ecb5
JM
34957 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
34958 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
34959 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
34960 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
34961 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
bec39cab 34962
b686ecb5
JM
34963 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34964 esac
34965done
8ecfd7bd 34966
4d696a5c 34967
b686ecb5
JM
34968# If the user did not use the arguments to specify the items to instantiate,
34969# then the envvar interface is used. Set only those that are not.
34970# We use the long form for the default assignment because of an extremely
34971# bizarre bug on SunOS 4.1.3.
34972if $ac_need_defaults; then
34973 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34974 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34975 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
34976 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
4d696a5c
SM
34977fi
34978
b686ecb5
JM
34979# Have a temporary directory for convenience. Make it in the build tree
34980# simply because there is no reason against having it here, and in addition,
34981# creating and moving files from /tmp can sometimes cause problems.
34982# Hook for its removal unless debugging.
34983# Note that there is a small window in which the directory will not be cleaned:
34984# after its creation but before its name has been assigned to `$tmp'.
34985$debug ||
34986{
34987 tmp= ac_tmp=
34988 trap 'exit_status=$?
34989 : "${ac_tmp:=$tmp}"
34990 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34991' 0
34992 trap 'as_fn_exit 1' 1 2 13 15
34993}
34994# Create a (secure) tmp directory for tmp files.
34995
34996{
34997 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34998 test -d "$tmp"
34999} ||
35000{
35001 tmp=./conf$$-$RANDOM
35002 (umask 077 && mkdir "$tmp")
35003} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
35004ac_tmp=$tmp
35005
35006# Set up the scripts for CONFIG_FILES section.
35007# No need to generate them if there are no CONFIG_FILES.
35008# This happens for instance with `./config.status config.h'.
35009if test -n "$CONFIG_FILES"; then
35010
35011if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
35012 ac_cs_awk_getline=:
35013 ac_cs_awk_pipe_init=
35014 ac_cs_awk_read_file='
35015 while ((getline aline < (F[key])) > 0)
35016 print(aline)
35017 close(F[key])'
35018 ac_cs_awk_pipe_fini=
8ecfd7bd 35019else
b686ecb5
JM
35020 ac_cs_awk_getline=false
35021 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
35022 ac_cs_awk_read_file='
35023 print "|#_!!_#|"
35024 print "cat " F[key] " &&"
35025 '$ac_cs_awk_pipe_init
35026 # The final `:' finishes the AND list.
35027 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
35028fi
35029ac_cr=`echo X | tr X '\015'`
35030# On cygwin, bash can eat \r inside `` if the user requested igncr.
35031# But we know of no other shell where ac_cr would be empty at this
35032# point, so we can use a bashism as a fallback.
35033if test "x$ac_cr" = x; then
35034 eval ac_cr=\$\'\\r\'
35035fi
35036ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
35037if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
35038 ac_cs_awk_cr='\\r'
35039else
35040 ac_cs_awk_cr=$ac_cr
8ecfd7bd
SDJ
35041fi
35042
b686ecb5
JM
35043echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
35044_ACEOF
8ecfd7bd 35045
b686ecb5
JM
35046# Create commands to substitute file output variables.
35047{
35048 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
35049 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
35050 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
35051 echo "_ACAWK" &&
35052 echo "_ACEOF"
35053} >conf$$files.sh &&
35054. ./conf$$files.sh ||
35055 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35056rm -f conf$$files.sh
dcd1f979 35057
b686ecb5
JM
35058{
35059 echo "cat >conf$$subs.awk <<_ACEOF" &&
35060 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
35061 echo "_ACEOF"
35062} >conf$$subs.sh ||
35063 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35064ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
35065ac_delim='%!_!# '
35066for ac_last_try in false false false false false :; do
35067 . ./conf$$subs.sh ||
35068 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
dcd1f979 35069
b686ecb5
JM
35070 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
35071 if test $ac_delim_n = $ac_delim_num; then
35072 break
35073 elif $ac_last_try; then
35074 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35075 else
35076 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35077 fi
35078done
35079rm -f conf$$subs.sh
8ecfd7bd 35080
b686ecb5
JM
35081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35082cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
35083_ACEOF
35084sed -n '
35085h
35086s/^/S["/; s/!.*/"]=/
35087p
35088g
35089s/^[^!]*!//
35090:repl
35091t repl
35092s/'"$ac_delim"'$//
35093t delim
35094:nl
35095h
35096s/\(.\{148\}\)..*/\1/
35097t more1
35098s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
35099p
35100n
35101b repl
35102:more1
35103s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35104p
35105g
35106s/.\{148\}//
35107t nl
35108:delim
35109h
35110s/\(.\{148\}\)..*/\1/
35111t more2
35112s/["\\]/\\&/g; s/^/"/; s/$/"/
35113p
35114b
35115:more2
35116s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35117p
35118g
35119s/.\{148\}//
35120t delim
35121' <conf$$subs.awk | sed '
35122/^[^""]/{
35123 N
35124 s/\n//
35125}
35126' >>$CONFIG_STATUS || ac_write_fail=1
35127rm -f conf$$subs.awk
35128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35129_ACAWK
35130cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
35131 for (key in S) S_is_set[key] = 1
35132 FS = "\a"
35133 \$ac_cs_awk_pipe_init
35134}
35135{
35136 line = $ 0
35137 nfields = split(line, field, "@")
35138 substed = 0
35139 len = length(field[1])
35140 for (i = 2; i < nfields; i++) {
35141 key = field[i]
35142 keylen = length(key)
35143 if (S_is_set[key]) {
35144 value = S[key]
35145 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
35146 len += length(value) + length(field[++i])
35147 substed = 1
35148 } else
35149 len += 1 + keylen
35150 }
35151 if (nfields == 3 && !substed) {
35152 key = field[2]
35153 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
35154 \$ac_cs_awk_read_file
35155 next
35156 }
35157 }
35158 print line
35159}
35160\$ac_cs_awk_pipe_fini
35161_ACAWK
35162_ACEOF
35163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35164if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
35165 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
35166else
35167 cat
35168fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
35169 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
35170_ACEOF
8ecfd7bd 35171
b686ecb5
JM
35172# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
35173# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
35174# trailing colons and then remove the whole line if VPATH becomes empty
35175# (actually we leave an empty line to preserve line numbers).
35176if test "x$srcdir" = x.; then
35177 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
35178h
35179s///
35180s/^/:/
35181s/[ ]*$/:/
35182s/:\$(srcdir):/:/g
35183s/:\${srcdir}:/:/g
35184s/:@srcdir@:/:/g
35185s/^:*//
35186s/:*$//
35187x
35188s/\(=[ ]*\).*/\1/
35189G
35190s/\n//
35191s/^[^=]*=[ ]*$//
35192}'
dcd1f979
TT
35193fi
35194
b686ecb5
JM
35195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35196fi # test -n "$CONFIG_FILES"
b292c783 35197
b686ecb5
JM
35198# Set up the scripts for CONFIG_HEADERS section.
35199# No need to generate them if there are no CONFIG_HEADERS.
35200# This happens for instance with `./config.status Makefile'.
35201if test -n "$CONFIG_HEADERS"; then
35202cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
35203BEGIN {
35204_ACEOF
8ecfd7bd 35205
b686ecb5
JM
35206# Transform confdefs.h into an awk script `defines.awk', embedded as
35207# here-document in config.status, that substitutes the proper values into
35208# config.h.in to produce config.h.
f6a88844 35209
b686ecb5
JM
35210# Create a delimiter string that does not exist in confdefs.h, to ease
35211# handling of long lines.
35212ac_delim='%!_!# '
35213for ac_last_try in false false :; do
35214 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
35215 if test -z "$ac_tt"; then
35216 break
35217 elif $ac_last_try; then
35218 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
35219 else
35220 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
f6a88844 35221 fi
b686ecb5 35222done
f6a88844 35223
b686ecb5
JM
35224# For the awk script, D is an array of macro values keyed by name,
35225# likewise P contains macro parameters if any. Preserve backslash
35226# newline sequences.
b292c783 35227
b686ecb5
JM
35228ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
35229sed -n '
35230s/.\{148\}/&'"$ac_delim"'/g
35231t rset
35232:rset
35233s/^[ ]*#[ ]*define[ ][ ]*/ /
35234t def
35235d
35236:def
35237s/\\$//
35238t bsnl
35239s/["\\]/\\&/g
35240s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
35241D["\1"]=" \3"/p
35242s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
35243d
35244:bsnl
35245s/["\\]/\\&/g
35246s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
35247D["\1"]=" \3\\\\\\n"\\/p
35248t cont
35249s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
35250t cont
35251d
35252:cont
35253n
35254s/.\{148\}/&'"$ac_delim"'/g
35255t clear
35256:clear
35257s/\\$//
35258t bsnlc
35259s/["\\]/\\&/g; s/^/"/; s/$/"/p
35260d
35261:bsnlc
35262s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
35263b cont
35264' <confdefs.h | sed '
35265s/'"$ac_delim"'/"\\\
35266"/g' >>$CONFIG_STATUS || ac_write_fail=1
bec39cab 35267
b686ecb5
JM
35268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35269 for (key in D) D_is_set[key] = 1
35270 FS = "\a"
35271}
35272/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
35273 line = \$ 0
35274 split(line, arg, " ")
35275 if (arg[1] == "#") {
35276 defundef = arg[2]
35277 mac1 = arg[3]
35278 } else {
35279 defundef = substr(arg[1], 2)
35280 mac1 = arg[2]
35281 }
35282 split(mac1, mac2, "(") #)
35283 macro = mac2[1]
35284 prefix = substr(line, 1, index(line, defundef) - 1)
35285 if (D_is_set[macro]) {
35286 # Preserve the white space surrounding the "#".
35287 print prefix "define", macro P[macro] D[macro]
35288 next
35289 } else {
35290 # Replace #undef with comments. This is necessary, for example,
35291 # in the case of _POSIX_SOURCE, which is predefined and required
35292 # on some systems where configure will not decide to define it.
35293 if (defundef == "undef") {
35294 print "/*", prefix defundef, macro, "*/"
35295 next
35296 }
35297 }
35298}
35299{ print }
35300_ACAWK
bec39cab 35301_ACEOF
b686ecb5
JM
35302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35303 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
35304fi # test -n "$CONFIG_HEADERS"
bec39cab 35305
bec39cab 35306
b686ecb5
JM
35307eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
35308shift
35309for ac_tag
35310do
35311 case $ac_tag in
35312 :[FHLC]) ac_mode=$ac_tag; continue;;
35313 esac
35314 case $ac_mode$ac_tag in
35315 :[FHL]*:*);;
35316 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
35317 :[FH]-) ac_tag=-:-;;
35318 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
35319 esac
35320 ac_save_IFS=$IFS
35321 IFS=:
35322 set x $ac_tag
35323 IFS=$ac_save_IFS
35324 shift
35325 ac_file=$1
35326 shift
bec39cab 35327
b686ecb5
JM
35328 case $ac_mode in
35329 :L) ac_source=$1;;
35330 :[FH])
35331 ac_file_inputs=
35332 for ac_f
35333 do
35334 case $ac_f in
35335 -) ac_f="$ac_tmp/stdin";;
35336 *) # Look for the file first in the build tree, then in the source tree
35337 # (if the path is not absolute). The absolute path cannot be DOS-style,
35338 # because $ac_f cannot contain `:'.
35339 test -f "$ac_f" ||
35340 case $ac_f in
35341 [\\/$]*) false;;
35342 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
35343 esac ||
35344 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
35345 esac
35346 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
35347 as_fn_append ac_file_inputs " '$ac_f'"
35348 done
bec39cab 35349
b686ecb5
JM
35350 # Let's still pretend it is `configure' which instantiates (i.e., don't
35351 # use $as_me), people would be surprised to read:
35352 # /* config.h. Generated by config.status. */
35353 configure_input='Generated from '`
35354 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
35355 `' by configure.'
35356 if test x"$ac_file" != x-; then
35357 configure_input="$ac_file. $configure_input"
35358 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
35359$as_echo "$as_me: creating $ac_file" >&6;}
35360 fi
35361 # Neutralize special characters interpreted by sed in replacement strings.
35362 case $configure_input in #(
35363 *\&* | *\|* | *\\* )
35364 ac_sed_conf_input=`$as_echo "$configure_input" |
35365 sed 's/[\\\\&|]/\\\\&/g'`;; #(
35366 *) ac_sed_conf_input=$configure_input;;
35367 esac
bec39cab 35368
b686ecb5
JM
35369 case $ac_tag in
35370 *:-:* | *:-) cat >"$ac_tmp/stdin" \
35371 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
35372 esac
35373 ;;
35374 esac
bec39cab 35375
b686ecb5
JM
35376 ac_dir=`$as_dirname -- "$ac_file" ||
35377$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35378 X"$ac_file" : 'X\(//\)[^/]' \| \
35379 X"$ac_file" : 'X\(//\)$' \| \
35380 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
35381$as_echo X"$ac_file" |
35382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35383 s//\1/
35384 q
35385 }
35386 /^X\(\/\/\)[^/].*/{
35387 s//\1/
35388 q
35389 }
35390 /^X\(\/\/\)$/{
35391 s//\1/
35392 q
35393 }
35394 /^X\(\/\).*/{
35395 s//\1/
35396 q
35397 }
35398 s/.*/./; q'`
35399 as_dir="$ac_dir"; as_fn_mkdir_p
35400 ac_builddir=.
bec39cab 35401
b686ecb5
JM
35402case "$ac_dir" in
35403.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35404*)
35405 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35406 # A ".." for each directory in $ac_dir_suffix.
35407 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35408 case $ac_top_builddir_sub in
35409 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35410 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35411 esac ;;
35412esac
35413ac_abs_top_builddir=$ac_pwd
35414ac_abs_builddir=$ac_pwd$ac_dir_suffix
35415# for backward compatibility:
35416ac_top_builddir=$ac_top_build_prefix
81ecdfbb 35417
b686ecb5
JM
35418case $srcdir in
35419 .) # We are building in place.
35420 ac_srcdir=.
35421 ac_top_srcdir=$ac_top_builddir_sub
35422 ac_abs_top_srcdir=$ac_pwd ;;
35423 [\\/]* | ?:[\\/]* ) # Absolute name.
35424 ac_srcdir=$srcdir$ac_dir_suffix;
35425 ac_top_srcdir=$srcdir
35426 ac_abs_top_srcdir=$srcdir ;;
35427 *) # Relative name.
35428 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35429 ac_top_srcdir=$ac_top_build_prefix$srcdir
35430 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35431esac
35432ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
81ecdfbb 35433
bec39cab 35434
b686ecb5
JM
35435 case $ac_mode in
35436 :F)
35437 #
35438 # CONFIG_FILE
35439 #
bec39cab 35440
b686ecb5
JM
35441 case $INSTALL in
35442 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
35443 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
35444 esac
35445_ACEOF
81ecdfbb 35446
b686ecb5
JM
35447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35448# If the template does not know about datarootdir, expand it.
35449# FIXME: This hack should be removed a few years after 2.60.
35450ac_datarootdir_hack=; ac_datarootdir_seen=
35451ac_sed_dataroot='
35452/datarootdir/ {
35453 p
35454 q
35455}
35456/@datadir@/p
35457/@docdir@/p
35458/@infodir@/p
35459/@localedir@/p
35460/@mandir@/p'
35461case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35462*datarootdir*) ac_datarootdir_seen=yes;;
35463*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35465$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35466_ACEOF
35467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35468 ac_datarootdir_hack='
35469 s&@datadir@&$datadir&g
35470 s&@docdir@&$docdir&g
35471 s&@infodir@&$infodir&g
35472 s&@localedir@&$localedir&g
35473 s&@mandir@&$mandir&g
35474 s&\\\${datarootdir}&$datarootdir&g' ;;
81ecdfbb 35475esac
b686ecb5 35476_ACEOF
81ecdfbb 35477
b686ecb5
JM
35478# Neutralize VPATH when `$srcdir' = `.'.
35479# Shell code in configure.ac might set extrasub.
35480# FIXME: do we really want to maintain this feature?
35481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35482ac_sed_extra="$ac_vpsub
35483$extrasub
35484_ACEOF
35485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35486:t
35487/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35488s|@configure_input@|$ac_sed_conf_input|;t t
35489s&@top_builddir@&$ac_top_builddir_sub&;t t
35490s&@top_build_prefix@&$ac_top_build_prefix&;t t
35491s&@srcdir@&$ac_srcdir&;t t
35492s&@abs_srcdir@&$ac_abs_srcdir&;t t
35493s&@top_srcdir@&$ac_top_srcdir&;t t
35494s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35495s&@builddir@&$ac_builddir&;t t
35496s&@abs_builddir@&$ac_abs_builddir&;t t
35497s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35498s&@INSTALL@&$ac_INSTALL&;t t
35499$ac_datarootdir_hack
35500"
35501eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
35502if $ac_cs_awk_getline; then
35503 $AWK -f "$ac_tmp/subs.awk"
35504else
35505 $AWK -f "$ac_tmp/subs.awk" | $SHELL
35506fi \
35507 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb 35508
b686ecb5
JM
35509test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35510 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
35511 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
35512 "$ac_tmp/out"`; test -z "$ac_out"; } &&
35513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35514which seems to be undefined. Please make sure it is defined" >&5
35515$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35516which seems to be undefined. Please make sure it is defined" >&2;}
bec39cab 35517
b686ecb5
JM
35518 rm -f "$ac_tmp/stdin"
35519 case $ac_file in
35520 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
35521 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
35522 esac \
35523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35524 ;;
35525 :H)
35526 #
35527 # CONFIG_HEADER
35528 #
35529 if test x"$ac_file" != x-; then
35530 {
35531 $as_echo "/* $configure_input */" \
35532 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
35533 } >"$ac_tmp/config.h" \
35534 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35535 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
35536 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35537$as_echo "$as_me: $ac_file is unchanged" >&6;}
35538 else
35539 rm -f "$ac_file"
35540 mv "$ac_tmp/config.h" "$ac_file" \
35541 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35542 fi
35543 else
35544 $as_echo "/* $configure_input */" \
35545 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
35546 || as_fn_error $? "could not create -" "$LINENO" 5
35547 fi
35548 ;;
35549 :L)
35550 #
35551 # CONFIG_LINK
35552 #
bec39cab 35553
b686ecb5
JM
35554 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
35555 :
35556 else
35557 # Prefer the file from the source tree if names are identical.
35558 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
35559 ac_source=$srcdir/$ac_source
35560 fi
81ecdfbb 35561
b686ecb5
JM
35562 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
35563$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
81ecdfbb 35564
b686ecb5
JM
35565 if test ! -r "$ac_source"; then
35566 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
35567 fi
35568 rm -f "$ac_file"
81ecdfbb 35569
b686ecb5
JM
35570 # Try a relative symlink, then a hard link, then a copy.
35571 case $ac_source in
35572 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
35573 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
35574 esac
35575 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
35576 ln "$ac_source" "$ac_file" 2>/dev/null ||
35577 cp -p "$ac_source" "$ac_file" ||
35578 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
35579 fi
35580 ;;
35581 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
35582$as_echo "$as_me: executing $ac_file commands" >&6;}
35583 ;;
35584 esac
bec39cab 35585
81ecdfbb 35586
b686ecb5
JM
35587 case $ac_file$ac_mode in
35588 "config.h":H) echo > stamp-h ;;
35589 "libtool":C)
81ecdfbb 35590
b686ecb5
JM
35591 # See if we are running on zsh, and set the options which allow our
35592 # commands through without removal of \ escapes.
35593 if test -n "${ZSH_VERSION+set}" ; then
35594 setopt NO_GLOB_SUBST
35595 fi
81ecdfbb 35596
b686ecb5
JM
35597 cfgfile="${ofile}T"
35598 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
35599 $RM "$cfgfile"
81ecdfbb 35600
b686ecb5
JM
35601 cat <<_LT_EOF >> "$cfgfile"
35602#! $SHELL
81ecdfbb 35603
b686ecb5
JM
35604# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
35605# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
35606# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
35607# NOTE: Changes made to this file will be lost: look at ltmain.sh.
35608#
35609# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
35610# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
35611# Written by Gordon Matzigkeit, 1996
35612#
35613# This file is part of GNU Libtool.
35614#
35615# GNU Libtool is free software; you can redistribute it and/or
35616# modify it under the terms of the GNU General Public License as
35617# published by the Free Software Foundation; either version 2 of
35618# the License, or (at your option) any later version.
35619#
35620# As a special exception to the GNU General Public License,
35621# if you distribute this file as part of a program or library that
35622# is built using GNU Libtool, you may include this file under the
35623# same distribution terms that you use for the rest of that program.
35624#
35625# GNU Libtool is distributed in the hope that it will be useful,
35626# but WITHOUT ANY WARRANTY; without even the implied warranty of
35627# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35628# GNU General Public License for more details.
35629#
35630# You should have received a copy of the GNU General Public License
35631# along with GNU Libtool; see the file COPYING. If not, a copy
35632# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
35633# obtained by writing to the Free Software Foundation, Inc.,
35634# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
81ecdfbb 35635
81ecdfbb 35636
b686ecb5
JM
35637# The names of the tagged configurations supported by this script.
35638available_tags="CXX "
81ecdfbb 35639
b686ecb5 35640# ### BEGIN LIBTOOL CONFIG
bec39cab 35641
b686ecb5
JM
35642# Which release of libtool.m4 was used?
35643macro_version=$macro_version
35644macro_revision=$macro_revision
81ecdfbb 35645
b686ecb5
JM
35646# Whether or not to build shared libraries.
35647build_libtool_libs=$enable_shared
bec39cab 35648
b686ecb5
JM
35649# Whether or not to build static libraries.
35650build_old_libs=$enable_static
bec39cab 35651
b686ecb5
JM
35652# What type of objects to build.
35653pic_mode=$pic_mode
bec39cab 35654
b686ecb5
JM
35655# Whether or not to optimize for fast installation.
35656fast_install=$enable_fast_install
b4e70030 35657
b686ecb5
JM
35658# Shell to use when invoking shell scripts.
35659SHELL=$lt_SHELL
b4e70030 35660
b686ecb5
JM
35661# An echo program that protects backslashes.
35662ECHO=$lt_ECHO
bec39cab 35663
b686ecb5
JM
35664# The host system.
35665host_alias=$host_alias
35666host=$host
35667host_os=$host_os
81ecdfbb 35668
b686ecb5
JM
35669# The build system.
35670build_alias=$build_alias
35671build=$build
35672build_os=$build_os
81ecdfbb 35673
b686ecb5
JM
35674# A sed program that does not truncate output.
35675SED=$lt_SED
81ecdfbb 35676
b686ecb5
JM
35677# Sed that helps us avoid accidentally triggering echo(1) options like -n.
35678Xsed="\$SED -e 1s/^X//"
81ecdfbb 35679
b686ecb5
JM
35680# A grep program that handles long lines.
35681GREP=$lt_GREP
bec39cab 35682
b686ecb5
JM
35683# An ERE matcher.
35684EGREP=$lt_EGREP
bec39cab 35685
b686ecb5
JM
35686# A literal string matcher.
35687FGREP=$lt_FGREP
d0ac1c44 35688
b686ecb5
JM
35689# A BSD- or MS-compatible name lister.
35690NM=$lt_NM
bec39cab 35691
b686ecb5
JM
35692# Whether we need soft or hard links.
35693LN_S=$lt_LN_S
bec39cab 35694
b686ecb5
JM
35695# What is the maximum length of a command?
35696max_cmd_len=$max_cmd_len
bec39cab 35697
b686ecb5
JM
35698# Object file suffix (normally "o").
35699objext=$ac_objext
bec39cab 35700
b686ecb5
JM
35701# Executable file suffix (normally "").
35702exeext=$exeext
81ecdfbb 35703
b686ecb5
JM
35704# whether the shell understands "unset".
35705lt_unset=$lt_unset
bec39cab 35706
b686ecb5
JM
35707# turn spaces into newlines.
35708SP2NL=$lt_lt_SP2NL
bec39cab 35709
b686ecb5
JM
35710# turn newlines into spaces.
35711NL2SP=$lt_lt_NL2SP
81ecdfbb 35712
b686ecb5
JM
35713# An object symbol dumper.
35714OBJDUMP=$lt_OBJDUMP
bec39cab 35715
b686ecb5
JM
35716# Method to check whether dependent libraries are shared objects.
35717deplibs_check_method=$lt_deplibs_check_method
234b45d4 35718
b686ecb5
JM
35719# Command to use when deplibs_check_method == "file_magic".
35720file_magic_cmd=$lt_file_magic_cmd
b4e70030 35721
b686ecb5
JM
35722# The archiver.
35723AR=$lt_AR
35724AR_FLAGS=$lt_AR_FLAGS
b4e70030 35725
b686ecb5
JM
35726# A symbol stripping program.
35727STRIP=$lt_STRIP
234b45d4 35728
b686ecb5
JM
35729# Commands used to install an old-style archive.
35730RANLIB=$lt_RANLIB
35731old_postinstall_cmds=$lt_old_postinstall_cmds
35732old_postuninstall_cmds=$lt_old_postuninstall_cmds
b4e70030 35733
b686ecb5
JM
35734# Whether to use a lock for old archive extraction.
35735lock_old_archive_extraction=$lock_old_archive_extraction
234b45d4 35736
b686ecb5
JM
35737# A C compiler.
35738LTCC=$lt_CC
234b45d4 35739
b686ecb5
JM
35740# LTCC compiler flags.
35741LTCFLAGS=$lt_CFLAGS
234b45d4 35742
b686ecb5
JM
35743# Take the output of nm and produce a listing of raw symbols and C names.
35744global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
234b45d4 35745
b686ecb5
JM
35746# Transform the output of nm in a proper C declaration.
35747global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
234b45d4 35748
b686ecb5
JM
35749# Transform the output of nm in a C name address pair.
35750global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
234b45d4 35751
b686ecb5
JM
35752# Transform the output of nm in a C name address pair when lib prefix is needed.
35753global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
bec39cab 35754
b686ecb5
JM
35755# The name of the directory that contains temporary libtool files.
35756objdir=$objdir
b4e70030 35757
b686ecb5
JM
35758# Used to examine libraries when file_magic_cmd begins with "file".
35759MAGIC_CMD=$MAGIC_CMD
bec39cab 35760
b686ecb5
JM
35761# Must we lock files when doing compilation?
35762need_locks=$lt_need_locks
81ecdfbb 35763
b686ecb5
JM
35764# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
35765DSYMUTIL=$lt_DSYMUTIL
bec39cab 35766
b686ecb5
JM
35767# Tool to change global to local symbols on Mac OS X.
35768NMEDIT=$lt_NMEDIT
c906108c 35769
b686ecb5
JM
35770# Tool to manipulate fat objects and archives on Mac OS X.
35771LIPO=$lt_LIPO
35772
35773# ldd/readelf like tool for Mach-O binaries on Mac OS X.
35774OTOOL=$lt_OTOOL
35775
35776# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
35777OTOOL64=$lt_OTOOL64
35778
35779# Old archive suffix (normally "a").
35780libext=$libext
35781
35782# Shared library suffix (normally ".so").
35783shrext_cmds=$lt_shrext_cmds
35784
35785# The commands to extract the exported symbol list from a shared archive.
35786extract_expsyms_cmds=$lt_extract_expsyms_cmds
35787
35788# Variables whose values should be saved in libtool wrapper scripts and
35789# restored at link time.
35790variables_saved_for_relink=$lt_variables_saved_for_relink
35791
35792# Do we need the "lib" prefix for modules?
35793need_lib_prefix=$need_lib_prefix
35794
35795# Do we need a version for libraries?
35796need_version=$need_version
35797
35798# Library versioning type.
35799version_type=$version_type
35800
35801# Shared library runtime path variable.
35802runpath_var=$runpath_var
35803
35804# Shared library path variable.
35805shlibpath_var=$shlibpath_var
35806
35807# Is shlibpath searched before the hard-coded library search path?
35808shlibpath_overrides_runpath=$shlibpath_overrides_runpath
35809
35810# Format of library name prefix.
35811libname_spec=$lt_libname_spec
35812
35813# List of archive names. First name is the real one, the rest are links.
35814# The last name is the one that the linker finds with -lNAME
35815library_names_spec=$lt_library_names_spec
35816
35817# The coded name of the library, if different from the real name.
35818soname_spec=$lt_soname_spec
35819
35820# Permission mode override for installation of shared libraries.
35821install_override_mode=$lt_install_override_mode
35822
35823# Command to use after installation of a shared archive.
35824postinstall_cmds=$lt_postinstall_cmds
c906108c 35825
b686ecb5
JM
35826# Command to use after uninstallation of a shared archive.
35827postuninstall_cmds=$lt_postuninstall_cmds
c906108c 35828
b686ecb5
JM
35829# Commands used to finish a libtool library installation in a directory.
35830finish_cmds=$lt_finish_cmds
c906108c 35831
b686ecb5
JM
35832# As "finish_cmds", except a single script fragment to be evaled but
35833# not shown.
35834finish_eval=$lt_finish_eval
c906108c 35835
b686ecb5
JM
35836# Whether we should hardcode library paths into libraries.
35837hardcode_into_libs=$hardcode_into_libs
c906108c 35838
b686ecb5
JM
35839# Compile-time system search path for libraries.
35840sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
c906108c 35841
b686ecb5
JM
35842# Run-time system search path for libraries.
35843sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
bec39cab 35844
b686ecb5
JM
35845# Whether dlopen is supported.
35846dlopen_support=$enable_dlopen
bec39cab 35847
b686ecb5
JM
35848# Whether dlopen of programs is supported.
35849dlopen_self=$enable_dlopen_self
b4e70030 35850
b686ecb5
JM
35851# Whether dlopen of statically linked programs is supported.
35852dlopen_self_static=$enable_dlopen_self_static
bec39cab 35853
b686ecb5
JM
35854# Commands to strip libraries.
35855old_striplib=$lt_old_striplib
35856striplib=$lt_striplib
4e8d927d 35857
81ecdfbb 35858
b686ecb5
JM
35859# The linker used to build libraries.
35860LD=$lt_LD
c906108c 35861
b686ecb5
JM
35862# How to create reloadable object files.
35863reload_flag=$lt_reload_flag
35864reload_cmds=$lt_reload_cmds
81ecdfbb 35865
b686ecb5
JM
35866# Commands used to build an old-style archive.
35867old_archive_cmds=$lt_old_archive_cmds
bec39cab 35868
b686ecb5
JM
35869# A language specific compiler.
35870CC=$lt_compiler
81ecdfbb 35871
b686ecb5
JM
35872# Is the compiler the GNU compiler?
35873with_gcc=$GCC
81ecdfbb 35874
b686ecb5
JM
35875# Compiler flag to turn off builtin functions.
35876no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
81ecdfbb 35877
b686ecb5
JM
35878# How to pass a linker flag through the compiler.
35879wl=$lt_lt_prog_compiler_wl
81ecdfbb 35880
b686ecb5
JM
35881# Additional compiler flags for building library objects.
35882pic_flag=$lt_lt_prog_compiler_pic
81ecdfbb 35883
b686ecb5
JM
35884# Compiler flag to prevent dynamic linking.
35885link_static_flag=$lt_lt_prog_compiler_static
81ecdfbb 35886
b686ecb5
JM
35887# Does compiler simultaneously support -c and -o options?
35888compiler_c_o=$lt_lt_cv_prog_compiler_c_o
81ecdfbb 35889
b686ecb5
JM
35890# Whether or not to add -lc for building shared libraries.
35891build_libtool_need_lc=$archive_cmds_need_lc
81ecdfbb 35892
b686ecb5
JM
35893# Whether or not to disallow shared libs when runtime libs are static.
35894allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
35895
35896# Compiler flag to allow reflexive dlopens.
35897export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
35898
35899# Compiler flag to generate shared objects directly from archives.
35900whole_archive_flag_spec=$lt_whole_archive_flag_spec
35901
35902# Whether the compiler copes with passing no objects directly.
35903compiler_needs_object=$lt_compiler_needs_object
81ecdfbb 35904
b686ecb5
JM
35905# Create an old-style archive from a shared archive.
35906old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
81ecdfbb 35907
b686ecb5
JM
35908# Create a temporary old-style archive to link instead of a shared archive.
35909old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
81ecdfbb 35910
b686ecb5
JM
35911# Commands used to build a shared archive.
35912archive_cmds=$lt_archive_cmds
35913archive_expsym_cmds=$lt_archive_expsym_cmds
81ecdfbb 35914
b686ecb5
JM
35915# Commands used to build a loadable module if different from building
35916# a shared archive.
35917module_cmds=$lt_module_cmds
35918module_expsym_cmds=$lt_module_expsym_cmds
4e8d927d 35919
b686ecb5
JM
35920# Whether we are building with GNU ld or not.
35921with_gnu_ld=$lt_with_gnu_ld
4e8d927d 35922
b686ecb5
JM
35923# Flag that allows shared libraries with undefined symbols to be built.
35924allow_undefined_flag=$lt_allow_undefined_flag
81ecdfbb 35925
b686ecb5
JM
35926# Flag that enforces no undefined symbols.
35927no_undefined_flag=$lt_no_undefined_flag
81ecdfbb 35928
b686ecb5
JM
35929# Flag to hardcode \$libdir into a binary during linking.
35930# This must work even if \$libdir does not exist
35931hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
4e8d927d 35932
b686ecb5
JM
35933# If ld is used when linking, flag to hardcode \$libdir into a binary
35934# during linking. This must work even if \$libdir does not exist.
35935hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
4e8d927d 35936
b686ecb5
JM
35937# Whether we need a single "-rpath" flag with a separated argument.
35938hardcode_libdir_separator=$lt_hardcode_libdir_separator
4e8d927d 35939
b686ecb5
JM
35940# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
35941# DIR into the resulting binary.
35942hardcode_direct=$hardcode_direct
81ecdfbb 35943
b686ecb5
JM
35944# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
35945# DIR into the resulting binary and the resulting library dependency is
35946# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
35947# library is relocated.
35948hardcode_direct_absolute=$hardcode_direct_absolute
4e8d927d 35949
b686ecb5
JM
35950# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
35951# into the resulting binary.
35952hardcode_minus_L=$hardcode_minus_L
35953
35954# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
35955# into the resulting binary.
35956hardcode_shlibpath_var=$hardcode_shlibpath_var
35957
35958# Set to "yes" if building a shared library automatically hardcodes DIR
35959# into the library and all subsequent libraries and executables linked
35960# against it.
35961hardcode_automatic=$hardcode_automatic
35962
35963# Set to yes if linker adds runtime paths of dependent libraries
35964# to runtime path list.
35965inherit_rpath=$inherit_rpath
35966
35967# Whether libtool must link a program against all its dependency libraries.
35968link_all_deplibs=$link_all_deplibs
35969
35970# Fix the shell variable \$srcfile for the compiler.
35971fix_srcfile_path=$lt_fix_srcfile_path
35972
35973# Set to "yes" if exported symbols are required.
35974always_export_symbols=$always_export_symbols
35975
35976# The commands to list exported symbols.
35977export_symbols_cmds=$lt_export_symbols_cmds
35978
35979# Symbols that should not be listed in the preloaded symbols.
35980exclude_expsyms=$lt_exclude_expsyms
35981
35982# Symbols that must always be exported.
35983include_expsyms=$lt_include_expsyms
35984
35985# Commands necessary for linking programs (against libraries) with templates.
35986prelink_cmds=$lt_prelink_cmds
35987
35988# Specify filename containing input files.
35989file_list_spec=$lt_file_list_spec
35990
35991# How to hardcode a shared library path into an executable.
35992hardcode_action=$hardcode_action
35993
35994# The directories searched by this compiler when creating a shared library.
35995compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
35996
35997# Dependencies to place before and after the objects being linked to
35998# create a shared library.
35999predep_objects=$lt_predep_objects
36000postdep_objects=$lt_postdep_objects
36001predeps=$lt_predeps
36002postdeps=$lt_postdeps
36003
36004# The library search path used internally by the compiler when linking
36005# a shared library.
36006compiler_lib_search_path=$lt_compiler_lib_search_path
36007
36008# ### END LIBTOOL CONFIG
36009
36010_LT_EOF
36011
36012 case $host_os in
36013 aix3*)
36014 cat <<\_LT_EOF >> "$cfgfile"
36015# AIX sometimes has problems with the GCC collect2 program. For some
36016# reason, if we set the COLLECT_NAMES environment variable, the problems
36017# vanish in a puff of smoke.
36018if test "X${COLLECT_NAMES+set}" != Xset; then
36019 COLLECT_NAMES=
36020 export COLLECT_NAMES
36021fi
36022_LT_EOF
81ecdfbb 36023 ;;
c906108c
SS
36024 esac
36025
bec39cab 36026
b686ecb5
JM
36027ltmain="$ac_aux_dir/ltmain.sh"
36028
36029
36030 # We use sed instead of cat because bash on DJGPP gets confused if
36031 # if finds mixed CR/LF and LF-only lines. Since sed operates in
36032 # text mode, it properly converts lines to CR/LF. This bash problem
36033 # is reportedly fixed, but why not run on old versions too?
36034 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
36035 || (rm -f "$cfgfile"; exit 1)
36036
36037 case $xsi_shell in
36038 yes)
36039 cat << \_LT_EOF >> "$cfgfile"
36040
36041# func_dirname file append nondir_replacement
36042# Compute the dirname of FILE. If nonempty, add APPEND to the result,
36043# otherwise set result to NONDIR_REPLACEMENT.
36044func_dirname ()
36045{
36046 case ${1} in
36047 */*) func_dirname_result="${1%/*}${2}" ;;
36048 * ) func_dirname_result="${3}" ;;
36049 esac
36050}
36051
36052# func_basename file
36053func_basename ()
36054{
36055 func_basename_result="${1##*/}"
36056}
bec39cab 36057
b686ecb5
JM
36058# func_dirname_and_basename file append nondir_replacement
36059# perform func_basename and func_dirname in a single function
36060# call:
36061# dirname: Compute the dirname of FILE. If nonempty,
36062# add APPEND to the result, otherwise set result
36063# to NONDIR_REPLACEMENT.
36064# value returned in "$func_dirname_result"
36065# basename: Compute filename of FILE.
36066# value retuned in "$func_basename_result"
36067# Implementation must be kept synchronized with func_dirname
36068# and func_basename. For efficiency, we do not delegate to
36069# those functions but instead duplicate the functionality here.
36070func_dirname_and_basename ()
36071{
36072 case ${1} in
36073 */*) func_dirname_result="${1%/*}${2}" ;;
36074 * ) func_dirname_result="${3}" ;;
36075 esac
36076 func_basename_result="${1##*/}"
36077}
bec39cab 36078
b686ecb5
JM
36079# func_stripname prefix suffix name
36080# strip PREFIX and SUFFIX off of NAME.
36081# PREFIX and SUFFIX must not contain globbing or regex special
36082# characters, hashes, percent signs, but SUFFIX may contain a leading
36083# dot (in which case that matches only a dot).
36084func_stripname ()
36085{
36086 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
36087 # positional parameters, so assign one to ordinary parameter first.
36088 func_stripname_result=${3}
36089 func_stripname_result=${func_stripname_result#"${1}"}
36090 func_stripname_result=${func_stripname_result%"${2}"}
36091}
c906108c 36092
b686ecb5
JM
36093# func_opt_split
36094func_opt_split ()
36095{
36096 func_opt_split_opt=${1%%=*}
36097 func_opt_split_arg=${1#*=}
36098}
c906108c 36099
b686ecb5
JM
36100# func_lo2o object
36101func_lo2o ()
36102{
36103 case ${1} in
36104 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
36105 *) func_lo2o_result=${1} ;;
c906108c 36106 esac
b686ecb5 36107}
121ce6e5 36108
b686ecb5
JM
36109# func_xform libobj-or-source
36110func_xform ()
36111{
36112 func_xform_result=${1%.*}.lo
81ecdfbb 36113}
81ecdfbb 36114
b686ecb5
JM
36115# func_arith arithmetic-term...
36116func_arith ()
36117{
36118 func_arith_result=$(( $* ))
36119}
81ecdfbb 36120
b686ecb5
JM
36121# func_len string
36122# STRING may not start with a hyphen.
36123func_len ()
36124{
36125 func_len_result=${#1}
36126}
81ecdfbb 36127
b686ecb5
JM
36128_LT_EOF
36129 ;;
36130 *) # Bourne compatible functions.
36131 cat << \_LT_EOF >> "$cfgfile"
36132
36133# func_dirname file append nondir_replacement
36134# Compute the dirname of FILE. If nonempty, add APPEND to the result,
36135# otherwise set result to NONDIR_REPLACEMENT.
36136func_dirname ()
36137{
36138 # Extract subdirectory from the argument.
36139 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
36140 if test "X$func_dirname_result" = "X${1}"; then
36141 func_dirname_result="${3}"
bec39cab 36142 else
b686ecb5 36143 func_dirname_result="$func_dirname_result${2}"
bec39cab 36144 fi
b686ecb5 36145}
c906108c 36146
b686ecb5
JM
36147# func_basename file
36148func_basename ()
36149{
36150 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
36151}
b4e70030 36152
b4e70030 36153
b686ecb5
JM
36154# func_stripname prefix suffix name
36155# strip PREFIX and SUFFIX off of NAME.
36156# PREFIX and SUFFIX must not contain globbing or regex special
36157# characters, hashes, percent signs, but SUFFIX may contain a leading
36158# dot (in which case that matches only a dot).
36159# func_strip_suffix prefix name
36160func_stripname ()
36161{
36162 case ${2} in
36163 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
36164 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
36165 esac
36166}
bec39cab 36167
b686ecb5
JM
36168# sed scripts:
36169my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
36170my_sed_long_arg='1s/^-[^=]*=//'
36171
36172# func_opt_split
36173func_opt_split ()
36174{
36175 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
36176 func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
36177}
36178
36179# func_lo2o object
36180func_lo2o ()
36181{
36182 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
36183}
36184
36185# func_xform libobj-or-source
36186func_xform ()
36187{
36188 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
36189}
36190
36191# func_arith arithmetic-term...
36192func_arith ()
36193{
36194 func_arith_result=`expr "$@"`
36195}
36196
36197# func_len string
36198# STRING may not start with a hyphen.
36199func_len ()
36200{
36201 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
36202}
36203
36204_LT_EOF
36205esac
36206
36207case $lt_shell_append in
36208 yes)
36209 cat << \_LT_EOF >> "$cfgfile"
36210
36211# func_append var value
36212# Append VALUE to the end of shell variable VAR.
36213func_append ()
36214{
36215 eval "$1+=\$2"
36216}
36217_LT_EOF
36218 ;;
36219 *)
36220 cat << \_LT_EOF >> "$cfgfile"
36221
36222# func_append var value
36223# Append VALUE to the end of shell variable VAR.
36224func_append ()
36225{
36226 eval "$1=\$$1\$2"
36227}
36228
36229_LT_EOF
36230 ;;
c906108c 36231 esac
b4e70030 36232
bec39cab 36233
b686ecb5
JM
36234 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
36235 || (rm -f "$cfgfile"; exit 1)
36236
36237 mv -f "$cfgfile" "$ofile" ||
36238 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
36239 chmod +x "$ofile"
36240
36241
36242 cat <<_LT_EOF >> "$ofile"
36243
36244# ### BEGIN LIBTOOL TAG CONFIG: CXX
36245
36246# The linker used to build libraries.
36247LD=$lt_LD_CXX
36248
36249# How to create reloadable object files.
36250reload_flag=$lt_reload_flag_CXX
36251reload_cmds=$lt_reload_cmds_CXX
36252
36253# Commands used to build an old-style archive.
36254old_archive_cmds=$lt_old_archive_cmds_CXX
36255
36256# A language specific compiler.
36257CC=$lt_compiler_CXX
36258
36259# Is the compiler the GNU compiler?
36260with_gcc=$GCC_CXX
36261
36262# Compiler flag to turn off builtin functions.
36263no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
36264
36265# How to pass a linker flag through the compiler.
36266wl=$lt_lt_prog_compiler_wl_CXX
36267
36268# Additional compiler flags for building library objects.
36269pic_flag=$lt_lt_prog_compiler_pic_CXX
36270
36271# Compiler flag to prevent dynamic linking.
36272link_static_flag=$lt_lt_prog_compiler_static_CXX
36273
36274# Does compiler simultaneously support -c and -o options?
36275compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
36276
36277# Whether or not to add -lc for building shared libraries.
36278build_libtool_need_lc=$archive_cmds_need_lc_CXX
36279
36280# Whether or not to disallow shared libs when runtime libs are static.
36281allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
36282
36283# Compiler flag to allow reflexive dlopens.
36284export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
36285
36286# Compiler flag to generate shared objects directly from archives.
36287whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
36288
36289# Whether the compiler copes with passing no objects directly.
36290compiler_needs_object=$lt_compiler_needs_object_CXX
36291
36292# Create an old-style archive from a shared archive.
36293old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
36294
36295# Create a temporary old-style archive to link instead of a shared archive.
36296old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
36297
36298# Commands used to build a shared archive.
36299archive_cmds=$lt_archive_cmds_CXX
36300archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
36301
36302# Commands used to build a loadable module if different from building
36303# a shared archive.
36304module_cmds=$lt_module_cmds_CXX
36305module_expsym_cmds=$lt_module_expsym_cmds_CXX
36306
36307# Whether we are building with GNU ld or not.
36308with_gnu_ld=$lt_with_gnu_ld_CXX
36309
36310# Flag that allows shared libraries with undefined symbols to be built.
36311allow_undefined_flag=$lt_allow_undefined_flag_CXX
36312
36313# Flag that enforces no undefined symbols.
36314no_undefined_flag=$lt_no_undefined_flag_CXX
36315
36316# Flag to hardcode \$libdir into a binary during linking.
36317# This must work even if \$libdir does not exist
36318hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
36319
36320# If ld is used when linking, flag to hardcode \$libdir into a binary
36321# during linking. This must work even if \$libdir does not exist.
36322hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
36323
36324# Whether we need a single "-rpath" flag with a separated argument.
36325hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
36326
36327# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
36328# DIR into the resulting binary.
36329hardcode_direct=$hardcode_direct_CXX
36330
36331# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
36332# DIR into the resulting binary and the resulting library dependency is
36333# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
36334# library is relocated.
36335hardcode_direct_absolute=$hardcode_direct_absolute_CXX
36336
36337# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
36338# into the resulting binary.
36339hardcode_minus_L=$hardcode_minus_L_CXX
36340
36341# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
36342# into the resulting binary.
36343hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
36344
36345# Set to "yes" if building a shared library automatically hardcodes DIR
36346# into the library and all subsequent libraries and executables linked
36347# against it.
36348hardcode_automatic=$hardcode_automatic_CXX
36349
36350# Set to yes if linker adds runtime paths of dependent libraries
36351# to runtime path list.
36352inherit_rpath=$inherit_rpath_CXX
36353
36354# Whether libtool must link a program against all its dependency libraries.
36355link_all_deplibs=$link_all_deplibs_CXX
36356
36357# Fix the shell variable \$srcfile for the compiler.
36358fix_srcfile_path=$lt_fix_srcfile_path_CXX
36359
36360# Set to "yes" if exported symbols are required.
36361always_export_symbols=$always_export_symbols_CXX
36362
36363# The commands to list exported symbols.
36364export_symbols_cmds=$lt_export_symbols_cmds_CXX
36365
36366# Symbols that should not be listed in the preloaded symbols.
36367exclude_expsyms=$lt_exclude_expsyms_CXX
36368
36369# Symbols that must always be exported.
36370include_expsyms=$lt_include_expsyms_CXX
36371
36372# Commands necessary for linking programs (against libraries) with templates.
36373prelink_cmds=$lt_prelink_cmds_CXX
36374
36375# Specify filename containing input files.
36376file_list_spec=$lt_file_list_spec_CXX
36377
36378# How to hardcode a shared library path into an executable.
36379hardcode_action=$hardcode_action_CXX
36380
36381# The directories searched by this compiler when creating a shared library.
36382compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
36383
36384# Dependencies to place before and after the objects being linked to
36385# create a shared library.
36386predep_objects=$lt_predep_objects_CXX
36387postdep_objects=$lt_postdep_objects_CXX
36388predeps=$lt_predeps_CXX
36389postdeps=$lt_postdeps_CXX
36390
36391# The library search path used internally by the compiler when linking
36392# a shared library.
36393compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
36394
36395# ### END LIBTOOL TAG CONFIG: CXX
36396_LT_EOF
36397
36398 ;;
81ecdfbb 36399 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
862776f2
AA
36400 "default-1":C)
36401 for ac_file in $CONFIG_FILES; do
36402 # Support "outfile[:infile[:infile...]]"
36403 case "$ac_file" in
36404 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
36405 esac
36406 # PO directories have a Makefile.in generated from Makefile.in.in.
36407 case "$ac_file" in */Makefile.in)
36408 # Adjust a relative srcdir.
36409 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
36410 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
36411 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
36412 # In autoconf-2.13 it is called $ac_given_srcdir.
36413 # In autoconf-2.50 it is called $srcdir.
36414 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
36415 case "$ac_given_srcdir" in
36416 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
36417 /*) top_srcdir="$ac_given_srcdir" ;;
36418 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
36419 esac
36420 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
36421 rm -f "$ac_dir/POTFILES"
36422 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
36423 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
36424 POMAKEFILEDEPS="POTFILES.in"
36425 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
36426 # on $ac_dir but don't depend on user-specified configuration
36427 # parameters.
36428 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
36429 # The LINGUAS file contains the set of available languages.
36430 if test -n "$OBSOLETE_ALL_LINGUAS"; then
36431 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
36432 fi
36433 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
36434 # Hide the ALL_LINGUAS assigment from automake.
36435 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
36436 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
36437 else
36438 # The set of available languages was given in configure.ac.
36439 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
36440 fi
36441 case "$ac_given_srcdir" in
36442 .) srcdirpre= ;;
36443 *) srcdirpre='$(srcdir)/' ;;
36444 esac
36445 POFILES=
36446 GMOFILES=
36447 UPDATEPOFILES=
36448 DUMMYPOFILES=
36449 for lang in $ALL_LINGUAS; do
36450 POFILES="$POFILES $srcdirpre$lang.po"
36451 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
36452 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
36453 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
36454 done
36455 # CATALOGS depends on both $ac_dir and the user's LINGUAS
36456 # environment variable.
36457 INST_LINGUAS=
36458 if test -n "$ALL_LINGUAS"; then
36459 for presentlang in $ALL_LINGUAS; do
36460 useit=no
36461 if test "%UNSET%" != "$LINGUAS"; then
36462 desiredlanguages="$LINGUAS"
36463 else
36464 desiredlanguages="$ALL_LINGUAS"
36465 fi
36466 for desiredlang in $desiredlanguages; do
36467 # Use the presentlang catalog if desiredlang is
36468 # a. equal to presentlang, or
36469 # b. a variant of presentlang (because in this case,
36470 # presentlang can be used as a fallback for messages
36471 # which are not translated in the desiredlang catalog).
36472 case "$desiredlang" in
36473 "$presentlang"*) useit=yes;;
36474 esac
36475 done
36476 if test $useit = yes; then
36477 INST_LINGUAS="$INST_LINGUAS $presentlang"
36478 fi
36479 done
36480 fi
36481 CATALOGS=
36482 if test -n "$INST_LINGUAS"; then
36483 for lang in $INST_LINGUAS; do
36484 CATALOGS="$CATALOGS $lang.gmo"
36485 done
36486 fi
36487 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
36488 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
36489 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
36490 if test -f "$f"; then
36491 case "$f" in
36492 *.orig | *.bak | *~) ;;
36493 *) cat "$f" >> "$ac_dir/Makefile" ;;
36494 esac
36495 fi
36496 done
36497 fi
36498 ;;
36499 esac
36500 done ;;
a0a461e5 36501 "nm.h":L) echo > stamp-nmh ;;
81ecdfbb 36502
bec39cab 36503 esac
81ecdfbb 36504done # for ac_tag
c906108c 36505
bec39cab 36506
81ecdfbb 36507as_fn_exit 0
bec39cab 36508_ACEOF
bec39cab
AC
36509ac_clean_files=$ac_clean_files_save
36510
81ecdfbb 36511test $ac_write_fail = 0 ||
d0ac1c44 36512 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 36513
bec39cab
AC
36514
36515# configure is writing to config.log, and then calls config.status.
36516# config.status does its own redirection, appending to config.log.
36517# Unfortunately, on DOS this fails, as config.log is still kept open
36518# by configure, so config.status won't be able to write to it; its
36519# output is simply discarded. So we exec the FD to /dev/null,
36520# effectively closing config.log, so it can be properly (re)opened and
36521# appended to by config.status. When coming back to configure, we
36522# need to make the FD available again.
36523if test "$no_create" != yes; then
36524 ac_cs_success=:
36525 ac_config_status_args=
36526 test "$silent" = yes &&
36527 ac_config_status_args="$ac_config_status_args --quiet"
36528 exec 5>/dev/null
36529 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
36530 exec 5>>config.log
36531 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
36532 # would make configure fail if this is the last instruction.
d0ac1c44 36533 $ac_cs_success || as_fn_exit 1
bec39cab 36534fi
c906108c 36535
bec39cab 36536#
81ecdfbb 36537# CONFIG_SUBDIRS section.
bec39cab 36538#
c906108c
SS
36539if test "$no_recursion" != yes; then
36540
81ecdfbb
RW
36541 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
36542 # so they do not pile up.
c906108c
SS
36543 ac_sub_configure_args=
36544 ac_prev=
fdc59709
PB
36545 eval "set x $ac_configure_args"
36546 shift
36547 for ac_arg
36548 do
c906108c
SS
36549 if test -n "$ac_prev"; then
36550 ac_prev=
36551 continue
36552 fi
bec39cab 36553 case $ac_arg in
c906108c
SS
36554 -cache-file | --cache-file | --cache-fil | --cache-fi \
36555 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
36556 ac_prev=cache_file ;;
36557 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
36558 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
36559 | --c=*)
36560 ;;
36561 --config-cache | -C)
c906108c
SS
36562 ;;
36563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
36564 ac_prev=srcdir ;;
36565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
36566 ;;
bec39cab
AC
36567 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
36568 ac_prev=prefix ;;
36569 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
36570 ;;
81ecdfbb
RW
36571 --disable-option-checking)
36572 ;;
fdc59709
PB
36573 *)
36574 case $ac_arg in
81ecdfbb 36575 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 36576 esac
81ecdfbb 36577 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
36578 esac
36579 done
36580
bec39cab
AC
36581 # Always prepend --prefix to ensure using the same prefix
36582 # in subdir configurations.
fdc59709
PB
36583 ac_arg="--prefix=$prefix"
36584 case $ac_arg in
81ecdfbb 36585 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 36586 esac
81ecdfbb
RW
36587 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
36588
36589 # Pass --silent
36590 if test "$silent" = yes; then
36591 ac_sub_configure_args="--silent $ac_sub_configure_args"
36592 fi
36593
36594 # Always prepend --disable-option-checking to silence warnings, since
36595 # different subdirs can have different --enable and --with options.
36596 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 36597
b4e70030 36598 ac_popdir=`pwd`
bec39cab 36599 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
36600
36601 # Do not complain, so a configure script can configure whichever
36602 # parts of a large source tree are present.
fdc59709 36603 test -d "$srcdir/$ac_dir" || continue
c906108c 36604
81ecdfbb
RW
36605 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
36606 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
36607 $as_echo "$ac_msg" >&6
36608 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
36609 ac_builddir=.
36610
81ecdfbb
RW
36611case "$ac_dir" in
36612.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
36613*)
36614 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
36615 # A ".." for each directory in $ac_dir_suffix.
36616 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
36617 case $ac_top_builddir_sub in
36618 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
36619 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
36620 esac ;;
36621esac
36622ac_abs_top_builddir=$ac_pwd
36623ac_abs_builddir=$ac_pwd$ac_dir_suffix
36624# for backward compatibility:
36625ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
36626
36627case $srcdir in
81ecdfbb 36628 .) # We are building in place.
bec39cab 36629 ac_srcdir=.
81ecdfbb
RW
36630 ac_top_srcdir=$ac_top_builddir_sub
36631 ac_abs_top_srcdir=$ac_pwd ;;
36632 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 36633 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
36634 ac_top_srcdir=$srcdir
36635 ac_abs_top_srcdir=$srcdir ;;
36636 *) # Relative name.
36637 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
36638 ac_top_srcdir=$ac_top_build_prefix$srcdir
36639 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 36640esac
81ecdfbb 36641ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 36642
c906108c 36643
fdc59709 36644 cd "$ac_dir"
c906108c
SS
36645
36646 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
36647 if test -f "$ac_srcdir/configure.gnu"; then
36648 ac_sub_configure=$ac_srcdir/configure.gnu
36649 elif test -f "$ac_srcdir/configure"; then
36650 ac_sub_configure=$ac_srcdir/configure
36651 elif test -f "$ac_srcdir/configure.in"; then
36652 # This should be Cygnus configure.
36653 ac_sub_configure=$ac_aux_dir/configure
c906108c 36654 else
81ecdfbb
RW
36655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
36656$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
36657 ac_sub_configure=
36658 fi
36659
36660 # The recursion is here.
36661 if test -n "$ac_sub_configure"; then
c906108c 36662 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
36663 case $cache_file in
36664 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
36665 *) # Relative name.
36666 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 36667 esac
c906108c 36668
81ecdfbb
RW
36669 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
36670$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 36671 # The eval makes quoting arguments work.
fdc59709
PB
36672 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
36673 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 36674 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
36675 fi
36676
fdc59709 36677 cd "$ac_popdir"
c906108c
SS
36678 done
36679fi
81ecdfbb
RW
36680if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
36681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
36682$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
36683fi
c906108c 36684