blob: f9eee2c028660f84832e60e29d108510c26d7403 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
810with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600811with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_libs
823with_system_expat
824with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100825with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000826enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700827with_tcltk_includes
828with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000830enable_ipv6
831with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000833with_c_locale_coercion
834with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700836with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_libm
838with_libc
839enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800841with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100842with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100843with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000844'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 ac_precious_vars='build_alias
846host_alias
847target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100848MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849CC
850CFLAGS
851LDFLAGS
852LIBS
853CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100854CPP
855PKG_CONFIG
856PKG_CONFIG_PATH
857PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861ac_init_help=
862ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000863ac_unrecognized_opts=
864ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# The variables have the same names as the options, with
866# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870no_recursion=
871prefix=NONE
872program_prefix=NONE
873program_suffix=NONE
874program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879x_includes=NONE
880x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000881
882# Installation directory options.
883# These are left unexpanded so users can "make install exec_prefix=/foo"
884# and all the variables that are supposed to be based on exec_prefix
885# by default will actually change.
886# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888bindir='${exec_prefix}/bin'
889sbindir='${exec_prefix}/sbin'
890libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891datarootdir='${prefix}/share'
892datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893sysconfdir='${prefix}/etc'
894sharedstatedir='${prefix}/com'
895localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896includedir='${prefix}/include'
897oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
899infodir='${datarootdir}/info'
900htmldir='${docdir}'
901dvidir='${docdir}'
902pdfdir='${docdir}'
903psdir='${docdir}'
904libdir='${exec_prefix}/lib'
905localedir='${datarootdir}/locale'
906mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 # If the previous option needs an argument, assign it.
913 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 ac_prev=
916 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200920 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
921 *=) ac_optarg= ;;
922 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Accept the important Cygnus configure options, so we can diagnose typos.
926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 case $ac_dashdash$ac_option in
928 --)
929 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -bindir | --bindir | --bindi | --bind | --bin | --bi)
932 ac_prev=bindir ;;
933 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
936 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 -cache-file | --cache-file | --cache-fil | --cache-fi \
942 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
943 ac_prev=cache_file ;;
944 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
945 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 cache_file=$ac_optarg ;;
947
948 --config-cache | -C)
949 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
957 | --dataroo | --dataro | --datar)
958 ac_prev=datarootdir ;;
959 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
960 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
961 datarootdir=$ac_optarg ;;
962
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978
979 -docdir | --docdir | --docdi | --doc | --do)
980 ac_prev=docdir ;;
981 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
982 docdir=$ac_optarg ;;
983
984 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
985 ac_prev=dvidir ;;
986 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
987 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200993 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt_orig=$ac_useropt
995 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
996 case $ac_user_opts in
997 *"
998"enable_$ac_useropt"
999"*) ;;
1000 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1001 ac_unrecognized_sep=', ';;
1002 esac
1003 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1006 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1007 | --exec | --exe | --ex)
1008 ac_prev=exec_prefix ;;
1009 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1010 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1011 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 # Obsolete; use --with-gas.
1016 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 -help | --help | --hel | --he | -h)
1019 ac_init_help=long ;;
1020 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1021 ac_init_help=recursive ;;
1022 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1023 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1031 ac_prev=htmldir ;;
1032 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1033 | --ht=*)
1034 htmldir=$ac_optarg ;;
1035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 -includedir | --includedir | --includedi | --included | --include \
1037 | --includ | --inclu | --incl | --inc)
1038 ac_prev=includedir ;;
1039 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1040 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -infodir | --infodir | --infodi | --infod | --info | --inf)
1044 ac_prev=infodir ;;
1045 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libdir | --libdir | --libdi | --libd)
1049 ac_prev=libdir ;;
1050 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1054 | --libexe | --libex | --libe)
1055 ac_prev=libexecdir ;;
1056 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1057 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 -localedir | --localedir | --localedi | --localed | --locale)
1061 ac_prev=localedir ;;
1062 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1063 localedir=$ac_optarg ;;
1064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 ac_prev=localstatedir ;;
1068 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
1072 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1073 ac_prev=mandir ;;
1074 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Obsolete; use --without-fp.
1079 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 no_create=yes ;;
1084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1086 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1087 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1090 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1091 | --oldin | --oldi | --old | --ol | --o)
1092 ac_prev=oldincludedir ;;
1093 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1094 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1095 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1099 ac_prev=prefix ;;
1100 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1104 | --program-pre | --program-pr | --program-p)
1105 ac_prev=program_prefix ;;
1106 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1107 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1111 | --program-suf | --program-su | --program-s)
1112 ac_prev=program_suffix ;;
1113 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1114 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -program-transform-name | --program-transform-name \
1118 | --program-transform-nam | --program-transform-na \
1119 | --program-transform-n | --program-transform- \
1120 | --program-transform | --program-transfor \
1121 | --program-transfo | --program-transf \
1122 | --program-trans | --program-tran \
1123 | --progr-tra | --program-tr | --program-t)
1124 ac_prev=program_transform_name ;;
1125 -program-transform-name=* | --program-transform-name=* \
1126 | --program-transform-nam=* | --program-transform-na=* \
1127 | --program-transform-n=* | --program-transform-=* \
1128 | --program-transform=* | --program-transfor=* \
1129 | --program-transfo=* | --program-transf=* \
1130 | --program-trans=* | --program-tran=* \
1131 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1135 ac_prev=pdfdir ;;
1136 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1137 pdfdir=$ac_optarg ;;
1138
1139 -psdir | --psdir | --psdi | --psd | --ps)
1140 ac_prev=psdir ;;
1141 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1142 psdir=$ac_optarg ;;
1143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1145 | -silent | --silent | --silen | --sile | --sil)
1146 silent=yes ;;
1147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149 ac_prev=sbindir ;;
1150 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153
1154 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156 | --sharedst | --shareds | --shared | --share | --shar \
1157 | --sha | --sh)
1158 ac_prev=sharedstatedir ;;
1159 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 -site | --site | --sit)
1166 ac_prev=site ;;
1167 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171 ac_prev=srcdir ;;
1172 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176 | --syscon | --sysco | --sysc | --sys | --sy)
1177 ac_prev=sysconfdir ;;
1178 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188 verbose=yes ;;
1189
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 -version | --version | --versio | --versi | --vers | -V)
1191 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001197 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt_orig=$ac_useropt
1199 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200 case $ac_user_opts in
1201 *"
1202"with_$ac_useropt"
1203"*) ;;
1204 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205 ac_unrecognized_sep=', ';;
1206 esac
1207 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 --x)
1226 # Obsolete; use --with-x.
1227 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230 | --x-incl | --x-inc | --x-in | --x-i)
1231 ac_prev=x_includes ;;
1232 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238 ac_prev=x_libraries ;;
1239 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1244Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 *=*)
1248 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1249 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 case $ac_envvar in #(
1251 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 export $ac_envvar ;;
1256
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001257 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001262 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ;;
1264
1265 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266done
1267
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271fi
1272
Matthias Kloseb9621712010-04-24 17:59:49 +00001273if test -n "$ac_unrecognized_opts"; then
1274 case $enable_option_checking in
1275 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1278 esac
1279fi
1280
1281# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1283 datadir sysconfdir sharedstatedir localstatedir includedir \
1284 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimesff5be6e2018-01-20 13:19:21 +01001285 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 # Remove trailing slashes.
1289 case $ac_val in
1290 */ )
1291 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1292 eval $ac_var=\$ac_val;;
1293 esac
1294 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 [\\/$]* | ?:[\\/]* ) continue;;
1297 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001300done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# There might be people who depend on the old broken behavior: `$host'
1303# used to hold the argument of --host etc.
1304# FIXME: To remove some day.
1305build=$build_alias
1306host=$host_alias
1307target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# FIXME: To remove some day.
1310if test "x$host_alias" != x; then
1311 if test "x$build_alias" = x; then
1312 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 elif test "x$build_alias" != "x$host_alias"; then
1314 cross_compiling=yes
1315 fi
1316fi
1317
1318ac_tool_prefix=
1319test -n "$host_alias" && ac_tool_prefix=$host_alias-
1320
1321test "$silent" = yes && exec 6>/dev/null
1322
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324ac_pwd=`pwd` && test -n "$ac_pwd" &&
1325ac_ls_di=`ls -di .` &&
1326ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001327 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332# Find the source files, if location was not specified.
1333if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001336 ac_confdir=`$as_dirname -- "$as_myself" ||
1337$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1338 X"$as_myself" : 'X\(//\)[^/]' \| \
1339 X"$as_myself" : 'X\(//\)$' \| \
1340 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1341$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\/\)[^/].*/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\).*/{
1355 s//\1/
1356 q
1357 }
1358 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001359 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001360 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361 srcdir=..
1362 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363else
1364 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366if test ! -r "$srcdir/$ac_unique_file"; then
1367 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001368 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1371ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 pwd)`
1374# When building in place, set srcdir=.
1375if test "$ac_abs_confdir" = "$ac_pwd"; then
1376 srcdir=.
1377fi
1378# Remove unnecessary trailing slashes from srcdir.
1379# Double slashes in file names in object file debugging info
1380# mess up M-x gdb in Emacs.
1381case $srcdir in
1382*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1383esac
1384for ac_var in $ac_precious_vars; do
1385 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_env_${ac_var}_value=\$${ac_var}
1387 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1389done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391#
1392# Report the --help message.
1393#
1394if test "$ac_init_help" = "long"; then
1395 # Omit some internal or obsolete options to make the list less imposing.
1396 # This message is too long to be a string in the A/UX 3.1 sh.
1397 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001398\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400Usage: $0 [OPTION]... [VAR=VALUE]...
1401
1402To assign environment variables (e.g., CC, CFLAGS...), specify them as
1403VAR=VALUE. See below for descriptions of some of the useful variables.
1404
1405Defaults for the options are specified in brackets.
1406
1407Configuration:
1408 -h, --help display this help and exit
1409 --help=short display options specific to this package
1410 --help=recursive display the short help of all the included packages
1411 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001412 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --cache-file=FILE cache test results in FILE [disabled]
1414 -C, --config-cache alias for \`--cache-file=config.cache'
1415 -n, --no-create do not create output files
1416 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1417
Martin v. Löwis11437992002-04-12 09:54:03 +00001418Installation directories:
1419 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001420 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
1424By default, \`make install' will install all the files in
1425\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1426an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1427for instance \`--prefix=\$HOME'.
1428
1429For better control, use the options below.
1430
1431Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 --bindir=DIR user executables [EPREFIX/bin]
1433 --sbindir=DIR system admin executables [EPREFIX/sbin]
1434 --libexecdir=DIR program executables [EPREFIX/libexec]
1435 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1436 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1437 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1438 --libdir=DIR object code libraries [EPREFIX/lib]
1439 --includedir=DIR C header files [PREFIX/include]
1440 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1441 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1442 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1443 --infodir=DIR info documentation [DATAROOTDIR/info]
1444 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1445 --mandir=DIR man documentation [DATAROOTDIR/man]
1446 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1447 --htmldir=DIR html documentation [DOCDIR]
1448 --dvidir=DIR dvi documentation [DOCDIR]
1449 --pdfdir=DIR pdf documentation [DOCDIR]
1450 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452
1453 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001458 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001463 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001464 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 cat <<\_ACEOF
1467
1468Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1471 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001472 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001473 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --enable-framework[=INSTALLDIR]
1475 Build (MacOSX|Darwin) framework
1476 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001477 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001478 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1479 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001480 --enable-loadable-sqlite-extensions
1481 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-ipv6 Enable ipv6 (with ipv4) support
1483 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001484 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001492 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1493 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001504 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001505 --with-lto Enable Link Time Optimization in any build. Disabled
1506 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
1510 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001512 --with-system-expat build pyexpat module using an installed expat
1513 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001514 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001515 --with-system-libmpdec build _decimal module using an installed libmpdec
1516 library
Ned Deilyd819b932013-09-06 01:07:05 -07001517 --with-tcltk-includes='-I...'
1518 override search for Tcl and Tk include files
1519 --with-tcltk-libs='-L...'
1520 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001521 --with-dbmliborder=db1:db2:...
1522 order to check db backends for dbm. Valid value is a
1523 colon separated string with the backend names
1524 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-doc-strings disable/enable documentation strings
1526 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001527 --with(out)-c-locale-coercion
1528 disable/enable C locale coercion to a UTF-8 based
1529 locale
1530 --with(out)-c-locale-warning
1531 disable/enable locale compatibility warning in the C
1532 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001533 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001534 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-libm=STRING math library
1536 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001537 --with(out)-computed-gotos
1538 Use computed gotos in evaluation loop (enabled by
1539 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001540 --with(out)-ensurepip=[=upgrade]
1541 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001542 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001543 --with-ssl-default-suites=[python|openssl|STRING]
1544 Override default cipher suites string, python: use
1545 Python's preferred selection (default), openssl:
1546 leave OpenSSL's defaults untouched, STRING: use a
1547 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001559 PKG_CONFIG path to pkg-config utility
1560 PKG_CONFIG_PATH
1561 directories to add to pkg-config's search path
1562 PKG_CONFIG_LIBDIR
1563 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Use these variables to override the choices made by `configure' or to help
1566it to find libraries and programs with nonstandard names/locations.
1567
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001568Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001571fi
1572
1573if test "$ac_init_help" = "recursive"; then
1574 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 test -d "$ac_dir" ||
1577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_builddir=.
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581case "$ac_dir" in
1582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 case $ac_top_builddir_sub in
1588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590 esac ;;
1591esac
1592ac_abs_top_builddir=$ac_pwd
1593ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594# for backward compatibility:
1595ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$ac_top_builddir_sub
1601 ac_abs_top_srcdir=$ac_pwd ;;
1602 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$srcdir
1605 ac_abs_top_srcdir=$srcdir ;;
1606 *) # Relative name.
1607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608 ac_top_srcdir=$ac_top_build_prefix$srcdir
1609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 cd "$ac_dir" || { ac_status=$?; continue; }
1614 # Check for guested configure.
1615 if test -f "$ac_srcdir/configure.gnu"; then
1616 echo &&
1617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618 elif test -f "$ac_srcdir/configure"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 fi || ac_status=$?
1624 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 done
1626fi
1627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if $ac_init_version; then
1630 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001631python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635This configure script is free software; the Free Software Foundation
1636gives unlimited permission to copy, distribute and modify it.
1637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001640
1641## ------------------------ ##
1642## Autoconf initialization. ##
1643## ------------------------ ##
1644
1645# ac_fn_c_try_compile LINENO
1646# --------------------------
1647# Try to compile conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_compile ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 rm -f conftest.$ac_objext
1652 if { { ac_try="$ac_compile"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_compile") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1667 test $ac_status = 0; } && {
1668 test -z "$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 } && test -s conftest.$ac_objext; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_compile
1682
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001683# ac_fn_c_try_cpp LINENO
1684# ----------------------
1685# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_cpp ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689 if { { ac_try="$ac_cpp conftest.$ac_ext"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } > conftest.i && {
1705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 }; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_cpp
1719
Matthias Kloseb9621712010-04-24 17:59:49 +00001720# ac_fn_c_try_link LINENO
1721# -----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_link ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext conftest$ac_exeext
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_c_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest$ac_exeext && {
1746 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001747 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1757 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1758 # interfere with the next link command; also delete a directory that is
1759 # left behind by Apple's compiler. We do this before executing the actions.
1760 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_link
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1767# -------------------------------------------------------
1768# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1769# the include files in INCLUDES and setting the cache variable VAR
1770# accordingly.
1771ac_fn_c_check_header_mongrel ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783else
1784 # Is the header compilable?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1786$as_echo_n "checking $2 usability... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789$4
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_compile "$LINENO"; then :
1793 ac_header_compiler=yes
1794else
1795 ac_header_compiler=no
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1799$as_echo "$ac_header_compiler" >&6; }
1800
1801# Is the header present?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1803$as_echo_n "checking $2 presence... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_cpp "$LINENO"; then :
1809 ac_header_preproc=yes
1810else
1811 ac_header_preproc=no
1812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1815$as_echo "$ac_header_preproc" >&6; }
1816
1817# So? What about this header?
1818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1819 yes:no: )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1821$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ;;
1825 no:yes:* )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1827$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1829$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1831$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1833$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001836( $as_echo "## --------------------------------------- ##
1837## Report this to https://bugs.python.org/ ##
1838## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 ) | sed "s/^/$as_me: WARNING: /" >&2
1840 ;;
1841esac
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=\$ac_header_compiler"
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001854
1855} # ac_fn_c_check_header_mongrel
1856
1857# ac_fn_c_try_run LINENO
1858# ----------------------
1859# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1860# that executables *can* be run.
1861ac_fn_c_try_run ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { { ac_try="$ac_link"
1865case "(($ac_try" in
1866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867 *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871 (eval "$ac_link") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1875 { { case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_try") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; }; }; then :
1885 ac_retval=0
1886else
1887 $as_echo "$as_me: program exited with status $ac_status" >&5
1888 $as_echo "$as_me: failed program was:" >&5
1889sed 's/^/| /' conftest.$ac_ext >&5
1890
1891 ac_retval=$ac_status
1892fi
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_run
1898
1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1900# -------------------------------------------------------
1901# Tests whether HEADER exists and can be compiled using the include files in
1902# INCLUDES, setting the cache variable VAR accordingly.
1903ac_fn_c_check_header_compile ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914#include <$2>
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 eval "$3=yes"
1918else
1919 eval "$3=no"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_check_header_compile
1929
Matthias Kloseb9621712010-04-24 17:59:49 +00001930# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1931# -------------------------------------------
1932# Tests whether TYPE exists after having included INCLUDES, setting cache
1933# variable VAR accordingly.
1934ac_fn_c_check_type ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946int
1947main ()
1948{
1949if (sizeof ($2))
1950 return 0;
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof (($2)))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 eval "$3=yes"
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977eval ac_res=\$$3
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982} # ac_fn_c_check_type
1983
Matthias Kloseb9621712010-04-24 17:59:49 +00001984# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1985# --------------------------------------------
1986# Tries to find the compile-time value of EXPR in a program that includes
1987# INCLUDES, setting VAR accordingly. Returns whether the value could be
1988# computed
1989ac_fn_c_compute_int ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 if test "$cross_compiling" = yes; then
1993 # Depending upon the size, compute the lo and hi bounds.
1994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002018test_array [0] = 0;
2019return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002097test_array [0] = 0;
2098return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002175if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002231
2232} # ac_fn_c_check_func
2233
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002234# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2235# ---------------------------------------------
2236# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2237# accordingly.
2238ac_fn_c_check_decl ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 as_decl_name=`echo $2|sed 's/ *(.*//'`
2242 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2244$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2245if eval \${$3+:} false; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$4
2251int
2252main ()
2253{
2254#ifndef $as_decl_name
2255#ifdef __cplusplus
2256 (void) $as_decl_use;
2257#else
2258 (void) $as_decl_name;
2259#endif
2260#endif
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277
2278} # ac_fn_c_check_decl
2279
Matthias Kloseb9621712010-04-24 17:59:49 +00002280# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2281# ----------------------------------------------------
2282# Tries to find if the field MEMBER exists in type AGGR, after including
2283# INCLUDES, setting cache variable VAR accordingly.
2284ac_fn_c_check_member ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2288$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$5
2295int
2296main ()
2297{
2298static $2 ac_aggr;
2299if (ac_aggr.$3)
2300return 0;
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_compile "$LINENO"; then :
2306 eval "$4=yes"
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (sizeof ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 eval "$4=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$4
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Ned Deily5489bda2018-01-31 17:44:09 -05002340It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002341generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002519## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 # We do not want a PATH search for config.site.
2576 case $CONFIG_SITE in #((
2577 -*) ac_site_file1=./$CONFIG_SITE;;
2578 */*) ac_site_file1=$CONFIG_SITE;;
2579 *) ac_site_file1=./$CONFIG_SITE;;
2580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 . "$ac_site_file" \
2596 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002599See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002675 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689
Christian Heimesff5be6e2018-01-20 13:19:21 +01002690
2691
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002692if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693 # If we're building out-of-tree, we need to make sure the following
2694 # resources get picked up before their $srcdir counterparts.
2695 # Objects/ -> typeslots.inc
2696 # Include/ -> Python-ast.h, graminit.h
2697 # Python/ -> importlib.h
2698 # (A side effect of this is that these resources will automatically be
2699 # regenerated when building out-of-tree, regardless of whether or not
2700 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2701 # off.)
2702 BASECPPFLAGS="-IObjects -IInclude -IPython"
2703else
2704 BASECPPFLAGS=""
2705fi
2706
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707
2708
2709
2710
Victor Stinner9ed34a82017-05-02 22:35:58 +02002711if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713# Extract the first word of "git", so it can be a program name with args.
2714set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718 $as_echo_n "(cached) " >&6
2719else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720 if test -n "$HAS_GIT"; then
2721 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722else
2723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724for as_dir in $PATH
2725do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734done
2735 done
2736IFS=$as_save_IFS
2737
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739fi
2740fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741HAS_GIT=$ac_cv_prog_HAS_GIT
2742if test -n "$HAS_GIT"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2744$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2747$as_echo "no" >&6; }
2748fi
2749
2750
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755then
Ned Deily554626a2017-03-20 23:41:52 -04002756 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2757 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITVERSION=""
2761 GITTAG=""
2762 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
2764
2765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002767
2768
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002769ac_aux_dir=
2770for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2771 if test -f "$ac_dir/install-sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install-sh -c"
2774 break
2775 elif test -f "$ac_dir/install.sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install.sh -c"
2778 break
2779 elif test -f "$ac_dir/shtool"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/shtool install -c"
2782 break
2783 fi
2784done
2785if test -z "$ac_aux_dir"; then
2786 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2787fi
2788
2789# These three variables are undocumented and unsupported,
2790# and are intended to be withdrawn in a future Autoconf release.
2791# They can cause serious problems if a builder's source tree is in a directory
2792# whose full name contains unusual characters.
2793ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2794ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2795ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2796
2797
2798# Make sure we can run config.sub.
2799$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2800 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2801
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2803$as_echo_n "checking build system type... " >&6; }
2804if ${ac_cv_build+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 ac_build_alias=$build_alias
2808test "x$ac_build_alias" = x &&
2809 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2810test "x$ac_build_alias" = x &&
2811 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2812ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2813 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2814
2815fi
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2817$as_echo "$ac_cv_build" >&6; }
2818case $ac_cv_build in
2819*-*-*) ;;
2820*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2821esac
2822build=$ac_cv_build
2823ac_save_IFS=$IFS; IFS='-'
2824set x $ac_cv_build
2825shift
2826build_cpu=$1
2827build_vendor=$2
2828shift; shift
2829# Remember, the first character of IFS is used to create $*,
2830# except with old shells:
2831build_os=$*
2832IFS=$ac_save_IFS
2833case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2834
2835
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2837$as_echo_n "checking host system type... " >&6; }
2838if ${ac_cv_host+:} false; then :
2839 $as_echo_n "(cached) " >&6
2840else
2841 if test "x$host_alias" = x; then
2842 ac_cv_host=$ac_cv_build
2843else
2844 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2846fi
2847
2848fi
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2850$as_echo "$ac_cv_host" >&6; }
2851case $ac_cv_host in
2852*-*-*) ;;
2853*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2854esac
2855host=$ac_cv_host
2856ac_save_IFS=$IFS; IFS='-'
2857set x $ac_cv_host
2858shift
2859host_cpu=$1
2860host_vendor=$2
2861shift; shift
2862# Remember, the first character of IFS is used to create $*,
2863# except with old shells:
2864host_os=$*
2865IFS=$ac_save_IFS
2866case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2867
2868
2869
doko@python.orga10e4a92013-01-25 18:45:12 +01002870
2871
Ned Deilyfcbc2462014-08-22 13:32:49 -07002872# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2873rm -f pybuilddir.txt
2874
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875for ac_prog in python$PACKAGE_VERSION python3 python
2876do
2877 # Extract the first word of "$ac_prog", so it can be a program name with args.
2878set dummy $ac_prog; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002881if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882 $as_echo_n "(cached) " >&6
2883else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884 if test -n "$PYTHON_FOR_REGEN"; then
2885 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2896 break 2
2897 fi
2898done
2899 done
2900IFS=$as_save_IFS
2901
2902fi
2903fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2905if test -n "$PYTHON_FOR_REGEN"; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2907$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
2911fi
2912
2913
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
2919
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002920if test "$cross_compiling" = yes; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2922$as_echo_n "checking for python interpreter for cross build... " >&6; }
2923 if test -z "$PYTHON_FOR_BUILD"; then
2924 for interp in python$PACKAGE_VERSION python3 python; do
2925 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002926 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927 break
2928 fi
2929 interp=
2930 done
2931 if test x$interp = x; then
2932 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2935$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002936 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2942fi
2943
2944
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Ned Deily5489bda2018-01-31 17:44:09 -05002960VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991
2992
2993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002996# Arguments passed to configure.
2997
2998CONFIG_ARGS="$ac_configure_args"
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3001$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003003if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 case $enableval in
3006 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # Locate the best usable SDK, see Mac/README.txt for more
3008 # information
3009 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003010 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3013 if test ! -d "${enableval}"
3014 then
3015 enableval=/
3016 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018 ;;
3019 esac
3020 case $enableval in
3021 no)
3022 UNIVERSALSDK=
3023 enable_universalsdk=
3024 ;;
3025 *)
3026 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 if test ! -d "${UNIVERSALSDK}"
3028 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003029 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031 ;;
3032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035else
3036
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042if test -n "${UNIVERSALSDK}"
3043then
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3045$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046else
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3048$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deily87adb6e2013-10-18 21:09:56 -07003053ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055# For backward compatibility reasons we prefer to select '32-bit' if available,
3056# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058if test "`uname -s`" = "Darwin"
3059then
3060 if test -n "${UNIVERSALSDK}"
3061 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 then
3064 UNIVERSAL_ARCHS="intel"
3065 fi
3066 fi
3067fi
3068
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3071$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072
3073# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003074if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 UNIVERSAL_ARCHS="$withval"
3077
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078fi
3079
Ned Deily87adb6e2013-10-18 21:09:56 -07003080if test -n "${UNIVERSALSDK}"
3081then
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3083$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3084else
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
3087fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003089
3090# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092 withval=$with_framework_name;
3093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003122 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 if test "x${prefix}" = "xNONE"; then
3124 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3125 else
3126 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3127 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003129 ;;
3130 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003134 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003135 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3136 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003137 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE" ; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
3147 case "${enableval}" in
3148 /System*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 if test "${prefix}" = "NONE" ; then
3151 # See below
3152 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3153 fi
3154 ;;
3155
3156 /Library*)
3157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3158 ;;
3159
3160 */Library/Frameworks)
3161 MDIR="`dirname "${enableval}"`"
3162 MDIR="`dirname "${MDIR}"`"
3163 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3164
3165 if test "${prefix}" = "NONE"; then
3166 # User hasn't specified the
3167 # --prefix option, but wants to install
3168 # the framework in a non-default location,
3169 # ensure that the compatibility links get
3170 # installed relative to that prefix as well
3171 # instead of in /usr/local.
3172 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3173 fi
3174 ;;
3175
3176 *)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 ;;
3179 esac
3180
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003183 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003205 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 if test "x${prefix}" = "xNONE" ; then
3207 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3208 else
3209 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3210 fi
Jack Jansene578a632001-08-15 01:27:14 +00003211 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003212
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
3217
Michael W. Hudson54241132001-12-07 15:38:26 +00003218
3219
3220
3221
Jack Jansene578a632001-08-15 01:27:14 +00003222
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223
3224
3225
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003226
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Ned Deilyb8f944f2013-11-21 22:42:25 -08003228
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003229
3230cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003231#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232_ACEOF
3233
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003251 *-*-linux-android*)
3252 ac_sys_system=Linux-android
3253 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 *-*-linux*)
3255 ac_sys_system=Linux
3256 ;;
3257 *-*-cygwin*)
3258 ac_sys_system=Cygwin
3259 ;;
3260 *)
3261 # for now, limit cross builds to known configurations
3262 MACHDEP="unknown"
3263 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3264 esac
3265 ac_sys_release=
3266 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003268 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003269 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 fi
3275 ac_md_system=`echo $ac_sys_system |
3276 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3277 ac_md_release=`echo $ac_sys_release |
3278 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3279 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003280
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003282 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003283 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003284 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3366 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3367 # identifies itself as Darwin/7.*
3368 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3369 # disables platform specific features beyond repair.
3370 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # has no effect, don't bother defining them
3372 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003373 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003374 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003375 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003376 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3377 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3378 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003379 AIX/4)
3380 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003381 AIX/5)
3382 if test `uname -r` -eq 1; then
3383 define_xopen_source=no
3384 fi
3385 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003386 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3387 # defining NI_NUMERICHOST.
3388 QNX/6.3.2)
3389 define_xopen_source=no
3390 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003391
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003392esac
3393
3394if test $define_xopen_source = yes
3395then
Victor Stinner14d098d2011-09-07 22:29:43 +02003396 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
Victor Stinner14d098d2011-09-07 22:29:43 +02003398$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
3401 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3402 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3403 # several APIs are not declared. Since this is also needed in some
3404 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
Matthias Kloseb9621712010-04-24 17:59:49 +00003406$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003409
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003410$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412fi
3413
Christian Heimes647cd872013-12-07 23:39:33 +01003414# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3415case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003416 hp*|HP*)
3417 define_stdc_a1=yes;;
3418 *)
3419 define_stdc_a1=no;;
3420esac
3421
3422if test $define_stdc_a1 = yes
3423then
Christian Heimes647cd872013-12-07 23:39:33 +01003424
3425$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3426
Christian Heimesb02bcae2013-12-08 15:21:08 +01003427fi
Christian Heimes647cd872013-12-07 23:39:33 +01003428
Jack Jansen6b08a402004-06-03 12:41:45 +00003429# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3430# it may influence the way we can build extensions, so distutils
3431# needs to check it
3432
Thomas Wouters477c8d52006-05-27 19:21:47 +00003433
Jack Jansen6b08a402004-06-03 12:41:45 +00003434CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003435EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003436
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003438
3439# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3440# for debug/optimization stuff. BASECFLAGS is for flags that are required
3441# just to get things to compile and link. Users are free to override OPT
3442# when running configure or make. The build should not break if they do.
3443# BASECFLAGS should generally not be messed with, however.
3444
3445# XXX shouldn't some/most/all of this code be merged with the stuff later
3446# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3448$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003451if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003453 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003454 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003455 without_gcc=yes;;
3456 yes) CC=gcc
3457 without_gcc=no;;
3458 *) CC=$withval
3459 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003460 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003461else
Martin v. Löwis11437992002-04-12 09:54:03 +00003462
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003464 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003465 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003466 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003467 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468fi
3469
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3471$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003472
Zachary Ware5af85642015-12-21 12:09:17 -06003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3474$as_echo_n "checking for --with-icc... " >&6; }
3475
3476# Check whether --with-icc was given.
3477if test "${with_icc+set}" = set; then :
3478 withval=$with_icc;
3479 case $withval in
3480 no) CC=${CC:-cc}
3481 with_icc=no;;
3482 yes) CC=icc
3483 CXX=icpc
3484 with_icc=yes;;
3485 *) CC=$withval
3486 with_icc=$withval;;
3487 esac
3488else
3489
3490 with_icc=no
3491fi
3492
3493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3494$as_echo "$with_icc" >&6; }
3495
Guido van Rossum8b131c51995-03-09 14:10:13 +00003496# If the user switches compilers, we can't believe the cache
3497if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3498then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003499 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003500(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501fi
3502
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003503# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3504# when the compiler supports them, but we don't always want -O2, and
3505# we set -g later.
3506if test -z "$CFLAGS"; then
3507 CFLAGS=
3508fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003509
3510if test "$ac_sys_system" = "Darwin"
3511then
3512 # Compiler selection on MacOSX is more complicated than
3513 # AC_PROG_CC can handle, see Mac/README.txt for more
3514 # information
3515 if test -z "${CC}"
3516 then
3517 found_gcc=
3518 found_clang=
3519 as_save_IFS=$IFS; IFS=:
3520 for as_dir in $PATH
3521 do
3522 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003523 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003525 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526 fi
3527 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003528 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 fi
3532 fi
3533 done
3534 IFS=$as_save_IFS
3535
3536 if test -n "$found_gcc" -a -n "$found_clang"
3537 then
3538 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3539 then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3541$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3542 CC="$found_clang"
3543 CXX="$found_clang++"
3544 fi
3545
3546
3547 elif test -z "$found_gcc" -a -n "$found_clang"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3550$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3551 CC="$found_clang"
3552 CXX="$found_clang++"
3553
3554 elif test -z "$found_gcc" -a -z "$found_clang"
3555 then
3556 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3557 if test -n "${found_clang}"
3558 then
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3560$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3561 CC="${found_clang}"
3562 CXX="`/usr/bin/xcrun -find clang++`"
3563
3564 # else: use default behaviour
3565 fi
3566 fi
3567 fi
3568fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003569ac_ext=c
3570ac_cpp='$CPP $CPPFLAGS'
3571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3573ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574if test -n "$ac_tool_prefix"; then
3575 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3576set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581else
3582 if test -n "$CC"; then
3583 ac_cv_prog_CC="$CC" # Let the user override the test.
3584else
Martin v. Löwis11437992002-04-12 09:54:03 +00003585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 break 2
3595 fi
3596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
Jack Jansendd19cf82001-12-06 22:36:17 +00003600fi
3601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003603if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3605$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613if test -z "$ac_cv_prog_CC"; then
3614 ac_ct_CC=$CC
3615 # Extract the first word of "gcc", so it can be a program name with args.
3616set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003619if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 if test -n "$ac_ct_CC"; then
3623 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3624else
3625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 break 2
3635 fi
3636done
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642ac_ct_CC=$ac_cv_prog_ac_ct_CC
3643if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3645$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 if test "x$ac_ct_CC" = x; then
3652 CC=""
3653 else
3654 case $cross_compiling:$ac_tool_warned in
3655yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658ac_tool_warned=yes ;;
3659esac
3660 CC=$ac_ct_CC
3661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003664fi
3665
Jack Jansendd19cf82001-12-06 22:36:17 +00003666if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 if test -n "$ac_tool_prefix"; then
3668 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003669set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003672if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 break 2
3688 fi
3689done
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003692
3693fi
3694fi
3695CC=$ac_cv_prog_CC
3696if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707if test -z "$CC"; then
3708 # Extract the first word of "cc", so it can be a program name with args.
3709set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003712if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 if test -n "$CC"; then
3716 ac_cv_prog_CC="$CC" # Let the user override the test.
3717else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3727 ac_prog_rejected=yes
3728 continue
3729 fi
3730 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 break 2
3733 fi
3734done
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003737
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test $ac_prog_rejected = yes; then
3739 # We found a bogon in the path, so make sure we never use it.
3740 set dummy $ac_cv_prog_CC
3741 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 # We chose a different compiler from the bogus one.
3744 # However, it has the same basename, so the bogon will be chosen
3745 # first if we set CC to just the basename; use the full file name.
3746 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003747 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 fi
3749fi
3750fi
3751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3755$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756else
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3758$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759fi
3760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$CC"; then
3764 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 do
3767 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003771if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003773else
3774 if test -n "$CC"; then
3775 ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788done
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
3792fi
3793fi
3794CC=$ac_cv_prog_CC
3795if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3797$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003801fi
3802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 test -n "$CC" && break
3805 done
3806fi
3807if test -z "$CC"; then
3808 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810do
3811 # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003815if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003817else
3818 if test -n "$ac_ct_CC"; then
3819 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3820else
3821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 break 2
3831 fi
3832done
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836fi
3837fi
3838ac_ct_CC=$ac_cv_prog_ac_ct_CC
3839if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3841$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$ac_ct_CC" && break
3849done
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851 if test "x$ac_ct_CC" = x; then
3852 CC=""
3853 else
3854 case $cross_compiling:$ac_tool_warned in
3855yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858ac_tool_warned=yes ;;
3859esac
3860 CC=$ac_ct_CC
3861 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863
3864fi
3865
3866
Matthias Kloseb9621712010-04-24 17:59:49 +00003867test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003869as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003870See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
3872# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003873$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3874set X $ac_compile
3875ac_compiler=$2
3876for ac_option in --version -v -V -qversion; do
3877 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
3884 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 if test -s conftest.err; then
3887 sed '10a\
3888... rest of stderr output deleted ...
3889 10q' conftest.err >conftest.er1
3890 cat conftest.er1 >&5
3891 fi
3892 rm -f conftest.er1 conftest.err
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }
3895done
Martin v. Löwis11437992002-04-12 09:54:03 +00003896
Matthias Kloseb9621712010-04-24 17:59:49 +00003897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003898/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003909ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910# Try to create an executable without -o first, disregard a.out.
3911# It will help us diagnose broken compilers, and finding out an intuition
3912# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3914$as_echo_n "checking whether the C compiler works... " >&6; }
3915ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3916
3917# The possible output files:
3918ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920ac_rmfiles=
3921for ac_file in $ac_files
3922do
3923 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3926 esac
3927done
3928rm -f $ac_rmfiles
3929
Matthias Kloseb9621712010-04-24 17:59:49 +00003930if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3942# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3943# in a Makefile. We should not override ac_cv_exeext if it was cached,
3944# so that the user can short-circuit this test for compilers unknown to
3945# Autoconf.
3946for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003951 ;;
3952 [ab].out )
3953 # We found the default executable, but exeext='' is most
3954 # certainly right.
3955 break;;
3956 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 then :; else
3959 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3960 fi
3961 # We set ac_cv_exeext here because the later test for it is not
3962 # safe: cross compilers may not add the suffix if given an `-o'
3963 # argument, so we may need to know it at that point already.
3964 # Even if this section looks crufty: it has the advantage of
3965 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 break;;
3967 * )
3968 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 esac
3970done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971test "$ac_cv_exeext" = no && ac_cv_exeext=
3972
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003973else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 ac_file=''
3975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003976if test -z "$ac_file"; then :
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003980sed 's/^/| /' conftest.$ac_ext >&5
3981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003984as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003985See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003986else
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3988$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3991$as_echo_n "checking for C compiler default output file name... " >&6; }
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3993$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3999$as_echo_n "checking for suffix of executables... " >&6; }
4000if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4012# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4013# work properly (i.e., refer to `conftest.exe'), while it won't with
4014# `rm'.
4015for ac_file in conftest.exe conftest conftest.*; do
4016 test -f "$ac_file" || continue
4017 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4020 break;;
4021 * ) break;;
4022 esac
4023done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024else
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004027as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004028See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f conftest conftest$ac_cv_exeext
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4032$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033
4034rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004035EXEEXT=$ac_cv_exeext
4036ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
4039#include <stdio.h>
4040int
4041main ()
4042{
4043FILE *f = fopen ("conftest.out", "w");
4044 return ferror (f) || fclose (f) != 0;
4045
4046 ;
4047 return 0;
4048}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004050ac_clean_files="$ac_clean_files conftest.out"
4051# Check that the compiler produces executables we can run. If not, either
4052# the compiler is broken, or we cross compile.
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4054$as_echo_n "checking whether we are cross compiling... " >&6; }
4055if test "$cross_compiling" != yes; then
4056 { { ac_try="$ac_link"
4057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
4061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
4063 (eval "$ac_link") 2>&5
4064 ac_status=$?
4065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }
4067 if { ac_try='./conftest$ac_cv_exeext'
4068 { { case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_try") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; }; then
4078 cross_compiling=no
4079 else
4080 if test "$cross_compiling" = maybe; then
4081 cross_compiling=yes
4082 else
4083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004085as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004086If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004087See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 fi
4089 fi
4090fi
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4092$as_echo "$cross_compiling" >&6; }
4093
4094rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4095ac_clean_files=$ac_clean_files_save
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4097$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004098if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo_n "(cached) " >&6
4100else
4101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102/* end confdefs.h. */
4103
4104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004113if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114case "(($ac_try" in
4115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116 *) ac_try_echo=$ac_try;;
4117esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4119$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004120 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4123 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 for ac_file in conftest.o conftest.obj conftest.*; do
4125 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4129 break;;
4130 esac
4131done
4132else
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004134sed 's/^/| /' conftest.$ac_ext >&5
4135
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004138as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004139See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004141rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4144$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145OBJEXT=$ac_cv_objext
4146ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4148$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004149if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004151else
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158#ifndef __GNUC__
4159 choke me
4160#endif
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 ac_compiler_gnu=yes
4168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004172ac_cv_c_compiler_gnu=$ac_compiler_gnu
4173
4174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4176$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4177if test $ac_compiler_gnu = yes; then
4178 GCC=yes
4179else
4180 GCC=
4181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182ac_test_CFLAGS=${CFLAGS+set}
4183ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4185$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004186if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 ac_save_c_werror_flag=$ac_c_werror_flag
4190 ac_c_werror_flag=yes
4191 ac_cv_prog_cc_g=no
4192 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 CFLAGS=""
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209/* end confdefs.h. */
4210
4211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221else
4222 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_c_werror_flag=$ac_save_c_werror_flag
4244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4246$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249elif test $ac_cv_prog_cc_g = yes; then
4250 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004251 CFLAGS="-g -O2"
4252 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254 fi
4255else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 if test "$GCC" = yes; then
4257 CFLAGS="-O2"
4258 else
4259 CFLAGS=
4260 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4263$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004264if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004268ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004270/* end confdefs.h. */
4271#include <stdarg.h>
4272#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004273struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4275struct buf { int x; };
4276FILE * (*rcsopen) (struct buf *, struct stat *, int);
4277static char *e (p, i)
4278 char **p;
4279 int i;
4280{
4281 return p[i];
4282}
4283static char *f (char * (*g) (char **, int), char **p, ...)
4284{
4285 char *s;
4286 va_list v;
4287 va_start (v,p);
4288 s = g (p, va_arg (v,int));
4289 va_end (v);
4290 return s;
4291}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292
4293/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4294 function prototypes and stuff, but not '\xHH' hex character constants.
4295 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4298 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4303 inside strings and character constants. */
4304#define FOO(x) 'x'
4305int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4306
Skip Montanaro6dead952003-09-25 14:50:04 +00004307int test (int i, double x);
4308struct s1 {int (*f) (int a);};
4309struct s2 {int (*f) (double a);};
4310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4311int argc;
4312char **argv;
4313int
4314main ()
4315{
4316return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4317 ;
4318 return 0;
4319}
4320_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4322 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004323do
4324 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328rm -f core conftest.err conftest.$ac_objext
4329 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004330done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332CC=$ac_save_CC
4333
4334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335# AC_CACHE_VAL
4336case "x$ac_cv_prog_cc_c89" in
4337 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4339$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4342$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4346$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004348if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352ac_ext=c
4353ac_cpp='$CPP $CPPFLAGS'
4354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4356ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004358ac_ext=c
4359ac_cpp='$CPP $CPPFLAGS'
4360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362ac_compiler_gnu=$ac_cv_c_compiler_gnu
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4364$as_echo_n "checking how to run the C preprocessor... " >&6; }
4365# On Suns, sometimes $CPP names a directory.
4366if test -n "$CPP" && test -d "$CPP"; then
4367 CPP=
4368fi
4369if test -z "$CPP"; then
4370 if ${ac_cv_prog_CPP+:} false; then :
4371 $as_echo_n "(cached) " >&6
4372else
4373 # Double quotes because CPP needs to be expanded
4374 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4375 do
4376 ac_preproc_ok=false
4377for ac_c_preproc_warn_flag in '' yes
4378do
4379 # Use a header file that comes with gcc, so configuring glibc
4380 # with a fresh cross-compiler works.
4381 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4382 # <limits.h> exists even on freestanding compilers.
4383 # On the NeXT, cc -E runs the code through the compiler's parser,
4384 # not just through cpp. "Syntax error" is here to catch this case.
4385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4386/* end confdefs.h. */
4387#ifdef __STDC__
4388# include <limits.h>
4389#else
4390# include <assert.h>
4391#endif
4392 Syntax error
4393_ACEOF
4394if ac_fn_c_try_cpp "$LINENO"; then :
4395
4396else
4397 # Broken: fails on valid input.
4398continue
4399fi
4400rm -f conftest.err conftest.i conftest.$ac_ext
4401
4402 # OK, works on sane cases. Now check whether nonexistent headers
4403 # can be detected and how.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#include <ac_nonexistent.h>
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409 # Broken: success on invalid input.
4410continue
4411else
4412 # Passes both tests.
4413ac_preproc_ok=:
4414break
4415fi
4416rm -f conftest.err conftest.i conftest.$ac_ext
4417
4418done
4419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4420rm -f conftest.i conftest.err conftest.$ac_ext
4421if $ac_preproc_ok; then :
4422 break
4423fi
4424
4425 done
4426 ac_cv_prog_CPP=$CPP
4427
4428fi
4429 CPP=$ac_cv_prog_CPP
4430else
4431 ac_cv_prog_CPP=$CPP
4432fi
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4434$as_echo "$CPP" >&6; }
4435ac_preproc_ok=false
4436for ac_c_preproc_warn_flag in '' yes
4437do
4438 # Use a header file that comes with gcc, so configuring glibc
4439 # with a fresh cross-compiler works.
4440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4441 # <limits.h> exists even on freestanding compilers.
4442 # On the NeXT, cc -E runs the code through the compiler's parser,
4443 # not just through cpp. "Syntax error" is here to catch this case.
4444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4445/* end confdefs.h. */
4446#ifdef __STDC__
4447# include <limits.h>
4448#else
4449# include <assert.h>
4450#endif
4451 Syntax error
4452_ACEOF
4453if ac_fn_c_try_cpp "$LINENO"; then :
4454
4455else
4456 # Broken: fails on valid input.
4457continue
4458fi
4459rm -f conftest.err conftest.i conftest.$ac_ext
4460
4461 # OK, works on sane cases. Now check whether nonexistent headers
4462 # can be detected and how.
4463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464/* end confdefs.h. */
4465#include <ac_nonexistent.h>
4466_ACEOF
4467if ac_fn_c_try_cpp "$LINENO"; then :
4468 # Broken: success on invalid input.
4469continue
4470else
4471 # Passes both tests.
4472ac_preproc_ok=:
4473break
4474fi
4475rm -f conftest.err conftest.i conftest.$ac_ext
4476
4477done
4478# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4479rm -f conftest.i conftest.err conftest.$ac_ext
4480if $ac_preproc_ok; then :
4481
4482else
4483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4485as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4486See \`config.log' for more details" "$LINENO" 5; }
4487fi
4488
4489ac_ext=c
4490ac_cpp='$CPP $CPPFLAGS'
4491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4493ac_compiler_gnu=$ac_cv_c_compiler_gnu
4494
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4496$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4497if ${ac_cv_path_GREP+:} false; then :
4498 $as_echo_n "(cached) " >&6
4499else
4500 if test -z "$GREP"; then
4501 ac_path_GREP_found=false
4502 # Loop through the user's path and test for each of PROGNAME-LIST
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4505do
4506 IFS=$as_save_IFS
4507 test -z "$as_dir" && as_dir=.
4508 for ac_prog in grep ggrep; do
4509 for ac_exec_ext in '' $ac_executable_extensions; do
4510 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4511 as_fn_executable_p "$ac_path_GREP" || continue
4512# Check for GNU ac_path_GREP and select it if it is found.
4513 # Check for GNU $ac_path_GREP
4514case `"$ac_path_GREP" --version 2>&1` in
4515*GNU*)
4516 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4517*)
4518 ac_count=0
4519 $as_echo_n 0123456789 >"conftest.in"
4520 while :
4521 do
4522 cat "conftest.in" "conftest.in" >"conftest.tmp"
4523 mv "conftest.tmp" "conftest.in"
4524 cp "conftest.in" "conftest.nl"
4525 $as_echo 'GREP' >> "conftest.nl"
4526 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4527 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4528 as_fn_arith $ac_count + 1 && ac_count=$as_val
4529 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4530 # Best one so far, save it but keep looking for a better one
4531 ac_cv_path_GREP="$ac_path_GREP"
4532 ac_path_GREP_max=$ac_count
4533 fi
4534 # 10*(2^10) chars as input seems more than enough
4535 test $ac_count -gt 10 && break
4536 done
4537 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4538esac
4539
4540 $ac_path_GREP_found && break 3
4541 done
4542 done
4543 done
4544IFS=$as_save_IFS
4545 if test -z "$ac_cv_path_GREP"; then
4546 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4547 fi
4548else
4549 ac_cv_path_GREP=$GREP
4550fi
4551
4552fi
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4554$as_echo "$ac_cv_path_GREP" >&6; }
4555 GREP="$ac_cv_path_GREP"
4556
4557
Łukasz Langaa785c872016-09-09 17:37:37 -07004558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4559$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4560if ${ac_cv_path_SED+:} false; then :
4561 $as_echo_n "(cached) " >&6
4562else
4563 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4564 for ac_i in 1 2 3 4 5 6 7; do
4565 ac_script="$ac_script$as_nl$ac_script"
4566 done
4567 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4568 { ac_script=; unset ac_script;}
4569 if test -z "$SED"; then
4570 ac_path_SED_found=false
4571 # Loop through the user's path and test for each of PROGNAME-LIST
4572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
4577 for ac_prog in sed gsed; do
4578 for ac_exec_ext in '' $ac_executable_extensions; do
4579 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4580 as_fn_executable_p "$ac_path_SED" || continue
4581# Check for GNU ac_path_SED and select it if it is found.
4582 # Check for GNU $ac_path_SED
4583case `"$ac_path_SED" --version 2>&1` in
4584*GNU*)
4585 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4586*)
4587 ac_count=0
4588 $as_echo_n 0123456789 >"conftest.in"
4589 while :
4590 do
4591 cat "conftest.in" "conftest.in" >"conftest.tmp"
4592 mv "conftest.tmp" "conftest.in"
4593 cp "conftest.in" "conftest.nl"
4594 $as_echo '' >> "conftest.nl"
4595 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4596 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4597 as_fn_arith $ac_count + 1 && ac_count=$as_val
4598 if test $ac_count -gt ${ac_path_SED_max-0}; then
4599 # Best one so far, save it but keep looking for a better one
4600 ac_cv_path_SED="$ac_path_SED"
4601 ac_path_SED_max=$ac_count
4602 fi
4603 # 10*(2^10) chars as input seems more than enough
4604 test $ac_count -gt 10 && break
4605 done
4606 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4607esac
4608
4609 $ac_path_SED_found && break 3
4610 done
4611 done
4612 done
4613IFS=$as_save_IFS
4614 if test -z "$ac_cv_path_SED"; then
4615 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4616 fi
4617else
4618 ac_cv_path_SED=$SED
4619fi
4620
4621fi
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4623$as_echo "$ac_cv_path_SED" >&6; }
4624 SED="$ac_cv_path_SED"
4625 rm -f conftest.sed
4626
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004627
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
4629
Matthias Kloseb9621712010-04-24 17:59:49 +00004630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4631$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004633# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004634if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
4637 case $withval in
4638 no) with_cxx_main=no
4639 MAINCC='$(CC)';;
4640 yes) with_cxx_main=yes
4641 MAINCC='$(CXX)';;
4642 *) with_cxx_main=yes
4643 MAINCC=$withval
4644 if test -z "$CXX"
4645 then
4646 CXX=$withval
4647 fi;;
4648 esac
4649else
4650
4651 with_cxx_main=no
4652 MAINCC='$(CC)'
4653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004654fi
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4657$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004658
4659preset_cxx="$CXX"
4660if test -z "$CXX"
4661then
4662 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663 gcc) if test -n "$ac_tool_prefix"; then
4664 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4665set dummy ${ac_tool_prefix}g++; ac_word=$2
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
4668if ${ac_cv_path_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694CXX=$ac_cv_path_CXX
4695if test -n "$CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4697$as_echo "$CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703
4704fi
4705if test -z "$ac_cv_path_CXX"; then
4706 ac_pt_CXX=$CXX
4707 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004711if ${ac_cv_path_ac_pt_CXX+:} false; then :
4712 $as_echo_n "(cached) " >&6
4713else
4714 case $ac_pt_CXX in
4715 [\\/]* | ?:[\\/]*)
4716 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4717 ;;
4718 *)
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in notfound
4721do
4722 IFS=$as_save_IFS
4723 test -z "$as_dir" && as_dir=.
4724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728 break 2
4729 fi
4730done
4731 done
4732IFS=$as_save_IFS
4733
4734 ;;
4735esac
4736fi
4737ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4738if test -n "$ac_pt_CXX"; then
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4740$as_echo "$ac_pt_CXX" >&6; }
4741else
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
4744fi
4745
4746 if test "x$ac_pt_CXX" = x; then
4747 CXX="g++"
4748 else
4749 case $cross_compiling:$ac_tool_warned in
4750yes:)
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4753ac_tool_warned=yes ;;
4754esac
4755 CXX=$ac_pt_CXX
4756 fi
4757else
4758 CXX="$ac_cv_path_CXX"
4759fi
4760 ;;
4761 cc) if test -n "$ac_tool_prefix"; then
4762 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4763set dummy ${ac_tool_prefix}c++; ac_word=$2
4764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004766if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
4769 case $CXX in
4770 [\\/]* | ?:[\\/]*)
4771 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4772 ;;
4773 *)
4774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4775for as_dir in notfound
4776do
4777 IFS=$as_save_IFS
4778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 break 2
4784 fi
4785done
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ;;
4790esac
4791fi
4792CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004793if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4795$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796else
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4798$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801
4802fi
4803if test -z "$ac_cv_path_CXX"; then
4804 ac_pt_CXX=$CXX
4805 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ;;
4816 *)
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818for as_dir in notfound
4819do
4820 IFS=$as_save_IFS
4821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826 break 2
4827 fi
4828done
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832 ;;
4833esac
4834fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4836if test -n "$ac_pt_CXX"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4838$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004839else
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004843
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 if test "x$ac_pt_CXX" = x; then
4845 CXX="c++"
4846 else
4847 case $cross_compiling:$ac_tool_warned in
4848yes:)
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4851ac_tool_warned=yes ;;
4852esac
4853 CXX=$ac_pt_CXX
4854 fi
4855else
4856 CXX="$ac_cv_path_CXX"
4857fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 clang|*/clang) if test -n "$ac_tool_prefix"; then
4860 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4861set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4870 ;;
4871 *)
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in notfound
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
Ned Deilycbfb9a52012-06-23 16:02:19 -07004887 ;;
4888esac
4889fi
4890CXX=$ac_cv_path_CXX
4891if test -n "$CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4893$as_echo "$CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899
4900fi
4901if test -z "$ac_cv_path_CXX"; then
4902 ac_pt_CXX=$CXX
4903 # Extract the first word of "clang++", so it can be a program name with args.
4904set dummy clang++; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if ${ac_cv_path_ac_pt_CXX+:} false; then :
4908 $as_echo_n "(cached) " >&6
4909else
4910 case $ac_pt_CXX in
4911 [\\/]* | ?:[\\/]*)
4912 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4913 ;;
4914 *)
4915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in notfound
4917do
4918 IFS=$as_save_IFS
4919 test -z "$as_dir" && as_dir=.
4920 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924 break 2
4925 fi
4926done
4927 done
4928IFS=$as_save_IFS
4929
4930 ;;
4931esac
4932fi
4933ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4934if test -n "$ac_pt_CXX"; then
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4936$as_echo "$ac_pt_CXX" >&6; }
4937else
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942 if test "x$ac_pt_CXX" = x; then
4943 CXX="clang++"
4944 else
4945 case $cross_compiling:$ac_tool_warned in
4946yes:)
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4949ac_tool_warned=yes ;;
4950esac
4951 CXX=$ac_pt_CXX
4952 fi
4953else
4954 CXX="$ac_cv_path_CXX"
4955fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004956 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004957 icc|*/icc) if test -n "$ac_tool_prefix"; then
4958 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4959set dummy ${ac_tool_prefix}icpc; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4968 ;;
4969 *)
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in notfound
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985 ;;
4986esac
4987fi
4988CXX=$ac_cv_path_CXX
4989if test -n "$CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4991$as_echo "$CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997
4998fi
4999if test -z "$ac_cv_path_CXX"; then
5000 ac_pt_CXX=$CXX
5001 # Extract the first word of "icpc", so it can be a program name with args.
5002set dummy icpc; ac_word=$2
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
5005if ${ac_cv_path_ac_pt_CXX+:} false; then :
5006 $as_echo_n "(cached) " >&6
5007else
5008 case $ac_pt_CXX in
5009 [\\/]* | ?:[\\/]*)
5010 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5011 ;;
5012 *)
5013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014for as_dir in notfound
5015do
5016 IFS=$as_save_IFS
5017 test -z "$as_dir" && as_dir=.
5018 for ac_exec_ext in '' $ac_executable_extensions; do
5019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5020 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022 break 2
5023 fi
5024done
5025 done
5026IFS=$as_save_IFS
5027
5028 ;;
5029esac
5030fi
5031ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5032if test -n "$ac_pt_CXX"; then
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5034$as_echo "$ac_pt_CXX" >&6; }
5035else
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037$as_echo "no" >&6; }
5038fi
5039
5040 if test "x$ac_pt_CXX" = x; then
5041 CXX="icpc"
5042 else
5043 case $cross_compiling:$ac_tool_warned in
5044yes:)
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5047ac_tool_warned=yes ;;
5048esac
5049 CXX=$ac_pt_CXX
5050 fi
5051else
5052 CXX="$ac_cv_path_CXX"
5053fi
5054 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055 esac
5056 if test "$CXX" = "notfound"
5057 then
5058 CXX=""
5059 fi
5060fi
5061if test -z "$CXX"
5062then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005063 if test -n "$ac_tool_prefix"; then
5064 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5065 do
5066 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005070if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072else
5073 if test -n "$CXX"; then
5074 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5075else
5076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005083 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085 break 2
5086 fi
5087done
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090
5091fi
5092fi
5093CXX=$ac_cv_prog_CXX
5094if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5096$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097else
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100fi
5101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005103 test -n "$CXX" && break
5104 done
5105fi
5106if test -z "$CXX"; then
5107 ac_ct_CXX=$CXX
5108 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5109do
5110 # Extract the first word of "$ac_prog", so it can be a program name with args.
5111set dummy $ac_prog; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5115 $as_echo_n "(cached) " >&6
5116else
5117 if test -n "$ac_ct_CXX"; then
5118 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5119else
5120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121for as_dir in $PATH
5122do
5123 IFS=$as_save_IFS
5124 test -z "$as_dir" && as_dir=.
5125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005127 ac_cv_prog_ac_ct_CXX="$ac_prog"
5128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129 break 2
5130 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 done
5133IFS=$as_save_IFS
5134
5135fi
5136fi
5137ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5138if test -n "$ac_ct_CXX"; then
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5140$as_echo "$ac_ct_CXX" >&6; }
5141else
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5143$as_echo "no" >&6; }
5144fi
5145
5146
5147 test -n "$ac_ct_CXX" && break
5148done
5149
5150 if test "x$ac_ct_CXX" = x; then
5151 CXX="notfound"
5152 else
5153 case $cross_compiling:$ac_tool_warned in
5154yes:)
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5157ac_tool_warned=yes ;;
5158esac
5159 CXX=$ac_ct_CXX
5160 fi
5161fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162
5163 if test "$CXX" = "notfound"
5164 then
5165 CXX=""
5166 fi
5167fi
5168if test "$preset_cxx" != "$CXX"
5169then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005170 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171
5172 By default, distutils will build C++ extension modules with \"$CXX\".
5173 If this is not intended, then set CXX on the configure command line.
5174 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180fi
5181
5182
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005183MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5184
5185
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5187$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5188cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005189#undef bfin
5190#undef cris
5191#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef hppa
5194#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005196#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005197#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005200#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005201 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005202#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203# if defined(__x86_64__) && defined(__LP64__)
5204 x86_64-linux-gnu
5205# elif defined(__x86_64__) && defined(__ILP32__)
5206 x86_64-linux-gnux32
5207# elif defined(__i386__)
5208 i386-linux-gnu
5209# elif defined(__aarch64__) && defined(__AARCH64EL__)
5210# if defined(__ILP32__)
5211 aarch64_ilp32-linux-gnu
5212# else
5213 aarch64-linux-gnu
5214# endif
5215# elif defined(__aarch64__) && defined(__AARCH64EB__)
5216# if defined(__ILP32__)
5217 aarch64_be_ilp32-linux-gnu
5218# else
5219 aarch64_be-linux-gnu
5220# endif
5221# elif defined(__alpha__)
5222 alpha-linux-gnu
5223# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5224# if defined(__ARMEL__)
5225 arm-linux-gnueabihf
5226# else
5227 armeb-linux-gnueabihf
5228# endif
5229# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5230# if defined(__ARMEL__)
5231 arm-linux-gnueabi
5232# else
5233 armeb-linux-gnueabi
5234# endif
5235# elif defined(__hppa__)
5236 hppa-linux-gnu
5237# elif defined(__ia64__)
5238 ia64-linux-gnu
5239# elif defined(__m68k__) && !defined(__mcoldfire__)
5240 m68k-linux-gnu
5241# elif defined(__mips_hard_float) && defined(_MIPSEL)
5242# if _MIPS_SIM == _ABIO32
5243 mipsel-linux-gnu
5244# elif _MIPS_SIM == _ABIN32
5245 mips64el-linux-gnuabin32
5246# elif _MIPS_SIM == _ABI64
5247 mips64el-linux-gnuabi64
5248# else
5249# error unknown platform triplet
5250# endif
5251# elif defined(__mips_hard_float)
5252# if _MIPS_SIM == _ABIO32
5253 mips-linux-gnu
5254# elif _MIPS_SIM == _ABIN32
5255 mips64-linux-gnuabin32
5256# elif _MIPS_SIM == _ABI64
5257 mips64-linux-gnuabi64
5258# else
5259# error unknown platform triplet
5260# endif
5261# elif defined(__or1k__)
5262 or1k-linux-gnu
5263# elif defined(__powerpc__) && defined(__SPE__)
5264 powerpc-linux-gnuspe
5265# elif defined(__powerpc64__)
5266# if defined(__LITTLE_ENDIAN__)
5267 powerpc64le-linux-gnu
5268# else
5269 powerpc64-linux-gnu
5270# endif
5271# elif defined(__powerpc__)
5272 powerpc-linux-gnu
5273# elif defined(__s390x__)
5274 s390x-linux-gnu
5275# elif defined(__s390__)
5276 s390-linux-gnu
5277# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5278 sh4-linux-gnu
5279# elif defined(__sparc__) && defined(__arch64__)
5280 sparc64-linux-gnu
5281# elif defined(__sparc__)
5282 sparc-linux-gnu
5283# else
5284# error unknown platform triplet
5285# endif
5286#elif defined(__FreeBSD_kernel__)
5287# if defined(__LP64__)
5288 x86_64-kfreebsd-gnu
5289# elif defined(__i386__)
5290 i386-kfreebsd-gnu
5291# else
5292# error unknown platform triplet
5293# endif
5294#elif defined(__gnu_hurd__)
5295 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005296#elif defined(__APPLE__)
5297 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298#else
5299# error unknown platform triplet
5300#endif
5301
5302EOF
5303
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005304if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5307$as_echo "$PLATFORM_TRIPLET" >&6; }
5308else
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5310$as_echo "none" >&6; }
5311fi
5312rm -f conftest.c conftest.out
5313
5314if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5315 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5316 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5317 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005318elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5319 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321
doko@ubuntu.com55532312016-06-14 08:55:19 +02005322if test x$MULTIARCH != x; then
5323 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5324fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325
5326
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5328$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5329save_LDFLAGS="$LDFLAGS"
5330LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005331
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333/* end confdefs.h. */
5334
5335int
5336main ()
5337{
5338
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343if ac_fn_c_try_link "$LINENO"; then :
5344 NO_AS_NEEDED="-Wl,--no-as-needed"
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5346$as_echo "yes" >&6; }
5347else
5348 NO_AS_NEEDED=""
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352rm -f core conftest.err conftest.$ac_objext \
5353 conftest$ac_exeext conftest.$ac_ext
5354LDFLAGS="$save_LDFLAGS"
5355
5356
5357
5358# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5361$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005362if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364else
5365 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5366 then ac_cv_path_EGREP="$GREP -E"
5367 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 # Loop through the user's path and test for each of PROGNAME-LIST
5371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5373do
5374 IFS=$as_save_IFS
5375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 for ac_prog in egrep; do
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005379 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005380# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 # Check for GNU $ac_path_EGREP
5382case `"$ac_path_EGREP" --version 2>&1` in
5383*GNU*)
5384 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5385*)
5386 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 while :
5389 do
5390 cat "conftest.in" "conftest.in" >"conftest.tmp"
5391 mv "conftest.tmp" "conftest.in"
5392 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5395 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5398 # Best one so far, save it but keep looking for a better one
5399 ac_cv_path_EGREP="$ac_path_EGREP"
5400 ac_path_EGREP_max=$ac_count
5401 fi
5402 # 10*(2^10) chars as input seems more than enough
5403 test $ac_count -gt 10 && break
5404 done
5405 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5406esac
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $ac_path_EGREP_found && break 3
5409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005414 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416else
5417 ac_cv_path_EGREP=$EGREP
5418fi
5419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 fi
5421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5423$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005425
5426
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5428$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005429if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo_n "(cached) " >&6
5431else
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005433/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005434#include <stdlib.h>
5435#include <stdarg.h>
5436#include <string.h>
5437#include <float.h>
5438
5439int
5440main ()
5441{
5442
5443 ;
5444 return 0;
5445}
5446_ACEOF
5447if ac_fn_c_try_compile "$LINENO"; then :
5448 ac_cv_header_stdc=yes
5449else
5450 ac_cv_header_stdc=no
5451fi
5452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5453
5454if test $ac_cv_header_stdc = yes; then
5455 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005459
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005464else
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005467rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469fi
5470
5471if test $ac_cv_header_stdc = yes; then
5472 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <stdlib.h>
5476
5477_ACEOF
5478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5479 $EGREP "free" >/dev/null 2>&1; then :
5480
5481else
5482 ac_cv_header_stdc=no
5483fi
5484rm -f conftest*
5485
5486fi
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5490 if test "$cross_compiling" = yes; then :
5491 :
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <ctype.h>
5496#include <stdlib.h>
5497#if ((' ' & 0x0FF) == 0x020)
5498# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5499# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5500#else
5501# define ISLOWER(c) \
5502 (('a' <= (c) && (c) <= 'i') \
5503 || ('j' <= (c) && (c) <= 'r') \
5504 || ('s' <= (c) && (c) <= 'z'))
5505# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5506#endif
5507
5508#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5509int
5510main ()
5511{
5512 int i;
5513 for (i = 0; i < 256; i++)
5514 if (XOR (islower (i), ISLOWER (i))
5515 || toupper (i) != TOUPPER (i))
5516 return 2;
5517 return 0;
5518}
5519_ACEOF
5520if ac_fn_c_try_run "$LINENO"; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5526 conftest.$ac_objext conftest.beam conftest.$ac_ext
5527fi
5528
5529fi
5530fi
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5532$as_echo "$ac_cv_header_stdc" >&6; }
5533if test $ac_cv_header_stdc = yes; then
5534
5535$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5536
5537fi
5538
5539# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5540for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5541 inttypes.h stdint.h unistd.h
5542do :
5543 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5544ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5545"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005546if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 cat >>confdefs.h <<_ACEOF
5548#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5549_ACEOF
5550
5551fi
5552
5553done
5554
5555
5556
5557 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005558if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 MINIX=yes
5560else
5561 MINIX=
5562fi
5563
5564
5565 if test "$MINIX" = yes; then
5566
5567$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5568
5569
5570$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5571
5572
5573$as_echo "#define _MINIX 1" >>confdefs.h
5574
5575 fi
5576
5577
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5579$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005580if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 $as_echo_n "(cached) " >&6
5582else
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584/* end confdefs.h. */
5585
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005586# define __EXTENSIONS__ 1
5587 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005588int
5589main ()
5590{
5591
5592 ;
5593 return 0;
5594}
5595_ACEOF
5596if ac_fn_c_try_compile "$LINENO"; then :
5597 ac_cv_safe_to_define___extensions__=yes
5598else
5599 ac_cv_safe_to_define___extensions__=no
5600fi
5601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602fi
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5604$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5605 test $ac_cv_safe_to_define___extensions__ = yes &&
5606 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5607
5608 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5609
5610 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5613
5614 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5615
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5619$as_echo_n "checking for the Android API level... " >&6; }
5620cat >> conftest.c <<EOF
5621#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005622android_api = __ANDROID_API__
5623arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005624#else
5625#error not Android
5626#endif
5627EOF
5628
5629if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005630 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5631 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5633$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005634 if test -z "$ANDROID_API_LEVEL"; then
5635 echo 'Fatal: you must define __ANDROID_API__'
5636 exit 1
5637 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638
5639cat >>confdefs.h <<_ACEOF
5640#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5641_ACEOF
5642
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5645$as_echo_n "checking for the Android arm ABI... " >&6; }
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5647$as_echo "$_arm_arch" >&6; }
5648 if test "$_arm_arch" = 7; then
5649 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5650 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5651 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652else
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5654$as_echo "not Android" >&6; }
5655fi
5656rm -f conftest.c conftest.out
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658# Check for unsupported systems
5659case $ac_sys_system/$ac_sys_release in
5660atheos*|Linux*/1*)
5661 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5662 echo See README for details.
5663 exit 1;;
5664esac
5665
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5668$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669
5670# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 withval=$with_suffix;
5673 case $withval in
5674 no) EXEEXT=;;
5675 yes) EXEEXT=.exe;;
5676 *) EXEEXT=$withval;;
5677 esac
5678fi
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5681$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682
5683# Test whether we're running on a non-case-sensitive system, in which
5684# case we give a warning if no ext is given
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5687$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688if test ! -d CaseSensitiveTestDir; then
5689mkdir CaseSensitiveTestDir
5690fi
5691
5692if test -d casesensitivetestdir
5693then
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5695$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 BUILDEXEEXT=.exe
5697else
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 BUILDEXEEXT=$EXEEXT
5701fi
5702rmdir CaseSensitiveTestDir
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704case $ac_sys_system in
5705hp*|HP*)
5706 case $CC in
5707 cc|*/cc) CC="$CC -Ae";;
5708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709esac
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5713$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test -z "$LIBRARY"
5715then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005716 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5719$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# LDLIBRARY is the name of the library to link against (as opposed to the
5722# name of the library into which to insert object files). BLDLIBRARY is also
5723# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5724# is blank as the main program is not linked directly against LDLIBRARY.
5725# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5726# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5727# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5728# DLLLIBRARY is the shared (i.e., DLL) library.
5729#
5730# RUNSHARED is used to run shared python without installed libraries
5731#
5732# INSTSONAME is the name of the shared library that will be use to install
5733# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005734#
5735# LDVERSION is the shared library version number, normally the Python version
5736# with the ABI build flags appended.
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740
5741
5742
5743
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745LDLIBRARY="$LIBRARY"
5746BLDLIBRARY='$(LDLIBRARY)'
5747INSTSONAME='$(LDLIBRARY)'
5748DLLLIBRARY=''
5749LDLIBRARYDIR=''
5750RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LINKCC is the command that links the python executable -- default is $(CC).
5754# If CXX is set, and if it is needed to link a main function that was
5755# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5756# python might then depend on the C++ runtime
5757# This is altered for AIX in order to build the export list before
5758# linking.
5759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5761$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LINKCC"
5763then
5764 LINKCC='$(PURIFY) $(MAINCC)'
5765 case $ac_sys_system in
5766 AIX*)
5767 exp_extra="\"\""
5768 if test $ac_sys_release -ge 5 -o \
5769 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5770 exp_extra="."
5771 fi
5772 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 QNX*)
5774 # qcc must be used because the other compilers do not
5775 # support -N.
5776 LINKCC=qcc;;
5777 esac
5778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5780$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5783# make sure we default having it set to "no": this is used by
5784# distutils.unixccompiler to know if it should add --enable-new-dtags
5785# to linker command lines, and failing to detect GNU ld simply results
5786# in the same bahaviour as before.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5789$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790ac_prog=ld
5791if test "$GCC" = yes; then
5792 ac_prog=`$CC -print-prog-name=ld`
5793fi
5794case `"$ac_prog" -V 2>&1 < /dev/null` in
5795 *GNU*)
5796 GNULD=yes;;
5797 *)
5798 GNULD=no;;
5799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5801$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5804$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 enableval=$enable_shared;
5808fi
5809
5810
5811if test -z "$enable_shared"
5812then
5813 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005814 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 enable_shared="yes";;
5816 *)
5817 enable_shared="no";;
5818 esac
5819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5821$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5824$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827 enableval=$enable_profiling;
5828fi
5829
5830if test "x$enable_profiling" = xyes; then
5831 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005832 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834/* end confdefs.h. */
5835int main() { return 0; }
5836_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837if ac_fn_c_try_link "$LINENO"; then :
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842rm -f core conftest.err conftest.$ac_objext \
5843 conftest$ac_exeext conftest.$ac_ext
5844 CC="$ac_save_cc"
5845else
5846 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5849$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851if test "x$enable_profiling" = xyes; then
5852 BASECFLAGS="-pg $BASECFLAGS"
5853 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5857$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
5859# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5860# library that we build, but we do not want to link against it (we
5861# will find it with a -framework option). For this reason there is an
5862# extra variable BLDLIBRARY against which Python and the extension
5863# modules are linked, BLDLIBRARY. This is normally the same as
5864# LDLIBRARY, but empty for MacOSX framework builds.
5865if test "$enable_framework"
5866then
5867 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005868 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 BLDLIBRARY=''
5870else
5871 BLDLIBRARY='$(LDLIBRARY)'
5872fi
5873
5874# Other platforms follow
5875if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005876 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877
Matthias Kloseb9621712010-04-24 17:59:49 +00005878$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
5880 case $ac_sys_system in
5881 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005882 LDLIBRARY='libpython$(LDVERSION).dll.a'
5883 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
5885 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
5887 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005890 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005891 then
5892 PY3LIBRARY=libpython3.so
5893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005895 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
5897 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005898 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005900 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005901 then
5902 PY3LIBRARY=libpython3.so
5903 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 hp*|HP*)
5906 case `uname -m` in
5907 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).dylib'
5919 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005920 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005922 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005925 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927 esac
5928else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005929 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 case $ac_sys_system in
5931 CYGWIN*)
5932 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 esac
5936fi
5937
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005938if test "$cross_compiling" = yes; then
5939 RUNSHARED=
5940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5943$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946if test -n "$ac_tool_prefix"; then
5947 for ac_prog in ar aal
5948 do
5949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005953if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
5956 if test -n "$AR"; then
5957 ac_cv_prog_AR="$AR" # Let the user override the test.
5958else
5959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960for as_dir in $PATH
5961do
5962 IFS=$as_save_IFS
5963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005966 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 break 2
5969 fi
5970done
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972IFS=$as_save_IFS
5973
5974fi
5975fi
5976AR=$ac_cv_prog_AR
5977if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5979$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984
5985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005986 test -n "$AR" && break
5987 done
5988fi
5989if test -z "$AR"; then
5990 ac_ct_AR=$AR
5991 for ac_prog in ar aal
5992do
5993 # Extract the first word of "$ac_prog", so it can be a program name with args.
5994set dummy $ac_prog; ac_word=$2
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if ${ac_cv_prog_ac_ct_AR+:} false; then :
5998 $as_echo_n "(cached) " >&6
5999else
6000 if test -n "$ac_ct_AR"; then
6001 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
6008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 ac_cv_prog_ac_ct_AR="$ac_prog"
6011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012 break 2
6013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015 done
6016IFS=$as_save_IFS
6017
6018fi
6019fi
6020ac_ct_AR=$ac_cv_prog_ac_ct_AR
6021if test -n "$ac_ct_AR"; then
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6023$as_echo "$ac_ct_AR" >&6; }
6024else
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
6027fi
6028
6029
6030 test -n "$ac_ct_AR" && break
6031done
6032
6033 if test "x$ac_ct_AR" = x; then
6034 AR="ar"
6035 else
6036 case $cross_compiling:$ac_tool_warned in
6037yes:)
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6040ac_tool_warned=yes ;;
6041esac
6042 AR=$ac_ct_AR
6043 fi
6044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045
6046
6047# tweak ARFLAGS only if the user didn't set it on the command line
6048
6049if test -z "$ARFLAGS"
6050then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006051 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053
doko@ubuntu.com58844492012-06-30 18:25:32 +02006054if test -n "$ac_tool_prefix"; then
6055 for ac_prog in readelf
6056 do
6057 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_READELF+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$READELF"; then
6065 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006074 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084READELF=$ac_cv_prog_READELF
6085if test -n "$READELF"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6087$as_echo "$READELF" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$READELF" && break
6095 done
6096fi
6097if test -z "$READELF"; then
6098 ac_ct_READELF=$READELF
6099 for ac_prog in readelf
6100do
6101 # Extract the first word of "$ac_prog", so it can be a program name with args.
6102set dummy $ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$ac_ct_READELF"; then
6109 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006118 ac_cv_prog_ac_ct_READELF="$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
6122done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6129if test -n "$ac_ct_READELF"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6131$as_echo "$ac_ct_READELF" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$ac_ct_READELF" && break
6139done
6140
6141 if test "x$ac_ct_READELF" = x; then
6142 READELF=":"
6143 else
6144 case $cross_compiling:$ac_tool_warned in
6145yes:)
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6148ac_tool_warned=yes ;;
6149esac
6150 READELF=$ac_ct_READELF
6151 fi
6152fi
6153
6154if test "$cross_compiling" = yes; then
6155 case "$READELF" in
6156 readelf|:)
6157 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6158 ;;
6159 esac
6160fi
6161
6162
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006165hp*|HP*)
6166 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167 if test -z "$INSTALL"
6168 then
6169 INSTALL="${srcdir}/install-sh -c"
6170 fi
6171esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172# Find a good install program. We prefer a C program (faster),
6173# so one script is as good as another. But avoid the broken or
6174# incompatible versions:
6175# SysV /etc/install, /usr/sbin/install
6176# SunOS /usr/etc/install
6177# IRIX /sbin/install
6178# AIX /bin/install
6179# AmigaOS /C/install, which installs bootblocks on floppy discs
6180# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6181# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6182# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6183# OS/2's system install, which has a completely different semantic
6184# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185# Reject install programs that cannot install multiple files.
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6187$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006189if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191else
6192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195 IFS=$as_save_IFS
6196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 # Account for people who put trailing slashes in PATH elements.
6198case $as_dir/ in #((
6199 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 /usr/ucb/* ) ;;
6203 *)
6204 # OSF1 and SCO ODT 3.0 have their own names for install.
6205 # Don't use installbsd from OSF since it installs stuff as root
6206 # by default.
6207 for ac_prog in ginstall scoinst install; do
6208 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006209 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210 if test $ac_prog = install &&
6211 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6212 # AIX install. It has an incompatible calling convention.
6213 :
6214 elif test $ac_prog = install &&
6215 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6216 # program-specific install script used by HP pwplus--don't use.
6217 :
6218 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 rm -rf conftest.one conftest.two conftest.dir
6220 echo one > conftest.one
6221 echo two > conftest.two
6222 mkdir conftest.dir
6223 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6224 test -s conftest.one && test -s conftest.two &&
6225 test -s conftest.dir/conftest.one &&
6226 test -s conftest.dir/conftest.two
6227 then
6228 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6229 break 3
6230 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 fi
6232 fi
6233 done
6234 done
6235 ;;
6236esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006237
6238 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239IFS=$as_save_IFS
6240
Matthias Kloseb9621712010-04-24 17:59:49 +00006241rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242
6243fi
6244 if test "${ac_cv_path_install+set}" = set; then
6245 INSTALL=$ac_cv_path_install
6246 else
6247 # As a last resort, use the slow shell script. Don't cache a
6248 # value for INSTALL within a source directory, because that will
6249 # break other packages using the cache if that directory is
6250 # removed, or if the value is a relative name.
6251 INSTALL=$ac_install_sh
6252 fi
6253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6255$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256
6257# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6258# It thinks the first close brace ends the variable substitution.
6259test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6260
6261test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6262
6263test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6264
Matthias Klose93a0ef12012-03-15 18:08:34 +01006265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6266$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6267if test -z "$MKDIR_P"; then
6268 if ${ac_cv_path_mkdir+:} false; then :
6269 $as_echo_n "(cached) " >&6
6270else
6271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6273do
6274 IFS=$as_save_IFS
6275 test -z "$as_dir" && as_dir=.
6276 for ac_prog in mkdir gmkdir; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006278 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006279 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6280 'mkdir (GNU coreutils) '* | \
6281 'mkdir (coreutils) '* | \
6282 'mkdir (fileutils) '4.1*)
6283 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6284 break 3;;
6285 esac
6286 done
6287 done
6288 done
6289IFS=$as_save_IFS
6290
6291fi
6292
6293 test -d ./--version && rmdir ./--version
6294 if test "${ac_cv_path_mkdir+set}" = set; then
6295 MKDIR_P="$ac_cv_path_mkdir -p"
6296 else
6297 # As a last resort, use the slow shell script. Don't cache a
6298 # value for MKDIR_P within a source directory, because that will
6299 # break other packages using the cache if that directory is
6300 # removed, or if the value is a relative name.
6301 MKDIR_P="$ac_install_sh -d"
6302 fi
6303fi
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6305$as_echo "$MKDIR_P" >&6; }
6306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307
6308# Not every filesystem supports hard links
6309
6310if test -z "$LN" ; then
6311 case $ac_sys_system in
6312 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 *) LN=ln;;
6314 esac
6315fi
6316
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006317# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006318
6319ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6323$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
6325# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006326if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 withval=$with_pydebug;
6328if test "$withval" != no
6329then
6330
Matthias Kloseb9621712010-04-24 17:59:49 +00006331$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6334$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006336 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006337else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339fi
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344
6345
T. Woutersddbfa2c2017-05-23 01:30:49 +02006346# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6347# the ABI. This allows enabling assertions without changing the ABI.
6348assertions='false'
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6350$as_echo_n "checking for --with-assertions... " >&6; }
6351
6352# Check whether --with-assertions was given.
6353if test "${with_assertions+set}" = set; then :
6354 withval=$with_assertions;
6355if test "$withval" != no
6356then
6357 assertions='true'
6358fi
6359fi
6360
6361if test "$assertions" = 'true'; then
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6363$as_echo "yes" >&6; }
6364elif test "$Py_DEBUG" = 'true'; then
6365 assertions='true'
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6367$as_echo "implied by --with-pydebug" >&6; }
6368else
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
Brett Cannon63d98bc2016-09-06 17:12:40 -07006373# Enable optimization flags
6374
6375
6376Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6378$as_echo_n "checking for --enable-optimizations... " >&6; }
6379# Check whether --enable-optimizations was given.
6380if test "${enable_optimizations+set}" = set; then :
6381 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006382if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006383then
6384 Py_OPT='true'
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6386$as_echo "yes" >&6; };
6387else
6388 Py_OPT='false'
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; };
6391fi
6392else
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006398 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6399 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006400 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006401 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006402 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006403 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006404 DEF_MAKE_RULE="build_all"
6405else
6406 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006407 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006408 DEF_MAKE_RULE="all"
6409fi
6410
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006411# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6413$as_echo_n "checking for --with-lto... " >&6; }
6414
6415# Check whether --with-lto was given.
6416if test "${with_lto+set}" = set; then :
6417 withval=$with_lto;
6418if test "$withval" != no
6419then
6420 Py_LTO='true'
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6422$as_echo "yes" >&6; };
6423else
6424 Py_LTO='false'
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; };
6427fi
6428else
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
6431fi
6432
6433if test "$Py_LTO" = 'true' ; then
6434 case $CC in
6435 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006436 case $ac_sys_system in
6437 Darwin*)
6438 # Any changes made here should be reflected in the GCC+Darwin case below
6439 LTOFLAGS="-flto -Wl,-export_dynamic"
6440 ;;
6441 *)
6442 LTOFLAGS="-flto"
6443 ;;
6444 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006445 ;;
6446 *gcc*)
6447 case $ac_sys_system in
6448 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006449 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006450 ;;
6451 *)
6452 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6453 ;;
6454 esac
6455 ;;
6456 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006457 CFLAGS="$CFLAGS $LTOFLAGS"
6458 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006459fi
6460
Brett Cannon7188a3e2015-09-18 15:13:44 -07006461# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006462
6463
6464
6465
6466
Gregory P. Smith799520c2016-09-07 16:10:00 -07006467# Make this work on systems where llvm tools are not installed with their
6468# normal names in the default $PATH (ie: Ubuntu). They exist under the
6469# non-suffixed name in their versioned llvm directory.
6470llvm_bin_dir=''
6471llvm_path="${PATH}"
6472if test "${CC}" = "clang"
6473then
6474 clang_bin=`which clang`
6475 # Some systems install clang elsewhere as a symlink to the real path
6476 # which is where the related llvm tools are located.
6477 if test -L "${clang_bin}"
6478 then
6479 clang_dir=`dirname "${clang_bin}"`
6480 clang_bin=`readlink "${clang_bin}"`
6481 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6482 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6483 fi
6484fi
Zachary Ware5af85642015-12-21 12:09:17 -06006485
Gregory P. Smith799520c2016-09-07 16:10:00 -07006486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6487$as_echo_n "checking target system type... " >&6; }
6488if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006489 $as_echo_n "(cached) " >&6
6490else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006491 if test "x$target_alias" = x; then
6492 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006493else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6495 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6496fi
6497
6498fi
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6500$as_echo "$ac_cv_target" >&6; }
6501case $ac_cv_target in
6502*-*-*) ;;
6503*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6504esac
6505target=$ac_cv_target
6506ac_save_IFS=$IFS; IFS='-'
6507set x $ac_cv_target
6508shift
6509target_cpu=$1
6510target_vendor=$2
6511shift; shift
6512# Remember, the first character of IFS is used to create $*,
6513# except with old shells:
6514target_os=$*
6515IFS=$ac_save_IFS
6516case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6517
6518
6519# The aliases save the names the user supplied, while $host etc.
6520# will get canonicalized.
6521test -n "$target_alias" &&
6522 test "$program_prefix$program_suffix$program_transform_name" = \
6523 NONENONEs,x,x, &&
6524 program_prefix=${target_alias}-
6525# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6526set dummy $target_alias-llvm-profdata; ac_word=$2
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6528$as_echo_n "checking for $ac_word... " >&6; }
6529if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6530 $as_echo_n "(cached) " >&6
6531else
6532 case $LLVM_PROFDATA in
6533 [\\/]* | ?:[\\/]*)
6534 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6535 ;;
6536 *)
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006539do
6540 IFS=$as_save_IFS
6541 test -z "$as_dir" && as_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546 break 2
6547 fi
6548done
6549 done
6550IFS=$as_save_IFS
6551
Gregory P. Smith799520c2016-09-07 16:10:00 -07006552 ;;
6553esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006554fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006555LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6556if test -n "$LLVM_PROFDATA"; then
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6558$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006559else
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }
6562fi
6563
6564
Gregory P. Smith799520c2016-09-07 16:10:00 -07006565if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6566 if test "$build" = "$target"; then
6567 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6568 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6569set dummy llvm-profdata; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6573 $as_echo_n "(cached) " >&6
6574else
6575 case $ac_pt_LLVM_PROFDATA in
6576 [\\/]* | ?:[\\/]*)
6577 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6578 ;;
6579 *)
6580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in ${llvm_path}
6582do
6583 IFS=$as_save_IFS
6584 test -z "$as_dir" && as_dir=.
6585 for ac_exec_ext in '' $ac_executable_extensions; do
6586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589 break 2
6590 fi
6591done
6592 done
6593IFS=$as_save_IFS
6594
6595 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6596 ;;
6597esac
6598fi
6599ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6600if test -n "$ac_pt_LLVM_PROFDATA"; then
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6602$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6603else
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6609 else
6610 LLVM_PROFDATA="''"
6611 fi
6612else
6613 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6614fi
6615
6616
6617if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6618then
6619 LLVM_PROF_FOUND="found"
6620else
6621 LLVM_PROF_FOUND="not-found"
6622fi
6623if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6624then
6625 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6626 if test -n "${found_llvm_profdata}"
6627 then
6628 # llvm-profdata isn't directly in $PATH in some cases.
6629 # https://apple.stackexchange.com/questions/197053/
6630 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6631 LLVM_PROF_FOUND=found
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6633$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6634 fi
6635fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636LLVM_PROF_ERR=no
6637case $CC in
6638 *clang*)
6639 # Any changes made here should be reflected in the GCC+Darwin case below
6640 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6641 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006642 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006643 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6644 if test $LLVM_PROF_FOUND = not-found
6645 then
6646 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 if test "${REQUIRE_PGO}" = "yes"
6648 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006649 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006650 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651 fi
6652 ;;
6653 *gcc*)
6654 case $ac_sys_system in
6655 Darwin*)
6656 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6657 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006659 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661 then
6662 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006663 if test "${REQUIRE_PGO}" = "yes"
6664 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006665 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006666 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006667 fi
6668 ;;
6669 *)
6670 PGO_PROF_GEN_FLAG="-fprofile-generate"
6671 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6672 LLVM_PROF_MERGER="true"
6673 LLVM_PROF_FILE=""
6674 ;;
6675 esac
6676 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006677 *icc*)
6678 PGO_PROF_GEN_FLAG="-prof-gen"
6679 PGO_PROF_USE_FLAG="-prof-use"
6680 LLVM_PROF_MERGER="true"
6681 LLVM_PROF_FILE=""
6682 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683esac
6684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6686# merged with this chunk of code?
6687
6688# Optimizer/debugger flags
6689# ------------------------
6690# (The following bit of code is complicated enough - please keep things
6691# indented properly. Just pretend you're editing Python code. ;-)
6692
6693# There are two parallel sets of case statements below, one that checks to
6694# see if OPT was set and one that does BASECFLAGS setting based upon
6695# compiler and platform. BASECFLAGS tweaks need to be made even if the
6696# user set OPT.
6697
6698# tweak OPT based on compiler and platform, only if the user didn't set
6699# it on the command line
6700
Victor Stinner9ed34a82017-05-02 22:35:58 +02006701
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006702if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703then
6704 case $GCC in
6705 yes)
6706 if test "$CC" != 'g++' ; then
6707 STRICT_PROTO="-Wstrict-prototypes"
6708 fi
6709 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6710 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6711 WRAP="-fwrapv"
6712 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006713
Stefan Krahaf04ff22011-12-08 22:20:31 +01006714 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006715 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006716 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006717 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006718 *)
6719 if $CC --version 2>&1 | grep -q clang
6720 then
6721 cc_is_clang=1
6722 else
6723 cc_is_clang=
6724 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006725 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006726
Victor Stinner35f3d242017-04-21 12:35:24 +02006727 if test -n "${cc_is_clang}"
6728 then
6729 # Clang also needs -fwrapv
6730 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006731 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6732 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006733 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006734 fi
6735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736 case $ac_cv_prog_cc_g in
6737 yes)
6738 if test "$Py_DEBUG" = 'true' ; then
6739 # Optimization messes up debuggers, so turn it off for
6740 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006741 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006742 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006743 else
Victor Stinner28205b22017-04-21 11:24:34 +02006744 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006745 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 else
Victor Stinner28205b22017-04-21 11:24:34 +02006747 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006748 fi
6749 ;;
6750 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006751 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752 ;;
6753 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006754
Victor Stinner826f83f2017-04-28 15:07:10 +02006755 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757 case $ac_sys_system in
6758 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6759 ;;
6760 esac
6761 ;;
6762
6763 *)
6764 OPT="-O"
6765 ;;
6766 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
6768
6769
6770
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772# The -arch flags for universal builds on OSX
6773UNIVERSAL_ARCH_FLAGS=
6774
6775
6776# tweak BASECFLAGS based on compiler and platform
6777case $GCC in
6778yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006779 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006780
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6782$as_echo_n "checking for -Wextra... " >&6; }
6783 ac_save_cc="$CC"
6784 CC="$CC -Wextra -Werror"
6785 if ${ac_cv_extra_warnings+:} false; then :
6786 $as_echo_n "(cached) " >&6
6787else
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789/* end confdefs.h. */
6790
6791
6792int
6793main ()
6794{
6795
6796 ;
6797 return 0;
6798}
6799
6800_ACEOF
6801if ac_fn_c_try_compile "$LINENO"; then :
6802
6803 ac_cv_extra_warnings=yes
6804
6805else
6806
6807 ac_cv_extra_warnings=no
6808
6809fi
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6811fi
6812
6813 CC="$ac_save_cc"
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6815$as_echo "$ac_cv_extra_warnings" >&6; }
6816
6817 if test $ac_cv_extra_warnings = yes
6818 then
6819 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6820 fi
6821
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822 # Python doesn't violate C99 aliasing rules, but older versions of
6823 # GCC produce warnings for legal Python code. Enable
6824 # -fno-strict-aliasing on versions of GCC that support but produce
6825 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6827$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828 ac_save_cc="$CC"
6829 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006831 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006833else
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006836
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006838int
6839main ()
6840{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006841
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006842 ;
6843 return 0;
6844}
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006847if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006848
6849 CC="$ac_save_cc -fstrict-aliasing"
6850 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852/* end confdefs.h. */
6853
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006854 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006855int
6856main ()
6857{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006858double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859 ;
6860 return 0;
6861}
Matthias Kloseb159a552010-04-25 21:00:44 +00006862
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006864if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006865
6866 ac_cv_no_strict_aliasing=no
6867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868else
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
6870 ac_cv_no_strict_aliasing=yes
6871
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006872fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006874
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006875else
Matthias Kloseb159a552010-04-25 21:00:44 +00006876
6877 ac_cv_no_strict_aliasing=no
6878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006881fi
6882
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006883 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6886$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006887 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 then
6889 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6890 fi
6891
Zachary Ware5af85642015-12-21 12:09:17 -06006892 # ICC doesn't recognize the option, but only emits a warning
6893 ## XXX does it emit an unused result warning and can it be disabled?
6894 case "$CC" in
6895 *icc*)
6896 ac_cv_disable_unused_result_warning=no
6897 ;;
6898 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6900$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6901 ac_save_cc="$CC"
6902 CC="$CC -Wunused-result -Werror"
6903 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006904 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006905 $as_echo_n "(cached) " >&6
6906else
6907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908/* end confdefs.h. */
6909
6910
6911int
6912main ()
6913{
6914
6915 ;
6916 return 0;
6917}
6918
6919_ACEOF
6920if ac_fn_c_try_compile "$LINENO"; then :
6921
6922 ac_cv_disable_unused_result_warning=yes
6923
6924else
6925
6926 ac_cv_disable_unused_result_warning=no
6927
6928fi
6929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6930fi
6931
6932 CFLAGS="$save_CFLAGS"
6933 CC="$ac_save_cc"
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6935$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006936 ;;
6937 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006938
6939 if test $ac_cv_disable_unused_result_warning = yes
6940 then
6941 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006942 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6943 fi
6944
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6946$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6947 ac_save_cc="$CC"
6948 CC="$CC -Wunused-parameter -Werror"
6949 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6950 $as_echo_n "(cached) " >&6
6951else
6952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6953/* end confdefs.h. */
6954
6955
6956int
6957main ()
6958{
6959
6960 ;
6961 return 0;
6962}
6963
6964_ACEOF
6965if ac_fn_c_try_compile "$LINENO"; then :
6966
6967 ac_cv_disable_unused_parameter_warning=yes
6968
6969else
6970
6971 ac_cv_disable_unused_parameter_warning=no
6972
6973fi
6974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6975fi
6976
6977 CC="$ac_save_cc"
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6979$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6980
6981 if test $ac_cv_disable_unused_parameter_warning = yes
6982 then
6983 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6984 fi
6985
6986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6987$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6988 ac_save_cc="$CC"
6989 CC="$CC -Wmissing-field-initializers -Werror"
6990 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6991 $as_echo_n "(cached) " >&6
6992else
6993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994/* end confdefs.h. */
6995
6996
6997int
6998main ()
6999{
7000
7001 ;
7002 return 0;
7003}
7004
7005_ACEOF
7006if ac_fn_c_try_compile "$LINENO"; then :
7007
7008 ac_cv_disable_missing_field_initializers=yes
7009
7010else
7011
7012 ac_cv_disable_missing_field_initializers=no
7013
7014fi
7015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7016fi
7017
7018 CC="$ac_save_cc"
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7020$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7021
7022 if test $ac_cv_disable_missing_field_initializers = yes
7023 then
7024 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007025 fi
7026
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7028$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7029 ac_save_cc="$CC"
7030 CC="$CC -Wsign-compare"
7031 save_CFLAGS="$CFLAGS"
7032 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7033 $as_echo_n "(cached) " >&6
7034else
7035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036/* end confdefs.h. */
7037
7038
7039int
7040main ()
7041{
7042
7043 ;
7044 return 0;
7045}
7046
7047_ACEOF
7048if ac_fn_c_try_compile "$LINENO"; then :
7049
7050 ac_cv_enable_sign_compare_warning=yes
7051
7052else
7053
7054 ac_cv_enable_sign_compare_warning=no
7055
7056fi
7057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7058fi
7059
7060 CFLAGS="$save_CFLAGS"
7061 CC="$ac_save_cc"
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7063$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7064
7065 if test $ac_cv_enable_sign_compare_warning = yes
7066 then
7067 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7068 fi
7069
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7071$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7072 ac_save_cc="$CC"
7073 CC="$CC -Wunreachable-code"
7074 save_CFLAGS="$CFLAGS"
7075 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
7078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7079/* end confdefs.h. */
7080
7081
7082int
7083main ()
7084{
7085
7086 ;
7087 return 0;
7088}
7089
7090_ACEOF
7091if ac_fn_c_try_compile "$LINENO"; then :
7092
7093 ac_cv_enable_unreachable_code_warning=yes
7094
7095else
7096
7097 ac_cv_enable_unreachable_code_warning=no
7098
7099fi
7100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7101fi
7102
7103 CFLAGS="$save_CFLAGS"
7104 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007105
7106 # Don't enable unreachable code warning in debug mode, since it usually
7107 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007108 # Issue #24324: Unfortunately, the unreachable code warning does not work
7109 # correctly on gcc and has been silently removed from the compiler.
7110 # It is supported on clang but on OS X systems gcc may be an alias
7111 # for clang. Try to determine if the compiler is not really gcc and,
7112 # if so, only then enable the warning.
7113 if test $ac_cv_enable_unreachable_code_warning = yes && \
7114 test "$Py_DEBUG" != "true" && \
7115 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007116 then
7117 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007118 else
7119 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007120 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7122$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007123
Victor Stinner193ee0a2017-02-06 14:24:00 +01007124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7125$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Werror=implicit-function-declaration"
7128 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7129 $as_echo_n "(cached) " >&6
7130else
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132/* end confdefs.h. */
7133
7134
7135int
7136main ()
7137{
7138
7139 ;
7140 return 0;
7141}
7142
7143_ACEOF
7144if ac_fn_c_try_compile "$LINENO"; then :
7145
7146 ac_cv_enable_implicit_function_declaration_error=yes
7147
7148else
7149
7150 ac_cv_enable_implicit_function_declaration_error=no
7151
7152fi
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7154fi
7155
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7158$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7159
7160 if test $ac_cv_enable_implicit_function_declaration_error = yes
7161 then
7162 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7163 fi
7164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7166 # support. Without this, treatment of subnormals doesn't follow
7167 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007168 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169 alpha*)
7170 BASECFLAGS="$BASECFLAGS -mieee"
7171 ;;
7172 esac
7173
7174 case $ac_sys_system in
7175 SCO_SV*)
7176 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7177 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007178
7179 # is there any other compiler on Darwin besides gcc?
7180 Darwin*)
7181 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7182 # used to be here, but non-Apple gcc doesn't accept them.
7183 if test "${CC}" = gcc
7184 then
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007186$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007187 case "${UNIVERSALSDK}" in
7188 */MacOSX10.4u.sdk)
7189 # Build using 10.4 SDK, force usage of gcc when the
7190 # compiler is gcc, otherwise the user will get very
7191 # confusing error messages when building on OSX 10.6
7192 CC=gcc-4.0
7193 CPP=cpp-4.0
7194 ;;
7195 esac
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007197$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007198 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199
Ned Deily87adb6e2013-10-18 21:09:56 -07007200 if test "${enable_universalsdk}"
7201 then
7202 case "$UNIVERSAL_ARCHS" in
7203 32-bit)
7204 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7205 LIPO_32BIT_FLAGS=""
7206 ARCH_RUN_32BIT=""
7207 ;;
7208 64-bit)
7209 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7210 LIPO_32BIT_FLAGS=""
7211 ARCH_RUN_32BIT="true"
7212 ;;
7213 all)
7214 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7215 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7216 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7217 ;;
7218 intel)
7219 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7220 LIPO_32BIT_FLAGS="-extract i386"
7221 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7222 ;;
7223 intel-32)
7224 UNIVERSAL_ARCH_FLAGS="-arch i386"
7225 LIPO_32BIT_FLAGS=""
7226 ARCH_RUN_32BIT=""
7227 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007228 intel-64)
7229 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7230 LIPO_32BIT_FLAGS=""
7231 ARCH_RUN_32BIT="true"
7232 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007233 3-way)
7234 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7235 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7236 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7237 ;;
7238 *)
7239 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7240 ;;
7241 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242
Ned Deily87adb6e2013-10-18 21:09:56 -07007243 if test "${UNIVERSALSDK}" != "/"
7244 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007245 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7246 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007247 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007248 else
7249 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7250 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007251 fi
7252 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253
Ned Deily87adb6e2013-10-18 21:09:56 -07007254 # Calculate an appropriate deployment target for this build:
7255 # The deployment target value is used explicitly to enable certain
7256 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007257 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007258 # component of the string returned by distutils.get_platform().
7259 #
7260 # Use the value from:
7261 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7262 # 2. the operating system version of the build machine if >= 10.6
7263 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7264 # below to pick either 10.3, 10.4, or 10.5 as the target.
7265 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7268$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007269 cur_target_major=`sw_vers -productVersion | \
7270 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7271 cur_target_minor=`sw_vers -productVersion | \
7272 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7273 cur_target="${cur_target_major}.${cur_target_minor}"
7274 if test ${cur_target_major} -eq 10 && \
7275 test ${cur_target_minor} -ge 3 && \
7276 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007277 then
Ned Deily36820b62014-06-25 13:44:22 -07007278 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007279 cur_target=10.3
7280 if test ${enable_universalsdk}
7281 then
7282 case "$UNIVERSAL_ARCHS" in
7283 all|3-way|intel|64-bit)
7284 # These configurations were first supported in 10.5
7285 cur_target='10.5'
7286 ;;
7287 esac
7288 else
7289 if test `/usr/bin/arch` = "i386"
7290 then
7291 # 10.4 was the first release to support Intel archs
7292 cur_target="10.4"
7293 fi
7294 fi
7295 fi
7296 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007297
Ned Deily87adb6e2013-10-18 21:09:56 -07007298 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7299 # environment with a value that is the same as what we'll use
7300 # in the Makefile to ensure that we'll get the same compiler
7301 # environment during configure and build time.
7302 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7303 export MACOSX_DEPLOYMENT_TARGET
7304 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7306$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007307
Ned Deily87adb6e2013-10-18 21:09:56 -07007308 # end of Darwin* tests
7309 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310 esac
7311 ;;
7312
7313*)
7314 case $ac_sys_system in
7315 OpenUNIX*|UnixWare*)
7316 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7317 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 SCO_SV*)
7319 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7320 ;;
7321 esac
7322 ;;
7323esac
7324
Zachary Ware5af85642015-12-21 12:09:17 -06007325# ICC needs -fp-model strict or floats behave badly
7326case "$CC" in
7327*icc*)
7328 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7329 ;;
7330esac
7331
T. Woutersddbfa2c2017-05-23 01:30:49 +02007332if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333 :
7334else
7335 OPT="-DNDEBUG $OPT"
7336fi
7337
7338if test "$ac_arch_flags"
7339then
7340 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7341fi
7342
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343# On some compilers, pthreads are available without further options
7344# (e.g. MacOS X). On some of these systems, the compiler will not
7345# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7346# So we have to see first whether pthreads are available without
7347# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7349$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007350if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007351 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352else
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354 ac_cv_pthread_is_default=no
7355else
Matthias Kloseb9621712010-04-24 17:59:49 +00007356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007357/* end confdefs.h. */
7358
Stefan Krah7dba5942012-11-22 22:49:11 +01007359#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360#include <pthread.h>
7361
7362void* routine(void* p){return NULL;}
7363
7364int main(){
7365 pthread_t p;
7366 if(pthread_create(&p,NULL,routine,NULL)!=0)
7367 return 1;
7368 (void)pthread_detach(p);
7369 return 0;
7370}
7371
7372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007373if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374
7375 ac_cv_pthread_is_default=yes
7376 ac_cv_kthread=no
7377 ac_cv_pthread=no
7378
7379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384fi
7385
7386
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387fi
7388
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7390$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391
7392
7393if test $ac_cv_pthread_is_default = yes
7394then
7395 ac_cv_kpthread=no
7396else
7397# -Kpthread, if available, provides the right #defines
7398# and linker options to make pthread_create available
7399# Some compilers won't report that they do not support -Kpthread,
7400# so we need to run a program to see whether it really made the
7401# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7403$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007404if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406else
7407 ac_save_cc="$CC"
7408CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007409if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 ac_cv_kpthread=no
7411else
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413/* end confdefs.h. */
7414
Stefan Krah7dba5942012-11-22 22:49:11 +01007415#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416#include <pthread.h>
7417
7418void* routine(void* p){return NULL;}
7419
7420int main(){
7421 pthread_t p;
7422 if(pthread_create(&p,NULL,routine,NULL)!=0)
7423 return 1;
7424 (void)pthread_detach(p);
7425 return 0;
7426}
7427
7428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430 ac_cv_kpthread=yes
7431else
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436fi
7437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438CC="$ac_save_cc"
7439fi
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7442$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443fi
7444
7445if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7446then
7447# -Kthread, if available, provides the right #defines
7448# and linker options to make pthread_create available
7449# Some compilers won't report that they do not support -Kthread,
7450# so we need to run a program to see whether it really made the
7451# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7453$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007454if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456else
7457 ac_save_cc="$CC"
7458CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007459if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460 ac_cv_kthread=no
7461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463/* end confdefs.h. */
7464
Stefan Krah7dba5942012-11-22 22:49:11 +01007465#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466#include <pthread.h>
7467
7468void* routine(void* p){return NULL;}
7469
7470int main(){
7471 pthread_t p;
7472 if(pthread_create(&p,NULL,routine,NULL)!=0)
7473 return 1;
7474 (void)pthread_detach(p);
7475 return 0;
7476}
7477
7478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007479if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480 ac_cv_kthread=yes
7481else
Matthias Kloseb9621712010-04-24 17:59:49 +00007482 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486fi
7487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488CC="$ac_save_cc"
7489fi
7490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7492$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493fi
7494
7495if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7496then
7497# -pthread, if available, provides the right #defines
7498# and linker options to make pthread_create available
7499# Some compilers won't report that they do not support -pthread,
7500# so we need to run a program to see whether it really made the
7501# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7503$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007504if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506else
7507 ac_save_cc="$CC"
7508CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007509if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510 ac_cv_pthread=no
7511else
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513/* end confdefs.h. */
7514
Stefan Krah7dba5942012-11-22 22:49:11 +01007515#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516#include <pthread.h>
7517
7518void* routine(void* p){return NULL;}
7519
7520int main(){
7521 pthread_t p;
7522 if(pthread_create(&p,NULL,routine,NULL)!=0)
7523 return 1;
7524 (void)pthread_detach(p);
7525 return 0;
7526}
7527
7528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007529if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530 ac_cv_pthread=yes
7531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538CC="$ac_save_cc"
7539fi
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7542$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
7544
7545# If we have set a CC compiler flag for thread support then
7546# check if it works for CXX, too.
7547ac_cv_cxx_thread=no
7548if test ! -z "$CXX"
7549then
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7551$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552ac_save_cxx="$CXX"
7553
7554if test "$ac_cv_kpthread" = "yes"
7555then
7556 CXX="$CXX -Kpthread"
7557 ac_cv_cxx_thread=yes
7558elif test "$ac_cv_kthread" = "yes"
7559then
7560 CXX="$CXX -Kthread"
7561 ac_cv_cxx_thread=yes
7562elif test "$ac_cv_pthread" = "yes"
7563then
7564 CXX="$CXX -pthread"
7565 ac_cv_cxx_thread=yes
7566fi
7567
7568if test $ac_cv_cxx_thread = yes
7569then
7570 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7571 $CXX -c conftest.$ac_ext 2>&5
7572 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7573 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7574 then
7575 ac_cv_cxx_thread=yes
7576 else
7577 ac_cv_cxx_thread=no
7578 fi
7579 rm -fr conftest*
7580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7582$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584CXX="$ac_save_cxx"
7585
7586
7587# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7589$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007590if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594/* end confdefs.h. */
7595#include <stdlib.h>
7596#include <stdarg.h>
7597#include <string.h>
7598#include <float.h>
7599
7600int
7601main ()
7602{
7603
7604 ;
7605 return 0;
7606}
7607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007608if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609 ac_cv_header_stdc=yes
7610else
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7614
7615if test $ac_cv_header_stdc = yes; then
7616 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618/* end confdefs.h. */
7619#include <string.h>
7620
7621_ACEOF
7622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 $EGREP "memchr" >/dev/null 2>&1; then :
7624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625else
7626 ac_cv_header_stdc=no
7627fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007628rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629
7630fi
7631
7632if test $ac_cv_header_stdc = yes; then
7633 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635/* end confdefs.h. */
7636#include <stdlib.h>
7637
7638_ACEOF
7639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 $EGREP "free" >/dev/null 2>&1; then :
7641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642else
7643 ac_cv_header_stdc=no
7644fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007645rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646
7647fi
7648
7649if test $ac_cv_header_stdc = yes; then
7650 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652 :
7653else
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655/* end confdefs.h. */
7656#include <ctype.h>
7657#include <stdlib.h>
7658#if ((' ' & 0x0FF) == 0x020)
7659# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7660# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7661#else
7662# define ISLOWER(c) \
7663 (('a' <= (c) && (c) <= 'i') \
7664 || ('j' <= (c) && (c) <= 'r') \
7665 || ('s' <= (c) && (c) <= 'z'))
7666# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7667#endif
7668
7669#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7670int
7671main ()
7672{
7673 int i;
7674 for (i = 0; i < 256; i++)
7675 if (XOR (islower (i), ISLOWER (i))
7676 || toupper (i) != TOUPPER (i))
7677 return 2;
7678 return 0;
7679}
7680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007681if ac_fn_c_try_run "$LINENO"; then :
7682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688fi
7689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690fi
7691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7693$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694if test $ac_cv_header_stdc = yes; then
7695
Matthias Kloseb9621712010-04-24 17:59:49 +00007696$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697
7698fi
7699
stratakise768c862018-01-23 16:11:24 +01007700for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007701fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007702ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007703sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007704unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007705poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007706sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007707sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007708sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007709sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007710sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007711libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007712linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007713sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007714do :
7715 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7716ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007717if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007719#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007720_ACEOF
7721
7722fi
7723
Guido van Rossum627b2d71993-12-24 10:39:16 +00007724done
7725
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007726ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007727for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7730$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007731if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007735/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736#include <sys/types.h>
7737#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007738
Martin v. Löwis11437992002-04-12 09:54:03 +00007739int
7740main ()
7741{
7742if ((DIR *) 0)
7743return 0;
7744 ;
7745 return 0;
7746}
7747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007749 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007750else
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755eval ac_res=\$$as_ac_Header
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7757$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007761_ACEOF
7762
7763ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007765
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766done
7767# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7768if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7770$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007771if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773else
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778/* Override any GCC internal prototype to avoid an error.
7779 Use char because int might match the return type of a GCC
7780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007781#ifdef __cplusplus
7782extern "C"
7783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007784char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007785int
7786main ()
7787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 ;
7790 return 0;
7791}
7792_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793for ac_lib in '' dir; do
7794 if test -z "$ac_lib"; then
7795 ac_res="none required"
7796 else
7797 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007805 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808done
Victor Stinnere0be4232011-10-25 13:06:09 +02007809if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811else
7812 ac_cv_search_opendir=no
7813fi
7814rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007815LIBS=$ac_func_search_save_LIBS
7816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7818$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007820if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007822
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Michael W. Hudson54241132001-12-07 15:38:26 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7827$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007828if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007830else
7831 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835/* Override any GCC internal prototype to avoid an error.
7836 Use char because int might match the return type of a GCC
7837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007838#ifdef __cplusplus
7839extern "C"
7840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007841char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007842int
7843main ()
7844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ;
7847 return 0;
7848}
7849_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850for ac_lib in '' x; do
7851 if test -z "$ac_lib"; then
7852 ac_res="none required"
7853 else
7854 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007855 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860rm -f core conftest.err conftest.$ac_objext \
7861 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007862 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865done
Victor Stinnere0be4232011-10-25 13:06:09 +02007866if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868else
7869 ac_cv_search_opendir=no
7870fi
7871rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007872LIBS=$ac_func_search_save_LIBS
7873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7875$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007877if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880fi
7881
7882fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7885$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007886if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007891#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007892int
7893main ()
7894{
7895return makedev(0, 0);
7896 ;
7897 return 0;
7898}
7899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901 ac_cv_header_sys_types_h_makedev=yes
7902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007907
7908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7910$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007911
7912if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007913ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007914if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007915
Matthias Kloseb9621712010-04-24 17:59:49 +00007916$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007917
7918fi
7919
7920
7921
7922 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007925
Matthias Kloseb9621712010-04-24 17:59:49 +00007926$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007927
7928fi
7929
7930
7931 fi
7932fi
7933
Michael W. Hudson54241132001-12-07 15:38:26 +00007934
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007935# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7936# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7937SAVE_CFLAGS=$CFLAGS
7938CFLAGS="-std=c99 $CFLAGS"
7939for ac_header in bluetooth/bluetooth.h
7940do :
7941 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7942if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7943 cat >>confdefs.h <<_ACEOF
7944#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7945_ACEOF
7946
7947fi
7948
7949done
7950
7951CFLAGS=$SAVE_CFLAGS
7952
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007953# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7954for ac_header in net/if.h
7955do :
7956 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7957#ifdef STDC_HEADERS
7958# include <stdlib.h>
7959# include <stddef.h>
7960#else
7961# ifdef HAVE_STDLIB_H
7962# include <stdlib.h>
7963# endif
7964#endif
7965#ifdef HAVE_SYS_SOCKET_H
7966# include <sys/socket.h>
7967#endif
7968
7969"
Victor Stinnere0be4232011-10-25 13:06:09 +02007970if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007971 cat >>confdefs.h <<_ACEOF
7972#define HAVE_NET_IF_H 1
7973_ACEOF
7974
7975fi
7976
7977done
7978
7979
Martin v. Löwis11017b12006-01-14 18:12:57 +00007980# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007981for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007982do :
7983 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00007984#ifdef HAVE_ASM_TYPES_H
7985#include <asm/types.h>
7986#endif
7987#ifdef HAVE_SYS_SOCKET_H
7988#include <sys/socket.h>
7989#endif
7990
Matthias Kloseb9621712010-04-24 17:59:49 +00007991"
Victor Stinnere0be4232011-10-25 13:06:09 +02007992if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007993 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007994#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007995_ACEOF
7996
7997fi
7998
7999done
8000
8001
caaveryeffc12f2017-09-06 18:18:10 -04008002for ac_header in linux/vm_sockets.h
8003do :
8004 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8005#ifdef HAVE_SYS_SOCKET_H
8006#include <sys/socket.h>
8007#endif
8008
8009"
8010if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_LINUX_VM_SOCKETS_H 1
8013_ACEOF
8014
8015fi
8016
8017done
8018
8019
Charles-François Natali47413c12011-10-06 19:47:44 +02008020# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008021for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008022do :
8023 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8024ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8025#ifdef HAVE_SYS_SOCKET_H
8026#include <sys/socket.h>
8027#endif
8028
8029"
8030if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8031 cat >>confdefs.h <<_ACEOF
8032#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8033_ACEOF
8034
8035fi
8036
8037done
8038
8039
Guido van Rossum627b2d71993-12-24 10:39:16 +00008040# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008041was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8043$as_echo_n "checking for clock_t in time.h... " >&6; }
8044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
8048_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008051 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052else
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
8054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008056
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008057
Guido van Rossum627b2d71993-12-24 10:39:16 +00008058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008059rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008060
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8062$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8065$as_echo_n "checking for makedev... " >&6; }
8066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008067/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008068
Jesus Cea740f53a2010-04-28 11:35:30 +00008069#if defined(MAJOR_IN_MKDEV)
8070#include <sys/mkdev.h>
8071#elif defined(MAJOR_IN_SYSMACROS)
8072#include <sys/sysmacros.h>
8073#else
8074#include <sys/types.h>
8075#endif
8076
Neal Norwitz11690112002-07-30 01:08:28 +00008077int
8078main ()
8079{
Jesus Cea740f53a2010-04-28 11:35:30 +00008080
8081 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008082 ;
8083 return 0;
8084}
Matthias Kloseb159a552010-04-25 21:00:44 +00008085
Neal Norwitz11690112002-07-30 01:08:28 +00008086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008087if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008088 ac_cv_has_makedev=yes
8089else
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008092rm -f core conftest.err conftest.$ac_objext \
8093 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8095$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008096if test "$ac_cv_has_makedev" = "yes"; then
8097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008099
8100fi
8101
Christian Heimes985ecdc2013-11-20 11:46:18 +01008102# byte swapping
8103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8104$as_echo_n "checking for le64toh... " >&6; }
8105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106/* end confdefs.h. */
8107
8108#ifdef HAVE_ENDIAN_H
8109#include <endian.h>
8110#elif defined(HAVE_SYS_ENDIAN_H)
8111#include <sys/endian.h>
8112#endif
8113
8114int
8115main ()
8116{
8117
8118 le64toh(1)
8119 ;
8120 return 0;
8121}
8122
8123_ACEOF
8124if ac_fn_c_try_link "$LINENO"; then :
8125 ac_cv_has_le64toh=yes
8126else
8127 ac_cv_has_le64toh=no
8128fi
8129rm -f core conftest.err conftest.$ac_objext \
8130 conftest$ac_exeext conftest.$ac_ext
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8132$as_echo "$ac_cv_has_le64toh" >&6; }
8133if test "$ac_cv_has_le64toh" = "yes"; then
8134
8135$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8136
8137fi
8138
Martin v. Löwis399a6892002-10-04 10:22:02 +00008139use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008140# Don't use largefile support for GNU/Hurd
8141case $ac_sys_system in GNU*)
8142 use_lfs=no
8143esac
8144
Martin v. Löwis399a6892002-10-04 10:22:02 +00008145if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008146# Two defines needed to enable largefile support on various platforms
8147# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008148case $ac_sys_system/$ac_sys_release in
8149AIX*)
8150
8151$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8152
8153 ;;
8154esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008157
8158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008160
Martin v. Löwis399a6892002-10-04 10:22:02 +00008161fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008162
Guido van Rossum84e7b241996-08-19 21:59:00 +00008163# Add some code to confdefs.h so that the test for off_t works on SCO
8164cat >> confdefs.h <<\EOF
8165#if defined(SCO_DS)
8166#undef _OFF_T
8167#endif
8168EOF
8169
Guido van Rossumef2255b2000-03-10 22:30:29 +00008170# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008171ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008174else
Martin v. Löwis11437992002-04-12 09:54:03 +00008175
8176cat >>confdefs.h <<_ACEOF
8177#define mode_t int
8178_ACEOF
8179
8180fi
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008183if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008185else
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
8190
8191fi
8192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008194if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008196else
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
8198cat >>confdefs.h <<_ACEOF
8199#define pid_t int
8200_ACEOF
8201
8202fi
8203
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008204
Martin v. Löwis11437992002-04-12 09:54:03 +00008205cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008206#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008210if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008212else
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
8214cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008216_ACEOF
8217
8218fi
8219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8221$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008222if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008227#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232 ac_cv_type_uid_t=yes
8233else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008234 ac_cv_type_uid_t=no
8235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008236rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8240$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008241if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242
Matthias Kloseb9621712010-04-24 17:59:49 +00008243$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008244
8245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008247
8248fi
8249
Mark Dickinson983bc162012-12-02 12:11:38 +00008250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008252if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008255
8256fi
8257
Stefan Krah1919b7e2012-03-21 18:25:23 +01008258ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8259if test "x$ac_cv_type___uint128_t" = xyes; then :
8260
8261$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8262
8263fi
8264
Jack Jansendd19cf82001-12-06 22:36:17 +00008265
Michael W. Hudson54241132001-12-07 15:38:26 +00008266# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008267# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268# The cast to long int works around a bug in the HP C Compiler
8269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8271# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8273$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008274if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279else
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 if test "$ac_cv_type_int" = yes; then
8281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008283as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008284See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 else
8286 ac_cv_sizeof_int=0
8287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8292$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293
8294
8295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008297#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008298_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008299
8300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301# The cast to long int works around a bug in the HP C Compiler
8302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8304# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8306$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008307if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008309else
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312else
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 if test "$ac_cv_type_long" = yes; then
8314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008316as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008317See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318 else
8319 ac_cv_sizeof_long=0
8320 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8325$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326
8327
8328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008332
8333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334# The cast to long int works around a bug in the HP C Compiler
8335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8337# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8339$as_echo_n "checking size of long long... " >&6; }
8340if ${ac_cv_sizeof_long_long+:} false; then :
8341 $as_echo_n "(cached) " >&6
8342else
8343 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8344
8345else
8346 if test "$ac_cv_type_long_long" = yes; then
8347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8349as_fn_error 77 "cannot compute sizeof (long long)
8350See \`config.log' for more details" "$LINENO" 5; }
8351 else
8352 ac_cv_sizeof_long_long=0
8353 fi
8354fi
8355
8356fi
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8358$as_echo "$ac_cv_sizeof_long_long" >&6; }
8359
8360
8361
8362cat >>confdefs.h <<_ACEOF
8363#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8364_ACEOF
8365
8366
8367# The cast to long int works around a bug in the HP C Compiler
8368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8370# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8372$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008373if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008375else
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378else
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 if test "$ac_cv_type_void_p" = yes; then
8380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008382as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008383See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384 else
8385 ac_cv_sizeof_void_p=0
8386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8391$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392
8393
8394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008396#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008397_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008398
8399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8405$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 if test "$ac_cv_type_short" = yes; then
8413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008415as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 else
8418 ac_cv_sizeof_short=0
8419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8424$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
8426
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008429#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008431
8432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# The cast to long int works around a bug in the HP C Compiler
8434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8436# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8438$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008441else
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444else
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 if test "$ac_cv_type_float" = yes; then
8446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008448as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008449See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 else
8451 ac_cv_sizeof_float=0
8452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8457$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458
8459
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008462#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008463_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008464
8465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466# The cast to long int works around a bug in the HP C Compiler
8467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8469# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8471$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008474else
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477else
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 if test "$ac_cv_type_double" = yes; then
8479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008481as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008482See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483 else
8484 ac_cv_sizeof_double=0
8485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8490$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491
8492
8493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008496_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008497
8498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499# The cast to long int works around a bug in the HP C Compiler
8500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8504$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008507else
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if test "$ac_cv_type_fpos_t" = yes; then
8512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008514as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_fpos_t=0
8518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8523$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008528#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008530
Michael W. Hudson54241132001-12-07 15:38:26 +00008531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532# The cast to long int works around a bug in the HP C Compiler
8533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8535# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8537$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008538if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008540else
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008542
Martin v. Löwis18e16552006-02-15 17:27:45 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 if test "$ac_cv_type_size_t" = yes; then
8545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008547as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008548See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 else
8550 ac_cv_sizeof_size_t=0
8551 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553
Martin v. Löwis18e16552006-02-15 17:27:45 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8556$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557
8558
8559
Martin v. Löwis18e16552006-02-15 17:27:45 +00008560cat >>confdefs.h <<_ACEOF
8561#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8562_ACEOF
8563
8564
Christian Heimes400adb02008-02-01 08:12:03 +00008565# The cast to long int works around a bug in the HP C Compiler
8566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8570$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008571if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008575
Christian Heimes400adb02008-02-01 08:12:03 +00008576else
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 if test "$ac_cv_type_pid_t" = yes; then
8578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008580as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008581See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008582 else
8583 ac_cv_sizeof_pid_t=0
8584 fi
8585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586
Christian Heimes400adb02008-02-01 08:12:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8589$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008590
8591
8592
8593cat >>confdefs.h <<_ACEOF
8594#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8595_ACEOF
8596
8597
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
8602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8603$as_echo_n "checking size of uintptr_t... " >&6; }
8604if ${ac_cv_sizeof_uintptr_t+:} false; then :
8605 $as_echo_n "(cached) " >&6
8606else
8607 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8608
8609else
8610 if test "$ac_cv_type_uintptr_t" = yes; then
8611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8613as_fn_error 77 "cannot compute sizeof (uintptr_t)
8614See \`config.log' for more details" "$LINENO" 5; }
8615 else
8616 ac_cv_sizeof_uintptr_t=0
8617 fi
8618fi
8619
8620fi
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8622$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8623
8624
8625
8626cat >>confdefs.h <<_ACEOF
8627#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8628_ACEOF
8629
8630
Michael W. Hudson54241132001-12-07 15:38:26 +00008631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8633$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008634have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008636/* end confdefs.h. */
8637
8638int
8639main ()
8640{
8641long double x; x = (long double)0;
8642 ;
8643 return 0;
8644}
8645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008646if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647
8648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008650
8651 have_long_double=yes
8652
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008653fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8656$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008657if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008658# The cast to long int works around a bug in the HP C Compiler
8659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8663$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008664if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008668
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 if test "$ac_cv_type_long_double" = yes; then
8671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008673as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008674See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008675 else
8676 ac_cv_sizeof_long_double=0
8677 fi
8678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8682$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008683
8684
8685
8686cat >>confdefs.h <<_ACEOF
8687#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8688_ACEOF
8689
8690
8691fi
8692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693# The cast to long int works around a bug in the HP C Compiler
8694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8696# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8698$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008703
Thomas Woutersb2137042007-02-01 18:02:27 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 if test "$ac_cv_type__Bool" = yes; then
8706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008708as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008709See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710 else
8711 ac_cv_sizeof__Bool=0
8712 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008714
Thomas Woutersb2137042007-02-01 18:02:27 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8717$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718
8719
8720
Thomas Woutersb2137042007-02-01 18:02:27 +00008721cat >>confdefs.h <<_ACEOF
8722#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8723_ACEOF
8724
8725
Thomas Woutersb2137042007-02-01 18:02:27 +00008726
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008727# The cast to long int works around a bug in the HP C Compiler
8728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8730# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8732$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008733if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008735else
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008737#ifdef HAVE_SYS_TYPES_H
8738#include <sys/types.h>
8739#endif
8740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_off_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749 else
8750 ac_cv_sizeof_off_t=0
8751 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8756$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758
8759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008761#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008763
Michael W. Hudson54241132001-12-07 15:38:26 +00008764
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008765
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8767$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008768if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008769 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8774$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008778fi
8779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780# The cast to long int works around a bug in the HP C Compiler
8781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8785$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008786if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008790#ifdef HAVE_SYS_TYPES_H
8791#include <sys/types.h>
8792#endif
8793#ifdef HAVE_TIME_H
8794#include <time.h>
8795#endif
8796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008799else
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 if test "$ac_cv_type_time_t" = yes; then
8801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008803as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008804See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805 else
8806 ac_cv_sizeof_time_t=0
8807 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8812$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008814
8815
Martin v. Löwis11437992002-04-12 09:54:03 +00008816cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008817#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008818_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008819
Michael W. Hudson54241132001-12-07 15:38:26 +00008820
8821
Trent Mick635f6fb2000-08-23 21:33:05 +00008822# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008823ac_save_cc="$CC"
8824if test "$ac_cv_kpthread" = "yes"
8825then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008826elif test "$ac_cv_kthread" = "yes"
8827then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008828elif test "$ac_cv_pthread" = "yes"
8829then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008830fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8833$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008834have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
8838 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008839int
8840main ()
8841{
Guido van Rossum12580492000-09-24 16:47:19 +00008842pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ;
8844 return 0;
8845}
Matthias Kloseb159a552010-04-25 21:00:44 +00008846
Martin v. Löwis11437992002-04-12 09:54:03 +00008847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008848if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008849 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8853$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008854if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8858# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8860$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865#ifdef HAVE_PTHREAD_H
8866#include <pthread.h>
8867#endif
8868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 if test "$ac_cv_type_pthread_t" = yes; then
8873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008875as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008876See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877 else
8878 ac_cv_sizeof_pthread_t=0
8879 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881
Trent Mick635f6fb2000-08-23 21:33:05 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8884$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886
8887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008889#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892
Trent Mick635f6fb2000-08-23 21:33:05 +00008893fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008894
8895# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8896# This checking will be unnecessary after removing deprecated TLS API.
8897# The cast to long int works around a bug in the HP C Compiler
8898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8900# This bug is HP SR number 8606223364.
8901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8902$as_echo_n "checking size of pthread_key_t... " >&6; }
8903if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8904 $as_echo_n "(cached) " >&6
8905else
8906 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8907"; then :
8908
8909else
8910 if test "$ac_cv_type_pthread_key_t" = yes; then
8911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8913as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8914See \`config.log' for more details" "$LINENO" 5; }
8915 else
8916 ac_cv_sizeof_pthread_key_t=0
8917 fi
8918fi
8919
8920fi
8921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8922$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8923
8924
8925
8926cat >>confdefs.h <<_ACEOF
8927#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8928_ACEOF
8929
8930
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8932$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8933if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8935/* end confdefs.h. */
8936#include <pthread.h>
8937int
8938main ()
8939{
8940pthread_key_t k; k * 1;
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945if ac_fn_c_try_compile "$LINENO"; then :
8946 ac_pthread_key_t_is_arithmetic_type=yes
8947else
8948 ac_pthread_key_t_is_arithmetic_type=no
8949
8950fi
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8953$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8954 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8955
8956$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8957
8958 fi
8959else
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008963CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008964
Michael W. Hudson54241132001-12-07 15:38:26 +00008965
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008966case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008967 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008968 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8969 ;;
8970 Darwin/*)
8971 OTHER_LIBTOOL_OPT=""
8972 ;;
8973esac
8974
8975
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008976
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008977case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008978 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008979 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8980 if test "${enable_universalsdk}"; then
8981 :
8982 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008983 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008984 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008985 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008986 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008987 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008988 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008989 if test ${gcc_version} '<' 4.0
8990 then
8991 LIBTOOL_CRUFT="-lcc_dynamic"
8992 else
8993 LIBTOOL_CRUFT=""
8994 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008996 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997else
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009000
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001 #include <unistd.h>
9002 int main(int argc, char*argv[])
9003 {
9004 if (sizeof(long) == 4) {
9005 return 0;
9006 } else {
9007 return 1;
9008 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009009 }
9010
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009012if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013 ac_osx_32bit=yes
9014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9018 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009019fi
9020
9021
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009023 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024 i386)
9025 MACOSX_DEFAULT_ARCH="i386"
9026 ;;
9027 ppc)
9028 MACOSX_DEFAULT_ARCH="ppc"
9029 ;;
9030 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009031 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032 ;;
9033 esac
9034 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009035 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036 i386)
9037 MACOSX_DEFAULT_ARCH="x86_64"
9038 ;;
9039 ppc)
9040 MACOSX_DEFAULT_ARCH="ppc64"
9041 ;;
9042 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009043 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009044 ;;
9045 esac
9046
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009047 fi
9048
9049 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009050 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009051 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009052esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9054$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009055if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009057 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009059 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009060
Matthias Kloseb9621712010-04-24 17:59:49 +00009061$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9064$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009065 if test $enable_shared = "yes"
9066 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009067 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00009068 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069else
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009072fi
9073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9075$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009076case $ac_sys_system/$ac_sys_release in
9077 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9082$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009083 ;;
9084 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009087 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009088esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009089
Guido van Rossum0a516c91994-09-12 10:58:40 +00009090# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009091
Michael W. Hudson54241132001-12-07 15:38:26 +00009092
9093
9094
9095
Benjamin Peterson99f03762010-04-11 22:15:28 +00009096
Thomas Wouters477c8d52006-05-27 19:21:47 +00009097
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009098# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9099# -- usually .so, .sl on HP-UX, .dll on Cygwin
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9101$as_echo_n "checking the extension of shared libraries... " >&6; }
9102if test -z "$SHLIB_SUFFIX"; then
9103 case $ac_sys_system in
9104 hp*|HP*)
9105 case `uname -m` in
9106 ia64) SHLIB_SUFFIX=.so;;
9107 *) SHLIB_SUFFIX=.sl;;
9108 esac
9109 ;;
9110 CYGWIN*) SHLIB_SUFFIX=.dll;;
9111 *) SHLIB_SUFFIX=.so;;
9112 esac
9113fi
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9115$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009116
Guido van Rossum0a516c91994-09-12 10:58:40 +00009117# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009118# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119# (Shared libraries in this instance are shared modules to be loaded into
9120# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9122$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009123if test -z "$LDSHARED"
9124then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009125 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009126 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009127 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009128 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009129 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009131 if test "$GCC" = "yes" ; then
9132 LDSHARED='$(CC) -shared'
9133 LDCXXSHARED='$(CXX) -shared'
9134 else
9135 LDSHARED='$(CC) -G'
9136 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009137 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009138 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009139 if test "$GCC" = "yes" ; then
9140 LDSHARED='$(CC) -shared'
9141 LDCXXSHARED='$(CXX) -shared'
9142 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009143 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009144 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009145 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009146 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009147 LDSHARED='$(CC) -bundle'
9148 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009149 if test "$enable_framework" ; then
9150 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009151 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9152 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009153 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009154 else
9155 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009156 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009157 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009158 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009159 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009160 LDSHARED='$(CC) -bundle'
9161 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009162 if test "$enable_framework" ; then
9163 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009164 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9165 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009167 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009168 # No framework, use the Python app as bundle-loader
9169 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009170 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009172 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009173 Darwin/*)
9174 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9175 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009176
Ned Deily36820b62014-06-25 13:44:22 -07009177 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9178 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9179 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9180 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9181 if test ${dep_target_major} -eq 10 && \
9182 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009183 then
Ned Deily36820b62014-06-25 13:44:22 -07009184 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009185 LDSHARED='$(CC) -bundle'
9186 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009187 if test "$enable_framework" ; then
9188 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009189 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9190 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009191 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009192 else
9193 # No framework, use the Python app as bundle-loader
9194 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9195 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009197 fi
Ned Deily36820b62014-06-25 13:44:22 -07009198 else
9199 # building for OS X 10.3 and later
9200 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9201 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9202 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009203 fi
9204 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 Linux*|GNU*|QNX*)
9206 LDSHARED='$(CC) -shared'
9207 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009208 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009209 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009210 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009213 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009214 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009215 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009216 OpenBSD*)
9217 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9218 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009219 LDSHARED='$(CC) -shared $(CCSHARED)'
9220 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009221 else
9222 case `uname -r` in
9223 [01].* | 2.[0-7] | 2.[0-7].*)
9224 LDSHARED="ld -Bshareable ${LDFLAGS}"
9225 ;;
9226 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009227 LDSHARED='$(CC) -shared $(CCSHARED)'
9228 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009229 ;;
9230 esac
9231 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009233 LDSHARED='$(CC) -shared'
9234 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009235 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 if test "$GCC" = "yes" ; then
9237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared'
9239 else
9240 LDSHARED='$(CC) -G'
9241 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009242 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243 SCO_SV*)
9244 LDSHARED='$(CC) -Wl,-G,-Bexport'
9245 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9246 CYGWIN*)
9247 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9248 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249 *) LDSHARED="ld";;
9250 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9253$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009254LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009255BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009257# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9259$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260if test -z "$CCSHARED"
9261then
Guido van Rossum07397971997-04-29 21:49:50 +00009262 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009263 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009264 then CCSHARED="-fPIC";
9265 elif test `uname -p` = sparc;
9266 then CCSHARED="-xcode=pic32";
9267 else CCSHARED="-Kpic";
9268 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009269 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009270 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009271 else CCSHARED="+z";
9272 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009273 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009274 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009275 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009276 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009277 if test "$GCC" = "yes"
9278 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009279 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009280 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009281 SCO_SV*)
9282 if test "$GCC" = "yes"
9283 then CCSHARED="-fPIC"
9284 else CCSHARED="-Kpic -belf"
9285 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009286 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9289$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009290# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009291# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9293$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009294if test -z "$LINKFORSHARED"
9295then
Guido van Rossum07397971997-04-29 21:49:50 +00009296 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009297 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009298 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009299 LINKFORSHARED="-Wl,-E -Wl,+s";;
9300# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009301 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009302 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009305 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009306
9307 # Issue #18075: the default maximum stack size (8MBytes) is too
9308 # small for the default recursion limit. Increase the stack size
9309 # to ensure that tests don't crash
9310 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9311
Jack Jansene578a632001-08-15 01:27:14 +00009312 if test "$enable_framework"
9313 then
Jack Jansenda49e192005-01-07 13:08:22 +00009314 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009315 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009316 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009317 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009318 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009319 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009320 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009321 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9322 then
9323 LINKFORSHARED="-Wl,--export-dynamic"
9324 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009325 SunOS/5*) case $CC in
9326 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009327 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009328 then
9329 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009330 fi;;
9331 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009332 CYGWIN*)
9333 if test $enable_shared = "no"
9334 then
9335 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9336 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009337 QNX*)
9338 # -Wl,-E causes the symbols to be added to the dynamic
9339 # symbol table so that they can be found when a module
9340 # is loaded. -N 2048K causes the stack size to be set
9341 # to 2048 kilobytes so that the stack doesn't overflow
9342 # when running test_compile.py.
9343 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9347$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009348
Michael W. Hudson54241132001-12-07 15:38:26 +00009349
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9352$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009353if test ! "$LIBRARY" = "$LDLIBRARY"
9354then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009355 case $ac_sys_system in
9356 CYGWIN*)
9357 # Cygwin needs CCSHARED when building extension DLLs
9358 # but not when building the interpreter DLL.
9359 CFLAGSFORSHARED='';;
9360 *)
9361 CFLAGSFORSHARED='$(CCSHARED)'
9362 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9365$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009366
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9368# library (with --enable-shared).
9369# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009370# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9371# if it is not required, since it creates a dependency of the shared library
9372# to LIBS. This, in turn, means that applications linking the shared libpython
9373# don't need to link LIBS explicitly. The default should be only changed
9374# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009375
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9377$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009378case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009379 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009380 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9383$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009384
9385
Guido van Rossum627b2d71993-12-24 10:39:16 +00009386# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9388$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009389if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009390 $as_echo_n "(cached) " >&6
9391else
9392 ac_check_lib_save_LIBS=$LIBS
9393LIBS="-lsendfile $LIBS"
9394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9395/* end confdefs.h. */
9396
9397/* Override any GCC internal prototype to avoid an error.
9398 Use char because int might match the return type of a GCC
9399 builtin and then its argument prototype would still apply. */
9400#ifdef __cplusplus
9401extern "C"
9402#endif
9403char sendfile ();
9404int
9405main ()
9406{
9407return sendfile ();
9408 ;
9409 return 0;
9410}
9411_ACEOF
9412if ac_fn_c_try_link "$LINENO"; then :
9413 ac_cv_lib_sendfile_sendfile=yes
9414else
9415 ac_cv_lib_sendfile_sendfile=no
9416fi
9417rm -f core conftest.err conftest.$ac_objext \
9418 conftest$ac_exeext conftest.$ac_ext
9419LIBS=$ac_check_lib_save_LIBS
9420fi
9421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9422$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009423if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009424 cat >>confdefs.h <<_ACEOF
9425#define HAVE_LIBSENDFILE 1
9426_ACEOF
9427
9428 LIBS="-lsendfile $LIBS"
9429
9430fi
9431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9433$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009434if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436else
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009438LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442/* Override any GCC internal prototype to avoid an error.
9443 Use char because int might match the return type of a GCC
9444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009445#ifdef __cplusplus
9446extern "C"
9447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009448char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449int
9450main ()
9451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ;
9454 return 0;
9455}
9456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462rm -f core conftest.err conftest.$ac_objext \
9463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9467$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009468if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 cat >>confdefs.h <<_ACEOF
9470#define HAVE_LIBDL 1
9471_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009472
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009473 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475fi
9476 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9478$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009481else
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009483LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487/* Override any GCC internal prototype to avoid an error.
9488 Use char because int might match the return type of a GCC
9489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009490#ifdef __cplusplus
9491extern "C"
9492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009493char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009494int
9495main ()
9496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ;
9499 return 0;
9500}
9501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009504else
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009507rm -f core conftest.err conftest.$ac_objext \
9508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9512$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009513if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 cat >>confdefs.h <<_ACEOF
9515#define HAVE_LIBDLD 1
9516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009517
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520fi
9521 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009522
Michael Felt0d3ccb42017-12-30 22:39:20 +01009523# checks for uuid.h location
9524for ac_header in uuid/uuid.h uuid.h
9525do :
9526 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9527ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9528if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9529 cat >>confdefs.h <<_ACEOF
9530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9531_ACEOF
9532
9533fi
9534
9535done
9536
9537
Berker Peksag9a10ff42017-11-08 23:09:16 +03009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9539$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541/* end confdefs.h. */
9542#include <uuid/uuid.h>
9543int
9544main ()
9545{
9546
9547#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009548void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009549#endif
9550
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555if ac_fn_c_try_compile "$LINENO"; then :
9556
9557$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9558
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9560$as_echo "yes" >&6; }
9561else
9562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
9564
9565fi
9566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9567
Michael Felt0d3ccb42017-12-30 22:39:20 +01009568# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009569# FreeBSD and OpenBSD provides support as well
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9571$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573/* end confdefs.h. */
9574#include <uuid.h>
9575int
9576main ()
9577{
9578
9579#ifndef uuid_create
9580void *x = uuid_create
9581#endif
9582
9583 ;
9584 return 0;
9585}
9586_ACEOF
9587if ac_fn_c_try_compile "$LINENO"; then :
9588
9589$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9590
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9592$as_echo "yes" >&6; }
9593else
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595$as_echo "no" >&6; }
9596
9597fi
9598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009600# 'Real Time' functions on Solaris
9601# posix4 on Solaris 2.6
9602# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009605if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009606 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009607else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009608 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612/* Override any GCC internal prototype to avoid an error.
9613 Use char because int might match the return type of a GCC
9614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615#ifdef __cplusplus
9616extern "C"
9617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009618char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009619int
9620main ()
9621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ;
9624 return 0;
9625}
9626_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627for ac_lib in '' pthread rt posix4; do
9628 if test -z "$ac_lib"; then
9629 ac_res="none required"
9630 else
9631 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009632 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009637rm -f core conftest.err conftest.$ac_objext \
9638 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009639 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642done
Victor Stinnere0be4232011-10-25 13:06:09 +02009643if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645else
9646 ac_cv_search_sem_init=no
9647fi
9648rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009649LIBS=$ac_func_search_save_LIBS
9650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9652$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009654if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009656
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009657fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009658
Martin v. Löwis519adae2003-09-20 10:47:47 +00009659
Martin v. Löwis19d17342003-06-14 21:03:05 +00009660# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9662$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009663if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009665else
9666 ac_check_lib_save_LIBS=$LIBS
9667LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009678int
9679main ()
9680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687 ac_cv_lib_intl_textdomain=yes
9688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691rm -f core conftest.err conftest.$ac_objext \
9692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009693LIBS=$ac_check_lib_save_LIBS
9694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9696$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009697if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009700
Brett Cannonc6d936e2009-06-07 20:09:53 +00009701 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009702fi
9703
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009704
9705# checks for system dependent C++ extensions support
9706case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9708$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009711
Georg Brandl59e87bd2011-02-15 19:48:59 +00009712 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ;
9718 return 0;
9719}
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009722if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009723
Matthias Kloseb159a552010-04-25 21:00:44 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Matthias Kloseb159a552010-04-25 21:00:44 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009729
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009730else
Matthias Kloseb159a552010-04-25 21:00:44 +00009731
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009733$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009734
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009738 *) ;;
9739esac
9740
Christian Heimes985ecdc2013-11-20 11:46:18 +01009741# check for systems that require aligned memory access
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9743$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009744if ${ac_cv_aligned_required+:} false; then :
9745 $as_echo_n "(cached) " >&6
9746else
9747 if test "$cross_compiling" = yes; then :
9748 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009749else
9750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751/* end confdefs.h. */
9752
9753int main()
9754{
9755 char s[16];
9756 int i, *p1, *p2;
9757 for (i=0; i < 16; i++)
9758 s[i] = i;
9759 p1 = (int*)(s+1);
9760 p2 = (int*)(s+2);
9761 if (*p1 == *p2)
9762 return 1;
9763 return 0;
9764}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009765_ACEOF
9766if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009767 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009768else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009769 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009770fi
9771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9772 conftest.$ac_objext conftest.beam conftest.$ac_ext
9773fi
9774
9775
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009776fi
9777
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9779$as_echo "$ac_cv_aligned_required" >&6; }
9780if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009781
9782$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9783
9784fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009785
9786# str, bytes and memoryview hash algorithm
9787
9788
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9790$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9791
9792# Check whether --with-hash_algorithm was given.
9793if test "${with_hash_algorithm+set}" = set; then :
9794 withval=$with_hash_algorithm;
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9796$as_echo "$withval" >&6; }
9797case "$withval" in
9798 siphash24)
9799 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9800
9801 ;;
9802 fnv)
9803 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9804
9805 ;;
9806 *)
9807 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9808 ;;
9809esac
9810
9811else
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9813$as_echo "default" >&6; }
9814fi
9815
9816
Charles-François Natalid30b0222014-05-08 23:08:51 +01009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9818$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9819
9820# Check whether --with-address_sanitizer was given.
9821if test "${with_address_sanitizer+set}" = set; then :
9822 withval=$with_address_sanitizer;
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9824$as_echo "$withval" >&6; }
9825BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9826LDFLAGS="-fsanitize=address $LDFLAGS"
9827
9828else
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
Guido van Rossum70c7f481998-03-26 18:44:10 +00009834# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9836$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009837if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009841LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845/* Override any GCC internal prototype to avoid an error.
9846 Use char because int might match the return type of a GCC
9847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009848#ifdef __cplusplus
9849extern "C"
9850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009851char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009852int
9853main ()
9854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ;
9857 return 0;
9858}
9859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865rm -f core conftest.err conftest.$ac_objext \
9866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009867LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9870$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009872 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009873fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009874 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9876$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009879else
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009881LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9910$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009912 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009913fi
9914 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9917$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009920if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9923$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009924LIBS="$withval $LIBS"
9925
9926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929fi
9930
Guido van Rossum7f43da71994-08-01 12:15:30 +00009931
Victor Stinner8291b5e2015-03-20 16:03:14 +01009932
9933
9934
9935
9936
9937
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009938
Victor Stinner8291b5e2015-03-20 16:03:14 +01009939if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9940 if test -n "$ac_tool_prefix"; then
9941 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9942set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9944$as_echo_n "checking for $ac_word... " >&6; }
9945if ${ac_cv_path_PKG_CONFIG+:} false; then :
9946 $as_echo_n "(cached) " >&6
9947else
9948 case $PKG_CONFIG in
9949 [\\/]* | ?:[\\/]*)
9950 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9951 ;;
9952 *)
9953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9954for as_dir in $PATH
9955do
9956 IFS=$as_save_IFS
9957 test -z "$as_dir" && as_dir=.
9958 for ac_exec_ext in '' $ac_executable_extensions; do
9959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9960 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9962 break 2
9963 fi
9964done
9965 done
9966IFS=$as_save_IFS
9967
9968 ;;
9969esac
9970fi
9971PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9972if test -n "$PKG_CONFIG"; then
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9974$as_echo "$PKG_CONFIG" >&6; }
9975else
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9977$as_echo "no" >&6; }
9978fi
9979
9980
9981fi
9982if test -z "$ac_cv_path_PKG_CONFIG"; then
9983 ac_pt_PKG_CONFIG=$PKG_CONFIG
9984 # Extract the first word of "pkg-config", so it can be a program name with args.
9985set dummy pkg-config; ac_word=$2
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9987$as_echo_n "checking for $ac_word... " >&6; }
9988if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9989 $as_echo_n "(cached) " >&6
9990else
9991 case $ac_pt_PKG_CONFIG in
9992 [\\/]* | ?:[\\/]*)
9993 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9994 ;;
9995 *)
9996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9997for as_dir in $PATH
9998do
9999 IFS=$as_save_IFS
10000 test -z "$as_dir" && as_dir=.
10001 for ac_exec_ext in '' $ac_executable_extensions; do
10002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10003 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10005 break 2
10006 fi
10007done
10008 done
10009IFS=$as_save_IFS
10010
10011 ;;
10012esac
10013fi
10014ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10015if test -n "$ac_pt_PKG_CONFIG"; then
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10017$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10018else
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
10021fi
10022
10023 if test "x$ac_pt_PKG_CONFIG" = x; then
10024 PKG_CONFIG=""
10025 else
10026 case $cross_compiling:$ac_tool_warned in
10027yes:)
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10030ac_tool_warned=yes ;;
10031esac
10032 PKG_CONFIG=$ac_pt_PKG_CONFIG
10033 fi
10034else
10035 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10036fi
10037
10038fi
10039if test -n "$PKG_CONFIG"; then
10040 _pkg_min_version=0.9.0
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10042$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10043 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10045$as_echo "yes" >&6; }
10046 else
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048$as_echo "no" >&6; }
10049 PKG_CONFIG=""
10050 fi
10051fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010052
10053# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10055$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056
10057# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010058if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010059 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010060else
10061 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010062fi
10063
10064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10066$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010067
10068# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10070$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010071
10072# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010073if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010074 withval=$with_system_ffi;
10075fi
10076
10077
Zachary Waref40d4dd2016-09-17 01:25:24 -050010078if test "$ac_sys_system" = "Darwin"
10079then
10080 case "$with_system_ffi" in
10081 "")
10082 with_system_ffi="no"
10083 ;;
10084 yes|no)
10085 ;;
10086 *)
10087 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10088 ;;
10089 esac
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10091$as_echo "$with_system_ffi" >&6; }
10092else
10093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10094$as_echo "yes" >&6; }
10095 if test "$with_system_ffi" != ""
10096 then
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10098$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10099 fi
10100 with_system_ffi="yes"
10101fi
Zachary Ware935043d2016-09-09 17:01:21 -070010102
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010103if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010104 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10105else
10106 LIBFFI_INCLUDEDIR=""
10107fi
10108
10109
Stefan Krah60187b52012-03-23 19:06:27 +010010110# Check for use of the system libmpdec library
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10112$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10113
10114# Check whether --with-system_libmpdec was given.
10115if test "${with_system_libmpdec+set}" = set; then :
10116 withval=$with_system_libmpdec;
10117else
10118 with_system_libmpdec="no"
10119fi
10120
10121
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10123$as_echo "$with_system_libmpdec" >&6; }
10124
Benjamin Peterson076ed002010-10-31 17:11:02 +000010125# Check for support for loadable sqlite extensions
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10127$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10128# Check whether --enable-loadable-sqlite-extensions was given.
10129if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10130 enableval=$enable_loadable_sqlite_extensions;
10131else
10132 enable_loadable_sqlite_extensions="no"
10133fi
10134
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10137$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10138
Ned Deilyd819b932013-09-06 01:07:05 -070010139# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10140
10141
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10143$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10144
10145# Check whether --with-tcltk-includes was given.
10146if test "${with_tcltk_includes+set}" = set; then :
10147 withval=$with_tcltk_includes;
10148else
10149 with_tcltk_includes="default"
10150fi
10151
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10153$as_echo "$with_tcltk_includes" >&6; }
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10155$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10156
10157# Check whether --with-tcltk-libs was given.
10158if test "${with_tcltk_libs+set}" = set; then :
10159 withval=$with_tcltk_libs;
10160else
10161 with_tcltk_libs="default"
10162fi
10163
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10165$as_echo "$with_tcltk_libs" >&6; }
10166if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10167then
10168 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10169 then
10170 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10171 fi
10172 TCLTK_INCLUDES=""
10173 TCLTK_LIBS=""
10174else
10175 TCLTK_INCLUDES="$with_tcltk_includes"
10176 TCLTK_LIBS="$with_tcltk_libs"
10177fi
10178
Matthias Klose55708cc2009-04-30 08:06:49 +000010179# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10181$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010182
10183# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010185 withval=$with_dbmliborder;
10186if test x$with_dbmliborder = xyes
10187then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010188as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010189else
10190 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10191 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10192 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010193 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010194 fi
10195 done
10196fi
10197fi
10198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10200$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202
Martin v. Löwis11437992002-04-12 09:54:03 +000010203
10204# Templates for things AC_DEFINEd more than once.
10205# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010206
10207
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010208if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010209then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212
10213 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010214elif test "$ac_cv_kpthread" = "yes"
10215then
10216 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010217 if test "$ac_cv_cxx_thread" = "yes"; then
10218 CXX="$CXX -Kpthread"
10219 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010220 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010221elif test "$ac_cv_kthread" = "yes"
10222then
10223 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010224 if test "$ac_cv_cxx_thread" = "yes"; then
10225 CXX="$CXX -Kthread"
10226 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010227 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010228elif test "$ac_cv_pthread" = "yes"
10229then
10230 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010231 if test "$ac_cv_cxx_thread" = "yes"; then
10232 CXX="$CXX -pthread"
10233 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 if test ! -z "$withval" -a -d "$withval"
10237 then LDFLAGS="$LDFLAGS -L$withval"
10238 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239
10240 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010241 # define _POSIX_THREADS in unistd.h. Some apparently don't
10242 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10244$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010246/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010247
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010249#ifdef _POSIX_THREADS
10250yes
10251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
10253_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010256 unistd_defines_pthreads=yes
10257else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010258 unistd_defines_pthreads=no
10259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010260rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10263$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010266
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010267 # Just looking for pthread_create in libpthread is not enough:
10268 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10269 # So we really have to include pthread.h, and then link.
10270 _libs=$LIBS
10271 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10273$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010276
10277#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010279
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010281int
10282main ()
10283{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010284
10285pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10293$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010294 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010295
Guido van Rossum02a1c402000-02-25 19:26:31 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010298 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010300if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010301
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010303
Guido van Rossumad678af1998-10-02 14:42:15 +000010304else
Guido van Rossumad678af1998-10-02 14:42:15 +000010305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10307$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010308if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010310else
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010312LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316/* Override any GCC internal prototype to avoid an error.
10317 Use char because int might match the return type of a GCC
10318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010319#ifdef __cplusplus
10320extern "C"
10321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010322char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010323int
10324main ()
10325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010333else
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336rm -f core conftest.err conftest.$ac_objext \
10337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010338LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10341$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010342if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010344 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010345 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010346
Greg Steinadf63d62000-07-05 10:38:09 +000010347else
Greg Steinadf63d62000-07-05 10:38:09 +000010348
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10350$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010351if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010355LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362#ifdef __cplusplus
10363extern "C"
10364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010365char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10384$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010385if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010388 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010389
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010390else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10393$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010398LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402/* Override any GCC internal prototype to avoid an error.
10403 Use char because int might match the return type of a GCC
10404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405#ifdef __cplusplus
10406extern "C"
10407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010408char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409int
10410main ()
10411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422rm -f core conftest.err conftest.$ac_objext \
10423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010424LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10427$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010428if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010430 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010431 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010432
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010433else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10436$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010437if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010439else
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445/* Override any GCC internal prototype to avoid an error.
10446 Use char because int might match the return type of a GCC
10447 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010448#ifdef __cplusplus
10449extern "C"
10450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010451char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
10453main ()
10454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010462else
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465rm -f core conftest.err conftest.$ac_objext \
10466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010467LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10470$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010471if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010472
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010473 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010474 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010475
Guido van Rossumb93a8621998-05-07 13:27:32 +000010476else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010477
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010478 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10479
Guido van Rossum2d38f911996-06-26 19:47:01 +000010480fi
10481
Guido van Rossum627b2d71993-12-24 10:39:16 +000010482
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010483fi
10484
Guido van Rossum0be3e491997-05-22 20:33:33 +000010485fi
10486
Guido van Rossum49545951997-12-02 19:28:29 +000010487fi
10488
Guido van Rossumb93a8621998-05-07 13:27:32 +000010489fi
10490
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010492rm -f core conftest.err conftest.$ac_objext \
10493 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10496$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010497if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010499else
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010501LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505/* Override any GCC internal prototype to avoid an error.
10506 Use char because int might match the return type of a GCC
10507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010508#ifdef __cplusplus
10509extern "C"
10510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010511char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010512int
10513main ()
10514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 ;
10517 return 0;
10518}
10519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010522else
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010525rm -f core conftest.err conftest.$ac_objext \
10526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10530$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010531if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010532
Martin v. Löwis130fb172001-07-19 11:00:41 +000010533 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010534
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535fi
10536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010537
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010538fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010539
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010540if test "$posix_threads" = "yes"; then
10541 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010542
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544
10545 fi
10546
10547 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10548 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010549 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010550$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010551
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552 ;;
10553 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010554$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555
10556 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010557 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010559
10560 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561 esac
10562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10564$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569 ac_cv_pthread_system_supported=no
10570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010572/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010573
10574 #include <stdio.h>
10575 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576 void *foo(void *parm) {
10577 return NULL;
10578 }
10579 main() {
10580 pthread_attr_t attr;
10581 pthread_t id;
10582 if (pthread_attr_init(&attr)) exit(-1);
10583 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10584 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10585 exit(0);
10586 }
10587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010589 ac_cv_pthread_system_supported=yes
10590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
10599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10601$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 if test "$ac_cv_pthread_system_supported" = "yes"; then
10603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605
10606 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 for ac_func in pthread_sigmask
10608do :
10609 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010610if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010612#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010614 case $ac_sys_system in
10615 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010616
Matthias Kloseb9621712010-04-24 17:59:49 +000010617$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010618
10619 ;;
10620 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621fi
10622done
10623
pdoxe14679c2017-10-05 00:01:56 -070010624 for ac_func in pthread_getcpuclockid
10625do :
10626 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10627if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10628 cat >>confdefs.h <<_ACEOF
10629#define HAVE_PTHREAD_GETCPUCLOCKID 1
10630_ACEOF
10631
10632fi
10633done
10634
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635fi
10636
10637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10641$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010643if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648 ipv6=no
10649 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10651$as_echo "yes" >&6; }
10652 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653
10654 ipv6=yes
10655 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657else
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661 /* AF_INET6 available check */
10662#include <sys/types.h>
10663#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010664int
10665main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010667int domain = AF_INET6;
10668 ;
10669 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010670}
Martin v. Löwis11437992002-04-12 09:54:03 +000010671_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010672if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10675$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010677
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678else
Matthias Kloseb159a552010-04-25 21:00:44 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010682 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010687if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10689$as_echo_n "checking if RFC2553 API is available... " >&6; }
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010691/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010692
10693 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010694#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010695int
10696main ()
10697{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010698struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010699 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ;
10701 return 0;
10702}
Matthias Kloseb159a552010-04-25 21:00:44 +000010703
Martin v. Löwis11437992002-04-12 09:54:03 +000010704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010705if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010706
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010709 ipv6=yes
10710
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010711else
Matthias Kloseb159a552010-04-25 21:00:44 +000010712
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010714$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010715 ipv6=no
10716
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010719fi
10720
10721if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010723
10724fi
10725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726fi
10727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728
10729ipv6type=unknown
10730ipv6lib=none
10731ipv6trylibc=no
10732
10733if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10735$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010736 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10737 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 case $i in
10739 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010741/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743#include <netinet/in.h>
10744#ifdef IPV6_INRIA_VERSION
10745yes
10746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010747_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010750 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010752rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753
10754 ;;
10755 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010757/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010758
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759#include <netinet/in.h>
10760#ifdef __KAME__
10761yes
10762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010763_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766 ipv6type=$i;
10767 ipv6lib=inet6
10768 ipv6libdir=/usr/local/v6/lib
10769 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010771rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772
10773 ;;
10774 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010776/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778#include <features.h>
10779#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10780yes
10781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010782_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785 ipv6type=$i;
10786 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010788rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789
10790 ;;
10791 linux-inet6)
10792 if test -d /usr/inet6; then
10793 ipv6type=$i
10794 ipv6lib=inet6
10795 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010796 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 fi
10798 ;;
10799 solaris)
10800 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010801 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802 ipv6type=$i
10803 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804 fi
10805 fi
10806 ;;
10807 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010809/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811#include <sys/param.h>
10812#ifdef _TOSHIBA_INET6
10813yes
10814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010815_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818 ipv6type=$i;
10819 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010820 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010822rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823
10824 ;;
10825 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829#include </usr/local/v6/include/sys/v6config.h>
10830#ifdef __V6D__
10831yes
10832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010833_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 ipv6type=$i;
10837 ipv6lib=v6;
10838 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010839 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010841rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842
10843 ;;
10844 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848#include <sys/param.h>
10849#ifdef _ZETA_MINAMI_INET6
10850yes
10851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010852_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855 ipv6type=$i;
10856 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010857 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010859rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860
10861 ;;
10862 esac
10863 if test "$ipv6type" != "unknown"; then
10864 break
10865 fi
10866 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10868$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869fi
10870
10871if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10872 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10873 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10874 echo "using lib$ipv6lib"
10875 else
10876 if test $ipv6trylibc = "yes"; then
10877 echo "using libc"
10878 else
10879 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10880 echo "You need to fetch lib$ipv6lib.a from appropriate"
10881 echo 'ipv6 kit and compile beforehand.'
10882 exit 1
10883 fi
10884 fi
10885fi
10886
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10888$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10890/* end confdefs.h. */
10891 /* CAN_RAW_FD_FRAMES available check */
10892#include <linux/can/raw.h>
10893int
10894main ()
10895{
10896int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10897 ;
10898 return 0;
10899}
10900_ACEOF
10901if ac_fn_c_try_compile "$LINENO"; then :
10902
10903
10904$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10905
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10907$as_echo "yes" >&6; }
10908
10909else
10910
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913
10914fi
10915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10916
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010917# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10919$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010922if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010923 withval=$with_doc_strings;
10924fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010925
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010926
10927if test -z "$with_doc_strings"
10928then with_doc_strings="yes"
10929fi
10930if test "$with_doc_strings" != "no"
10931then
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010934
10935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10937$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010938
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010939# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10941$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010944if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945 withval=$with_pymalloc;
10946fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010947
Neil Schemenauera35c6882001-02-27 04:45:05 +000010948
Neil Schemenauer16c22972002-03-22 15:34:49 +000010949if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010950then
10951 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010952fi
10953if test "$with_pymalloc" != "no"
10954then
Martin v. Löwis11437992002-04-12 09:54:03 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010957
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010958 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10961$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010962
Nick Coghlan6ea41862017-06-11 13:16:15 +100010963# Check for --with-c-locale-coercion
10964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10965$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10966
10967# Check whether --with-c-locale-coercion was given.
10968if test "${with_c_locale_coercion+set}" = set; then :
10969 withval=$with_c_locale_coercion;
10970fi
10971
10972
10973if test -z "$with_c_locale_coercion"
10974then
10975 with_c_locale_coercion="yes"
10976fi
10977if test "$with_c_locale_coercion" != "no"
10978then
10979
10980$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10981
10982fi
10983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10984$as_echo "$with_c_locale_coercion" >&6; }
10985
10986# Check for --with-c-locale-warning
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10988$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10989
10990# Check whether --with-c-locale-warning was given.
10991if test "${with_c_locale_warning+set}" = set; then :
10992 withval=$with_c_locale_warning;
10993fi
10994
10995
10996if test -z "$with_c_locale_warning"
10997then
10998 with_c_locale_warning="yes"
10999fi
11000if test "$with_c_locale_warning" != "no"
11001then
11002
11003$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11004
11005fi
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11007$as_echo "$with_c_locale_warning" >&6; }
11008
Benjamin Peterson05159c42009-12-03 03:01:27 +000011009# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11011$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011012
11013# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015 withval=$with_valgrind;
11016else
11017 with_valgrind=no
11018fi
11019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11021$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011024if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011027
11028else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011029 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011030
11031fi
11032
11033
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011034 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035fi
11036
Łukasz Langaa785c872016-09-09 17:37:37 -070011037# Check for DTrace support
11038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11039$as_echo_n "checking for --with-dtrace... " >&6; }
11040
11041# Check whether --with-dtrace was given.
11042if test "${with_dtrace+set}" = set; then :
11043 withval=$with_dtrace;
11044else
11045 with_dtrace=no
11046fi
11047
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11049$as_echo "$with_dtrace" >&6; }
11050
11051
11052
11053
11054
11055DTRACE=
11056DFLAGS=
11057DTRACE_HEADERS=
11058DTRACE_OBJS=
11059
11060if test "$with_dtrace" = "yes"
11061then
11062 # Extract the first word of "dtrace", so it can be a program name with args.
11063set dummy dtrace; ac_word=$2
11064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11065$as_echo_n "checking for $ac_word... " >&6; }
11066if ${ac_cv_path_DTRACE+:} false; then :
11067 $as_echo_n "(cached) " >&6
11068else
11069 case $DTRACE in
11070 [\\/]* | ?:[\\/]*)
11071 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11072 ;;
11073 *)
11074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11075for as_dir in $PATH
11076do
11077 IFS=$as_save_IFS
11078 test -z "$as_dir" && as_dir=.
11079 for ac_exec_ext in '' $ac_executable_extensions; do
11080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11081 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11083 break 2
11084 fi
11085done
11086 done
11087IFS=$as_save_IFS
11088
11089 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11090 ;;
11091esac
11092fi
11093DTRACE=$ac_cv_path_DTRACE
11094if test -n "$DTRACE"; then
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11096$as_echo "$DTRACE" >&6; }
11097else
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
11100fi
11101
11102
11103 if test "$DTRACE" = "not found"; then
11104 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11105 fi
11106
11107$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11108
11109 DTRACE_HEADERS="Include/pydtrace_probes.h"
11110
11111 # On OS X, DTrace providers do not need to be explicitly compiled and
11112 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11113 # generation flag '-G'. We check for presence of this flag, rather than
11114 # hardcoding support by OS, in the interest of robustness.
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11116$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11117if ${ac_cv_dtrace_link+:} false; then :
11118 $as_echo_n "(cached) " >&6
11119else
11120 ac_cv_dtrace_link=no
11121 echo 'BEGIN' > conftest.d
11122 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11123 ac_cv_dtrace_link=yes
11124
11125fi
11126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11127$as_echo "$ac_cv_dtrace_link" >&6; }
11128 if test "$ac_cv_dtrace_link" = "yes"; then
11129 DTRACE_OBJS="Python/pydtrace.o"
11130 fi
11131fi
11132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011133# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011134
Guido van Rossum98935bf2001-09-05 19:13:16 +000011135DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011136
Guido van Rossume97ee181999-12-20 21:27:22 +000011137# the dlopen() function means we might want to use dynload_shlib.o. some
11138# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011139for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011140do :
11141 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011145_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011146
Guido van Rossume97ee181999-12-20 21:27:22 +000011147fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011148done
Guido van Rossume97ee181999-12-20 21:27:22 +000011149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Guido van Rossume97ee181999-12-20 21:27:22 +000011151# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11152# loading of modules.
11153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11155$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011156if test -z "$DYNLOADFILE"
11157then
11158 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011159 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11160 if test "$ac_cv_func_dlopen" = yes
11161 then DYNLOADFILE="dynload_shlib.o"
11162 else DYNLOADFILE="dynload_aix.o"
11163 fi
11164 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011165 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011166 *)
11167 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11168 # out any dynamic loading
11169 if test "$ac_cv_func_dlopen" = yes
11170 then DYNLOADFILE="dynload_shlib.o"
11171 else DYNLOADFILE="dynload_stub.o"
11172 fi
11173 ;;
11174 esac
11175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11177$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011178if test "$DYNLOADFILE" != "dynload_stub.o"
11179then
Martin v. Löwis11437992002-04-12 09:54:03 +000011180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011182
11183fi
11184
Neil Schemenauer4e425612001-06-19 15:44:15 +000011185# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11186
Michael W. Hudson54241132001-12-07 15:38:26 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11189$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011190if test -z "$MACHDEP_OBJS"
11191then
Jack Jansene578a632001-08-15 01:27:14 +000011192 MACHDEP_OBJS=$extra_machdep_objs
11193else
11194 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011195fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011196if test -z "$MACHDEP_OBJS"; then
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11198$as_echo "none" >&6; }
11199else
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11201$as_echo "$MACHDEP_OBJS" >&6; }
11202fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011203
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011205for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011206 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011207 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011208 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011209 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011210 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011211 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011212 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011213 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011214 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011215 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011216 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011217 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011218 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011219 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011220 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11221 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011222 sigaction sigaltstack siginterrupt sigpending sigrelse \
11223 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011224 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011225 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011226 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011227do :
11228 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11229ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011230if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011233_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011235fi
11236done
11237
Michael W. Hudson54241132001-12-07 15:38:26 +000011238
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011239ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11240 #include <dirent.h>
11241"
11242if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11243
11244$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11245
11246fi
11247
11248
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249# For some functions, having a definition is not sufficient, since
11250# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11252$as_echo_n "checking for chroot... " >&6; }
11253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011255#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011256int
11257main ()
11258{
11259void *x=chroot
11260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011267
Matthias Kloseb159a552010-04-25 21:00:44 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011269$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011273
11274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11277$as_echo_n "checking for link... " >&6; }
11278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011279/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281int
11282main ()
11283{
11284void *x=link
11285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011292
Matthias Kloseb159a552010-04-25 21:00:44 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298
11299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11302$as_echo_n "checking for symlink... " >&6; }
11303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306int
11307main ()
11308{
11309void *x=symlink
11310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317
Matthias Kloseb159a552010-04-25 21:00:44 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323
11324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11327$as_echo_n "checking for fchdir... " >&6; }
11328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011330#include <unistd.h>
11331int
11332main ()
11333{
11334void *x=fchdir
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011342
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011348
11349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11352$as_echo_n "checking for fsync... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011355#include <unistd.h>
11356int
11357main ()
11358{
11359void *x=fsync
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011367
Matthias Kloseb159a552010-04-25 21:00:44 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011373
11374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11377$as_echo_n "checking for fdatasync... " >&6; }
11378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380#include <unistd.h>
11381int
11382main ()
11383{
11384void *x=fdatasync
11385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011392
Matthias Kloseb159a552010-04-25 21:00:44 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398
11399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11402$as_echo_n "checking for epoll... " >&6; }
11403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011404/* end confdefs.h. */
11405#include <sys/epoll.h>
11406int
11407main ()
11408{
11409void *x=epoll_create
11410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011417
Matthias Kloseb159a552010-04-25 21:00:44 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011423
11424fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11427$as_echo_n "checking for epoll_create1... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11429/* end confdefs.h. */
11430#include <sys/epoll.h>
11431int
11432main ()
11433{
11434void *x=epoll_create1
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439if ac_fn_c_try_compile "$LINENO"; then :
11440
11441$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11444$as_echo "yes" >&6; }
11445else
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448
11449fi
11450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11452$as_echo_n "checking for kqueue... " >&6; }
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011454/* end confdefs.h. */
11455
11456#include <sys/types.h>
11457#include <sys/event.h>
11458
11459int
11460main ()
11461{
11462int x=kqueue()
11463 ;
11464 return 0;
11465}
11466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470
Matthias Kloseb159a552010-04-25 21:00:44 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011476
11477fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11480$as_echo_n "checking for prlimit... " >&6; }
11481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11482/* end confdefs.h. */
11483
11484#include <sys/time.h>
11485#include <sys/resource.h>
11486
11487int
11488main ()
11489{
11490void *x=prlimit
11491 ;
11492 return 0;
11493}
11494_ACEOF
11495if ac_fn_c_try_compile "$LINENO"; then :
11496
11497$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11498
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11500$as_echo "yes" >&6; }
11501else
11502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
11504
11505fi
11506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11507
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508# On some systems (eg. FreeBSD 5), we would find a definition of the
11509# functions ctermid_r, setgroups in the library, but no prototype
11510# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11511# address to avoid compiler warnings and potential miscompilations
11512# because of the missing prototypes.
11513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11515$as_echo_n "checking for ctermid_r... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011517/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011518
Martin v. Löwisd5843682002-11-21 20:41:28 +000011519#include <stdio.h>
11520
Martin v. Löwisd5843682002-11-21 20:41:28 +000011521int
11522main ()
11523{
11524void* p = ctermid_r
11525 ;
11526 return 0;
11527}
11528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011530
Matthias Kloseb9621712010-04-24 17:59:49 +000011531$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011532
Matthias Kloseb159a552010-04-25 21:00:44 +000011533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011534$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011538
11539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11543$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011545 $as_echo_n "(cached) " >&6
11546else
11547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011549#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011550int
11551main ()
11552{
11553void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011554
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011555 ;
11556 return 0;
11557}
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011560 ac_cv_flock_decl=yes
11561else
11562 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011563
11564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011566
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011567fi
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11569$as_echo "$ac_cv_flock_decl" >&6; }
11570if test "x${ac_cv_flock_decl}" = xyes; then
11571 for ac_func in flock
11572do :
11573 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011574if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011575 cat >>confdefs.h <<_ACEOF
11576#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011577_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011578
Antoine Pitroua3000072010-09-07 14:52:42 +000011579else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011581$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011582if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011583 $as_echo_n "(cached) " >&6
11584else
11585 ac_check_lib_save_LIBS=$LIBS
11586LIBS="-lbsd $LIBS"
11587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11588/* end confdefs.h. */
11589
11590/* Override any GCC internal prototype to avoid an error.
11591 Use char because int might match the return type of a GCC
11592 builtin and then its argument prototype would still apply. */
11593#ifdef __cplusplus
11594extern "C"
11595#endif
11596char flock ();
11597int
11598main ()
11599{
11600return flock ();
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605if ac_fn_c_try_link "$LINENO"; then :
11606 ac_cv_lib_bsd_flock=yes
11607else
11608 ac_cv_lib_bsd_flock=no
11609fi
11610rm -f core conftest.err conftest.$ac_objext \
11611 conftest$ac_exeext conftest.$ac_ext
11612LIBS=$ac_check_lib_save_LIBS
11613fi
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11615$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011616if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011618
11619
11620$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11621
11622
11623fi
11624
11625
11626fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011627done
11628
Antoine Pitroua3000072010-09-07 14:52:42 +000011629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11632$as_echo_n "checking for getpagesize... " >&6; }
11633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011634/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011635
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011636#include <unistd.h>
11637
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011638int
11639main ()
11640{
11641void* p = getpagesize
11642 ;
11643 return 0;
11644}
11645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011649
Matthias Kloseb159a552010-04-25 21:00:44 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11654$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011655
11656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011658
Victor Stinner984890f2011-11-24 13:53:38 +010011659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11660$as_echo_n "checking for broken unsetenv... " >&6; }
11661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11662/* end confdefs.h. */
11663
11664#include <stdlib.h>
11665
11666int
11667main ()
11668{
11669int res = unsetenv("DUMMY")
11670 ;
11671 return 0;
11672}
11673_ACEOF
11674if ac_fn_c_try_compile "$LINENO"; then :
11675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
11677else
11678
11679$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11680
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11682$as_echo "yes" >&6; }
11683
11684fi
11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11686
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011687for ac_prog in true
11688do
11689 # Extract the first word of "$ac_prog", so it can be a program name with args.
11690set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011693if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011695else
11696 if test -n "$TRUE"; then
11697 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11698else
11699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11700for as_dir in $PATH
11701do
11702 IFS=$as_save_IFS
11703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011706 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011708 break 2
11709 fi
11710done
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011713
11714fi
11715fi
11716TRUE=$ac_cv_prog_TRUE
11717if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11719$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11722$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011723fi
11724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011726 test -n "$TRUE" && break
11727done
11728test -n "$TRUE" || TRUE="/bin/true"
11729
11730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11732$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011733if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011735else
11736 ac_check_lib_save_LIBS=$LIBS
11737LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741/* Override any GCC internal prototype to avoid an error.
11742 Use char because int might match the return type of a GCC
11743 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011744#ifdef __cplusplus
11745extern "C"
11746#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011747char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748int
11749main ()
11750{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752 ;
11753 return 0;
11754}
11755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757 ac_cv_lib_c_inet_aton=yes
11758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011761rm -f core conftest.err conftest.$ac_objext \
11762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011763LIBS=$ac_check_lib_save_LIBS
11764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11766$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011767if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011768 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11771$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011772if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774else
11775 ac_check_lib_save_LIBS=$LIBS
11776LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011780/* Override any GCC internal prototype to avoid an error.
11781 Use char because int might match the return type of a GCC
11782 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783#ifdef __cplusplus
11784extern "C"
11785#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011786char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787int
11788main ()
11789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791 ;
11792 return 0;
11793}
11794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796 ac_cv_lib_resolv_inet_aton=yes
11797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011800rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802LIBS=$ac_check_lib_save_LIBS
11803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11805$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011806if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807 cat >>confdefs.h <<_ACEOF
11808#define HAVE_LIBRESOLV 1
11809_ACEOF
11810
11811 LIBS="-lresolv $LIBS"
11812
11813fi
11814
11815
11816fi
11817
11818
Christian Heimesd0764e22007-12-04 15:00:33 +000011819# On Tru64, chflags seems to be present, but calling it will
11820# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11822$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011825else
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011827 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011830/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011831
Christian Heimesd0764e22007-12-04 15:00:33 +000011832#include <sys/stat.h>
11833#include <unistd.h>
11834int main(int argc, char*argv[])
11835{
11836 if(chflags(argv[0], 0) != 0)
11837 return 1;
11838 return 0;
11839}
Ned Deily3eb67d52011-06-28 00:00:28 -070011840
Christian Heimesd0764e22007-12-04 15:00:33 +000011841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011843 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011849fi
11850
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011851
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11854$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011855if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011858 ac_cv_have_chflags="yes"
11859else
11860 ac_cv_have_chflags="no"
11861fi
11862
11863fi
11864if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011865
Matthias Kloseb9621712010-04-24 17:59:49 +000011866$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011867
11868fi
11869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11871$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011872if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011876 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011879/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011880
Christian Heimesd0764e22007-12-04 15:00:33 +000011881#include <sys/stat.h>
11882#include <unistd.h>
11883int main(int argc, char*argv[])
11884{
11885 if(lchflags(argv[0], 0) != 0)
11886 return 1;
11887 return 0;
11888}
Ned Deily3eb67d52011-06-28 00:00:28 -070011889
Christian Heimesd0764e22007-12-04 15:00:33 +000011890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011898fi
11899
11900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11903$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011904if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011907 ac_cv_have_lchflags="yes"
11908else
11909 ac_cv_have_lchflags="no"
11910fi
11911
11912fi
11913if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916
11917fi
11918
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011919case $ac_sys_system/$ac_sys_release in
11920Darwin/*)
11921 _CUR_CFLAGS="${CFLAGS}"
11922 _CUR_LDFLAGS="${LDFLAGS}"
11923 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11924 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11925 ;;
11926esac
11927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11929$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011932else
11933 ac_check_lib_save_LIBS=$LIBS
11934LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011936/* end confdefs.h. */
11937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011938/* Override any GCC internal prototype to avoid an error.
11939 Use char because int might match the return type of a GCC
11940 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011941#ifdef __cplusplus
11942extern "C"
11943#endif
11944char inflateCopy ();
11945int
11946main ()
11947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011948return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011949 ;
11950 return 0;
11951}
11952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011953if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954 ac_cv_lib_z_inflateCopy=yes
11955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011958rm -f core conftest.err conftest.$ac_objext \
11959 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011960LIBS=$ac_check_lib_save_LIBS
11961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11963$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011964if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011967
11968fi
11969
11970
11971case $ac_sys_system/$ac_sys_release in
11972Darwin/*)
11973 CFLAGS="${_CUR_CFLAGS}"
11974 LDFLAGS="${_CUR_LDFLAGS}"
11975 ;;
11976esac
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11979$as_echo_n "checking for hstrerror... " >&6; }
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011982
Martin v. Löwise9416172003-05-03 10:12:45 +000011983#include <netdb.h>
11984
Martin v. Löwise9416172003-05-03 10:12:45 +000011985int
11986main ()
11987{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011988void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011989 ;
11990 return 0;
11991}
11992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011996
Matthias Kloseb159a552010-04-25 21:00:44 +000011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011999else
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012002
12003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012004rm -f core conftest.err conftest.$ac_objext \
12005 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12008$as_echo_n "checking for inet_aton... " >&6; }
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
Martin v. Löwis86d66262006-02-17 08:40:11 +000012012#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012013#include <sys/socket.h>
12014#include <netinet/in.h>
12015#include <arpa/inet.h>
12016
Martin v. Löwise9416172003-05-03 10:12:45 +000012017int
12018main ()
12019{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012020void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012021 ;
12022 return 0;
12023}
12024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012028
Matthias Kloseb159a552010-04-25 21:00:44 +000012029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12033$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012034
12035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012036rm -f core conftest.err conftest.$ac_objext \
12037 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12040$as_echo_n "checking for inet_pton... " >&6; }
12041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012042/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012043
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012044#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012045#include <sys/socket.h>
12046#include <netinet/in.h>
12047#include <arpa/inet.h>
12048
Martin v. Löwise9416172003-05-03 10:12:45 +000012049int
12050main ()
12051{
12052void* p = inet_pton
12053 ;
12054 return 0;
12055}
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
Matthias Kloseb159a552010-04-25 21:00:44 +000012061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012063else
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12065$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012066
12067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012069
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012070# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12072$as_echo_n "checking for setgroups... " >&6; }
12073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012075
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012076#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012077#ifdef HAVE_GRP_H
12078#include <grp.h>
12079#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012080
Martin v. Löwisd5843682002-11-21 20:41:28 +000012081int
12082main ()
12083{
12084void* p = setgroups
12085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012090
Matthias Kloseb9621712010-04-24 17:59:49 +000012091$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012092
Matthias Kloseb159a552010-04-25 21:00:44 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012098
12099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012101
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012102# check for openpty and forkpty
12103
12104for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012105do :
12106 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012110_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012112else
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12114$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012115if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012117else
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012119LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123/* Override any GCC internal prototype to avoid an error.
12124 Use char because int might match the return type of a GCC
12125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012126#ifdef __cplusplus
12127extern "C"
12128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012129char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012130int
12131main ()
12132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ;
12135 return 0;
12136}
12137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012143rm -f core conftest.err conftest.$ac_objext \
12144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012145LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12148$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012151 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12154$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012157else
12158 ac_check_lib_save_LIBS=$LIBS
12159LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012161/* end confdefs.h. */
12162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163/* Override any GCC internal prototype to avoid an error.
12164 Use char because int might match the return type of a GCC
12165 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012166#ifdef __cplusplus
12167extern "C"
12168#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012169char openpty ();
12170int
12171main ()
12172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174 ;
12175 return 0;
12176}
12177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179 ac_cv_lib_bsd_openpty=yes
12180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183rm -f core conftest.err conftest.$ac_objext \
12184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185LIBS=$ac_check_lib_save_LIBS
12186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12188$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012189if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012191 LIBS="$LIBS -lbsd"
12192fi
12193
12194
12195fi
12196
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197
12198fi
12199done
12200
12201for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012202do :
12203 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012204if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012206#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012207_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12211$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012212if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214else
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012216LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220/* Override any GCC internal prototype to avoid an error.
12221 Use char because int might match the return type of a GCC
12222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012223#ifdef __cplusplus
12224extern "C"
12225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012226char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012227int
12228main ()
12229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 ;
12232 return 0;
12233}
12234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240rm -f core conftest.err conftest.$ac_objext \
12241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012242LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12245$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12251$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254else
12255 ac_check_lib_save_LIBS=$LIBS
12256LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012258/* end confdefs.h. */
12259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260/* Override any GCC internal prototype to avoid an error.
12261 Use char because int might match the return type of a GCC
12262 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012263#ifdef __cplusplus
12264extern "C"
12265#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012266char forkpty ();
12267int
12268main ()
12269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271 ;
12272 return 0;
12273}
12274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012276 ac_cv_lib_bsd_forkpty=yes
12277else
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012280rm -f core conftest.err conftest.$ac_objext \
12281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012282LIBS=$ac_check_lib_save_LIBS
12283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12285$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012286if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012288 LIBS="$LIBS -lbsd"
12289fi
12290
12291
12292fi
12293
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294
12295fi
12296done
12297
Jack Jansendd19cf82001-12-06 22:36:17 +000012298
Michael W. Hudson54241132001-12-07 15:38:26 +000012299# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012300for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012301do :
12302 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12303ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012304if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012307_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012310done
12311
Michael W. Hudson54241132001-12-07 15:38:26 +000012312
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012313ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012314if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012315 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012316
Martin v. Löwis1142de32002-03-29 16:28:31 +000012317else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012319 *" dup2.$ac_objext "* ) ;;
12320 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012322esac
12323
Martin v. Löwis1142de32002-03-29 16:28:31 +000012324fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012325
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012326ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012328 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12329
12330else
12331 case " $LIBOBJS " in
12332 *" strdup.$ac_objext "* ) ;;
12333 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12334 ;;
12335esac
12336
12337fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012338
12339
12340for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012341do :
12342 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012343if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012361
Guido van Rossum627b2d71993-12-24 10:39:16 +000012362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012364
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012366done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012367
Jack Jansen150753c2003-03-29 22:07:47 +000012368for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012369do :
12370 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012371if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012377#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012378int
12379main ()
12380{
12381setpgrp(0,0);
12382 ;
12383 return 0;
12384}
12385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012389
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012392
12393fi
12394done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012395
Thomas Wouters3a584202000-08-05 23:28:51 +000012396for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012397do :
12398 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012406int
12407main ()
12408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if ac_fn_c_try_compile "$LINENO"; then :
12415
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416else
Skip Montanaro6dead952003-09-25 14:50:04 +000012417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Guido van Rossum627b2d71993-12-24 10:39:16 +000012421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012424fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012425done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Victor Stinnere0be4232011-10-25 13:06:09 +020012428for ac_func in clock_gettime
12429do :
12430 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12431if test "x$ac_cv_func_clock_gettime" = xyes; then :
12432 cat >>confdefs.h <<_ACEOF
12433#define HAVE_CLOCK_GETTIME 1
12434_ACEOF
12435
12436else
12437
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12439$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12440if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12441 $as_echo_n "(cached) " >&6
12442else
12443 ac_check_lib_save_LIBS=$LIBS
12444LIBS="-lrt $LIBS"
12445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h. */
12447
12448/* Override any GCC internal prototype to avoid an error.
12449 Use char because int might match the return type of a GCC
12450 builtin and then its argument prototype would still apply. */
12451#ifdef __cplusplus
12452extern "C"
12453#endif
12454char clock_gettime ();
12455int
12456main ()
12457{
12458return clock_gettime ();
12459 ;
12460 return 0;
12461}
12462_ACEOF
12463if ac_fn_c_try_link "$LINENO"; then :
12464 ac_cv_lib_rt_clock_gettime=yes
12465else
12466 ac_cv_lib_rt_clock_gettime=no
12467fi
12468rm -f core conftest.err conftest.$ac_objext \
12469 conftest$ac_exeext conftest.$ac_ext
12470LIBS=$ac_check_lib_save_LIBS
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12473$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12474if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12475
Victor Stinner7efb8332014-08-29 15:41:08 +020012476 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012477 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12478
12479
12480$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12481
12482
12483fi
12484
12485
12486fi
12487done
12488
12489
12490for ac_func in clock_getres
12491do :
12492 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12493if test "x$ac_cv_func_clock_getres" = xyes; then :
12494 cat >>confdefs.h <<_ACEOF
12495#define HAVE_CLOCK_GETRES 1
12496_ACEOF
12497
12498else
12499
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12501$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12502if ${ac_cv_lib_rt_clock_getres+:} false; then :
12503 $as_echo_n "(cached) " >&6
12504else
12505 ac_check_lib_save_LIBS=$LIBS
12506LIBS="-lrt $LIBS"
12507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12508/* end confdefs.h. */
12509
12510/* Override any GCC internal prototype to avoid an error.
12511 Use char because int might match the return type of a GCC
12512 builtin and then its argument prototype would still apply. */
12513#ifdef __cplusplus
12514extern "C"
12515#endif
12516char clock_getres ();
12517int
12518main ()
12519{
12520return clock_getres ();
12521 ;
12522 return 0;
12523}
12524_ACEOF
12525if ac_fn_c_try_link "$LINENO"; then :
12526 ac_cv_lib_rt_clock_getres=yes
12527else
12528 ac_cv_lib_rt_clock_getres=no
12529fi
12530rm -f core conftest.err conftest.$ac_objext \
12531 conftest$ac_exeext conftest.$ac_ext
12532LIBS=$ac_check_lib_save_LIBS
12533fi
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12535$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12536if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12537
12538 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12539
12540
12541fi
12542
12543
12544fi
12545done
12546
12547
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012548for ac_func in clock_settime
12549do :
12550 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12551if test "x$ac_cv_func_clock_settime" = xyes; then :
12552 cat >>confdefs.h <<_ACEOF
12553#define HAVE_CLOCK_SETTIME 1
12554_ACEOF
12555
12556else
12557
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12559$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12560if ${ac_cv_lib_rt_clock_settime+:} false; then :
12561 $as_echo_n "(cached) " >&6
12562else
12563 ac_check_lib_save_LIBS=$LIBS
12564LIBS="-lrt $LIBS"
12565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566/* end confdefs.h. */
12567
12568/* Override any GCC internal prototype to avoid an error.
12569 Use char because int might match the return type of a GCC
12570 builtin and then its argument prototype would still apply. */
12571#ifdef __cplusplus
12572extern "C"
12573#endif
12574char clock_settime ();
12575int
12576main ()
12577{
12578return clock_settime ();
12579 ;
12580 return 0;
12581}
12582_ACEOF
12583if ac_fn_c_try_link "$LINENO"; then :
12584 ac_cv_lib_rt_clock_settime=yes
12585else
12586 ac_cv_lib_rt_clock_settime=no
12587fi
12588rm -f core conftest.err conftest.$ac_objext \
12589 conftest$ac_exeext conftest.$ac_ext
12590LIBS=$ac_check_lib_save_LIBS
12591fi
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12593$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12594if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12595
12596 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12597
12598
12599fi
12600
12601
12602fi
12603done
12604
12605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12607$as_echo_n "checking for major... " >&6; }
12608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012610
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012611#if defined(MAJOR_IN_MKDEV)
12612#include <sys/mkdev.h>
12613#elif defined(MAJOR_IN_SYSMACROS)
12614#include <sys/sysmacros.h>
12615#else
12616#include <sys/types.h>
12617#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012618
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012619int
12620main ()
12621{
12622
12623 makedev(major(0),minor(0));
12624
12625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012630
12631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12635$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012636
12637else
Skip Montanaro6dead952003-09-25 14:50:04 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12640$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012641
12642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012643rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012645
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012646# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012647# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12649$as_echo_n "checking for getaddrinfo... " >&6; }
12650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012652
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012653#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012654#include <sys/socket.h>
12655#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012656#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012657
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012661getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012667 have_getaddrinfo=yes
12668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671rm -f core conftest.err conftest.$ac_objext \
12672 conftest$ac_exeext conftest.$ac_ext
12673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12674$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012675if test $have_getaddrinfo = yes
12676then
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12678$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012679 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012683
12684if test "${enable_ipv6+set}" = set; then
12685 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12686else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012687 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012688fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012691/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012692
Stefan Krah19c21392012-11-22 23:47:32 +010012693#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012694#include <sys/types.h>
12695#include <netdb.h>
12696#include <string.h>
12697#include <sys/socket.h>
12698#include <netinet/in.h>
12699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012700int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701{
12702 int passive, gaierr, inet4 = 0, inet6 = 0;
12703 struct addrinfo hints, *ai, *aitop;
12704 char straddr[INET6_ADDRSTRLEN], strport[16];
12705
12706 for (passive = 0; passive <= 1; passive++) {
12707 memset(&hints, 0, sizeof(hints));
12708 hints.ai_family = AF_UNSPEC;
12709 hints.ai_flags = passive ? AI_PASSIVE : 0;
12710 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012711 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012712 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12713 (void)gai_strerror(gaierr);
12714 goto bad;
12715 }
12716 for (ai = aitop; ai; ai = ai->ai_next) {
12717 if (ai->ai_addr == NULL ||
12718 ai->ai_addrlen == 0 ||
12719 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12720 straddr, sizeof(straddr), strport, sizeof(strport),
12721 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12722 goto bad;
12723 }
12724 switch (ai->ai_family) {
12725 case AF_INET:
12726 if (strcmp(strport, "54321") != 0) {
12727 goto bad;
12728 }
12729 if (passive) {
12730 if (strcmp(straddr, "0.0.0.0") != 0) {
12731 goto bad;
12732 }
12733 } else {
12734 if (strcmp(straddr, "127.0.0.1") != 0) {
12735 goto bad;
12736 }
12737 }
12738 inet4++;
12739 break;
12740 case AF_INET6:
12741 if (strcmp(strport, "54321") != 0) {
12742 goto bad;
12743 }
12744 if (passive) {
12745 if (strcmp(straddr, "::") != 0) {
12746 goto bad;
12747 }
12748 } else {
12749 if (strcmp(straddr, "::1") != 0) {
12750 goto bad;
12751 }
12752 }
12753 inet6++;
12754 break;
12755 case AF_UNSPEC:
12756 goto bad;
12757 break;
12758 default:
12759 /* another family support? */
12760 break;
12761 }
12762 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012763 freeaddrinfo(aitop);
12764 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012765 }
12766
12767 if (!(inet4 == 0 || inet4 == 2))
12768 goto bad;
12769 if (!(inet6 == 0 || inet6 == 2))
12770 goto bad;
12771
12772 if (aitop)
12773 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012774 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775
12776 bad:
12777 if (aitop)
12778 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012779 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012780}
12781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012784 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012792fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12797$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12798
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012799if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012800then
12801 if test $ipv6 = yes
12802 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012803 echo 'Fatal: You must get working getaddrinfo() function.'
12804 echo ' or you can specify "--disable-ipv6"'.
12805 exit 1
12806 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012807else
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012810
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012812
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012813for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012814do :
12815 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012816if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012818#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012819_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012820
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821fi
12822done
12823
Michael W. Hudson54241132001-12-07 15:38:26 +000012824
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012825# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12827$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012828if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012832/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833#include <sys/types.h>
12834#include <sys/time.h>
12835#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837int
12838main ()
12839{
12840if ((struct tm *) 0)
12841return 0;
12842 ;
12843 return 0;
12844}
12845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012847 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12854$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012855if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858
12859fi
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12862$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012863if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012865else
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012867/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868#include <sys/types.h>
12869#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
12873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874struct tm tm;
12875 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ;
12878 return 0;
12879}
12880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882 ac_cv_struct_tm=time.h
12883else
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12889$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012890if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893
12894fi
12895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899"
Victor Stinnere0be4232011-10-25 13:06:09 +020012900if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
12902cat >>confdefs.h <<_ACEOF
12903#define HAVE_STRUCT_TM_TM_ZONE 1
12904_ACEOF
12905
12906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012908
Martin v. Löwis11437992002-04-12 09:54:03 +000012909if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912
12913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12915"
Victor Stinnere0be4232011-10-25 13:06:09 +020012916if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918else
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920fi
12921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924_ACEOF
12925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12927$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012928if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012933#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934#if !HAVE_DECL_TZNAME
12935extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938int
12939main ()
12940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 ;
12943 return 0;
12944}
12945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012946if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947 ac_cv_var_tzname=yes
12948else
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012951rm -f core conftest.err conftest.$ac_objext \
12952 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12955$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012956 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960 fi
12961fi
12962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012964if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
12966cat >>confdefs.h <<_ACEOF
12967#define HAVE_STRUCT_STAT_ST_RDEV 1
12968_ACEOF
12969
12970
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012971fi
12972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012974if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012975
Martin v. Löwis11437992002-04-12 09:54:03 +000012976cat >>confdefs.h <<_ACEOF
12977#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12978_ACEOF
12979
12980
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012981fi
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012984if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012985
12986cat >>confdefs.h <<_ACEOF
12987#define HAVE_STRUCT_STAT_ST_FLAGS 1
12988_ACEOF
12989
12990
12991fi
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012994if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012995
12996cat >>confdefs.h <<_ACEOF
12997#define HAVE_STRUCT_STAT_ST_GEN 1
12998_ACEOF
12999
13000
13001fi
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013005
13006cat >>confdefs.h <<_ACEOF
13007#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13008_ACEOF
13009
13010
13011fi
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013014if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016cat >>confdefs.h <<_ACEOF
13017#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13018_ACEOF
13019
13020
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013021fi
13022
Stefan Krah267b6392016-04-26 01:09:18 +020013023ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13024 #include <sys/types.h>
13025 #include <pwd.h>
13026
13027"
13028if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13029
13030cat >>confdefs.h <<_ACEOF
13031#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13032_ACEOF
13033
13034
13035fi
13036ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13037 #include <sys/types.h>
13038 #include <pwd.h>
13039
13040"
13041if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13042
13043cat >>confdefs.h <<_ACEOF
13044#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13045_ACEOF
13046
13047
13048fi
13049
Zachary Ware6a6967e2016-10-01 00:47:27 -050013050# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13051ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13052"
13053if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13054
13055cat >>confdefs.h <<_ACEOF
13056#define HAVE_SIGINFO_T_SI_BAND 1
13057_ACEOF
13058
13059
13060fi
13061
Michael W. Hudson54241132001-12-07 15:38:26 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13064$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013065if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013067else
Matthias Kloseb159a552010-04-25 21:00:44 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
13073main ()
13074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013080if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081 ac_cv_header_time_altzone=yes
13082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087fi
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13090$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013091if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094
13095fi
13096
Guido van Rossumda88dad1995-01-26 00:46:29 +000013097was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13099$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013101/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013102
13103#include <sys/types.h>
13104#include <sys/select.h>
13105#include <sys/time.h>
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110;
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ;
13112 return 0;
13113}
13114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013120 was_it_defined=yes
13121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13125$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13128$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013134#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013135int
13136main ()
13137{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 ;
13140 return 0;
13141}
13142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013144 ac_cv_struct_addrinfo=yes
13145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13149fi
13150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13152$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156
13157fi
13158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13160$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013161if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013165/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166
13167# include <sys/types.h>
13168# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013169int
13170main ()
13171{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 ;
13174 return 0;
13175}
13176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013178 ac_cv_struct_sockaddr_storage=yes
13179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13183fi
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13186$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013190
13191fi
13192
Christian Heimesdffa3942016-09-05 23:54:41 +020013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13194$as_echo_n "checking for sockaddr_alg... " >&6; }
13195if ${ac_cv_struct_sockaddr_alg+:} false; then :
13196 $as_echo_n "(cached) " >&6
13197else
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199/* end confdefs.h. */
13200
13201# include <sys/types.h>
13202# include <sys/socket.h>
13203# include <linux/if_alg.h>
13204int
13205main ()
13206{
13207struct sockaddr_alg s
13208 ;
13209 return 0;
13210}
13211_ACEOF
13212if ac_fn_c_try_compile "$LINENO"; then :
13213 ac_cv_struct_sockaddr_alg=yes
13214else
13215 ac_cv_struct_sockaddr_alg=no
13216fi
13217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218fi
13219
13220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13221$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13222if test $ac_cv_struct_sockaddr_alg = yes; then
13223
13224$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13225
13226fi
13227
Guido van Rossum627b2d71993-12-24 10:39:16 +000013228# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13231$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013232if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013237$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013238int
13239main ()
13240{
13241static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013242test_array [0] = 0;
13243return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
13245 ;
13246 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013247}
Martin v. Löwis11437992002-04-12 09:54:03 +000013248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013250 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13257$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013258if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013260
13261fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13264$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013265if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013269/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271int
13272main ()
13273{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013276 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013278 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280 char const *const *pcpcc;
13281 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 /* NEC SVR4.0.2 mips cc rejects this. */
13283 struct point {int x, y;};
13284 static struct point const zero = {0,0};
13285 /* AIX XL C 1.02.0.0 rejects this.
13286 It does not let you subtract one const X* pointer from another in
13287 an arm of an if-expression whose if-part is not a constant
13288 expression */
13289 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292 ++pcpcc;
13293 ppc = (char**) pcpcc;
13294 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013295 { /* SCO 3.2v4 cc rejects this sort of thing. */
13296 char tx;
13297 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 }
13303 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13304 int x[] = {25, 17};
13305 const int *foo = &x[0];
13306 ++foo;
13307 }
13308 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13309 typedef const int *iptr;
13310 iptr p = 0;
13311 ++p;
13312 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013313 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013315 struct s { int j; const int *ap[3]; } bx;
13316 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 }
13318 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13319 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013323#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013324
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 ;
13326 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013327}
Martin v. Löwis11437992002-04-12 09:54:03 +000013328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330 ac_cv_c_const=yes
13331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13337$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341
13342fi
13343
Michael W. Hudson54241132001-12-07 15:38:26 +000013344
Guido van Rossumda88dad1995-01-26 00:46:29 +000013345works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13347$as_echo_n "checking for working signed char... " >&6; }
13348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013349/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351int
13352main ()
13353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ;
13356 return 0;
13357}
13358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013360 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013361else
Skip Montanaro6dead952003-09-25 14:50:04 +000013362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013364
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013365
Guido van Rossum7f43da71994-08-01 12:15:30 +000013366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13369$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370
Guido van Rossumda88dad1995-01-26 00:46:29 +000013371have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13373$as_echo_n "checking for prototypes... " >&6; }
13374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013375/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013376int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013377int
13378main ()
13379{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 ;
13382 return 0;
13383}
13384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Matthias Kloseb159a552010-04-25 21:00:44 +000013389 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13393$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
Guido van Rossumda88dad1995-01-26 00:46:29 +000013395works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13397$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013399/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400
13401#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013402int foo(int x, ...) {
13403 va_list va;
13404 va_start(va, x);
13405 va_arg(va, int);
13406 va_arg(va, char *);
13407 va_arg(va, double);
13408 return 0;
13409}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411int
13412main ()
13413{
Guido van Rossum90eea071996-08-30 20:58:57 +000013414return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 ;
13416 return 0;
13417}
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
13421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013424 works=yes
13425
Guido van Rossum627b2d71993-12-24 10:39:16 +000013426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13429$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013430
Martin v. Löwisd6320502004-08-12 13:45:08 +000013431# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13433$as_echo_n "checking for socketpair... " >&6; }
13434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013435/* end confdefs.h. */
13436
13437#include <sys/types.h>
13438#include <sys/socket.h>
13439
13440int
13441main ()
13442{
13443void *x=socketpair
13444 ;
13445 return 0;
13446}
13447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013451
Matthias Kloseb159a552010-04-25 21:00:44 +000013452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13456$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013457
13458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013460
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013461# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13463$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013466#include <sys/types.h>
13467#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013468int
13469main ()
13470{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013471struct sockaddr x;
13472x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if ac_fn_c_try_compile "$LINENO"; then :
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13479$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013482
13483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13485$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013486
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013489
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013490# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
13492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013494if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13499$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013500 OLD_CFLAGS=$CFLAGS
13501 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013504
13505# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507int
13508main ()
13509{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013510
13511 char *name;
13512 struct hostent *he, *res;
13513 char buffer[2048];
13514 int buflen = 2048;
13515 int h_errnop;
13516
13517 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
13519 ;
13520 return 0;
13521}
13522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013526
Martin v. Löwis11437992002-04-12 09:54:03 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13531$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013533else
Skip Montanaro6dead952003-09-25 14:50:04 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13536$as_echo "no" >&6; }
13537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13538$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013540/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Martin v. Löwis11437992002-04-12 09:54:03 +000013544int
13545main ()
13546{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013547
13548 char *name;
13549 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013550 char buffer[2048];
13551 int buflen = 2048;
13552 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013553
Matthias Kloseb159a552010-04-25 21:00:44 +000013554 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
13556 ;
13557 return 0;
13558}
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Matthias Kloseb159a552010-04-25 21:00:44 +000013565$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13568$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013570else
Skip Montanaro6dead952003-09-25 14:50:04 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13573$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13575$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13577/* end confdefs.h. */
13578
13579# include <netdb.h>
13580
13581int
13582main ()
13583{
13584
13585 char *name;
13586 struct hostent *he;
13587 struct hostent_data data;
13588
13589 (void) gethostbyname_r(name, he, &data);
13590
13591 ;
13592 return 0;
13593}
13594_ACEOF
13595if ac_fn_c_try_compile "$LINENO"; then :
13596
13597 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13598
13599
13600$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13601
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13603$as_echo "yes" >&6; }
13604
13605else
13606
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013618 CFLAGS=$OLD_CFLAGS
13619
13620else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 for ac_func in gethostbyname
13623do :
13624 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013625if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013627#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013628_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013631done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632
Michael W. Hudson54241132001-12-07 15:38:26 +000013633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013634fi
13635
Michael W. Hudson54241132001-12-07 15:38:26 +000013636
13637
13638
13639
13640
13641
Guido van Rossum627b2d71993-12-24 10:39:16 +000013642# checks for system services
13643# (none yet)
13644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013646ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013648
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013649else
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13651$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013652if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013654else
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013656LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660/* Override any GCC internal prototype to avoid an error.
13661 Use char because int might match the return type of a GCC
13662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013663#ifdef __cplusplus
13664extern "C"
13665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013666char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013667int
13668main ()
13669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 ;
13672 return 0;
13673}
13674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013680rm -f core conftest.err conftest.$ac_objext \
13681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13685$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013686if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 cat >>confdefs.h <<_ACEOF
13688#define HAVE_LIBIEEE 1
13689_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013691 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692
Guido van Rossum627b2d71993-12-24 10:39:16 +000013693fi
13694
Michael W. Hudson54241132001-12-07 15:38:26 +000013695
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013696fi
13697
Michael W. Hudson54241132001-12-07 15:38:26 +000013698
Guido van Rossum7f43da71994-08-01 12:15:30 +000013699# check for --with-libm=...
13700
Guido van Rossum563e7081996-09-10 18:20:48 +000013701case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013702Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013703*) LIBM=-lm
13704esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13706$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013709if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013711if test "$withval" = no
13712then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13714$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013715elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013716then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13718$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013719else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13723$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724fi
13725
Guido van Rossum7f43da71994-08-01 12:15:30 +000013726
13727# check for --with-libc=...
13728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13730$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013732# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013733if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013735if test "$withval" = no
13736then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13738$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013739elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013740then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13742$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013743else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013744fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13747$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748fi
13749
Guido van Rossum7f43da71994-08-01 12:15:30 +000013750
Stefan Krah1919b7e2012-03-21 18:25:23 +010013751# **************************************
13752# * Check for gcc x64 inline assembler *
13753# **************************************
13754
13755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13756$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13758/* end confdefs.h. */
13759
13760int
13761main ()
13762{
13763
13764 __asm__ __volatile__ ("movq %rcx, %rax");
13765
13766 ;
13767 return 0;
13768}
13769_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013770if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013771 have_gcc_asm_for_x64=yes
13772else
13773 have_gcc_asm_for_x64=no
13774fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013775rm -f core conftest.err conftest.$ac_objext \
13776 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13778$as_echo "$have_gcc_asm_for_x64" >&6; }
13779if test "$have_gcc_asm_for_x64" = yes
13780then
13781
13782$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13783
13784fi
13785
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013786# **************************************************
13787# * Check for various properties of floating point *
13788# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13791$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013794else
13795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797 ac_cv_little_endian_double=no
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800/* end confdefs.h. */
13801
13802#include <string.h>
13803int main() {
13804 double x = 9006104071832581.0;
13805 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13806 return 0;
13807 else
13808 return 1;
13809}
13810
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813 ac_cv_little_endian_double=yes
13814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819fi
13820
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821fi
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13824$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825if test "$ac_cv_little_endian_double" = yes
13826then
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829
13830fi
13831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13833$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836else
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839 ac_cv_big_endian_double=no
13840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842/* end confdefs.h. */
13843
13844#include <string.h>
13845int main() {
13846 double x = 9006104071832581.0;
13847 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13848 return 0;
13849 else
13850 return 1;
13851}
13852
13853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855 ac_cv_big_endian_double=yes
13856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861fi
13862
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863fi
13864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13866$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867if test "$ac_cv_big_endian_double" = yes
13868then
13869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871
13872fi
13873
13874# Some ARM platforms use a mixed-endian representation for doubles.
13875# While Python doesn't currently have full support for these platforms
13876# (see e.g., issue 1762561), we can at least make sure that float <-> string
13877# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13879$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013880if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882else
13883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885 ac_cv_mixed_endian_double=no
13886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888/* end confdefs.h. */
13889
13890#include <string.h>
13891int main() {
13892 double x = 9006104071832581.0;
13893 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13894 return 0;
13895 else
13896 return 1;
13897}
13898
13899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013900if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013901 ac_cv_mixed_endian_double=yes
13902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907fi
13908
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909fi
13910
Matthias Kloseb9621712010-04-24 17:59:49 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13912$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913if test "$ac_cv_mixed_endian_double" = yes
13914then
13915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013917
13918fi
13919
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013920# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013921# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013922# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013923# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013924# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013925# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013926
13927# This inline assembler syntax may also work for suncc and icc,
13928# so we try it on all platforms.
13929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13931$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933/* end confdefs.h. */
13934
13935int
13936main ()
13937{
13938
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013939 unsigned short cw;
13940 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13941 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942
13943 ;
13944 return 0;
13945}
13946_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013947if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948 have_gcc_asm_for_x87=yes
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013952rm -f core conftest.err conftest.$ac_objext \
13953 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13955$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013956if test "$have_gcc_asm_for_x87" = yes
13957then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013960
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013962
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13964$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966/* end confdefs.h. */
13967
13968int
13969main ()
13970{
13971
13972 unsigned int fpcr;
13973 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13974 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13975
13976 ;
13977 return 0;
13978}
13979_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013980if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013981 have_gcc_asm_for_mc68881=yes
13982else
13983 have_gcc_asm_for_mc68881=no
13984fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013985rm -f core conftest.err conftest.$ac_objext \
13986 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13988$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13989if test "$have_gcc_asm_for_mc68881" = yes
13990then
13991
13992$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13993
13994fi
13995
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013996# Detect whether system arithmetic is subject to x87-style double
13997# rounding issues. The result of this test has little meaning on non
13998# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13999# mode is round-to-nearest and double rounding issues are present, and
14000# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14002$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003# $BASECFLAGS may affect the result
14004ac_save_cc="$CC"
14005CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014007 ac_cv_x87_double_rounding=no
14008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014010/* end confdefs.h. */
14011
14012#include <stdlib.h>
14013#include <math.h>
14014int main() {
14015 volatile double x, y, z;
14016 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14017 x = 0.99999999999999989; /* 1-2**-53 */
14018 y = 1./x;
14019 if (y != 1.)
14020 exit(0);
14021 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14022 x = 1e16;
14023 y = 2.99999;
14024 z = x + y;
14025 if (z != 1e16+4.)
14026 exit(0);
14027 /* both tests show evidence of double rounding */
14028 exit(1);
14029}
14030
14031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014032if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033 ac_cv_x87_double_rounding=no
14034else
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014039fi
14040
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014041CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14043$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014044if test "$ac_cv_x87_double_rounding" = yes
14045then
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014048
14049fi
14050
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051# ************************************
14052# * Check for mathematical functions *
14053# ************************************
14054
14055LIBS_SAVE=$LIBS
14056LIBS="$LIBS $LIBM"
14057
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014058for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14059do :
14060 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14061ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014062if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014063 cat >>confdefs.h <<_ACEOF
14064#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14065_ACEOF
14066
14067fi
14068done
14069
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014070for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014071do :
14072 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14073ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014074if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014075 cat >>confdefs.h <<_ACEOF
14076#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14077_ACEOF
14078
14079fi
14080done
14081
14082ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14083"
Victor Stinnere0be4232011-10-25 13:06:09 +020014084if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085 ac_have_decl=1
14086else
14087 ac_have_decl=0
14088fi
14089
14090cat >>confdefs.h <<_ACEOF
14091#define HAVE_DECL_ISINF $ac_have_decl
14092_ACEOF
14093ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14094"
Victor Stinnere0be4232011-10-25 13:06:09 +020014095if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096 ac_have_decl=1
14097else
14098 ac_have_decl=0
14099fi
14100
14101cat >>confdefs.h <<_ACEOF
14102#define HAVE_DECL_ISNAN $ac_have_decl
14103_ACEOF
14104ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14105"
Victor Stinnere0be4232011-10-25 13:06:09 +020014106if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014107 ac_have_decl=1
14108else
14109 ac_have_decl=0
14110fi
14111
14112cat >>confdefs.h <<_ACEOF
14113#define HAVE_DECL_ISFINITE $ac_have_decl
14114_ACEOF
14115
14116
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014117# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14118# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14120$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014121if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014123else
14124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014126 ac_cv_tanh_preserves_zero_sign=no
14127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014129/* end confdefs.h. */
14130
14131#include <math.h>
14132#include <stdlib.h>
14133int main() {
14134 /* return 0 if either negative zeros don't exist
14135 on this platform or if negative zeros exist
14136 and tanh(-0.) == -0. */
14137 if (atan2(0., -1.) == atan2(-0., -1.) ||
14138 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14139 else exit(1);
14140}
14141
14142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014144 ac_cv_tanh_preserves_zero_sign=yes
14145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014150fi
14151
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014152fi
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14155$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014156if test "$ac_cv_tanh_preserves_zero_sign" = yes
14157then
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014160
14161fi
14162
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163if test "$ac_cv_func_log1p" = yes
14164then
14165 # On some versions of AIX, log1p(-0.) returns 0. instead of
14166 # -0. See issue #9920.
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14168$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014169 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014170 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014171else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014172
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014173 if test "$cross_compiling" = yes; then :
14174 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014175else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14177/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014179 #include <math.h>
14180 #include <stdlib.h>
14181 int main() {
14182 /* Fail if the signs of log1p(-0.) and -0. can be
14183 distinguished. */
14184 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14185 return 0;
14186 else
14187 return 1;
14188 }
14189
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014190_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191if ac_fn_c_try_run "$LINENO"; then :
14192 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014194 ac_cv_log1p_drops_zero_sign=yes
14195fi
14196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014198fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014199
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014200fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014201
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14203$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14204fi
14205if test "$ac_cv_log1p_drops_zero_sign" = yes
14206then
14207
14208$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14209
14210fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014212LIBS=$LIBS_SAVE
14213
Mark Dickinsona614f042009-11-28 12:48:43 +000014214# For multiprocessing module, check that sem_open
14215# actually works. For FreeBSD versions <= 7.2,
14216# the kernel module that provides POSIX semaphores
14217# isn't loaded by default, so an attempt to call
14218# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14220$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014221if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014225 ac_cv_posix_semaphores_enabled=yes
14226else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014228/* end confdefs.h. */
14229
14230#include <unistd.h>
14231#include <fcntl.h>
14232#include <stdio.h>
14233#include <semaphore.h>
14234#include <sys/stat.h>
14235
14236int main(void) {
14237 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14238 if (a == SEM_FAILED) {
14239 perror("sem_open");
14240 return 1;
14241 }
14242 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014243 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014244 return 0;
14245}
14246
14247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014248if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014249 ac_cv_posix_semaphores_enabled=yes
14250else
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014255fi
14256
14257
Mark Dickinsona614f042009-11-28 12:48:43 +000014258fi
14259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14261$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014262if test $ac_cv_posix_semaphores_enabled = no
14263then
14264
Matthias Kloseb9621712010-04-24 17:59:49 +000014265$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014266
14267fi
14268
Mark Dickinson10683072009-04-18 21:18:19 +000014269# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14271$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014272if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274else
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014276 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014277else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014279/* end confdefs.h. */
14280
14281#include <unistd.h>
14282#include <fcntl.h>
14283#include <stdio.h>
14284#include <semaphore.h>
14285#include <sys/stat.h>
14286
14287int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014288 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014289 int count;
14290 int res;
14291 if(a==SEM_FAILED){
14292 perror("sem_open");
14293 return 1;
14294
14295 }
14296 res = sem_getvalue(a, &count);
14297 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014298 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014299 return res==-1 ? 1 : 0;
14300}
14301
Mark Dickinson10683072009-04-18 21:18:19 +000014302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014310fi
14311
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014312
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014313fi
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14316$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014317if test $ac_cv_broken_sem_getvalue = yes
14318then
14319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014321
14322fi
14323
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014324ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14325"
14326if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14327 ac_have_decl=1
14328else
14329 ac_have_decl=0
14330fi
14331
14332cat >>confdefs.h <<_ACEOF
14333#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14334_ACEOF
14335ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14336"
14337if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14338 ac_have_decl=1
14339else
14340 ac_have_decl=0
14341fi
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_DECL_RTLD_NOW $ac_have_decl
14345_ACEOF
14346ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14347"
14348if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14349 ac_have_decl=1
14350else
14351 ac_have_decl=0
14352fi
14353
14354cat >>confdefs.h <<_ACEOF
14355#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14356_ACEOF
14357ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14358"
14359if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14360 ac_have_decl=1
14361else
14362 ac_have_decl=0
14363fi
14364
14365cat >>confdefs.h <<_ACEOF
14366#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14367_ACEOF
14368ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14369"
14370if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14371 ac_have_decl=1
14372else
14373 ac_have_decl=0
14374fi
14375
14376cat >>confdefs.h <<_ACEOF
14377#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14378_ACEOF
14379ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14380"
14381if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14382 ac_have_decl=1
14383else
14384 ac_have_decl=0
14385fi
14386
14387cat >>confdefs.h <<_ACEOF
14388#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14389_ACEOF
14390ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14391"
14392if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14393 ac_have_decl=1
14394else
14395 ac_have_decl=0
14396fi
14397
14398cat >>confdefs.h <<_ACEOF
14399#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14400_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014401ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14402"
14403if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14404 ac_have_decl=1
14405else
14406 ac_have_decl=0
14407fi
14408
14409cat >>confdefs.h <<_ACEOF
14410#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14411_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014412
14413
Mark Dickinsonbd792642009-03-18 20:06:12 +000014414# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14416$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014417# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014418if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014419 enableval=$enable_big_digits; case $enable_big_digits in
14420yes)
14421 enable_big_digits=30 ;;
14422no)
14423 enable_big_digits=15 ;;
1442415|30)
14425 ;;
14426*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014427 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000014428esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14430$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014431
14432cat >>confdefs.h <<_ACEOF
14433#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14434_ACEOF
14435
14436
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14439$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014440fi
14441
14442
Guido van Rossumef2255b2000-03-10 22:30:29 +000014443# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014444ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014445if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014450 wchar_h="yes"
14451
Guido van Rossumef2255b2000-03-10 22:30:29 +000014452else
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014454
14455fi
14456
Michael W. Hudson54241132001-12-07 15:38:26 +000014457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014459# determine wchar_t size
14460if test "$wchar_h" = yes
14461then
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14465# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14467$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014468if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14472"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Martin v. Löwis11437992002-04-12 09:54:03 +000014474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 if test "$ac_cv_type_wchar_t" = yes; then
14476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014478as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014479See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480 else
14481 ac_cv_sizeof_wchar_t=0
14482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014484
Martin v. Löwis11437992002-04-12 09:54:03 +000014485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14487$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488
14489
14490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014492#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014493_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014494
Michael W. Hudson54241132001-12-07 15:38:26 +000014495
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014496fi
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14499$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014500have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014502/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014503
14504#include <tcl.h>
14505#if TCL_UTF_MAX != 6
14506# error "NOT UCS4_TCL"
14507#endif
14508int
14509main ()
14510{
14511
14512 ;
14513 return 0;
14514}
14515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014517
14518
Matthias Kloseb9621712010-04-24 17:59:49 +000014519$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014520
14521 have_ucs4_tcl=yes
14522
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14526$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014527
Skip Montanaro6dead952003-09-25 14:50:04 +000014528# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014529if test "$wchar_h" = yes
14530then
14531 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14533$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014534 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014536else
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014539 ac_cv_wchar_t_signed=yes
14540else
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014543
14544 #include <wchar.h>
14545 int main()
14546 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014547 /* Success: exit code 0 */
14548 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014549 }
14550
14551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014552if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014553 ac_cv_wchar_t_signed=yes
14554else
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014559fi
14560
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014561fi
14562
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14564$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565fi
14566
Georg Brandl52d168a2008-01-07 18:10:24 +000014567# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014568if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014569 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014570then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014571 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014574
Georg Brandl52d168a2008-01-07 18:10:24 +000014575else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014576 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014577fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14579$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580
14581# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14583$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014584if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 ac_cv_c_bigendian=unknown
14588 # See if we're dealing with a universal compiler.
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590/* end confdefs.h. */
14591#ifndef __APPLE_CC__
14592 not a universal capable compiler
14593 #endif
14594 typedef int dummy;
14595
Skip Montanaro6dead952003-09-25 14:50:04 +000014596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_compile "$LINENO"; then :
14598
14599 # Check for potential -arch flags. It is not universal unless
14600 # there are at least two -arch flags with different values.
14601 ac_arch=
14602 ac_prev=
14603 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14604 if test -n "$ac_prev"; then
14605 case $ac_word in
14606 i?86 | x86_64 | ppc | ppc64)
14607 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14608 ac_arch=$ac_word
14609 else
14610 ac_cv_c_bigendian=universal
14611 break
14612 fi
14613 ;;
14614 esac
14615 ac_prev=
14616 elif test "x$ac_word" = "x-arch"; then
14617 ac_prev=arch
14618 fi
14619 done
14620fi
14621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14622 if test $ac_cv_c_bigendian = unknown; then
14623 # See if sys/param.h defines the BYTE_ORDER macro.
14624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014625/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014626#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629int
14630main ()
14631{
Matthias Kloseb9621712010-04-24 17:59:49 +000014632#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14633 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14634 && LITTLE_ENDIAN)
14635 bogus endian macros
14636 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638 ;
14639 return 0;
14640}
14641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014642if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014643 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014645/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014646#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649int
14650main ()
14651{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014652#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014653 not big endian
14654 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656 ;
14657 return 0;
14658}
14659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014661 ac_cv_c_bigendian=yes
14662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014666fi
14667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14668 fi
14669 if test $ac_cv_c_bigendian = unknown; then
14670 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014672/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014673#include <limits.h>
14674
Martin v. Löwis11437992002-04-12 09:54:03 +000014675int
14676main ()
14677{
Matthias Kloseb9621712010-04-24 17:59:49 +000014678#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14679 bogus endian macros
14680 #endif
14681
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ;
14683 return 0;
14684}
14685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_compile "$LINENO"; then :
14687 # It does; now see whether it defined to _BIG_ENDIAN or not.
14688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689/* end confdefs.h. */
14690#include <limits.h>
14691
14692int
14693main ()
14694{
14695#ifndef _BIG_ENDIAN
14696 not big endian
14697 #endif
14698
14699 ;
14700 return 0;
14701}
14702_ACEOF
14703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709fi
14710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14711 fi
14712 if test $ac_cv_c_bigendian = unknown; then
14713 # Compile a test program.
14714 if test "$cross_compiling" = yes; then :
14715 # Try to guess by grepping values from an object file.
14716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717/* end confdefs.h. */
14718short int ascii_mm[] =
14719 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14720 short int ascii_ii[] =
14721 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14722 int use_ascii (int i) {
14723 return ascii_mm[i] + ascii_ii[i];
14724 }
14725 short int ebcdic_ii[] =
14726 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14727 short int ebcdic_mm[] =
14728 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14729 int use_ebcdic (int i) {
14730 return ebcdic_mm[i] + ebcdic_ii[i];
14731 }
14732 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734int
14735main ()
14736{
14737return use_ascii (foo) == use_ebcdic (foo);
14738 ;
14739 return 0;
14740}
14741_ACEOF
14742if ac_fn_c_try_compile "$LINENO"; then :
14743 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14744 ac_cv_c_bigendian=yes
14745 fi
14746 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14747 if test "$ac_cv_c_bigendian" = unknown; then
14748 ac_cv_c_bigendian=no
14749 else
14750 # finding both strings is unlikely to happen, but who knows?
14751 ac_cv_c_bigendian=unknown
14752 fi
14753 fi
14754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014758/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014760int
14761main ()
14762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 /* Are we little or big endian? From Harbison&Steele. */
14765 union
14766 {
14767 long int l;
14768 char c[sizeof (long int)];
14769 } u;
14770 u.l = 1;
14771 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772
14773 ;
14774 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775}
Martin v. Löwis11437992002-04-12 09:54:03 +000014776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014777if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778 ac_cv_c_bigendian=no
14779else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14789$as_echo "$ac_cv_c_bigendian" >&6; }
14790 case $ac_cv_c_bigendian in #(
14791 yes)
14792 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14793;; #(
14794 no)
14795 ;; #(
14796 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 ;; #(
14801 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014802 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014803 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014805
Michael W. Hudson54241132001-12-07 15:38:26 +000014806
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014807# ABI version string for Python extension modules. This appears between the
14808# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14809# from the following attributes which affect the ABI of this Python build (in
14810# this order):
14811#
14812# * The Python implementation (always 'cpython-' for us)
14813# * The major and minor version numbers
14814# * --with-pydebug (adds a 'd')
14815# * --with-pymalloc (adds a 'm')
14816# * --with-wide-unicode (adds a 'u')
14817#
14818# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014819# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14820# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014821
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14823$as_echo_n "checking ABIFLAGS... " >&6; }
14824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14825$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14827$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014828SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14830$as_echo "$SOABI" >&6; }
14831
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014832
14833case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014834 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014835 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14836 *)
14837 EXT_SUFFIX=${SHLIB_SUFFIX};;
14838esac
14839
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14841$as_echo_n "checking LDVERSION... " >&6; }
14842LDVERSION='$(VERSION)$(ABIFLAGS)'
14843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14844$as_echo "$LDVERSION" >&6; }
14845
doko@python.org87421192013-01-26 11:39:31 +010014846
doko@ubuntu.com55532312016-06-14 08:55:19 +020014847if test x$PLATFORM_TRIPLET = x; then
14848 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14849else
14850 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14851fi
doko@python.org87421192013-01-26 11:39:31 +010014852
14853
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014854# Check whether right shifting a negative integer extends the sign bit
14855# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14857$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014858if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014860else
Martin v. Löwis11437992002-04-12 09:54:03 +000014861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014863 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014866/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014867
14868int main()
14869{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014870 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014871}
14872
Martin v. Löwis11437992002-04-12 09:54:03 +000014873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014874if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014875 ac_cv_rshift_extends_sign=yes
14876else
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014881fi
14882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883fi
14884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14886$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014887if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014888then
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014891
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014892fi
14893
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014894# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14896$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014897if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014902/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014903#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014904int
14905main ()
14906{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014907
14908 FILE *f = fopen("/dev/null", "r");
14909 flockfile(f);
14910 getc_unlocked(f);
14911 funlockfile(f);
14912
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ;
14914 return 0;
14915}
14916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014918 ac_cv_have_getc_unlocked=yes
14919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_cv_have_getc_unlocked=no
14921fi
14922rm -f core conftest.err conftest.$ac_objext \
14923 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925
Matthias Kloseb9621712010-04-24 17:59:49 +000014926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14927$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014928if test "$ac_cv_have_getc_unlocked" = yes
14929then
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014932
14933fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014934
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014935# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014936# save the value of LIBS so we don't actually link Python with readline
14937LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014938
Gregory P. Smith18820942008-09-07 06:24:49 +000014939# On some systems we need to link readline to a termcap compatible
14940# library. NOTE: Keep the precedence of listed libraries synchronised
14941# with setup.py.
14942py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14944$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014945for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014946 if test -z "$py_libtermcap"; then
14947 READLINE_LIBS="-lreadline"
14948 else
14949 READLINE_LIBS="-lreadline -l$py_libtermcap"
14950 fi
14951 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014953/* end confdefs.h. */
14954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014961char readline ();
14962int
14963main ()
14964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014970if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014971 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014973rm -f core conftest.err conftest.$ac_objext \
14974 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014975 if test $py_cv_lib_readline = yes; then
14976 break
14977 fi
14978done
14979# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14980#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014981if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14983$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014984else
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14986$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014987
Matthias Kloseb9621712010-04-24 17:59:49 +000014988$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014989
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014990fi
14991
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014992# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995#include <readline/readline.h>
14996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014997if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014998 have_readline=yes
14999else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015000 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015001
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015002fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015003rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015004if test $have_readline = yes
15005then
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015007/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015008#include <readline/readline.h>
15009
15010_ACEOF
15011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015013
Matthias Kloseb9621712010-04-24 17:59:49 +000015014$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015015
15016fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015017rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015020/* end confdefs.h. */
15021#include <readline/readline.h>
15022
15023_ACEOF
15024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015028
15029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015030rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015031
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015032fi
15033
Martin v. Löwis0daad592001-09-30 21:09:59 +000015034# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15036$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015037if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015039else
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015041LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045/* Override any GCC internal prototype to avoid an error.
15046 Use char because int might match the return type of a GCC
15047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015048#ifdef __cplusplus
15049extern "C"
15050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015051char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015052int
15053main ()
15054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ;
15057 return 0;
15058}
15059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015062else
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015065rm -f core conftest.err conftest.$ac_objext \
15066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015067LIBS=$ac_check_lib_save_LIBS
15068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15070$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015071if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015074
Martin v. Löwis0daad592001-09-30 21:09:59 +000015075fi
15076
Michael W. Hudson54241132001-12-07 15:38:26 +000015077
Thomas Wouters89d996e2007-09-08 17:39:28 +000015078# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15080$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015081if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015083else
15084 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015085LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087/* end confdefs.h. */
15088
15089/* Override any GCC internal prototype to avoid an error.
15090 Use char because int might match the return type of a GCC
15091 builtin and then its argument prototype would still apply. */
15092#ifdef __cplusplus
15093extern "C"
15094#endif
15095char rl_completion_display_matches_hook ();
15096int
15097main ()
15098{
15099return rl_completion_display_matches_hook ();
15100 ;
15101 return 0;
15102}
15103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015104if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015105 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15106else
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015109rm -f core conftest.err conftest.$ac_objext \
15110 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015111LIBS=$ac_check_lib_save_LIBS
15112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15114$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015115if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015118
15119fi
15120
15121
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015122# also in 4.0, but not in editline
15123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15124$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15125if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15126 $as_echo_n "(cached) " >&6
15127else
15128 ac_check_lib_save_LIBS=$LIBS
15129LIBS="-lreadline $READLINE_LIBS $LIBS"
15130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131/* end confdefs.h. */
15132
15133/* Override any GCC internal prototype to avoid an error.
15134 Use char because int might match the return type of a GCC
15135 builtin and then its argument prototype would still apply. */
15136#ifdef __cplusplus
15137extern "C"
15138#endif
15139char rl_resize_terminal ();
15140int
15141main ()
15142{
15143return rl_resize_terminal ();
15144 ;
15145 return 0;
15146}
15147_ACEOF
15148if ac_fn_c_try_link "$LINENO"; then :
15149 ac_cv_lib_readline_rl_resize_terminal=yes
15150else
15151 ac_cv_lib_readline_rl_resize_terminal=no
15152fi
15153rm -f core conftest.err conftest.$ac_objext \
15154 conftest$ac_exeext conftest.$ac_ext
15155LIBS=$ac_check_lib_save_LIBS
15156fi
15157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15158$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15159if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15160
15161$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15162
15163fi
15164
15165
Martin v. Löwis0daad592001-09-30 21:09:59 +000015166# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15168$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015169if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015171else
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015173LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177/* Override any GCC internal prototype to avoid an error.
15178 Use char because int might match the return type of a GCC
15179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015180#ifdef __cplusplus
15181extern "C"
15182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015183char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015184int
15185main ()
15186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015194else
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015197rm -f core conftest.err conftest.$ac_objext \
15198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015199LIBS=$ac_check_lib_save_LIBS
15200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15202$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015203if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015206
Guido van Rossum353ae582001-07-10 16:45:32 +000015207fi
15208
Jack Jansendd19cf82001-12-06 22:36:17 +000015209
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212/* end confdefs.h. */
15213#include <readline/readline.h>
15214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015215if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015216 have_readline=yes
15217else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015218 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015219
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015220fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015221rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222if test $have_readline = yes
15223then
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015225/* end confdefs.h. */
15226#include <readline/readline.h>
15227
15228_ACEOF
15229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015233
15234fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015235rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015236
15237fi
15238
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15240$as_echo_n "checking for append_history in -lreadline... " >&6; }
15241if ${ac_cv_lib_readline_append_history+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243else
15244 ac_check_lib_save_LIBS=$LIBS
15245LIBS="-lreadline $READLINE_LIBS $LIBS"
15246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15247/* end confdefs.h. */
15248
15249/* Override any GCC internal prototype to avoid an error.
15250 Use char because int might match the return type of a GCC
15251 builtin and then its argument prototype would still apply. */
15252#ifdef __cplusplus
15253extern "C"
15254#endif
15255char append_history ();
15256int
15257main ()
15258{
15259return append_history ();
15260 ;
15261 return 0;
15262}
15263_ACEOF
15264if ac_fn_c_try_link "$LINENO"; then :
15265 ac_cv_lib_readline_append_history=yes
15266else
15267 ac_cv_lib_readline_append_history=no
15268fi
15269rm -f core conftest.err conftest.$ac_objext \
15270 conftest$ac_exeext conftest.$ac_ext
15271LIBS=$ac_check_lib_save_LIBS
15272fi
15273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15274$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15275if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15276
15277$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15278
15279fi
15280
15281
Martin v. Löwis82bca632006-02-10 20:49:30 +000015282# End of readline checks: restore LIBS
15283LIBS=$LIBS_no_readline
15284
Matthias Kloseb9621712010-04-24 17:59:49 +000015285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15286$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015287if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015289else
Martin v. Löwis11437992002-04-12 09:54:03 +000015290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015292 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015295/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015296
15297int main()
15298{
15299 int val1 = nice(1);
15300 if (val1 != -1 && val1 == nice(2))
15301 exit(0);
15302 exit(1);
15303}
15304
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015306if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015307 ac_cv_broken_nice=yes
15308else
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015313fi
15314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315fi
15316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15318$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015319if test "$ac_cv_broken_nice" = yes
15320then
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015323
15324fi
15325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15327$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015328if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015330else
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332 ac_cv_broken_poll=no
15333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015335/* end confdefs.h. */
15336
15337#include <poll.h>
15338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339int main()
15340{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015341 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015342 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015343
15344 close (42);
15345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015346 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015347 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015348 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015349 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015350 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015351 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015352 return 1;
15353}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015354
15355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015356if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015357 ac_cv_broken_poll=yes
15358else
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15362 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015365fi
15366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15368$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015369if test "$ac_cv_broken_poll" = yes
15370then
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015373
15374fi
15375
Brett Cannon43802422005-02-10 20:48:03 +000015376# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000015377# (which is not required by ISO C or UNIX spec) and/or if we support
15378# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015379ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000015380#include <$ac_cv_struct_tm>
15381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382"
Victor Stinnere0be4232011-10-25 13:06:09 +020015383if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015384
15385cat >>confdefs.h <<_ACEOF
15386#define HAVE_STRUCT_TM_TM_ZONE 1
15387_ACEOF
15388
15389
15390fi
15391
15392if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15393
Matthias Kloseb9621712010-04-24 17:59:49 +000015394$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015395
15396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15398"
Victor Stinnere0be4232011-10-25 13:06:09 +020015399if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401else
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403fi
15404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015406#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407_ACEOF
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15410$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015411if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413else
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015415/* end confdefs.h. */
15416#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417#if !HAVE_DECL_TZNAME
15418extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015419#endif
15420
15421int
15422main ()
15423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015425 ;
15426 return 0;
15427}
15428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015429if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015430 ac_cv_var_tzname=yes
15431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015434rm -f core conftest.err conftest.$ac_objext \
15435 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15438$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015439 if test $ac_cv_var_tzname = yes; then
15440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015442
15443 fi
15444fi
15445
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015446
Martin v. Löwis1d459062005-03-14 21:23:33 +000015447# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15449$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015450if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452else
15453
Matthias Kloseb9621712010-04-24 17:59:49 +000015454if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015455 ac_cv_working_tzset=no
15456else
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015458/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015459
15460#include <stdlib.h>
15461#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015462#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015463
15464#if HAVE_TZNAME
15465extern char *tzname[];
15466#endif
15467
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015468int main()
15469{
Brett Cannon18367812003-09-19 00:59:16 +000015470 /* Note that we need to ensure that not only does tzset(3)
15471 do 'something' with localtime, but it works as documented
15472 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015473 This includes making sure that tzname is set properly if
15474 tm->tm_zone does not exist since it is the alternative way
15475 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015476
15477 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015478 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015479 */
15480
Martin v. Löwis1d459062005-03-14 21:23:33 +000015481 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015482 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15483
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015484 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015486 if (localtime(&groundhogday)->tm_hour != 0)
15487 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015488#if HAVE_TZNAME
15489 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15490 if (strcmp(tzname[0], "UTC") ||
15491 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15492 exit(1);
15493#endif
Brett Cannon18367812003-09-19 00:59:16 +000015494
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015495 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015497 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015498 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015499#if HAVE_TZNAME
15500 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15501 exit(1);
15502#endif
Brett Cannon18367812003-09-19 00:59:16 +000015503
15504 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15505 tzset();
15506 if (localtime(&groundhogday)->tm_hour != 11)
15507 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015508#if HAVE_TZNAME
15509 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15510 exit(1);
15511#endif
15512
15513#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015514 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15515 exit(1);
15516 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15517 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015518#endif
Brett Cannon18367812003-09-19 00:59:16 +000015519
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015520 exit(0);
15521}
15522
15523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015524if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015525 ac_cv_working_tzset=yes
15526else
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015531fi
15532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533fi
15534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15536$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015537if test "$ac_cv_working_tzset" = yes
15538then
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015541
15542fi
15543
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015544# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15546$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015547if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015549else
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015551/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015552#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015553int
15554main ()
15555{
15556
15557struct stat st;
15558st.st_mtim.tv_nsec = 1;
15559
15560 ;
15561 return 0;
15562}
15563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015565 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015566else
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15570fi
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15573$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015574if test "$ac_cv_stat_tv_nsec" = yes
15575then
15576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015578
15579fi
15580
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15583$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015584if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015585 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015586else
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015588/* end confdefs.h. */
15589#include <sys/stat.h>
15590int
15591main ()
15592{
15593
15594struct stat st;
15595st.st_mtimespec.tv_nsec = 1;
15596
15597 ;
15598 return 0;
15599}
15600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015602 ac_cv_stat_tv_nsec2=yes
15603else
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15607fi
15608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15610$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015611if test "$ac_cv_stat_tv_nsec2" = yes
15612then
15613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015615
15616fi
15617
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015618# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015619ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015620if test "$cross_compiling" = no; then
15621 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15622fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015623
15624for ac_header in curses.h ncurses.h
15625do :
15626 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15627ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15629 cat >>confdefs.h <<_ACEOF
15630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15631_ACEOF
15632
15633fi
15634
15635done
15636
15637
15638# On Solaris, term.h requires curses.h
15639for ac_header in term.h
15640do :
15641 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15642#ifdef HAVE_CURSES_H
15643#include <curses.h>
15644#endif
15645
15646"
15647if test "x$ac_cv_header_term_h" = xyes; then :
15648 cat >>confdefs.h <<_ACEOF
15649#define HAVE_TERM_H 1
15650_ACEOF
15651
15652fi
15653
15654done
15655
15656
Jack Jansen666b1e72001-10-31 12:11:48 +000015657# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15659$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015660if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015664/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015665#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015666int
15667main ()
15668{
Jack Jansen666b1e72001-10-31 12:11:48 +000015669
15670 int rtn;
15671 rtn = mvwdelch(0,0,0);
15672
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 ;
15674 return 0;
15675}
15676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015677if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015678 ac_cv_mvwdelch_is_expression=yes
15679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15683fi
15684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15686$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015687
15688if test "$ac_cv_mvwdelch_is_expression" = yes
15689then
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
Matthias Kloseb9621712010-04-24 17:59:49 +000015691$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015692
15693fi
15694
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015695# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15696# structs since version 5.7. If the macro is defined as zero before including
15697# [n]curses.h, ncurses will expose fields of the structs regardless of the
15698# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15700$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015701if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015705/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015706
15707 #define NCURSES_OPAQUE 0
15708 #include <curses.h>
15709
Martin v. Löwis11437992002-04-12 09:54:03 +000015710int
15711main ()
15712{
Jack Jansen666b1e72001-10-31 12:11:48 +000015713
15714 WINDOW *w;
15715 w->_flags = 0;
15716
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 ;
15718 return 0;
15719}
15720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015721if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015722 ac_cv_window_has_flags=yes
15723else
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15727fi
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15730$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015731
Jack Jansen666b1e72001-10-31 12:11:48 +000015732
15733if test "$ac_cv_window_has_flags" = yes
15734then
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015737
15738fi
15739
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15741$as_echo_n "checking for is_pad... " >&6; }
15742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743/* end confdefs.h. */
15744#include <curses.h>
15745int
15746main ()
15747{
15748
15749#ifndef is_pad
15750void *x=is_pad
15751#endif
15752
15753 ;
15754 return 0;
15755}
15756_ACEOF
15757if ac_fn_c_try_compile "$LINENO"; then :
15758
15759$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15760
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15762$as_echo "yes" >&6; }
15763else
15764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15765$as_echo "no" >&6; }
15766
15767fi
15768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15769
Matthias Kloseb9621712010-04-24 17:59:49 +000015770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15771$as_echo_n "checking for is_term_resized... " >&6; }
15772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015773/* end confdefs.h. */
15774#include <curses.h>
15775int
15776main ()
15777{
15778void *x=is_term_resized
15779 ;
15780 return 0;
15781}
15782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786
Matthias Kloseb159a552010-04-25 21:00:44 +000015787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015789else
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15791$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015792
15793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15797$as_echo_n "checking for resize_term... " >&6; }
15798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015799/* end confdefs.h. */
15800#include <curses.h>
15801int
15802main ()
15803{
15804void *x=resize_term
15805 ;
15806 return 0;
15807}
15808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015810
Matthias Kloseb9621712010-04-24 17:59:49 +000015811$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812
Matthias Kloseb159a552010-04-25 21:00:44 +000015813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015814$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015815else
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15817$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015818
15819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15823$as_echo_n "checking for resizeterm... " >&6; }
15824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015825/* end confdefs.h. */
15826#include <curses.h>
15827int
15828main ()
15829{
15830void *x=resizeterm
15831 ;
15832 return 0;
15833}
15834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015835if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015838
Matthias Kloseb159a552010-04-25 21:00:44 +000015839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015840$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015841else
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015844
15845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015847
15848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15849$as_echo_n "checking for immedok... " >&6; }
15850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851/* end confdefs.h. */
15852#include <curses.h>
15853int
15854main ()
15855{
15856
15857#ifndef immedok
15858void *x=immedok
15859#endif
15860
15861 ;
15862 return 0;
15863}
15864_ACEOF
15865if ac_fn_c_try_compile "$LINENO"; then :
15866
15867$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15868
15869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15870$as_echo "yes" >&6; }
15871else
15872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15873$as_echo "no" >&6; }
15874
15875fi
15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877
15878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15879$as_echo_n "checking for syncok... " >&6; }
15880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15881/* end confdefs.h. */
15882#include <curses.h>
15883int
15884main ()
15885{
15886
15887#ifndef syncok
15888void *x=syncok
15889#endif
15890
15891 ;
15892 return 0;
15893}
15894_ACEOF
15895if ac_fn_c_try_compile "$LINENO"; then :
15896
15897$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15898
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15900$as_echo "yes" >&6; }
15901else
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15903$as_echo "no" >&6; }
15904
15905fi
15906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15909$as_echo_n "checking for wchgat... " >&6; }
15910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911/* end confdefs.h. */
15912#include <curses.h>
15913int
15914main ()
15915{
15916
15917#ifndef wchgat
15918void *x=wchgat
15919#endif
15920
15921 ;
15922 return 0;
15923}
15924_ACEOF
15925if ac_fn_c_try_compile "$LINENO"; then :
15926
15927$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15928
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15930$as_echo "yes" >&6; }
15931else
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15933$as_echo "no" >&6; }
15934
15935fi
15936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15937
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15939$as_echo_n "checking for filter... " >&6; }
15940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941/* end confdefs.h. */
15942#include <curses.h>
15943int
15944main ()
15945{
15946
15947#ifndef filter
15948void *x=filter
15949#endif
15950
15951 ;
15952 return 0;
15953}
15954_ACEOF
15955if ac_fn_c_try_compile "$LINENO"; then :
15956
15957$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15958
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15960$as_echo "yes" >&6; }
15961else
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
15964
15965fi
15966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
15968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15969$as_echo_n "checking for has_key... " >&6; }
15970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15971/* end confdefs.h. */
15972#include <curses.h>
15973int
15974main ()
15975{
15976
15977#ifndef has_key
15978void *x=has_key
15979#endif
15980
15981 ;
15982 return 0;
15983}
15984_ACEOF
15985if ac_fn_c_try_compile "$LINENO"; then :
15986
15987$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15988
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15990$as_echo "yes" >&6; }
15991else
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15993$as_echo "no" >&6; }
15994
15995fi
15996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15999$as_echo_n "checking for typeahead... " >&6; }
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001/* end confdefs.h. */
16002#include <curses.h>
16003int
16004main ()
16005{
16006
16007#ifndef typeahead
16008void *x=typeahead
16009#endif
16010
16011 ;
16012 return 0;
16013}
16014_ACEOF
16015if ac_fn_c_try_compile "$LINENO"; then :
16016
16017$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16018
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16020$as_echo "yes" >&6; }
16021else
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16023$as_echo "no" >&6; }
16024
16025fi
16026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16027
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16029$as_echo_n "checking for use_env... " >&6; }
16030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16031/* end confdefs.h. */
16032#include <curses.h>
16033int
16034main ()
16035{
16036
16037#ifndef use_env
16038void *x=use_env
16039#endif
16040
16041 ;
16042 return 0;
16043}
16044_ACEOF
16045if ac_fn_c_try_compile "$LINENO"; then :
16046
16047$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16048
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16050$as_echo "yes" >&6; }
16051else
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16053$as_echo "no" >&6; }
16054
16055fi
16056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016057# last curses configure check
16058CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16061$as_echo "$as_me: checking for device files" >&6;}
16062
16063if test "x$cross_compiling" = xyes; then
16064 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16066$as_echo_n "checking for /dev/ptmx... " >&6; }
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16068$as_echo "not set" >&6; }
16069 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16070 fi
16071 if test "${ac_cv_file__dev_ptc+set}" != set; then
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16073$as_echo_n "checking for /dev/ptc... " >&6; }
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16075$as_echo "not set" >&6; }
16076 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16077 fi
16078fi
16079
Matthias Kloseb9621712010-04-24 17:59:49 +000016080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16081$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016082if ${ac_cv_file__dev_ptmx+:} false; then :
16083 $as_echo_n "(cached) " >&6
16084else
16085 test "$cross_compiling" = yes &&
16086 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16087if test -r "/dev/ptmx"; then
16088 ac_cv_file__dev_ptmx=yes
16089else
16090 ac_cv_file__dev_ptmx=no
16091fi
16092fi
16093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16094$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16095if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016096
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016097fi
16098
16099if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016102
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16105$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016106if ${ac_cv_file__dev_ptc+:} false; then :
16107 $as_echo_n "(cached) " >&6
16108else
16109 test "$cross_compiling" = yes &&
16110 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16111if test -r "/dev/ptc"; then
16112 ac_cv_file__dev_ptc=yes
16113else
16114 ac_cv_file__dev_ptc=no
16115fi
16116fi
16117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16118$as_echo "$ac_cv_file__dev_ptc" >&6; }
16119if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016120
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016121fi
16122
16123if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016124
Matthias Kloseb9621712010-04-24 17:59:49 +000016125$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016126
Neal Norwitz865400f2003-03-21 01:42:58 +000016127fi
16128
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016129if test $ac_sys_system = Darwin
16130then
16131 LIBS="$LIBS -framework CoreFoundation"
16132fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16135$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016136if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016138else
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016140 ac_cv_have_size_t_format="cross -- assuming yes"
16141
Thomas Wouters477c8d52006-05-27 19:21:47 +000016142else
Matthias Kloseb9621712010-04-24 17:59:49 +000016143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016144/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145
Thomas Wouters477c8d52006-05-27 19:21:47 +000016146#include <stdio.h>
16147#include <stddef.h>
16148#include <string.h>
16149
Christian Heimes2c181612007-12-17 20:04:13 +000016150#ifdef HAVE_SYS_TYPES_H
16151#include <sys/types.h>
16152#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016153
16154#ifdef HAVE_SSIZE_T
16155typedef ssize_t Py_ssize_t;
16156#elif SIZEOF_VOID_P == SIZEOF_LONG
16157typedef long Py_ssize_t;
16158#else
16159typedef int Py_ssize_t;
16160#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016161
Christian Heimes2c181612007-12-17 20:04:13 +000016162int main()
16163{
16164 char buffer[256];
16165
Thomas Wouters477c8d52006-05-27 19:21:47 +000016166 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16167 return 1;
16168
Thomas Wouters89f507f2006-12-13 04:49:30 +000016169 if (strcmp(buffer, "123"))
16170 return 1;
16171
16172 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16173 return 1;
16174
16175 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016176 return 1;
16177
16178 return 0;
16179}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016180
Thomas Wouters477c8d52006-05-27 19:21:47 +000016181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016182if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016183 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016184else
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016189fi
16190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16193$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016194if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016195
Matthias Kloseb9621712010-04-24 17:59:49 +000016196$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016197
16198fi
16199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016201#ifdef HAVE_SYS_TYPES_H
16202#include <sys/types.h>
16203#endif
16204#ifdef HAVE_SYS_SOCKET_H
16205#include <sys/socket.h>
16206#endif
16207
Matthias Kloseb9621712010-04-24 17:59:49 +000016208"
Victor Stinnere0be4232011-10-25 13:06:09 +020016209if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016210
Martin v. Löwis11437992002-04-12 09:54:03 +000016211else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016214
16215fi
16216
Michael W. Hudson54241132001-12-07 15:38:26 +000016217
Matthias Kloseb9621712010-04-24 17:59:49 +000016218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16219$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016220if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016221 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016222else
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016224 ac_cv_broken_mbstowcs=no
16225else
Matthias Kloseb9621712010-04-24 17:59:49 +000016226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016227/* end confdefs.h. */
16228
Stefan Krah19c21392012-11-22 23:47:32 +010016229#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016230#include<stdlib.h>
16231int main() {
16232 size_t len = -1;
16233 const char *str = "text";
16234 len = mbstowcs(NULL, str, 0);
16235 return (len != 4);
16236}
16237
16238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016239if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016240 ac_cv_broken_mbstowcs=no
16241else
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016246fi
16247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016248fi
16249
Matthias Kloseb9621712010-04-24 17:59:49 +000016250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16251$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016252if test "$ac_cv_broken_mbstowcs" = yes
16253then
16254
Matthias Kloseb9621712010-04-24 17:59:49 +000016255$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016256
16257fi
16258
Antoine Pitroub52ec782009-01-25 16:34:23 +000016259# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16261$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016262
16263# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016264if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016265 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016266if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016267then
16268
Matthias Kloseb9621712010-04-24 17:59:49 +000016269$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016270
Matthias Kloseb9621712010-04-24 17:59:49 +000016271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16272$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016273fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016274if test "$withval" = no
16275then
16276
16277$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16278
Matthias Kloseb9621712010-04-24 17:59:49 +000016279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16280$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016281fi
16282
Antoine Pitrou042b1282010-08-13 21:15:58 +000016283else
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16285$as_echo "no value specified" >&6; }
16286fi
16287
Antoine Pitroub52ec782009-01-25 16:34:23 +000016288
Matthias Kloseb17289e2012-03-15 19:51:34 +010016289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16290$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16291if ${ac_cv_computed_gotos+:} false; then :
16292 $as_echo_n "(cached) " >&6
16293else
16294 if test "$cross_compiling" = yes; then :
16295 if test "${with_computed_gotos+set}" = set; then
16296 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16297 else
16298 ac_cv_computed_gotos=no
16299 fi
16300else
16301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302/* end confdefs.h. */
16303
16304int main(int argc, char **argv)
16305{
16306 static void *targets[1] = { &&LABEL1 };
16307 goto LABEL2;
16308LABEL1:
16309 return 0;
16310LABEL2:
16311 goto *targets[0];
16312 return 1;
16313}
16314
16315_ACEOF
16316if ac_fn_c_try_run "$LINENO"; then :
16317 ac_cv_computed_gotos=yes
16318else
16319 ac_cv_computed_gotos=no
16320fi
16321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16322 conftest.$ac_objext conftest.beam conftest.$ac_ext
16323fi
16324
16325fi
16326
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16328$as_echo "$ac_cv_computed_gotos" >&6; }
16329case "$ac_cv_computed_gotos" in yes*)
16330
16331$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16332
16333esac
16334
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016335case $ac_sys_system in
16336AIX*)
16337
16338$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16339 ;;
16340esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016341
Michael W. Hudson54241132001-12-07 15:38:26 +000016342
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016343
16344
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016345for h in `(cd $srcdir;echo Python/thread_*.h)`
16346do
16347 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16348done
16349
Michael W. Hudson54241132001-12-07 15:38:26 +000016350
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016351SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16353$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016354for dir in $SRCDIRS; do
16355 if test ! -d $dir; then
16356 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016357 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016358done
Matthias Kloseb9621712010-04-24 17:59:49 +000016359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16360$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016361
Stefan Krah1919b7e2012-03-21 18:25:23 +010016362# Availability of -O2:
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16364$as_echo_n "checking for -O2... " >&6; }
16365saved_cflags="$CFLAGS"
16366CFLAGS="-O2"
16367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368/* end confdefs.h. */
16369
16370int
16371main ()
16372{
16373
16374
16375 ;
16376 return 0;
16377}
16378_ACEOF
16379if ac_fn_c_try_compile "$LINENO"; then :
16380 have_O2=yes
16381else
16382 have_O2=no
16383fi
16384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16386$as_echo "$have_O2" >&6; }
16387CFLAGS="$saved_cflags"
16388
16389# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16390# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16392$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16393saved_cflags="$CFLAGS"
16394CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16395if test "$have_O2" = no; then
16396 CFLAGS=""
16397fi
16398if test "$cross_compiling" = yes; then :
16399 have_glibc_memmove_bug=undefined
16400else
16401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16402/* end confdefs.h. */
16403
16404#include <stdio.h>
16405#include <stdlib.h>
16406#include <string.h>
16407void foo(void *p, void *q) { memmove(p, q, 19); }
16408int main() {
16409 char a[32] = "123456789000000000";
16410 foo(&a[9], a);
16411 if (strcmp(a, "123456789123456789000000000") != 0)
16412 return 1;
16413 foo(a, &a[9]);
16414 if (strcmp(a, "123456789000000000") != 0)
16415 return 1;
16416 return 0;
16417}
16418
16419_ACEOF
16420if ac_fn_c_try_run "$LINENO"; then :
16421 have_glibc_memmove_bug=no
16422else
16423 have_glibc_memmove_bug=yes
16424fi
16425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16426 conftest.$ac_objext conftest.beam conftest.$ac_ext
16427fi
16428
16429CFLAGS="$saved_cflags"
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16431$as_echo "$have_glibc_memmove_bug" >&6; }
16432if test "$have_glibc_memmove_bug" = yes; then
16433
16434$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16435
16436fi
16437
16438if test "$have_gcc_asm_for_x87" = yes; then
16439 # Some versions of gcc miscompile inline asm:
16440 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16441 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16442 case $CC in
16443 *gcc*)
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16445$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16446 saved_cflags="$CFLAGS"
16447 CFLAGS="-O2"
16448 if test "$cross_compiling" = yes; then :
16449 have_ipa_pure_const_bug=undefined
16450else
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452/* end confdefs.h. */
16453
16454 __attribute__((noinline)) int
16455 foo(int *p) {
16456 int r;
16457 asm ( "movl \$6, (%1)\n\t"
16458 "xorl %0, %0\n\t"
16459 : "=r" (r) : "r" (p) : "memory"
16460 );
16461 return r;
16462 }
16463 int main() {
16464 int p = 8;
16465 if ((foo(&p) ? : p) != 6)
16466 return 1;
16467 return 0;
16468 }
16469
16470_ACEOF
16471if ac_fn_c_try_run "$LINENO"; then :
16472 have_ipa_pure_const_bug=no
16473else
16474 have_ipa_pure_const_bug=yes
16475fi
16476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16477 conftest.$ac_objext conftest.beam conftest.$ac_ext
16478fi
16479
16480 CFLAGS="$saved_cflags"
16481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16482$as_echo "$have_ipa_pure_const_bug" >&6; }
16483 if test "$have_ipa_pure_const_bug" = yes; then
16484
16485$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16486
16487 fi
16488 ;;
16489 esac
16490fi
16491
Victor Stinner4f5366e2015-01-09 02:13:19 +010016492# Check for stdatomic.h
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16494$as_echo_n "checking for stdatomic.h... " >&6; }
16495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16496/* end confdefs.h. */
16497
16498
16499 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016500 atomic_int value = ATOMIC_VAR_INIT(1);
16501 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016502 int main() {
16503 int loaded_value = atomic_load(&value);
16504 return 0;
16505 }
16506
16507
16508_ACEOF
16509if ac_fn_c_try_link "$LINENO"; then :
16510 have_stdatomic_h=yes
16511else
16512 have_stdatomic_h=no
16513fi
16514rm -f core conftest.err conftest.$ac_objext \
16515 conftest$ac_exeext conftest.$ac_ext
16516
16517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16518$as_echo "$have_stdatomic_h" >&6; }
16519
16520if test "$have_stdatomic_h" = yes; then
16521
16522$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16523
16524fi
16525
16526# Check for GCC >= 4.7 __atomic builtins
16527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16528$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16530/* end confdefs.h. */
16531
16532
16533 volatile int val = 1;
16534 int main() {
16535 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16536 return 0;
16537 }
16538
16539
16540_ACEOF
16541if ac_fn_c_try_link "$LINENO"; then :
16542 have_builtin_atomic=yes
16543else
16544 have_builtin_atomic=no
16545fi
16546rm -f core conftest.err conftest.$ac_objext \
16547 conftest$ac_exeext conftest.$ac_ext
16548
16549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16550$as_echo "$have_builtin_atomic" >&6; }
16551
16552if test "$have_builtin_atomic" = yes; then
16553
16554$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16555
16556fi
16557
Ned Deily322f5ba2013-11-21 23:01:59 -080016558# ensurepip option
16559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16560$as_echo_n "checking for ensurepip... " >&6; }
16561
16562# Check whether --with-ensurepip was given.
16563if test "${with_ensurepip+set}" = set; then :
16564 withval=$with_ensurepip;
16565else
16566 with_ensurepip=upgrade
16567fi
16568
16569case $with_ensurepip in #(
16570 yes|upgrade) :
16571 ENSUREPIP=upgrade ;; #(
16572 install) :
16573 ENSUREPIP=install ;; #(
16574 no) :
16575 ENSUREPIP=no ;; #(
16576 *) :
16577 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16578esac
16579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16580$as_echo "$ENSUREPIP" >&6; }
16581
16582
Victor Stinner35a97c02015-03-08 02:59:09 +010016583# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16585$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16587/* end confdefs.h. */
16588
16589
16590 #include <dirent.h>
16591
16592 int main() {
16593 struct dirent entry;
16594 return entry.d_type == DT_UNKNOWN;
16595 }
16596
16597
16598_ACEOF
16599if ac_fn_c_try_link "$LINENO"; then :
16600 have_dirent_d_type=yes
16601else
16602 have_dirent_d_type=no
16603fi
16604rm -f core conftest.err conftest.$ac_objext \
16605 conftest$ac_exeext conftest.$ac_ext
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16607$as_echo "$have_dirent_d_type" >&6; }
16608
16609if test "$have_dirent_d_type" = yes; then
16610
16611$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16612
16613fi
16614
Victor Stinner9eb57c52015-03-19 22:21:49 +010016615# check if the Linux getrandom() syscall is available
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16617$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16619/* end confdefs.h. */
16620
16621
Victor Stinner1b80b242016-04-12 22:34:58 +020016622 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016623 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016624 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016625
16626 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016627 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016628 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016629 const int flags = GRND_NONBLOCK;
16630 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016631 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016632 return 0;
16633 }
16634
16635
16636_ACEOF
16637if ac_fn_c_try_link "$LINENO"; then :
16638 have_getrandom_syscall=yes
16639else
16640 have_getrandom_syscall=no
16641fi
16642rm -f core conftest.err conftest.$ac_objext \
16643 conftest$ac_exeext conftest.$ac_ext
16644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16645$as_echo "$have_getrandom_syscall" >&6; }
16646
16647if test "$have_getrandom_syscall" = yes; then
16648
16649$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16650
16651fi
16652
Victor Stinner3abf44e2015-09-18 15:38:37 +020016653# check if the getrandom() function is available
16654# the test was written for the Solaris function of <sys/random.h>
16655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16656$as_echo_n "checking for the getrandom() function... " >&6; }
16657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16658/* end confdefs.h. */
16659
16660
16661 #include <sys/random.h>
16662
16663 int main() {
16664 char buffer[1];
16665 const size_t buflen = sizeof(buffer);
16666 const int flags = 0;
16667 /* ignore the result, Python checks for ENOSYS at runtime */
16668 (void)getrandom(buffer, buflen, flags);
16669 return 0;
16670 }
16671
16672
16673_ACEOF
16674if ac_fn_c_try_link "$LINENO"; then :
16675 have_getrandom=yes
16676else
16677 have_getrandom=no
16678fi
16679rm -f core conftest.err conftest.$ac_objext \
16680 conftest$ac_exeext conftest.$ac_ext
16681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16682$as_echo "$have_getrandom" >&6; }
16683
16684if test "$have_getrandom" = yes; then
16685
16686$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16687
16688fi
16689
Christian Heimesff5be6e2018-01-20 13:19:21 +010016690# Check for usable OpenSSL
16691
16692 found=false
16693
16694# Check whether --with-openssl was given.
16695if test "${with_openssl+set}" = set; then :
16696 withval=$with_openssl;
16697 case "$withval" in
16698 "" | y | ye | yes | n | no)
16699 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16700 ;;
16701 *) ssldirs="$withval"
16702 ;;
16703 esac
16704
16705else
16706
16707 # if pkg-config is installed and openssl has installed a .pc file,
16708 # then use that information and don't search ssldirs
16709 if test -n "$ac_tool_prefix"; then
16710 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16711set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16713$as_echo_n "checking for $ac_word... " >&6; }
16714if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16715 $as_echo_n "(cached) " >&6
16716else
16717 if test -n "$PKG_CONFIG"; then
16718 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16719else
16720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16721for as_dir in $PATH
16722do
16723 IFS=$as_save_IFS
16724 test -z "$as_dir" && as_dir=.
16725 for ac_exec_ext in '' $ac_executable_extensions; do
16726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16727 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16729 break 2
16730 fi
16731done
16732 done
16733IFS=$as_save_IFS
16734
16735fi
16736fi
16737PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16738if test -n "$PKG_CONFIG"; then
16739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16740$as_echo "$PKG_CONFIG" >&6; }
16741else
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16743$as_echo "no" >&6; }
16744fi
16745
16746
16747fi
16748if test -z "$ac_cv_prog_PKG_CONFIG"; then
16749 ac_ct_PKG_CONFIG=$PKG_CONFIG
16750 # Extract the first word of "pkg-config", so it can be a program name with args.
16751set dummy pkg-config; ac_word=$2
16752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16753$as_echo_n "checking for $ac_word... " >&6; }
16754if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16755 $as_echo_n "(cached) " >&6
16756else
16757 if test -n "$ac_ct_PKG_CONFIG"; then
16758 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16759else
16760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16761for as_dir in $PATH
16762do
16763 IFS=$as_save_IFS
16764 test -z "$as_dir" && as_dir=.
16765 for ac_exec_ext in '' $ac_executable_extensions; do
16766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16767 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16769 break 2
16770 fi
16771done
16772 done
16773IFS=$as_save_IFS
16774
16775fi
16776fi
16777ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16778if test -n "$ac_ct_PKG_CONFIG"; then
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16780$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16781else
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16783$as_echo "no" >&6; }
16784fi
16785
16786 if test "x$ac_ct_PKG_CONFIG" = x; then
16787 PKG_CONFIG=""
16788 else
16789 case $cross_compiling:$ac_tool_warned in
16790yes:)
16791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16793ac_tool_warned=yes ;;
16794esac
16795 PKG_CONFIG=$ac_ct_PKG_CONFIG
16796 fi
16797else
16798 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16799fi
16800
16801 if test x"$PKG_CONFIG" != x""; then
16802 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16803 if test $? = 0; then
16804 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16805 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16806 found=true
16807 fi
16808 fi
16809
16810 # no such luck; use some default ssldirs
16811 if ! $found; then
16812 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16813 fi
16814
16815
16816fi
16817
16818
16819
16820 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16821 # an 'openssl' subdirectory
16822
16823 if ! $found; then
16824 OPENSSL_INCLUDES=
16825 for ssldir in $ssldirs; do
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16827$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16828 if test -f "$ssldir/include/openssl/ssl.h"; then
16829 OPENSSL_INCLUDES="-I$ssldir/include"
16830 OPENSSL_LDFLAGS="-L$ssldir/lib"
16831 OPENSSL_LIBS="-lssl -lcrypto"
16832 found=true
16833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16834$as_echo "yes" >&6; }
16835 break
16836 else
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16838$as_echo "no" >&6; }
16839 fi
16840 done
16841
16842 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16843 # it will just work!
16844 fi
16845
16846 # try the preprocessor and linker with our new flags,
16847 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16848
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16850$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16851 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16852 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16853
16854 save_LIBS="$LIBS"
16855 save_LDFLAGS="$LDFLAGS"
16856 save_CPPFLAGS="$CPPFLAGS"
16857 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16858 LIBS="$OPENSSL_LIBS $LIBS"
16859 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861/* end confdefs.h. */
16862#include <openssl/ssl.h>
16863int
16864main ()
16865{
16866SSL_new(NULL)
16867 ;
16868 return 0;
16869}
16870_ACEOF
16871if ac_fn_c_try_link "$LINENO"; then :
16872
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16874$as_echo "yes" >&6; }
16875 have_openssl=yes
16876
16877else
16878
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16880$as_echo "no" >&6; }
16881 have_openssl=no
16882
16883fi
16884rm -f core conftest.err conftest.$ac_objext \
16885 conftest$ac_exeext conftest.$ac_ext
16886 CPPFLAGS="$save_CPPFLAGS"
16887 LDFLAGS="$save_LDFLAGS"
16888 LIBS="$save_LIBS"
16889
16890
16891
16892
16893
16894
16895if test "$have_openssl" = yes; then
16896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16897$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16898
16899 save_LIBS="$LIBS"
16900 save_LDFLAGS="$LDFLAGS"
16901 save_CPPFLAGS="$CPPFLAGS"
16902 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16903 LIBS="$OPENSSL_LIBS $LIBS"
16904 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16905
16906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16907/* end confdefs.h. */
16908
16909 #include <openssl/x509_vfy.h>
16910
16911int
16912main ()
16913{
16914
16915 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16916 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16917 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16918 X509_VERIFY_PARAM_set_hostflags(p, 0);
16919
16920 ;
16921 return 0;
16922}
16923
16924_ACEOF
16925if ac_fn_c_try_link "$LINENO"; then :
16926
16927 ac_cv_has_x509_verify_param_set1_host=yes
16928
16929else
16930
16931 ac_cv_has_x509_verify_param_set1_host=no
16932
16933fi
16934rm -f core conftest.err conftest.$ac_objext \
16935 conftest$ac_exeext conftest.$ac_ext
16936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16937$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16938 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16939
16940$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16941
16942 fi
16943
16944 CPPFLAGS="$save_CPPFLAGS"
16945 LDFLAGS="$save_LDFLAGS"
16946 LIBS="$save_LIBS"
16947fi
16948
Christian Heimes892d66e2018-01-29 14:10:18 +010016949# ssl module default cipher suite string
16950
16951
16952
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16954$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16955
16956# Check whether --with-ssl-default-suites was given.
16957if test "${with_ssl_default_suites+set}" = set; then :
16958 withval=$with_ssl_default_suites;
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16960$as_echo "$withval" >&6; }
16961case "$withval" in
16962 python)
16963 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16964
16965 ;;
16966 openssl)
16967 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16968
16969 ;;
16970 *)
16971 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16972
16973 cat >>confdefs.h <<_ACEOF
16974#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16975_ACEOF
16976
16977 ;;
16978esac
16979
16980else
16981
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16983$as_echo "python" >&6; }
16984$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16985
16986
16987fi
16988
16989
16990
Guido van Rossum627b2d71993-12-24 10:39:16 +000016991# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016992ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016993
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016994ac_config_files="$ac_config_files Modules/ld_so_aix"
16995
Martin v. Löwis11437992002-04-12 09:54:03 +000016996cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016997# This file is a shell script that caches the results of configure
16998# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016999# scripts and configure runs, see configure's option --config-cache.
17000# It is not useful on other systems. If it contains results you don't
17001# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017002#
Martin v. Löwis11437992002-04-12 09:54:03 +000017003# config.status only pays attention to the cache file if you give it
17004# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017005#
Skip Montanaro6dead952003-09-25 14:50:04 +000017006# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017007# loading this file, other *unset* `ac_cv_foo' will be assigned the
17008# following values.
17009
17010_ACEOF
17011
Guido van Rossumf78abae1997-01-21 22:02:36 +000017012# The following way of writing the cache mishandles newlines in values,
17013# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017015# Ultrix sh set writes to stderr and can't be redirected directly,
17016# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017(
17018 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17019 eval ac_val=\$$ac_var
17020 case $ac_val in #(
17021 *${as_nl}*)
17022 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17024$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025 esac
17026 case $ac_var in #(
17027 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017028 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17029 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017030 esac ;;
17031 esac
17032 done
17033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17036 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 # `set' does not quote correctly, so add quotes: double-quote
17038 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017040 "s/'/'\\\\''/g;
17041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 *)
17044 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 esac |
17048 sort
17049) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017050 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17055 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017056 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17057 :end' >>confcache
17058if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17059 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017060 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17062$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017063 if test ! -f "$cache_file" || test -h "$cache_file"; then
17064 cat confcache >"$cache_file"
17065 else
17066 case $cache_file in #(
17067 */* | ?:*)
17068 mv -f confcache "$cache_file"$$ &&
17069 mv -f "$cache_file"$$ "$cache_file" ;; #(
17070 *)
17071 mv -f confcache "$cache_file" ;;
17072 esac
17073 fi
17074 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017075 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17077$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017078 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017079fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017080rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017082test "x$prefix" = xNONE && prefix=$ac_default_prefix
17083# Let make expand exec_prefix.
17084test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017085
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017086DEFS=-DHAVE_CONFIG_H
17087
Skip Montanaro6dead952003-09-25 14:50:04 +000017088ac_libobjs=
17089ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017090U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017091for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17092 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17096 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017097 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17098 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017099done
17100LIBOBJS=$ac_libobjs
17101
17102LTLIBOBJS=$ac_ltlibobjs
17103
17104
Martin v. Löwis11437992002-04-12 09:54:03 +000017105
Matthias Kloseb9621712010-04-24 17:59:49 +000017106
Victor Stinnere0be4232011-10-25 13:06:09 +020017107: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017108ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017109ac_clean_files_save=$ac_clean_files
17110ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017111{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17112$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17113as_write_fail=0
17114cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017115#! $SHELL
17116# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017117# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017118# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017119# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017120
Martin v. Löwis11437992002-04-12 09:54:03 +000017121debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017122ac_cs_recheck=false
17123ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017124
Matthias Kloseb9621712010-04-24 17:59:49 +000017125SHELL=\${CONFIG_SHELL-$SHELL}
17126export SHELL
17127_ASEOF
17128cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17129## -------------------- ##
17130## M4sh Initialization. ##
17131## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133# Be more Bourne compatible
17134DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017135if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 emulate sh
17137 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017139 # is contrary to our usage. Disable this feature.
17140 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017141 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017142else
Matthias Kloseb9621712010-04-24 17:59:49 +000017143 case `(set -o) 2>/dev/null` in #(
17144 *posix*) :
17145 set -o posix ;; #(
17146 *) :
17147 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017149fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017150
17151
Matthias Kloseb9621712010-04-24 17:59:49 +000017152as_nl='
17153'
17154export as_nl
17155# Printing a long string crashes Solaris 7 /usr/bin/printf.
17156as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17157as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17158as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17159# Prefer a ksh shell builtin over an external printf program on Solaris,
17160# but without wasting forks for bash or zsh.
17161if test -z "$BASH_VERSION$ZSH_VERSION" \
17162 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17163 as_echo='print -r --'
17164 as_echo_n='print -rn --'
17165elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17166 as_echo='printf %s\n'
17167 as_echo_n='printf %s'
17168else
17169 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17170 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17171 as_echo_n='/usr/ucb/echo -n'
17172 else
17173 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17174 as_echo_n_body='eval
17175 arg=$1;
17176 case $arg in #(
17177 *"$as_nl"*)
17178 expr "X$arg" : "X\\(.*\\)$as_nl";
17179 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17180 esac;
17181 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17182 '
17183 export as_echo_n_body
17184 as_echo_n='sh -c $as_echo_n_body as_echo'
17185 fi
17186 export as_echo_body
17187 as_echo='sh -c $as_echo_body as_echo'
17188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
17190# The user is always right.
17191if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 PATH_SEPARATOR=:
17193 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17194 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17195 PATH_SEPARATOR=';'
17196 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199
17200# IFS
17201# We need space, tab and new line, in precisely that order. Quoting is
17202# there to prevent editors from complaining about space-tab.
17203# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17204# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205IFS=" "" $as_nl"
17206
17207# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017208as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017209case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 *[\\/]* ) as_myself=$0 ;;
17211 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017212for as_dir in $PATH
17213do
17214 IFS=$as_save_IFS
17215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017216 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17217 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 ;;
17221esac
17222# We did not find ourselves, most probably we were run as `sh COMMAND'
17223# in which case we are not to be found in the path.
17224if test "x$as_myself" = x; then
17225 as_myself=$0
17226fi
17227if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017228 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17229 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230fi
17231
Matthias Kloseb9621712010-04-24 17:59:49 +000017232# Unset variables that we do not need and which cause bugs (e.g. in
17233# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17234# suppresses any "Segmentation fault" message there. '((' could
17235# trigger a bug in pdksh 5.2.14.
17236for as_var in BASH_ENV ENV MAIL MAILPATH
17237do eval test x\${$as_var+set} = xset \
17238 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239done
17240PS1='$ '
17241PS2='> '
17242PS4='+ '
17243
17244# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017245LC_ALL=C
17246export LC_ALL
17247LANGUAGE=C
17248export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249
Matthias Kloseb9621712010-04-24 17:59:49 +000017250# CDPATH.
17251(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17252
17253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017254# as_fn_error STATUS ERROR [LINENO LOG_FD]
17255# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017256# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17257# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017258# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017259as_fn_error ()
17260{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017261 as_status=$1; test $as_status -eq 0 && as_status=1
17262 if test "$4"; then
17263 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17264 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 as_fn_exit $as_status
17268} # as_fn_error
17269
17270
17271# as_fn_set_status STATUS
17272# -----------------------
17273# Set $? to STATUS, without forking.
17274as_fn_set_status ()
17275{
17276 return $1
17277} # as_fn_set_status
17278
17279# as_fn_exit STATUS
17280# -----------------
17281# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17282as_fn_exit ()
17283{
17284 set +e
17285 as_fn_set_status $1
17286 exit $1
17287} # as_fn_exit
17288
17289# as_fn_unset VAR
17290# ---------------
17291# Portably unset VAR.
17292as_fn_unset ()
17293{
17294 { eval $1=; unset $1;}
17295}
17296as_unset=as_fn_unset
17297# as_fn_append VAR VALUE
17298# ----------------------
17299# Append the text in VALUE to the end of the definition contained in VAR. Take
17300# advantage of any shell optimizations that allow amortized linear growth over
17301# repeated appends, instead of the typical quadratic growth present in naive
17302# implementations.
17303if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17304 eval 'as_fn_append ()
17305 {
17306 eval $1+=\$2
17307 }'
17308else
17309 as_fn_append ()
17310 {
17311 eval $1=\$$1\$2
17312 }
17313fi # as_fn_append
17314
17315# as_fn_arith ARG...
17316# ------------------
17317# Perform arithmetic evaluation on the ARGs, and store the result in the
17318# global $as_val. Take advantage of shells that can avoid forks. The arguments
17319# must be portable across $(()) and expr.
17320if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17321 eval 'as_fn_arith ()
17322 {
17323 as_val=$(( $* ))
17324 }'
17325else
17326 as_fn_arith ()
17327 {
17328 as_val=`expr "$@" || test $? -eq 1`
17329 }
17330fi # as_fn_arith
17331
17332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333if expr a : '\(a\)' >/dev/null 2>&1 &&
17334 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17335 as_expr=expr
17336else
17337 as_expr=false
17338fi
17339
17340if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17341 as_basename=basename
17342else
17343 as_basename=false
17344fi
17345
Matthias Kloseb9621712010-04-24 17:59:49 +000017346if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17347 as_dirname=dirname
17348else
17349 as_dirname=false
17350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352as_me=`$as_basename -- "$0" ||
17353$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17354 X"$0" : 'X\(//\)$' \| \
17355 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017356$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 sed '/^.*\/\([^/][^/]*\)\/*$/{
17358 s//\1/
17359 q
17360 }
17361 /^X\/\(\/\/\)$/{
17362 s//\1/
17363 q
17364 }
17365 /^X\/\(\/\).*/{
17366 s//\1/
17367 q
17368 }
17369 s/.*/./; q'`
17370
Matthias Kloseb9621712010-04-24 17:59:49 +000017371# Avoid depending upon Character Ranges.
17372as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17373as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17374as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17375as_cr_digits='0123456789'
17376as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377
17378ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017379case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017383 xy) ECHO_C='\c';;
17384 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17385 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 esac;;
17387*)
17388 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017390
Martin v. Löwis11437992002-04-12 09:54:03 +000017391rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392if test -d conf$$.dir; then
17393 rm -f conf$$.dir/conf$$.file
17394else
17395 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017398if (echo >conf$$.file) 2>/dev/null; then
17399 if ln -s conf$$.file conf$$ 2>/dev/null; then
17400 as_ln_s='ln -s'
17401 # ... but there are two gotchas:
17402 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17403 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017404 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017405 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017406 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 elif ln conf$$.file conf$$ 2>/dev/null; then
17408 as_ln_s=ln
17409 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017410 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017411 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017412else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017413 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17416rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017417
Matthias Kloseb9621712010-04-24 17:59:49 +000017418
17419# as_fn_mkdir_p
17420# -------------
17421# Create "$as_dir" as a directory, including parents if necessary.
17422as_fn_mkdir_p ()
17423{
17424
17425 case $as_dir in #(
17426 -*) as_dir=./$as_dir;;
17427 esac
17428 test -d "$as_dir" || eval $as_mkdir_p || {
17429 as_dirs=
17430 while :; do
17431 case $as_dir in #(
17432 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17433 *) as_qdir=$as_dir;;
17434 esac
17435 as_dirs="'$as_qdir' $as_dirs"
17436 as_dir=`$as_dirname -- "$as_dir" ||
17437$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17438 X"$as_dir" : 'X\(//\)[^/]' \| \
17439 X"$as_dir" : 'X\(//\)$' \| \
17440 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17441$as_echo X"$as_dir" |
17442 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17443 s//\1/
17444 q
17445 }
17446 /^X\(\/\/\)[^/].*/{
17447 s//\1/
17448 q
17449 }
17450 /^X\(\/\/\)$/{
17451 s//\1/
17452 q
17453 }
17454 /^X\(\/\).*/{
17455 s//\1/
17456 q
17457 }
17458 s/.*/./; q'`
17459 test -d "$as_dir" && break
17460 done
17461 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017462 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017463
17464
17465} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017466if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017468else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017469 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017470 as_mkdir_p=false
17471fi
17472
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017473
17474# as_fn_executable_p FILE
17475# -----------------------
17476# Test if FILE is an executable regular file.
17477as_fn_executable_p ()
17478{
17479 test -f "$1" && test -x "$1"
17480} # as_fn_executable_p
17481as_test_x='test -x'
17482as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017483
17484# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017485as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017486
17487# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017488as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017489
17490
Martin v. Löwis11437992002-04-12 09:54:03 +000017491exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017492## ----------------------------------- ##
17493## Main body of $CONFIG_STATUS script. ##
17494## ----------------------------------- ##
17495_ASEOF
17496test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497
Matthias Kloseb9621712010-04-24 17:59:49 +000017498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17499# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017500# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501# values after options handling.
17502ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017503This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017504generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017505
17506 CONFIG_FILES = $CONFIG_FILES
17507 CONFIG_HEADERS = $CONFIG_HEADERS
17508 CONFIG_LINKS = $CONFIG_LINKS
17509 CONFIG_COMMANDS = $CONFIG_COMMANDS
17510 $ $0 $@
17511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512on `(hostname || uname -n) 2>/dev/null | sed 1q`
17513"
17514
Martin v. Löwis11437992002-04-12 09:54:03 +000017515_ACEOF
17516
Matthias Kloseb9621712010-04-24 17:59:49 +000017517case $ac_config_files in *"
17518"*) set x $ac_config_files; shift; ac_config_files=$*;;
17519esac
17520
17521case $ac_config_headers in *"
17522"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17523esac
17524
17525
17526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017527# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017528config_files="$ac_config_files"
17529config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017532
Matthias Kloseb9621712010-04-24 17:59:49 +000017533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017534ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017535\`$as_me' instantiates files and other configuration actions
17536from templates according to the current configuration. Unless the files
17537and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017538
Matthias Kloseb9621712010-04-24 17:59:49 +000017539Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017540
17541 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 --config print configuration, then exit
17544 -q, --quiet, --silent
17545 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 -d, --debug don't remove temporary files
17547 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017548 --file=FILE[:TEMPLATE]
17549 instantiate the configuration file FILE
17550 --header=FILE[:TEMPLATE]
17551 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017552
17553Configuration files:
17554$config_files
17555
17556Configuration headers:
17557$config_headers
17558
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017559Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17563ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017564ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017565python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017566configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017567 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017568
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017569Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017570This config.status script is free software; the Free Software Foundation
17571gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572
17573ac_pwd='$ac_pwd'
17574srcdir='$srcdir'
17575INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017576MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017577test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017578_ACEOF
17579
Matthias Kloseb9621712010-04-24 17:59:49 +000017580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17581# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017582ac_need_defaults=:
17583while test $# != 0
17584do
17585 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017586 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17588 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017589 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591 --*=)
17592 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17593 ac_optarg=
17594 ac_shift=:
17595 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017597 ac_option=$1
17598 ac_optarg=$2
17599 ac_shift=shift
17600 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 esac
17602
Skip Montanaro6dead952003-09-25 14:50:04 +000017603 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017605 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17606 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017608 $as_echo "$ac_cs_version"; exit ;;
17609 --config | --confi | --conf | --con | --co | --c )
17610 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 debug=: ;;
17613 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017614 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017615 case $ac_optarg in
17616 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017617 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 esac
17619 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 ac_need_defaults=false;;
17621 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017622 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017623 case $ac_optarg in
17624 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17625 esac
17626 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 --he | --h)
17629 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017630 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017631Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017634 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17635 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17636 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017637
17638 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017639 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017640Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017641
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017644
17645 esac
17646 shift
17647done
17648
Skip Montanaro6dead952003-09-25 14:50:04 +000017649ac_configure_extra_args=
17650
17651if $ac_cs_silent; then
17652 exec 6>/dev/null
17653 ac_configure_extra_args="$ac_configure_extra_args --silent"
17654fi
17655
17656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017658if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017659 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017660 shift
17661 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17662 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017664 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017665fi
17666
Martin v. Löwis11437992002-04-12 09:54:03 +000017667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669exec 5>>config.log
17670{
17671 echo
17672 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17673## Running $as_me. ##
17674_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017675 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
Matthias Kloseb9621712010-04-24 17:59:49 +000017682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683
17684# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017685for ac_config_target in $ac_config_targets
17686do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 case $ac_config_target in
17688 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17689 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17690 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017691 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17692 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017694 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017695 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017696 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697
Victor Stinnere0be4232011-10-25 13:06:09 +020017698 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017699 esac
17700done
17701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702
Martin v. Löwis11437992002-04-12 09:54:03 +000017703# If the user did not use the arguments to specify the items to instantiate,
17704# then the envvar interface is used. Set only those that are not.
17705# We use the long form for the default assignment because of an extremely
17706# bizarre bug on SunOS 4.1.3.
17707if $ac_need_defaults; then
17708 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17709 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17710fi
17711
Skip Montanaro6dead952003-09-25 14:50:04 +000017712# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017714# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715# Hook for its removal unless debugging.
17716# Note that there is a small window in which the directory will not be cleaned:
17717# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017718$debug ||
17719{
Victor Stinnere0be4232011-10-25 13:06:09 +020017720 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017722 : "${ac_tmp:=$tmp}"
17723 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017725 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017726}
Martin v. Löwis11437992002-04-12 09:54:03 +000017727# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017728
Martin v. Löwis11437992002-04-12 09:54:03 +000017729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017731 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017732} ||
17733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 tmp=./conf$$-$RANDOM
17735 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017736} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017737ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017738
Matthias Kloseb9621712010-04-24 17:59:49 +000017739# Set up the scripts for CONFIG_FILES section.
17740# No need to generate them if there are no CONFIG_FILES.
17741# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017743
Matthias Kloseb9621712010-04-24 17:59:49 +000017744
17745ac_cr=`echo X | tr X '\015'`
17746# On cygwin, bash can eat \r inside `` if the user requested igncr.
17747# But we know of no other shell where ac_cr would be empty at this
17748# point, so we can use a bashism as a fallback.
17749if test "x$ac_cr" = x; then
17750 eval ac_cr=\$\'\\r\'
17751fi
17752ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17753if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017754 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017755else
17756 ac_cs_awk_cr=$ac_cr
17757fi
17758
Victor Stinnere0be4232011-10-25 13:06:09 +020017759echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017760_ACEOF
17761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762
Matthias Kloseb9621712010-04-24 17:59:49 +000017763{
17764 echo "cat >conf$$subs.awk <<_ACEOF" &&
17765 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17766 echo "_ACEOF"
17767} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017768 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17769ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770ac_delim='%!_!# '
17771for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017773 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17776 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 break
17778 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017779 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 else
17781 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783done
Matthias Kloseb9621712010-04-24 17:59:49 +000017784rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785
Matthias Kloseb9621712010-04-24 17:59:49 +000017786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017787cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017789sed -n '
17790h
17791s/^/S["/; s/!.*/"]=/
17792p
17793g
17794s/^[^!]*!//
17795:repl
17796t repl
17797s/'"$ac_delim"'$//
17798t delim
17799:nl
17800h
17801s/\(.\{148\}\)..*/\1/
17802t more1
17803s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17804p
17805n
17806b repl
17807:more1
17808s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17809p
17810g
17811s/.\{148\}//
17812t nl
17813:delim
17814h
17815s/\(.\{148\}\)..*/\1/
17816t more2
17817s/["\\]/\\&/g; s/^/"/; s/$/"/
17818p
17819b
17820:more2
17821s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17822p
17823g
17824s/.\{148\}//
17825t delim
17826' <conf$$subs.awk | sed '
17827/^[^""]/{
17828 N
17829 s/\n//
17830}
17831' >>$CONFIG_STATUS || ac_write_fail=1
17832rm -f conf$$subs.awk
17833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17834_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017835cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017836 for (key in S) S_is_set[key] = 1
17837 FS = ""
17838
17839}
17840{
17841 line = $ 0
17842 nfields = split(line, field, "@")
17843 substed = 0
17844 len = length(field[1])
17845 for (i = 2; i < nfields; i++) {
17846 key = field[i]
17847 keylen = length(key)
17848 if (S_is_set[key]) {
17849 value = S[key]
17850 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17851 len += length(value) + length(field[++i])
17852 substed = 1
17853 } else
17854 len += 1 + keylen
17855 }
17856
17857 print line
17858}
17859
17860_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17863if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17864 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17865else
17866 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017867fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017868 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017869_ACEOF
17870
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017871# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17872# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873# trailing colons and then remove the whole line if VPATH becomes empty
17874# (actually we leave an empty line to preserve line numbers).
17875if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017876 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17877h
17878s///
17879s/^/:/
17880s/[ ]*$/:/
17881s/:\$(srcdir):/:/g
17882s/:\${srcdir}:/:/g
17883s/:@srcdir@:/:/g
17884s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017886x
17887s/\(=[ ]*\).*/\1/
17888G
17889s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890s/^[^=]*=[ ]*$//
17891}'
17892fi
17893
Matthias Kloseb9621712010-04-24 17:59:49 +000017894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017895fi # test -n "$CONFIG_FILES"
17896
Matthias Kloseb9621712010-04-24 17:59:49 +000017897# Set up the scripts for CONFIG_HEADERS section.
17898# No need to generate them if there are no CONFIG_HEADERS.
17899# This happens for instance with `./config.status Makefile'.
17900if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017901cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017902BEGIN {
17903_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904
Matthias Kloseb9621712010-04-24 17:59:49 +000017905# Transform confdefs.h into an awk script `defines.awk', embedded as
17906# here-document in config.status, that substitutes the proper values into
17907# config.h.in to produce config.h.
17908
17909# Create a delimiter string that does not exist in confdefs.h, to ease
17910# handling of long lines.
17911ac_delim='%!_!# '
17912for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017913 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17914 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 break
17916 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017917 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017918 else
17919 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17920 fi
17921done
17922
17923# For the awk script, D is an array of macro values keyed by name,
17924# likewise P contains macro parameters if any. Preserve backslash
17925# newline sequences.
17926
17927ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17928sed -n '
17929s/.\{148\}/&'"$ac_delim"'/g
17930t rset
17931:rset
17932s/^[ ]*#[ ]*define[ ][ ]*/ /
17933t def
17934d
17935:def
17936s/\\$//
17937t bsnl
17938s/["\\]/\\&/g
17939s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17940D["\1"]=" \3"/p
17941s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17942d
17943:bsnl
17944s/["\\]/\\&/g
17945s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17946D["\1"]=" \3\\\\\\n"\\/p
17947t cont
17948s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17949t cont
17950d
17951:cont
17952n
17953s/.\{148\}/&'"$ac_delim"'/g
17954t clear
17955:clear
17956s/\\$//
17957t bsnlc
17958s/["\\]/\\&/g; s/^/"/; s/$/"/p
17959d
17960:bsnlc
17961s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17962b cont
17963' <confdefs.h | sed '
17964s/'"$ac_delim"'/"\\\
17965"/g' >>$CONFIG_STATUS || ac_write_fail=1
17966
17967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17968 for (key in D) D_is_set[key] = 1
17969 FS = ""
17970}
17971/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17972 line = \$ 0
17973 split(line, arg, " ")
17974 if (arg[1] == "#") {
17975 defundef = arg[2]
17976 mac1 = arg[3]
17977 } else {
17978 defundef = substr(arg[1], 2)
17979 mac1 = arg[2]
17980 }
17981 split(mac1, mac2, "(") #)
17982 macro = mac2[1]
17983 prefix = substr(line, 1, index(line, defundef) - 1)
17984 if (D_is_set[macro]) {
17985 # Preserve the white space surrounding the "#".
17986 print prefix "define", macro P[macro] D[macro]
17987 next
17988 } else {
17989 # Replace #undef with comments. This is necessary, for example,
17990 # in the case of _POSIX_SOURCE, which is predefined and required
17991 # on some systems where configure will not decide to define it.
17992 if (defundef == "undef") {
17993 print "/*", prefix defundef, macro, "*/"
17994 next
17995 }
17996 }
17997}
17998{ print }
17999_ACAWK
18000_ACEOF
18001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018002 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018003fi # test -n "$CONFIG_HEADERS"
18004
18005
18006eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18007shift
18008for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009do
18010 case $ac_tag in
18011 :[FHLC]) ac_mode=$ac_tag; continue;;
18012 esac
18013 case $ac_mode$ac_tag in
18014 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018015 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016 :[FH]-) ac_tag=-:-;;
18017 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18018 esac
18019 ac_save_IFS=$IFS
18020 IFS=:
18021 set x $ac_tag
18022 IFS=$ac_save_IFS
18023 shift
18024 ac_file=$1
18025 shift
18026
18027 case $ac_mode in
18028 :L) ac_source=$1;;
18029 :[FH])
18030 ac_file_inputs=
18031 for ac_f
18032 do
18033 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018034 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 *) # Look for the file first in the build tree, then in the source tree
18036 # (if the path is not absolute). The absolute path cannot be DOS-style,
18037 # because $ac_f cannot contain `:'.
18038 test -f "$ac_f" ||
18039 case $ac_f in
18040 [\\/$]*) false;;
18041 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18042 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018043 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18046 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047 done
18048
18049 # Let's still pretend it is `configure' which instantiates (i.e., don't
18050 # use $as_me), people would be surprised to read:
18051 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018052 configure_input='Generated from '`
18053 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18054 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 if test x"$ac_file" != x-; then
18056 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018057 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18058$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018060 # Neutralize special characters interpreted by sed in replacement strings.
18061 case $configure_input in #(
18062 *\&* | *\|* | *\\* )
18063 ac_sed_conf_input=`$as_echo "$configure_input" |
18064 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18065 *) ac_sed_conf_input=$configure_input;;
18066 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067
18068 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018069 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18070 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071 esac
18072 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 esac
18074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018076$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077 X"$ac_file" : 'X\(//\)[^/]' \| \
18078 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018080$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18082 s//\1/
18083 q
18084 }
18085 /^X\(\/\/\)[^/].*/{
18086 s//\1/
18087 q
18088 }
18089 /^X\(\/\/\)$/{
18090 s//\1/
18091 q
18092 }
18093 /^X\(\/\).*/{
18094 s//\1/
18095 q
18096 }
18097 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018098 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 ac_builddir=.
18100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101case "$ac_dir" in
18102.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18103*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018104 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018106 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107 case $ac_top_builddir_sub in
18108 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18109 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18110 esac ;;
18111esac
18112ac_abs_top_builddir=$ac_pwd
18113ac_abs_builddir=$ac_pwd$ac_dir_suffix
18114# for backward compatibility:
18115ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018116
18117case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120 ac_top_srcdir=$ac_top_builddir_sub
18121 ac_abs_top_srcdir=$ac_pwd ;;
18122 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124 ac_top_srcdir=$srcdir
18125 ac_abs_top_srcdir=$srcdir ;;
18126 *) # Relative name.
18127 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18128 ac_top_srcdir=$ac_top_build_prefix$srcdir
18129 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018130esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018132
Martin v. Löwis11437992002-04-12 09:54:03 +000018133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134 case $ac_mode in
18135 :F)
18136 #
18137 # CONFIG_FILE
18138 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018139
18140 case $INSTALL in
18141 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018143 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018144 ac_MKDIR_P=$MKDIR_P
18145 case $MKDIR_P in
18146 [\\/$]* | ?:[\\/]* ) ;;
18147 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18148 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018149_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150
Matthias Kloseb9621712010-04-24 17:59:49 +000018151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152# If the template does not know about datarootdir, expand it.
18153# FIXME: This hack should be removed a few years after 2.60.
18154ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018155ac_sed_dataroot='
18156/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157 p
18158 q
18159}
18160/@datadir@/p
18161/@docdir@/p
18162/@infodir@/p
18163/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018164/@mandir@/p'
18165case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166*datarootdir*) ac_datarootdir_seen=yes;;
18167*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18169$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172 ac_datarootdir_hack='
18173 s&@datadir@&$datadir&g
18174 s&@docdir@&$docdir&g
18175 s&@infodir@&$infodir&g
18176 s&@localedir@&$localedir&g
18177 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018178 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179esac
18180_ACEOF
18181
18182# Neutralize VPATH when `$srcdir' = `.'.
18183# Shell code in configure.ac might set extrasub.
18184# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18186ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018187$extrasub
18188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018190:t
18191/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018192s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018193s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018194s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195s&@srcdir@&$ac_srcdir&;t t
18196s&@abs_srcdir@&$ac_abs_srcdir&;t t
18197s&@top_srcdir@&$ac_top_srcdir&;t t
18198s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18199s&@builddir@&$ac_builddir&;t t
18200s&@abs_builddir@&$ac_abs_builddir&;t t
18201s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18202s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018203s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018205"
Victor Stinnere0be4232011-10-25 13:06:09 +020018206eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18207 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018210 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18211 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18212 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018214which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018215$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018216which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018217
Victor Stinnere0be4232011-10-25 13:06:09 +020018218 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018220 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18221 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018222 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018223 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 ;;
18225 :H)
18226 #
18227 # CONFIG_HEADER
18228 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018230 {
18231 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018232 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18233 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018234 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018235 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18237$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018238 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018239 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018240 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018241 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018242 fi
18243 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018244 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018245 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018246 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018247 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250
18251 esac
18252
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018253
18254 case $ac_file$ac_mode in
18255 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18256
18257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258done # for ac_tag
18259
Guido van Rossum627b2d71993-12-24 10:39:16 +000018260
Matthias Kloseb9621712010-04-24 17:59:49 +000018261as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018262_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018263ac_clean_files=$ac_clean_files_save
18264
Matthias Kloseb9621712010-04-24 17:59:49 +000018265test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018266 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018267
Martin v. Löwis11437992002-04-12 09:54:03 +000018268
18269# configure is writing to config.log, and then calls config.status.
18270# config.status does its own redirection, appending to config.log.
18271# Unfortunately, on DOS this fails, as config.log is still kept open
18272# by configure, so config.status won't be able to write to it; its
18273# output is simply discarded. So we exec the FD to /dev/null,
18274# effectively closing config.log, so it can be properly (re)opened and
18275# appended to by config.status. When coming back to configure, we
18276# need to make the FD available again.
18277if test "$no_create" != yes; then
18278 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018279 ac_config_status_args=
18280 test "$silent" = yes &&
18281 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018282 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018283 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 exec 5>>config.log
18285 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18286 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018287 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018288fi
18289if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18291$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018292fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018293
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018294
Christian Heimes75ed8902013-11-20 01:11:18 +010018295echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018296if test ! -f Modules/Setup
18297then
18298 cp $srcdir/Modules/Setup.dist Modules/Setup
18299fi
18300
Christian Heimes75ed8902013-11-20 01:11:18 +010018301echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018302if test ! -f Modules/Setup.local
18303then
18304 echo "# Edit this file for local setup changes" >Modules/Setup.local
18305fi
18306
Christian Heimes75ed8902013-11-20 01:11:18 +010018307echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018308$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018309 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018310 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018311mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018312
18313if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18314 echo "" >&6
18315 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018316 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000018317 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018318 echo "" >&6
18319 echo "" >&6
18320fi
18321