blob: 2c49d853a384a0b86ec403be463637e4c311a996 [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.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
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'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
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
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200819with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800825with_memory_sanitizer
826with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_libs
828with_system_expat
829with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100830with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000831enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700832with_tcltk_includes
833with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoaac4d032019-05-31 19:39:47 +01001289 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001402\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001462 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001468 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001477 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-framework[=INSTALLDIR]
1479 Build (MacOSX|Darwin) framework
1480 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001481 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001482 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1483 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001496 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1497 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001498 --with-framework-name=FRAMEWORK
1499 specify an alternate name of the framework built
1500 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001506 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001507 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001508 --with-lto Enable Link Time Optimization in any build. Disabled
1509 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001510 --with-hash-algorithm=[fnv|siphash24]
1511 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001512 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001513 enable AddressSanitizer (asan)
1514 --with-memory-sanitizer enable MemorySanitizer (msan)
1515 --with-undefined-behavior-sanitizer
1516 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001536 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001537 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-libm=STRING math library
1539 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001540 --with(out)-computed-gotos
1541 Use computed gotos in evaluation loop (enabled by
1542 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001543 --with(out)-ensurepip=[=upgrade]
1544 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001545 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001546 --with-ssl-default-suites=[python|openssl|STRING]
1547 Override default cipher suites string, python: use
1548 Python's preferred selection (default), openssl:
1549 leave OpenSSL's defaults untouched, STRING: use a
1550 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001634python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002343It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Christian Heimesff5be6e2018-01-20 13:19:21 +01002693
2694
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002695if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696 # If we're building out-of-tree, we need to make sure the following
2697 # resources get picked up before their $srcdir counterparts.
2698 # Objects/ -> typeslots.inc
2699 # Include/ -> Python-ast.h, graminit.h
2700 # Python/ -> importlib.h
2701 # (A side effect of this is that these resources will automatically be
2702 # regenerated when building out-of-tree, regardless of whether or not
2703 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2704 # off.)
2705 BASECPPFLAGS="-IObjects -IInclude -IPython"
2706else
2707 BASECPPFLAGS=""
2708fi
2709
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710
2711
2712
2713
Victor Stinner9ed34a82017-05-02 22:35:58 +02002714if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716# Extract the first word of "git", so it can be a program name with args.
2717set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $as_echo_n "(cached) " >&6
2722else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 if test -n "$HAS_GIT"; then
2724 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725else
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
2738 done
2739IFS=$as_save_IFS
2740
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742fi
2743fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=$ac_cv_prog_HAS_GIT
2745if test -n "$HAS_GIT"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2747$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753
2754else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Xiang Zhang4c855572018-08-20 22:36:19 +08002759 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2760 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2761 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763 GITVERSION=""
2764 GITTAG=""
2765 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766fi
2767
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
doko@python.orga10e4a92013-01-25 18:45:12 +01002873
2874
Ned Deilyfcbc2462014-08-22 13:32:49 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878for ac_prog in python$PACKAGE_VERSION python3 python
2879do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885 $as_echo_n "(cached) " >&6
2886else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 if test -n "$PYTHON_FOR_REGEN"; then
2888 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889else
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901done
2902 done
2903IFS=$as_save_IFS
2904
2905fi
2906fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2908if test -n "$PYTHON_FOR_REGEN"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2910$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
2914fi
2915
2916
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
2922
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923if test "$cross_compiling" = yes; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2925$as_echo_n "checking for python interpreter for cross build... " >&6; }
2926 if test -z "$PYTHON_FOR_BUILD"; then
2927 for interp in python$PACKAGE_VERSION python3 python; do
2928 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002929 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 +02002930 break
2931 fi
2932 interp=
2933 done
2934 if test x$interp = x; then
2935 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2936 fi
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2938$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002939 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 +02002940 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Benjamin Petersond23f8222009-04-05 19:13:16 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002963VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002965# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002966
2967SOVERSION=1.0
2968
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969# The later defininition of _XOPEN_SOURCE disables certain features
2970# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973
2974
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980
2981
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987
2988
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994
2995
2996
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002997define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002999# Arguments passed to configure.
3000
3001CONFIG_ARGS="$ac_configure_args"
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3004$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003006if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003008 case $enableval in
3009 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003010 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 # information
3012 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003013 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003014 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 ;;
3022 esac
3023 case $enableval in
3024 no)
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027 ;;
3028 *)
3029 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 if test ! -d "${UNIVERSALSDK}"
3031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003032 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038else
3039
3040 UNIVERSALSDK=
3041 enable_universalsdk=
3042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045if test -n "${UNIVERSALSDK}"
3046then
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3048$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049else
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deily87adb6e2013-10-18 21:09:56 -07003056ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058# For backward compatibility reasons we prefer to select '32-bit' if available,
3059# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061if test "`uname -s`" = "Darwin"
3062then
3063 if test -n "${UNIVERSALSDK}"
3064 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003065 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066 then
3067 UNIVERSAL_ARCHS="intel"
3068 fi
3069 fi
3070fi
3071
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003072
Matthias Kloseb9621712010-04-24 17:59:49 +00003073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3074$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075
3076# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 UNIVERSAL_ARCHS="$withval"
3080
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081fi
3082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083if test -n "${UNIVERSALSDK}"
3084then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3086$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3087else
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
3090fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092
3093# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095 withval=$with_framework_name;
3096 PYTHONFRAMEWORK=${withval}
3097 PYTHONFRAMEWORKDIR=${withval}.framework
3098 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3099
3100else
3101
3102 PYTHONFRAMEWORK=Python
3103 PYTHONFRAMEWORKDIR=Python.framework
3104 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3105
3106fi
3107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003109if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003111 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003112 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003113 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 esac
3115 case $enableval in
3116 no)
3117 PYTHONFRAMEWORK=
3118 PYTHONFRAMEWORKDIR=no-framework
3119 PYTHONFRAMEWORKPREFIX=
3120 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST=
3122 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 FRAMEWORKALTINSTALLFIRST=
3124 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003125 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 if test "x${prefix}" = "xNONE"; then
3127 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3128 else
3129 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3130 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003132 ;;
3133 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003137 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003138 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3139 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003140 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 if test "x${prefix}" = "xNONE" ; then
3144 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 else
3147 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3148 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
3150 case "${enableval}" in
3151 /System*)
3152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3153 if test "${prefix}" = "NONE" ; then
3154 # See below
3155 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3156 fi
3157 ;;
3158
3159 /Library*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 ;;
3162
3163 */Library/Frameworks)
3164 MDIR="`dirname "${enableval}"`"
3165 MDIR="`dirname "${MDIR}"`"
3166 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3167
3168 if test "${prefix}" = "NONE"; then
3169 # User hasn't specified the
3170 # --prefix option, but wants to install
3171 # the framework in a non-default location,
3172 # ensure that the compatibility links get
3173 # installed relative to that prefix as well
3174 # instead of in /usr/local.
3175 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3176 fi
3177 ;;
3178
3179 *)
3180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3181 ;;
3182 esac
3183
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003186 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3193
3194 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3195
Jack Jansene578a632001-08-15 01:27:14 +00003196 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Guido van Rossum563e7081996-09-10 18:20:48 +00003198else
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003201 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORKPREFIX=
3203 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST=
3205 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 FRAMEWORKALTINSTALLFIRST=
3207 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 if test "x${prefix}" = "xNONE" ; then
3210 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3211 else
3212 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3213 fi
Jack Jansene578a632001-08-15 01:27:14 +00003214 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217fi
3218
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219
3220
Michael W. Hudson54241132001-12-07 15:38:26 +00003221
3222
3223
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003226
3227
3228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003230
Ned Deilyb8f944f2013-11-21 22:42:25 -08003231
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232
3233cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003234#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003235_ACEOF
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003239## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003240## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003241##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242# Set name for machine-dependent library files
3243
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3245$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246if test -z "$MACHDEP"
3247then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 # avoid using uname for cross builds
3249 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003250 # ac_sys_system and ac_sys_release are used for setting
3251 # a lot of different things including 'define_xopen_source'
3252 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003254 *-*-linux-android*)
3255 ac_sys_system=Linux-android
3256 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 *-*-linux*)
3258 ac_sys_system=Linux
3259 ;;
3260 *-*-cygwin*)
3261 ac_sys_system=Cygwin
3262 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003263 *-*-vxworks*)
3264 ac_sys_system=VxWorks
3265 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 *)
3267 # for now, limit cross builds to known configurations
3268 MACHDEP="unknown"
3269 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3270 esac
3271 ac_sys_release=
3272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003274 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003275 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 fi
3281 ac_md_system=`echo $ac_sys_system |
3282 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3283 ac_md_release=`echo $ac_sys_release |
3284 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3285 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003286
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003288 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003289 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003290 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003292 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3296$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003297
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003298
3299if test "$cross_compiling" = yes; then
3300 case "$host" in
3301 *-*-linux*)
3302 case "$host_cpu" in
3303 arm*)
3304 _host_cpu=arm
3305 ;;
3306 *)
3307 _host_cpu=$host_cpu
3308 esac
3309 ;;
3310 *-*-cygwin*)
3311 _host_cpu=
3312 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003313 *-*-vxworks*)
3314 _host_cpu=$host_cpu
3315 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003316 *)
3317 # for now, limit cross builds to known configurations
3318 MACHDEP="unknown"
3319 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3320 esac
3321 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3322fi
3323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3325# disable features if it is defined, without any means to access these
3326# features as extensions. For these systems, we skip the definition of
3327# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3328# some feature, make sure there is no alternative way to access this
3329# feature. Also, when using wildcards, make sure you have verified the
3330# need for not defining _XOPEN_SOURCE on all systems matching the
3331# wildcard, and that the wildcard does not include future systems
3332# (which may remove their limitations).
3333case $ac_sys_system/$ac_sys_release in
3334 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3335 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003336 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003337 # In addition, Stefan Krah confirms that issue #1244610 exists through
3338 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340 define_xopen_source=no
3341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346
3347 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3350 # also defined. This can be overridden by defining _BSD_SOURCE
3351 # As this has a different meaning on Linux, only define it on OpenBSD
3352
Matthias Kloseb9621712010-04-24 17:59:49 +00003353$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354
3355 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003356 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3357 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3358 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003359 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 +00003360 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003361 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3362 # request to enable features supported by the standard as a request
3363 # to disable features not supported by the standard. The best way
3364 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3365 # entirely and define __EXTENSIONS__ instead.
3366 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003367 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3369 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003370 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003371 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 define_xopen_source=no;;
3373 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003375 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003376 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003377 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3378 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3379 # identifies itself as Darwin/7.*
3380 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # disables platform specific features beyond repair.
3382 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # has no effect, don't bother defining them
3384 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003385 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003386 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3389 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3390 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003391 AIX/4)
3392 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003393 AIX/5)
3394 if test `uname -r` -eq 1; then
3395 define_xopen_source=no
3396 fi
3397 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003398 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3399 # defining NI_NUMERICHOST.
3400 QNX/6.3.2)
3401 define_xopen_source=no
3402 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003403 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3404 # in network headers still using system V types.
3405 VxWorks/*)
3406 define_xopen_source=no
3407 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003408
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003409esac
3410
3411if test $define_xopen_source = yes
3412then
Victor Stinner14d098d2011-09-07 22:29:43 +02003413 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
Victor Stinner14d098d2011-09-07 22:29:43 +02003415$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
3418 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3419 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3420 # several APIs are not declared. Since this is also needed in some
3421 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Matthias Kloseb9621712010-04-24 17:59:49 +00003423$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003424
3425
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003426
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003427$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003429fi
3430
Christian Heimes647cd872013-12-07 23:39:33 +01003431# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3432case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003433 hp*|HP*)
3434 define_stdc_a1=yes;;
3435 *)
3436 define_stdc_a1=no;;
3437esac
3438
3439if test $define_stdc_a1 = yes
3440then
Christian Heimes647cd872013-12-07 23:39:33 +01003441
3442$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3443
Christian Heimesb02bcae2013-12-08 15:21:08 +01003444fi
Christian Heimes647cd872013-12-07 23:39:33 +01003445
Jack Jansen6b08a402004-06-03 12:41:45 +00003446# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3447# it may influence the way we can build extensions, so distutils
3448# needs to check it
3449
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003452EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003453
Guido van Rossum627b2d71993-12-24 10:39:16 +00003454# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003455
3456# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3457# for debug/optimization stuff. BASECFLAGS is for flags that are required
3458# just to get things to compile and link. Users are free to override OPT
3459# when running configure or make. The build should not break if they do.
3460# BASECFLAGS should generally not be messed with, however.
3461
Guido van Rossum8b131c51995-03-09 14:10:13 +00003462# If the user switches compilers, we can't believe the cache
3463if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3464then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003465 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003466(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003467fi
3468
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003469# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3470# when the compiler supports them, but we don't always want -O2, and
3471# we set -g later.
3472if test -z "$CFLAGS"; then
3473 CFLAGS=
3474fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003475
3476if test "$ac_sys_system" = "Darwin"
3477then
3478 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003479 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003480 # information
3481 if test -z "${CC}"
3482 then
3483 found_gcc=
3484 found_clang=
3485 as_save_IFS=$IFS; IFS=:
3486 for as_dir in $PATH
3487 do
3488 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003491 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003492 fi
3493 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003494 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003495 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003496 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003497 fi
3498 fi
3499 done
3500 IFS=$as_save_IFS
3501
3502 if test -n "$found_gcc" -a -n "$found_clang"
3503 then
3504 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3505 then
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3507$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3508 CC="$found_clang"
3509 CXX="$found_clang++"
3510 fi
3511
3512
3513 elif test -z "$found_gcc" -a -n "$found_clang"
3514 then
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3516$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3517 CC="$found_clang"
3518 CXX="$found_clang++"
3519
3520 elif test -z "$found_gcc" -a -z "$found_clang"
3521 then
3522 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3523 if test -n "${found_clang}"
3524 then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3526$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3527 CC="${found_clang}"
3528 CXX="`/usr/bin/xcrun -find clang++`"
3529
3530 # else: use default behaviour
3531 fi
3532 fi
3533 fi
3534fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535ac_ext=c
3536ac_cpp='$CPP $CPPFLAGS'
3537ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3538ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3539ac_compiler_gnu=$ac_cv_c_compiler_gnu
3540if test -n "$ac_tool_prefix"; then
3541 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3542set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3544$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003545if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003547else
3548 if test -n "$CC"; then
3549 ac_cv_prog_CC="$CC" # Let the user override the test.
3550else
Martin v. Löwis11437992002-04-12 09:54:03 +00003551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3552for as_dir in $PATH
3553do
3554 IFS=$as_save_IFS
3555 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 $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 +00003560 break 2
3561 fi
3562done
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003565
Jack Jansendd19cf82001-12-06 22:36:17 +00003566fi
3567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003568CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003569if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3571$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003572else
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3574$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003575fi
3576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577
Martin v. Löwis11437992002-04-12 09:54:03 +00003578fi
3579if test -z "$ac_cv_prog_CC"; then
3580 ac_ct_CC=$CC
3581 # Extract the first word of "gcc", so it can be a program name with args.
3582set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3584$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003585if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003587else
3588 if test -n "$ac_ct_CC"; then
3589 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3590else
3591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3592for as_dir in $PATH
3593do
3594 IFS=$as_save_IFS
3595 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 $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 +00003600 break 2
3601 fi
3602done
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003605
3606fi
3607fi
3608ac_ct_CC=$ac_cv_prog_ac_ct_CC
3609if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3611$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612else
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3614$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 if test "x$ac_ct_CC" = x; then
3618 CC=""
3619 else
3620 case $cross_compiling:$ac_tool_warned in
3621yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624ac_tool_warned=yes ;;
3625esac
3626 CC=$ac_ct_CC
3627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003628else
3629 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003630fi
3631
Jack Jansendd19cf82001-12-06 22:36:17 +00003632if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633 if test -n "$ac_tool_prefix"; then
3634 # 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 +00003635set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3637$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003638if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
3641 if test -n "$CC"; then
3642 ac_cv_prog_CC="$CC" # Let the user override the test.
3643else
Martin v. Löwis11437992002-04-12 09:54:03 +00003644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3645for as_dir in $PATH
3646do
3647 IFS=$as_save_IFS
3648 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 $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 +00003653 break 2
3654 fi
3655done
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003658
3659fi
3660fi
3661CC=$ac_cv_prog_CC
3662if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3664$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3667$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003668fi
3669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670
Martin v. Löwis11437992002-04-12 09:54:03 +00003671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673if test -z "$CC"; then
3674 # Extract the first word of "cc", so it can be a program name with args.
3675set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3677$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003678if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
3681 if test -n "$CC"; then
3682 ac_cv_prog_CC="$CC" # Let the user override the test.
3683else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003684 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3693 ac_prog_rejected=yes
3694 continue
3695 fi
3696 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 $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 +00003698 break 2
3699 fi
3700done
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003703
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003704if test $ac_prog_rejected = yes; then
3705 # We found a bogon in the path, so make sure we never use it.
3706 set dummy $ac_cv_prog_CC
3707 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003709 # We chose a different compiler from the bogus one.
3710 # However, it has the same basename, so the bogon will be chosen
3711 # first if we set CC to just the basename; use the full file name.
3712 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003713 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003714 fi
3715fi
3716fi
3717fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003718CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722else
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725fi
3726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729if test -z "$CC"; then
3730 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 do
3733 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003737if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003739else
3740 if test -n "$CC"; then
3741 ac_cv_prog_CC="$CC" # Let the user override the test.
3742else
Martin v. Löwis11437992002-04-12 09:54:03 +00003743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3744for as_dir in $PATH
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $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 +00003752 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754done
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
3758fi
3759fi
3760CC=$ac_cv_prog_CC
3761if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3763$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3766$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003767fi
3768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 test -n "$CC" && break
3771 done
3772fi
3773if test -z "$CC"; then
3774 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003776do
3777 # Extract the first word of "$ac_prog", so it can be a program name with args.
3778set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003781if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003783else
3784 if test -n "$ac_ct_CC"; then
3785 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3786else
3787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788for as_dir in $PATH
3789do
3790 IFS=$as_save_IFS
3791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $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 +00003796 break 2
3797 fi
3798done
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003801
Martin v. Löwis11437992002-04-12 09:54:03 +00003802fi
3803fi
3804ac_ct_CC=$ac_cv_prog_ac_ct_CC
3805if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3807$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003808else
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3810$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 test -n "$ac_ct_CC" && break
3815done
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 if test "x$ac_ct_CC" = x; then
3818 CC=""
3819 else
3820 case $cross_compiling:$ac_tool_warned in
3821yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824ac_tool_warned=yes ;;
3825esac
3826 CC=$ac_ct_CC
3827 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003828fi
3829
3830fi
3831
3832
Matthias Kloseb9621712010-04-24 17:59:49 +00003833test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003835as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003836See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
3838# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003839$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3840set X $ac_compile
3841ac_compiler=$2
3842for ac_option in --version -v -V -qversion; do
3843 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844case "(($ac_try" in
3845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3846 *) ac_try_echo=$ac_try;;
3847esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3849$as_echo "$ac_try_echo"; } >&5
3850 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 if test -s conftest.err; then
3853 sed '10a\
3854... rest of stderr output deleted ...
3855 10q' conftest.err >conftest.er1
3856 cat conftest.er1 >&5
3857 fi
3858 rm -f conftest.er1 conftest.err
3859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3860 test $ac_status = 0; }
3861done
Martin v. Löwis11437992002-04-12 09:54:03 +00003862
Matthias Kloseb9621712010-04-24 17:59:49 +00003863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003864/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003865
Martin v. Löwis11437992002-04-12 09:54:03 +00003866int
3867main ()
3868{
3869
3870 ;
3871 return 0;
3872}
3873_ACEOF
3874ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003875ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# Try to create an executable without -o first, disregard a.out.
3877# It will help us diagnose broken compilers, and finding out an intuition
3878# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3880$as_echo_n "checking whether the C compiler works... " >&6; }
3881ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3882
3883# The possible output files:
3884ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886ac_rmfiles=
3887for ac_file in $ac_files
3888do
3889 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3892 esac
3893done
3894rm -f $ac_rmfiles
3895
Matthias Kloseb9621712010-04-24 17:59:49 +00003896if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897case "(($ac_try" in
3898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3899 *) ac_try_echo=$ac_try;;
3900esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3902$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3906 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3908# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3909# in a Makefile. We should not override ac_cv_exeext if it was cached,
3910# so that the user can short-circuit this test for compilers unknown to
3911# Autoconf.
3912for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003913do
3914 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003917 ;;
3918 [ab].out )
3919 # We found the default executable, but exeext='' is most
3920 # certainly right.
3921 break;;
3922 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 then :; else
3925 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3926 fi
3927 # We set ac_cv_exeext here because the later test for it is not
3928 # safe: cross compilers may not add the suffix if given an `-o'
3929 # argument, so we may need to know it at that point already.
3930 # Even if this section looks crufty: it has the advantage of
3931 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003932 break;;
3933 * )
3934 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 esac
3936done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937test "$ac_cv_exeext" = no && ac_cv_exeext=
3938
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003939else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 ac_file=''
3941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003942if test -z "$ac_file"; then :
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944$as_echo "no" >&6; }
3945$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003946sed 's/^/| /' conftest.$ac_ext >&5
3947
Matthias Kloseb9621712010-04-24 17:59:49 +00003948{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003950as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003951See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003952else
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3954$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3957$as_echo_n "checking for C compiler default output file name... " >&6; }
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3959$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003963ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3965$as_echo_n "checking for suffix of executables... " >&6; }
3966if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967case "(($ac_try" in
3968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3969 *) ac_try_echo=$ac_try;;
3970esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3972$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3976 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3978# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3979# work properly (i.e., refer to `conftest.exe'), while it won't with
3980# `rm'.
3981for ac_file in conftest.exe conftest conftest.*; do
3982 test -f "$ac_file" || continue
3983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3986 break;;
3987 * ) break;;
3988 esac
3989done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003990else
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003993as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003994See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003996rm -f conftest conftest$ac_cv_exeext
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3998$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999
4000rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004001EXEEXT=$ac_cv_exeext
4002ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4004/* end confdefs.h. */
4005#include <stdio.h>
4006int
4007main ()
4008{
4009FILE *f = fopen ("conftest.out", "w");
4010 return ferror (f) || fclose (f) != 0;
4011
4012 ;
4013 return 0;
4014}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004016ac_clean_files="$ac_clean_files conftest.out"
4017# Check that the compiler produces executables we can run. If not, either
4018# the compiler is broken, or we cross compile.
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4020$as_echo_n "checking whether we are cross compiling... " >&6; }
4021if test "$cross_compiling" != yes; then
4022 { { ac_try="$ac_link"
4023case "(($ac_try" in
4024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4025 *) ac_try_echo=$ac_try;;
4026esac
4027eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4028$as_echo "$ac_try_echo"; } >&5
4029 (eval "$ac_link") 2>&5
4030 ac_status=$?
4031 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4032 test $ac_status = 0; }
4033 if { ac_try='./conftest$ac_cv_exeext'
4034 { { case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
4038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4039$as_echo "$ac_try_echo"; } >&5
4040 (eval "$ac_try") 2>&5
4041 ac_status=$?
4042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4043 test $ac_status = 0; }; }; then
4044 cross_compiling=no
4045 else
4046 if test "$cross_compiling" = maybe; then
4047 cross_compiling=yes
4048 else
4049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004051as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004052If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004053See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 fi
4055 fi
4056fi
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4058$as_echo "$cross_compiling" >&6; }
4059
4060rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4061ac_clean_files=$ac_clean_files_save
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4063$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004064if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 $as_echo_n "(cached) " >&6
4066else
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004068/* end confdefs.h. */
4069
4070int
4071main ()
4072{
4073
4074 ;
4075 return 0;
4076}
4077_ACEOF
4078rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004079if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004090 for ac_file in conftest.o conftest.obj conftest.*; do
4091 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4095 break;;
4096 esac
4097done
4098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004100sed 's/^/| /' conftest.$ac_ext >&5
4101
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004104as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004105See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004106fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004107rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4110$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004111OBJEXT=$ac_cv_objext
4112ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4114$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004115if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004117else
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004120
Martin v. Löwis11437992002-04-12 09:54:03 +00004121int
4122main ()
4123{
4124#ifndef __GNUC__
4125 choke me
4126#endif
4127
4128 ;
4129 return 0;
4130}
4131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 ac_compiler_gnu=yes
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004138ac_cv_c_compiler_gnu=$ac_compiler_gnu
4139
4140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4142$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4143if test $ac_compiler_gnu = yes; then
4144 GCC=yes
4145else
4146 GCC=
4147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004148ac_test_CFLAGS=${CFLAGS+set}
4149ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4151$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004152if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004154else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 ac_save_c_werror_flag=$ac_c_werror_flag
4156 ac_c_werror_flag=yes
4157 ac_cv_prog_cc_g=no
4158 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162int
4163main ()
4164{
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004171 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 CFLAGS=""
4174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175/* end confdefs.h. */
4176
4177int
4178main ()
4179{
4180
4181 ;
4182 return 0;
4183}
4184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004185if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186
Matthias Kloseb9621712010-04-24 17:59:49 +00004187else
4188 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191/* end confdefs.h. */
4192
4193int
4194main ()
4195{
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209 ac_c_werror_flag=$ac_save_c_werror_flag
4210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4212$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215elif test $ac_cv_prog_cc_g = yes; then
4216 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217 CFLAGS="-g -O2"
4218 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004219 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220 fi
4221else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004222 if test "$GCC" = yes; then
4223 CFLAGS="-O2"
4224 else
4225 CFLAGS=
4226 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4229$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004230if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004234ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004236/* end confdefs.h. */
4237#include <stdarg.h>
4238#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004239struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4241struct buf { int x; };
4242FILE * (*rcsopen) (struct buf *, struct stat *, int);
4243static char *e (p, i)
4244 char **p;
4245 int i;
4246{
4247 return p[i];
4248}
4249static char *f (char * (*g) (char **, int), char **p, ...)
4250{
4251 char *s;
4252 va_list v;
4253 va_start (v,p);
4254 s = g (p, va_arg (v,int));
4255 va_end (v);
4256 return s;
4257}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004258
4259/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4260 function prototypes and stuff, but not '\xHH' hex character constants.
4261 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4264 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004266int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4269 inside strings and character constants. */
4270#define FOO(x) 'x'
4271int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4272
Skip Montanaro6dead952003-09-25 14:50:04 +00004273int test (int i, double x);
4274struct s1 {int (*f) (int a);};
4275struct s2 {int (*f) (double a);};
4276int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4277int argc;
4278char **argv;
4279int
4280main ()
4281{
4282return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4283 ;
4284 return 0;
4285}
4286_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4288 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004289do
4290 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f core conftest.err conftest.$ac_objext
4295 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004298CC=$ac_save_CC
4299
4300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301# AC_CACHE_VAL
4302case "x$ac_cv_prog_cc_c89" in
4303 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4305$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4308$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004309 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4312$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004313esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004314if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Matthias Kloseb9621712010-04-24 17:59:49 +00004316fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004317
Martin v. Löwis11437992002-04-12 09:54:03 +00004318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004324ac_ext=c
4325ac_cpp='$CPP $CPPFLAGS'
4326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4328ac_compiler_gnu=$ac_cv_c_compiler_gnu
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4330$as_echo_n "checking how to run the C preprocessor... " >&6; }
4331# On Suns, sometimes $CPP names a directory.
4332if test -n "$CPP" && test -d "$CPP"; then
4333 CPP=
4334fi
4335if test -z "$CPP"; then
4336 if ${ac_cv_prog_CPP+:} false; then :
4337 $as_echo_n "(cached) " >&6
4338else
4339 # Double quotes because CPP needs to be expanded
4340 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4341 do
4342 ac_preproc_ok=false
4343for ac_c_preproc_warn_flag in '' yes
4344do
4345 # Use a header file that comes with gcc, so configuring glibc
4346 # with a fresh cross-compiler works.
4347 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4348 # <limits.h> exists even on freestanding compilers.
4349 # On the NeXT, cc -E runs the code through the compiler's parser,
4350 # not just through cpp. "Syntax error" is here to catch this case.
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h. */
4353#ifdef __STDC__
4354# include <limits.h>
4355#else
4356# include <assert.h>
4357#endif
4358 Syntax error
4359_ACEOF
4360if ac_fn_c_try_cpp "$LINENO"; then :
4361
4362else
4363 # Broken: fails on valid input.
4364continue
4365fi
4366rm -f conftest.err conftest.i conftest.$ac_ext
4367
4368 # OK, works on sane cases. Now check whether nonexistent headers
4369 # can be detected and how.
4370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371/* end confdefs.h. */
4372#include <ac_nonexistent.h>
4373_ACEOF
4374if ac_fn_c_try_cpp "$LINENO"; then :
4375 # Broken: success on invalid input.
4376continue
4377else
4378 # Passes both tests.
4379ac_preproc_ok=:
4380break
4381fi
4382rm -f conftest.err conftest.i conftest.$ac_ext
4383
4384done
4385# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4386rm -f conftest.i conftest.err conftest.$ac_ext
4387if $ac_preproc_ok; then :
4388 break
4389fi
4390
4391 done
4392 ac_cv_prog_CPP=$CPP
4393
4394fi
4395 CPP=$ac_cv_prog_CPP
4396else
4397 ac_cv_prog_CPP=$CPP
4398fi
4399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4400$as_echo "$CPP" >&6; }
4401ac_preproc_ok=false
4402for ac_c_preproc_warn_flag in '' yes
4403do
4404 # Use a header file that comes with gcc, so configuring glibc
4405 # with a fresh cross-compiler works.
4406 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4407 # <limits.h> exists even on freestanding compilers.
4408 # On the NeXT, cc -E runs the code through the compiler's parser,
4409 # not just through cpp. "Syntax error" is here to catch this case.
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h. */
4412#ifdef __STDC__
4413# include <limits.h>
4414#else
4415# include <assert.h>
4416#endif
4417 Syntax error
4418_ACEOF
4419if ac_fn_c_try_cpp "$LINENO"; then :
4420
4421else
4422 # Broken: fails on valid input.
4423continue
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427 # OK, works on sane cases. Now check whether nonexistent headers
4428 # can be detected and how.
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430/* end confdefs.h. */
4431#include <ac_nonexistent.h>
4432_ACEOF
4433if ac_fn_c_try_cpp "$LINENO"; then :
4434 # Broken: success on invalid input.
4435continue
4436else
4437 # Passes both tests.
4438ac_preproc_ok=:
4439break
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443done
4444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4445rm -f conftest.i conftest.err conftest.$ac_ext
4446if $ac_preproc_ok; then :
4447
4448else
4449 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4451as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4452See \`config.log' for more details" "$LINENO" 5; }
4453fi
4454
4455ac_ext=c
4456ac_cpp='$CPP $CPPFLAGS'
4457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4459ac_compiler_gnu=$ac_cv_c_compiler_gnu
4460
4461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4462$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4463if ${ac_cv_path_GREP+:} false; then :
4464 $as_echo_n "(cached) " >&6
4465else
4466 if test -z "$GREP"; then
4467 ac_path_GREP_found=false
4468 # Loop through the user's path and test for each of PROGNAME-LIST
4469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4471do
4472 IFS=$as_save_IFS
4473 test -z "$as_dir" && as_dir=.
4474 for ac_prog in grep ggrep; do
4475 for ac_exec_ext in '' $ac_executable_extensions; do
4476 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4477 as_fn_executable_p "$ac_path_GREP" || continue
4478# Check for GNU ac_path_GREP and select it if it is found.
4479 # Check for GNU $ac_path_GREP
4480case `"$ac_path_GREP" --version 2>&1` in
4481*GNU*)
4482 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4483*)
4484 ac_count=0
4485 $as_echo_n 0123456789 >"conftest.in"
4486 while :
4487 do
4488 cat "conftest.in" "conftest.in" >"conftest.tmp"
4489 mv "conftest.tmp" "conftest.in"
4490 cp "conftest.in" "conftest.nl"
4491 $as_echo 'GREP' >> "conftest.nl"
4492 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4493 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4494 as_fn_arith $ac_count + 1 && ac_count=$as_val
4495 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4496 # Best one so far, save it but keep looking for a better one
4497 ac_cv_path_GREP="$ac_path_GREP"
4498 ac_path_GREP_max=$ac_count
4499 fi
4500 # 10*(2^10) chars as input seems more than enough
4501 test $ac_count -gt 10 && break
4502 done
4503 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4504esac
4505
4506 $ac_path_GREP_found && break 3
4507 done
4508 done
4509 done
4510IFS=$as_save_IFS
4511 if test -z "$ac_cv_path_GREP"; then
4512 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4513 fi
4514else
4515 ac_cv_path_GREP=$GREP
4516fi
4517
4518fi
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4520$as_echo "$ac_cv_path_GREP" >&6; }
4521 GREP="$ac_cv_path_GREP"
4522
4523
Łukasz Langaa785c872016-09-09 17:37:37 -07004524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4525$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4526if ${ac_cv_path_SED+:} false; then :
4527 $as_echo_n "(cached) " >&6
4528else
4529 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4530 for ac_i in 1 2 3 4 5 6 7; do
4531 ac_script="$ac_script$as_nl$ac_script"
4532 done
4533 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4534 { ac_script=; unset ac_script;}
4535 if test -z "$SED"; then
4536 ac_path_SED_found=false
4537 # Loop through the user's path and test for each of PROGNAME-LIST
4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in $PATH
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
4543 for ac_prog in sed gsed; do
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4546 as_fn_executable_p "$ac_path_SED" || continue
4547# Check for GNU ac_path_SED and select it if it is found.
4548 # Check for GNU $ac_path_SED
4549case `"$ac_path_SED" --version 2>&1` in
4550*GNU*)
4551 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4552*)
4553 ac_count=0
4554 $as_echo_n 0123456789 >"conftest.in"
4555 while :
4556 do
4557 cat "conftest.in" "conftest.in" >"conftest.tmp"
4558 mv "conftest.tmp" "conftest.in"
4559 cp "conftest.in" "conftest.nl"
4560 $as_echo '' >> "conftest.nl"
4561 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4563 as_fn_arith $ac_count + 1 && ac_count=$as_val
4564 if test $ac_count -gt ${ac_path_SED_max-0}; then
4565 # Best one so far, save it but keep looking for a better one
4566 ac_cv_path_SED="$ac_path_SED"
4567 ac_path_SED_max=$ac_count
4568 fi
4569 # 10*(2^10) chars as input seems more than enough
4570 test $ac_count -gt 10 && break
4571 done
4572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4573esac
4574
4575 $ac_path_SED_found && break 3
4576 done
4577 done
4578 done
4579IFS=$as_save_IFS
4580 if test -z "$ac_cv_path_SED"; then
4581 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4582 fi
4583else
4584 ac_cv_path_SED=$SED
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4589$as_echo "$ac_cv_path_SED" >&6; }
4590 SED="$ac_cv_path_SED"
4591 rm -f conftest.sed
4592
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004593
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594
4595
Matthias Kloseb9621712010-04-24 17:59:49 +00004596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4597$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004600if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004601 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004602
4603 case $withval in
4604 no) with_cxx_main=no
4605 MAINCC='$(CC)';;
4606 yes) with_cxx_main=yes
4607 MAINCC='$(CXX)';;
4608 *) with_cxx_main=yes
4609 MAINCC=$withval
4610 if test -z "$CXX"
4611 then
4612 CXX=$withval
4613 fi;;
4614 esac
4615else
4616
4617 with_cxx_main=no
4618 MAINCC='$(CC)'
4619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004620fi
4621
Matthias Kloseb9621712010-04-24 17:59:49 +00004622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4623$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004624
4625preset_cxx="$CXX"
4626if test -z "$CXX"
4627then
4628 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004629 gcc) if test -n "$ac_tool_prefix"; then
4630 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4631set dummy ${ac_tool_prefix}g++; ac_word=$2
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4633$as_echo_n "checking for $ac_word... " >&6; }
4634if ${ac_cv_path_CXX+:} false; then :
4635 $as_echo_n "(cached) " >&6
4636else
4637 case $CXX in
4638 [\\/]* | ?:[\\/]*)
4639 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4640 ;;
4641 *)
4642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in notfound
4644do
4645 IFS=$as_save_IFS
4646 test -z "$as_dir" && as_dir=.
4647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004649 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4651 break 2
4652 fi
4653done
4654 done
4655IFS=$as_save_IFS
4656
4657 ;;
4658esac
4659fi
4660CXX=$ac_cv_path_CXX
4661if test -n "$CXX"; then
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4663$as_echo "$CXX" >&6; }
4664else
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666$as_echo "no" >&6; }
4667fi
4668
4669
4670fi
4671if test -z "$ac_cv_path_CXX"; then
4672 ac_pt_CXX=$CXX
4673 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004674set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004677if ${ac_cv_path_ac_pt_CXX+:} false; then :
4678 $as_echo_n "(cached) " >&6
4679else
4680 case $ac_pt_CXX in
4681 [\\/]* | ?:[\\/]*)
4682 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4683 ;;
4684 *)
4685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686for as_dir in notfound
4687do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696done
4697 done
4698IFS=$as_save_IFS
4699
4700 ;;
4701esac
4702fi
4703ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4704if test -n "$ac_pt_CXX"; then
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4706$as_echo "$ac_pt_CXX" >&6; }
4707else
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4709$as_echo "no" >&6; }
4710fi
4711
4712 if test "x$ac_pt_CXX" = x; then
4713 CXX="g++"
4714 else
4715 case $cross_compiling:$ac_tool_warned in
4716yes:)
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4719ac_tool_warned=yes ;;
4720esac
4721 CXX=$ac_pt_CXX
4722 fi
4723else
4724 CXX="$ac_cv_path_CXX"
4725fi
4726 ;;
4727 cc) if test -n "$ac_tool_prefix"; then
4728 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4729set dummy ${ac_tool_prefix}c++; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004732if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004733 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734else
4735 case $CXX in
4736 [\\/]* | ?:[\\/]*)
4737 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4738 ;;
4739 *)
4740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in notfound
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 break 2
4750 fi
4751done
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755 ;;
4756esac
4757fi
4758CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4761$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004762else
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767
4768fi
4769if test -z "$ac_cv_path_CXX"; then
4770 ac_pt_CXX=$CXX
4771 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780 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 +00004781 ;;
4782 *)
4783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in notfound
4785do
4786 IFS=$as_save_IFS
4787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 break 2
4793 fi
4794done
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ;;
4799esac
4800fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4802if test -n "$ac_pt_CXX"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4804$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805else
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004809
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810 if test "x$ac_pt_CXX" = x; then
4811 CXX="c++"
4812 else
4813 case $cross_compiling:$ac_tool_warned in
4814yes:)
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4817ac_tool_warned=yes ;;
4818esac
4819 CXX=$ac_pt_CXX
4820 fi
4821else
4822 CXX="$ac_cv_path_CXX"
4823fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 clang|*/clang) if test -n "$ac_tool_prefix"; then
4826 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4827set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if ${ac_cv_path_CXX+:} false; then :
4831 $as_echo_n "(cached) " >&6
4832else
4833 case $CXX in
4834 [\\/]* | ?:[\\/]*)
4835 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4836 ;;
4837 *)
4838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in notfound
4840do
4841 IFS=$as_save_IFS
4842 test -z "$as_dir" && as_dir=.
4843 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004845 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847 break 2
4848 fi
4849done
4850 done
4851IFS=$as_save_IFS
4852
Ned Deilycbfb9a52012-06-23 16:02:19 -07004853 ;;
4854esac
4855fi
4856CXX=$ac_cv_path_CXX
4857if test -n "$CXX"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4859$as_echo "$CXX" >&6; }
4860else
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865
4866fi
4867if test -z "$ac_cv_path_CXX"; then
4868 ac_pt_CXX=$CXX
4869 # Extract the first word of "clang++", so it can be a program name with args.
4870set dummy clang++; ac_word=$2
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if ${ac_cv_path_ac_pt_CXX+:} false; then :
4874 $as_echo_n "(cached) " >&6
4875else
4876 case $ac_pt_CXX in
4877 [\\/]* | ?:[\\/]*)
4878 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4879 ;;
4880 *)
4881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in notfound
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004888 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
4896 ;;
4897esac
4898fi
4899ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4900if test -n "$ac_pt_CXX"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4902$as_echo "$ac_pt_CXX" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
4908 if test "x$ac_pt_CXX" = x; then
4909 CXX="clang++"
4910 else
4911 case $cross_compiling:$ac_tool_warned in
4912yes:)
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4914$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4915ac_tool_warned=yes ;;
4916esac
4917 CXX=$ac_pt_CXX
4918 fi
4919else
4920 CXX="$ac_cv_path_CXX"
4921fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004922 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004923 icc|*/icc) if test -n "$ac_tool_prefix"; then
4924 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4925set dummy ${ac_tool_prefix}icpc; ac_word=$2
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4927$as_echo_n "checking for $ac_word... " >&6; }
4928if ${ac_cv_path_CXX+:} false; then :
4929 $as_echo_n "(cached) " >&6
4930else
4931 case $CXX in
4932 [\\/]* | ?:[\\/]*)
4933 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4934 ;;
4935 *)
4936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in notfound
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 for ac_exec_ext in '' $ac_executable_extensions; do
4942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4943 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4945 break 2
4946 fi
4947done
4948 done
4949IFS=$as_save_IFS
4950
4951 ;;
4952esac
4953fi
4954CXX=$ac_cv_path_CXX
4955if test -n "$CXX"; then
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4957$as_echo "$CXX" >&6; }
4958else
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4960$as_echo "no" >&6; }
4961fi
4962
4963
4964fi
4965if test -z "$ac_cv_path_CXX"; then
4966 ac_pt_CXX=$CXX
4967 # Extract the first word of "icpc", so it can be a program name with args.
4968set dummy icpc; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_ac_pt_CXX+:} false; then :
4972 $as_echo_n "(cached) " >&6
4973else
4974 case $ac_pt_CXX in
4975 [\\/]* | ?:[\\/]*)
4976 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4977 ;;
4978 *)
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in notfound
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
4984 for ac_exec_ext in '' $ac_executable_extensions; do
4985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988 break 2
4989 fi
4990done
4991 done
4992IFS=$as_save_IFS
4993
4994 ;;
4995esac
4996fi
4997ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4998if test -n "$ac_pt_CXX"; then
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5000$as_echo "$ac_pt_CXX" >&6; }
5001else
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006 if test "x$ac_pt_CXX" = x; then
5007 CXX="icpc"
5008 else
5009 case $cross_compiling:$ac_tool_warned in
5010yes:)
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5013ac_tool_warned=yes ;;
5014esac
5015 CXX=$ac_pt_CXX
5016 fi
5017else
5018 CXX="$ac_cv_path_CXX"
5019fi
5020 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005021 esac
5022 if test "$CXX" = "notfound"
5023 then
5024 CXX=""
5025 fi
5026fi
5027if test -z "$CXX"
5028then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005029 if test -n "$ac_tool_prefix"; then
5030 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5031 do
5032 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5033set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005038else
5039 if test -n "$CXX"; then
5040 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5041else
5042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043for as_dir in $PATH
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005049 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005051 break 2
5052 fi
5053done
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056
5057fi
5058fi
5059CXX=$ac_cv_prog_CXX
5060if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5062$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063else
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005066fi
5067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005069 test -n "$CXX" && break
5070 done
5071fi
5072if test -z "$CXX"; then
5073 ac_ct_CXX=$CXX
5074 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5075do
5076 # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5081 $as_echo_n "(cached) " >&6
5082else
5083 if test -n "$ac_ct_CXX"; then
5084 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5085else
5086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5087for as_dir in $PATH
5088do
5089 IFS=$as_save_IFS
5090 test -z "$as_dir" && as_dir=.
5091 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005093 ac_cv_prog_ac_ct_CXX="$ac_prog"
5094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5095 break 2
5096 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 done
5099IFS=$as_save_IFS
5100
5101fi
5102fi
5103ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5104if test -n "$ac_ct_CXX"; then
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5106$as_echo "$ac_ct_CXX" >&6; }
5107else
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109$as_echo "no" >&6; }
5110fi
5111
5112
5113 test -n "$ac_ct_CXX" && break
5114done
5115
5116 if test "x$ac_ct_CXX" = x; then
5117 CXX="notfound"
5118 else
5119 case $cross_compiling:$ac_tool_warned in
5120yes:)
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5123ac_tool_warned=yes ;;
5124esac
5125 CXX=$ac_ct_CXX
5126 fi
5127fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 if test "$CXX" = "notfound"
5130 then
5131 CXX=""
5132 fi
5133fi
5134if test "$preset_cxx" != "$CXX"
5135then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005136 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137
5138 By default, distutils will build C++ extension modules with \"$CXX\".
5139 If this is not intended, then set CXX on the configure command line.
5140 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005141$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142
5143 By default, distutils will build C++ extension modules with \"$CXX\".
5144 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005145 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146fi
5147
5148
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5150
5151
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5153$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5154cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef bfin
5156#undef cris
5157#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005158#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005159#undef hppa
5160#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005161#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005162#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005163#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005164#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005166#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005167 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005168#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169# if defined(__x86_64__) && defined(__LP64__)
5170 x86_64-linux-gnu
5171# elif defined(__x86_64__) && defined(__ILP32__)
5172 x86_64-linux-gnux32
5173# elif defined(__i386__)
5174 i386-linux-gnu
5175# elif defined(__aarch64__) && defined(__AARCH64EL__)
5176# if defined(__ILP32__)
5177 aarch64_ilp32-linux-gnu
5178# else
5179 aarch64-linux-gnu
5180# endif
5181# elif defined(__aarch64__) && defined(__AARCH64EB__)
5182# if defined(__ILP32__)
5183 aarch64_be_ilp32-linux-gnu
5184# else
5185 aarch64_be-linux-gnu
5186# endif
5187# elif defined(__alpha__)
5188 alpha-linux-gnu
5189# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5190# if defined(__ARMEL__)
5191 arm-linux-gnueabihf
5192# else
5193 armeb-linux-gnueabihf
5194# endif
5195# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5196# if defined(__ARMEL__)
5197 arm-linux-gnueabi
5198# else
5199 armeb-linux-gnueabi
5200# endif
5201# elif defined(__hppa__)
5202 hppa-linux-gnu
5203# elif defined(__ia64__)
5204 ia64-linux-gnu
5205# elif defined(__m68k__) && !defined(__mcoldfire__)
5206 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005207# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5208# if _MIPS_SIM == _ABIO32
5209 mipsisa32r6el-linux-gnu
5210# elif _MIPS_SIM == _ABIN32
5211 mipsisa64r6el-linux-gnuabin32
5212# elif _MIPS_SIM == _ABI64
5213 mipsisa64r6el-linux-gnuabi64
5214# else
5215# error unknown platform triplet
5216# endif
5217# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5218# if _MIPS_SIM == _ABIO32
5219 mipsisa32r6-linux-gnu
5220# elif _MIPS_SIM == _ABIN32
5221 mipsisa64r6-linux-gnuabin32
5222# elif _MIPS_SIM == _ABI64
5223 mipsisa64r6-linux-gnuabi64
5224# else
5225# error unknown platform triplet
5226# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227# elif defined(__mips_hard_float) && defined(_MIPSEL)
5228# if _MIPS_SIM == _ABIO32
5229 mipsel-linux-gnu
5230# elif _MIPS_SIM == _ABIN32
5231 mips64el-linux-gnuabin32
5232# elif _MIPS_SIM == _ABI64
5233 mips64el-linux-gnuabi64
5234# else
5235# error unknown platform triplet
5236# endif
5237# elif defined(__mips_hard_float)
5238# if _MIPS_SIM == _ABIO32
5239 mips-linux-gnu
5240# elif _MIPS_SIM == _ABIN32
5241 mips64-linux-gnuabin32
5242# elif _MIPS_SIM == _ABI64
5243 mips64-linux-gnuabi64
5244# else
5245# error unknown platform triplet
5246# endif
5247# elif defined(__or1k__)
5248 or1k-linux-gnu
5249# elif defined(__powerpc__) && defined(__SPE__)
5250 powerpc-linux-gnuspe
5251# elif defined(__powerpc64__)
5252# if defined(__LITTLE_ENDIAN__)
5253 powerpc64le-linux-gnu
5254# else
5255 powerpc64-linux-gnu
5256# endif
5257# elif defined(__powerpc__)
5258 powerpc-linux-gnu
5259# elif defined(__s390x__)
5260 s390x-linux-gnu
5261# elif defined(__s390__)
5262 s390-linux-gnu
5263# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5264 sh4-linux-gnu
5265# elif defined(__sparc__) && defined(__arch64__)
5266 sparc64-linux-gnu
5267# elif defined(__sparc__)
5268 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005269# elif defined(__riscv)
5270# if __riscv_xlen == 32
5271 riscv32-linux-gnu
5272# elif __riscv_xlen == 64
5273 riscv64-linux-gnu
5274# else
5275# error unknown platform triplet
5276# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277# else
5278# error unknown platform triplet
5279# endif
5280#elif defined(__FreeBSD_kernel__)
5281# if defined(__LP64__)
5282 x86_64-kfreebsd-gnu
5283# elif defined(__i386__)
5284 i386-kfreebsd-gnu
5285# else
5286# error unknown platform triplet
5287# endif
5288#elif defined(__gnu_hurd__)
5289 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005290#elif defined(__APPLE__)
5291 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005292#elif defined(__VXWORKS__)
5293 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294#else
5295# error unknown platform triplet
5296#endif
5297
5298EOF
5299
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005300if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005301 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5303$as_echo "$PLATFORM_TRIPLET" >&6; }
5304else
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5306$as_echo "none" >&6; }
5307fi
5308rm -f conftest.c conftest.out
5309
5310if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5311 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5312 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5313 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005314elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5315 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005317
doko@ubuntu.com55532312016-06-14 08:55:19 +02005318if test x$MULTIARCH != x; then
5319 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5320fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321
5322
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5324$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5325save_LDFLAGS="$LDFLAGS"
5326LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005327
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5329/* end confdefs.h. */
5330
5331int
5332main ()
5333{
5334
5335 ;
5336 return 0;
5337}
5338_ACEOF
5339if ac_fn_c_try_link "$LINENO"; then :
5340 NO_AS_NEEDED="-Wl,--no-as-needed"
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5342$as_echo "yes" >&6; }
5343else
5344 NO_AS_NEEDED=""
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5346$as_echo "no" >&6; }
5347fi
5348rm -f core conftest.err conftest.$ac_objext \
5349 conftest$ac_exeext conftest.$ac_ext
5350LDFLAGS="$save_LDFLAGS"
5351
5352
5353
5354# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005355
Matthias Kloseb9621712010-04-24 17:59:49 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5357$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005358if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005359 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360else
5361 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5362 then ac_cv_path_EGREP="$GREP -E"
5363 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005365 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 # Loop through the user's path and test for each of PROGNAME-LIST
5367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5369do
5370 IFS=$as_save_IFS
5371 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 for ac_prog in egrep; do
5373 for ac_exec_ext in '' $ac_executable_extensions; do
5374 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005375 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005376# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 # Check for GNU $ac_path_EGREP
5378case `"$ac_path_EGREP" --version 2>&1` in
5379*GNU*)
5380 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5381*)
5382 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384 while :
5385 do
5386 cat "conftest.in" "conftest.in" >"conftest.tmp"
5387 mv "conftest.tmp" "conftest.in"
5388 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5391 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5394 # Best one so far, save it but keep looking for a better one
5395 ac_cv_path_EGREP="$ac_path_EGREP"
5396 ac_path_EGREP_max=$ac_count
5397 fi
5398 # 10*(2^10) chars as input seems more than enough
5399 test $ac_count -gt 10 && break
5400 done
5401 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5402esac
5403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $ac_path_EGREP_found && break 3
5405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005410 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 +00005411 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412else
5413 ac_cv_path_EGREP=$EGREP
5414fi
5415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 fi
5417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5419$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005421
5422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5424$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005425if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo_n "(cached) " >&6
5427else
5428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005429/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005430#include <stdlib.h>
5431#include <stdarg.h>
5432#include <string.h>
5433#include <float.h>
5434
5435int
5436main ()
5437{
5438
5439 ;
5440 return 0;
5441}
5442_ACEOF
5443if ac_fn_c_try_compile "$LINENO"; then :
5444 ac_cv_header_stdc=yes
5445else
5446 ac_cv_header_stdc=no
5447fi
5448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5449
5450if test $ac_cv_header_stdc = yes; then
5451 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453/* end confdefs.h. */
5454#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005455
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005460else
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005462fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005463rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
Matthias Kloseb9621712010-04-24 17:59:49 +00005465fi
5466
5467if test $ac_cv_header_stdc = yes; then
5468 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <stdlib.h>
5472
5473_ACEOF
5474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5475 $EGREP "free" >/dev/null 2>&1; then :
5476
5477else
5478 ac_cv_header_stdc=no
5479fi
5480rm -f conftest*
5481
5482fi
5483
5484if test $ac_cv_header_stdc = yes; then
5485 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5486 if test "$cross_compiling" = yes; then :
5487 :
5488else
5489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490/* end confdefs.h. */
5491#include <ctype.h>
5492#include <stdlib.h>
5493#if ((' ' & 0x0FF) == 0x020)
5494# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5495# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5496#else
5497# define ISLOWER(c) \
5498 (('a' <= (c) && (c) <= 'i') \
5499 || ('j' <= (c) && (c) <= 'r') \
5500 || ('s' <= (c) && (c) <= 'z'))
5501# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5502#endif
5503
5504#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5505int
5506main ()
5507{
5508 int i;
5509 for (i = 0; i < 256; i++)
5510 if (XOR (islower (i), ISLOWER (i))
5511 || toupper (i) != TOUPPER (i))
5512 return 2;
5513 return 0;
5514}
5515_ACEOF
5516if ac_fn_c_try_run "$LINENO"; then :
5517
5518else
5519 ac_cv_header_stdc=no
5520fi
5521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5522 conftest.$ac_objext conftest.beam conftest.$ac_ext
5523fi
5524
5525fi
5526fi
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5528$as_echo "$ac_cv_header_stdc" >&6; }
5529if test $ac_cv_header_stdc = yes; then
5530
5531$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5532
5533fi
5534
5535# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5536for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5537 inttypes.h stdint.h unistd.h
5538do :
5539 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5540ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5541"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005542if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005543 cat >>confdefs.h <<_ACEOF
5544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5545_ACEOF
5546
5547fi
5548
5549done
5550
5551
5552
5553 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 +02005554if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005555 MINIX=yes
5556else
5557 MINIX=
5558fi
5559
5560
5561 if test "$MINIX" = yes; then
5562
5563$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5564
5565
5566$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5567
5568
5569$as_echo "#define _MINIX 1" >>confdefs.h
5570
5571 fi
5572
5573
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5575$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005576if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 $as_echo_n "(cached) " >&6
5578else
5579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5580/* end confdefs.h. */
5581
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005582# define __EXTENSIONS__ 1
5583 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005584int
5585main ()
5586{
5587
5588 ;
5589 return 0;
5590}
5591_ACEOF
5592if ac_fn_c_try_compile "$LINENO"; then :
5593 ac_cv_safe_to_define___extensions__=yes
5594else
5595 ac_cv_safe_to_define___extensions__=no
5596fi
5597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5598fi
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5600$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5601 test $ac_cv_safe_to_define___extensions__ = yes &&
5602 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5603
5604 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5605
5606 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5607
5608 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5609
5610 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5611
5612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613
Xavier de Gaye95750b12016-07-09 11:05:42 +02005614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5615$as_echo_n "checking for the Android API level... " >&6; }
5616cat >> conftest.c <<EOF
5617#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005618android_api = __ANDROID_API__
5619arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620#else
5621#error not Android
5622#endif
5623EOF
5624
5625if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005626 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5627 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5629$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005630 if test -z "$ANDROID_API_LEVEL"; then
5631 echo 'Fatal: you must define __ANDROID_API__'
5632 exit 1
5633 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005634
5635cat >>confdefs.h <<_ACEOF
5636#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5637_ACEOF
5638
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005639
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5641$as_echo_n "checking for the Android arm ABI... " >&6; }
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5643$as_echo "$_arm_arch" >&6; }
5644 if test "$_arm_arch" = 7; then
5645 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5646 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5647 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648else
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5650$as_echo "not Android" >&6; }
5651fi
5652rm -f conftest.c conftest.out
5653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654# Check for unsupported systems
5655case $ac_sys_system/$ac_sys_release in
5656atheos*|Linux*/1*)
5657 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5658 echo See README for details.
5659 exit 1;;
5660esac
5661
5662
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5664$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
5666# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005667if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 withval=$with_suffix;
5669 case $withval in
5670 no) EXEEXT=;;
5671 yes) EXEEXT=.exe;;
5672 *) EXEEXT=$withval;;
5673 esac
5674fi
5675
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5677$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678
5679# Test whether we're running on a non-case-sensitive system, in which
5680# case we give a warning if no ext is given
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5683$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684if test ! -d CaseSensitiveTestDir; then
5685mkdir CaseSensitiveTestDir
5686fi
5687
5688if test -d casesensitivetestdir
5689then
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5691$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 BUILDEXEEXT=.exe
5693else
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 BUILDEXEEXT=$EXEEXT
5697fi
5698rmdir CaseSensitiveTestDir
5699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700case $ac_sys_system in
5701hp*|HP*)
5702 case $CC in
5703 cc|*/cc) CC="$CC -Ae";;
5704 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705esac
5706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5709$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710if test -z "$LIBRARY"
5711then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005712 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5715$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717# LDLIBRARY is the name of the library to link against (as opposed to the
5718# name of the library into which to insert object files). BLDLIBRARY is also
5719# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5720# is blank as the main program is not linked directly against LDLIBRARY.
5721# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5722# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5723# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5724# DLLLIBRARY is the shared (i.e., DLL) library.
5725#
5726# RUNSHARED is used to run shared python without installed libraries
5727#
5728# INSTSONAME is the name of the shared library that will be use to install
5729# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005730#
5731# LDVERSION is the shared library version number, normally the Python version
5732# with the ABI build flags appended.
5733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734
5735
5736
5737
5738
5739
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741LDLIBRARY="$LIBRARY"
5742BLDLIBRARY='$(LDLIBRARY)'
5743INSTSONAME='$(LDLIBRARY)'
5744DLLLIBRARY=''
5745LDLIBRARYDIR=''
5746RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005747LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
5749# LINKCC is the command that links the python executable -- default is $(CC).
5750# If CXX is set, and if it is needed to link a main function that was
5751# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5752# python might then depend on the C++ runtime
5753# This is altered for AIX in order to build the export list before
5754# linking.
5755
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5757$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758if test -z "$LINKCC"
5759then
5760 LINKCC='$(PURIFY) $(MAINCC)'
5761 case $ac_sys_system in
5762 AIX*)
5763 exp_extra="\"\""
5764 if test $ac_sys_release -ge 5 -o \
5765 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5766 exp_extra="."
5767 fi
5768 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 QNX*)
5770 # qcc must be used because the other compilers do not
5771 # support -N.
5772 LINKCC=qcc;;
5773 esac
5774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5776$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5779# make sure we default having it set to "no": this is used by
5780# distutils.unixccompiler to know if it should add --enable-new-dtags
5781# to linker command lines, and failing to detect GNU ld simply results
5782# in the same bahaviour as before.
5783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5785$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786ac_prog=ld
5787if test "$GCC" = yes; then
5788 ac_prog=`$CC -print-prog-name=ld`
5789fi
5790case `"$ac_prog" -V 2>&1 < /dev/null` in
5791 *GNU*)
5792 GNULD=yes;;
5793 *)
5794 GNULD=no;;
5795esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5797$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5800$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005802if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803 enableval=$enable_shared;
5804fi
5805
5806
5807if test -z "$enable_shared"
5808then
5809 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005810 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 enable_shared="yes";;
5812 *)
5813 enable_shared="no";;
5814 esac
5815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5817$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5820$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005822if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005823 enableval=$enable_profiling;
5824fi
5825
5826if test "x$enable_profiling" = xyes; then
5827 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005828 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830/* end confdefs.h. */
5831int main() { return 0; }
5832_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833if ac_fn_c_try_link "$LINENO"; then :
5834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838rm -f core conftest.err conftest.$ac_objext \
5839 conftest$ac_exeext conftest.$ac_ext
5840 CC="$ac_save_cc"
5841else
5842 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5845$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847if test "x$enable_profiling" = xyes; then
5848 BASECFLAGS="-pg $BASECFLAGS"
5849 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5853$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854
5855# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5856# library that we build, but we do not want to link against it (we
5857# will find it with a -framework option). For this reason there is an
5858# extra variable BLDLIBRARY against which Python and the extension
5859# modules are linked, BLDLIBRARY. This is normally the same as
5860# LDLIBRARY, but empty for MacOSX framework builds.
5861if test "$enable_framework"
5862then
5863 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005864 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 BLDLIBRARY=''
5866else
5867 BLDLIBRARY='$(LDLIBRARY)'
5868fi
5869
5870# Other platforms follow
5871if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005872 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
Matthias Kloseb9621712010-04-24 17:59:49 +00005874$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875
5876 case $ac_sys_system in
5877 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005878 LDLIBRARY='libpython$(LDVERSION).dll.a'
5879 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 ;;
5881 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005882 LDLIBRARY='libpython$(LDVERSION).so'
5883 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005884 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005886 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005887 then
5888 PY3LIBRARY=libpython3.so
5889 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005891 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).so'
5893 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005894 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005896 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005897 then
5898 PY3LIBRARY=libpython3.so
5899 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
5901 hp*|HP*)
5902 case `uname -m` in
5903 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
5906 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
5909 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005911 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).dylib'
5915 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005918 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005920 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005921 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
5923 esac
5924else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005925 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 case $ac_sys_system in
5927 CYGWIN*)
5928 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005929 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ;;
5931 esac
5932fi
5933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005934if test "$cross_compiling" = yes; then
5935 RUNSHARED=
5936fi
5937
Matthias Kloseb9621712010-04-24 17:59:49 +00005938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5939$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005942if test -n "$ac_tool_prefix"; then
5943 for ac_prog in ar aal
5944 do
5945 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5946set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005949if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005950 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951else
5952 if test -n "$AR"; then
5953 ac_cv_prog_AR="$AR" # Let the user override the test.
5954else
5955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958 IFS=$as_save_IFS
5959 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005962 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 break 2
5965 fi
5966done
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968IFS=$as_save_IFS
5969
5970fi
5971fi
5972AR=$ac_cv_prog_AR
5973if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5975$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976else
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979fi
5980
5981
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005982 test -n "$AR" && break
5983 done
5984fi
5985if test -z "$AR"; then
5986 ac_ct_AR=$AR
5987 for ac_prog in ar aal
5988do
5989 # Extract the first word of "$ac_prog", so it can be a program name with args.
5990set dummy $ac_prog; ac_word=$2
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992$as_echo_n "checking for $ac_word... " >&6; }
5993if ${ac_cv_prog_ac_ct_AR+:} false; then :
5994 $as_echo_n "(cached) " >&6
5995else
5996 if test -n "$ac_ct_AR"; then
5997 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5998else
5999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002 IFS=$as_save_IFS
6003 test -z "$as_dir" && as_dir=.
6004 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006006 ac_cv_prog_ac_ct_AR="$ac_prog"
6007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6008 break 2
6009 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006011 done
6012IFS=$as_save_IFS
6013
6014fi
6015fi
6016ac_ct_AR=$ac_cv_prog_ac_ct_AR
6017if test -n "$ac_ct_AR"; then
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6019$as_echo "$ac_ct_AR" >&6; }
6020else
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022$as_echo "no" >&6; }
6023fi
6024
6025
6026 test -n "$ac_ct_AR" && break
6027done
6028
6029 if test "x$ac_ct_AR" = x; then
6030 AR="ar"
6031 else
6032 case $cross_compiling:$ac_tool_warned in
6033yes:)
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6036ac_tool_warned=yes ;;
6037esac
6038 AR=$ac_ct_AR
6039 fi
6040fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041
6042
6043# tweak ARFLAGS only if the user didn't set it on the command line
6044
6045if test -z "$ARFLAGS"
6046then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006047 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
doko@ubuntu.com58844492012-06-30 18:25:32 +02006050if test -n "$ac_tool_prefix"; then
6051 for ac_prog in readelf
6052 do
6053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6056$as_echo_n "checking for $ac_word... " >&6; }
6057if ${ac_cv_prog_READELF+:} false; then :
6058 $as_echo_n "(cached) " >&6
6059else
6060 if test -n "$READELF"; then
6061 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6062else
6063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064for as_dir in $PATH
6065do
6066 IFS=$as_save_IFS
6067 test -z "$as_dir" && as_dir=.
6068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006070 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6072 break 2
6073 fi
6074done
6075 done
6076IFS=$as_save_IFS
6077
6078fi
6079fi
6080READELF=$ac_cv_prog_READELF
6081if test -n "$READELF"; then
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6083$as_echo "$READELF" >&6; }
6084else
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087fi
6088
6089
6090 test -n "$READELF" && break
6091 done
6092fi
6093if test -z "$READELF"; then
6094 ac_ct_READELF=$READELF
6095 for ac_prog in readelf
6096do
6097 # Extract the first word of "$ac_prog", so it can be a program name with args.
6098set dummy $ac_prog; ac_word=$2
6099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6100$as_echo_n "checking for $ac_word... " >&6; }
6101if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6102 $as_echo_n "(cached) " >&6
6103else
6104 if test -n "$ac_ct_READELF"; then
6105 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6106else
6107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6108for as_dir in $PATH
6109do
6110 IFS=$as_save_IFS
6111 test -z "$as_dir" && as_dir=.
6112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006114 ac_cv_prog_ac_ct_READELF="$ac_prog"
6115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6116 break 2
6117 fi
6118done
6119 done
6120IFS=$as_save_IFS
6121
6122fi
6123fi
6124ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6125if test -n "$ac_ct_READELF"; then
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6127$as_echo "$ac_ct_READELF" >&6; }
6128else
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
6131fi
6132
6133
6134 test -n "$ac_ct_READELF" && break
6135done
6136
6137 if test "x$ac_ct_READELF" = x; then
6138 READELF=":"
6139 else
6140 case $cross_compiling:$ac_tool_warned in
6141yes:)
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6144ac_tool_warned=yes ;;
6145esac
6146 READELF=$ac_ct_READELF
6147 fi
6148fi
6149
6150if test "$cross_compiling" = yes; then
6151 case "$READELF" in
6152 readelf|:)
6153 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6154 ;;
6155 esac
6156fi
6157
6158
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006161hp*|HP*)
6162 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163 if test -z "$INSTALL"
6164 then
6165 INSTALL="${srcdir}/install-sh -c"
6166 fi
6167esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168# Find a good install program. We prefer a C program (faster),
6169# so one script is as good as another. But avoid the broken or
6170# incompatible versions:
6171# SysV /etc/install, /usr/sbin/install
6172# SunOS /usr/etc/install
6173# IRIX /sbin/install
6174# AIX /bin/install
6175# AmigaOS /C/install, which installs bootblocks on floppy discs
6176# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6177# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6178# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6179# OS/2's system install, which has a completely different semantic
6180# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006181# Reject install programs that cannot install multiple files.
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6183$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006185if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187else
6188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 # Account for people who put trailing slashes in PATH elements.
6194case $as_dir/ in #((
6195 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 /usr/ucb/* ) ;;
6199 *)
6200 # OSF1 and SCO ODT 3.0 have their own names for install.
6201 # Don't use installbsd from OSF since it installs stuff as root
6202 # by default.
6203 for ac_prog in ginstall scoinst install; do
6204 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006205 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 if test $ac_prog = install &&
6207 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6208 # AIX install. It has an incompatible calling convention.
6209 :
6210 elif test $ac_prog = install &&
6211 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6212 # program-specific install script used by HP pwplus--don't use.
6213 :
6214 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 rm -rf conftest.one conftest.two conftest.dir
6216 echo one > conftest.one
6217 echo two > conftest.two
6218 mkdir conftest.dir
6219 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6220 test -s conftest.one && test -s conftest.two &&
6221 test -s conftest.dir/conftest.one &&
6222 test -s conftest.dir/conftest.two
6223 then
6224 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6225 break 3
6226 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227 fi
6228 fi
6229 done
6230 done
6231 ;;
6232esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006233
6234 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235IFS=$as_save_IFS
6236
Matthias Kloseb9621712010-04-24 17:59:49 +00006237rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238
6239fi
6240 if test "${ac_cv_path_install+set}" = set; then
6241 INSTALL=$ac_cv_path_install
6242 else
6243 # As a last resort, use the slow shell script. Don't cache a
6244 # value for INSTALL within a source directory, because that will
6245 # break other packages using the cache if that directory is
6246 # removed, or if the value is a relative name.
6247 INSTALL=$ac_install_sh
6248 fi
6249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6251$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252
6253# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6254# It thinks the first close brace ends the variable substitution.
6255test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6256
6257test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6258
6259test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6260
Matthias Klose93a0ef12012-03-15 18:08:34 +01006261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6262$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6263if test -z "$MKDIR_P"; then
6264 if ${ac_cv_path_mkdir+:} false; then :
6265 $as_echo_n "(cached) " >&6
6266else
6267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6269do
6270 IFS=$as_save_IFS
6271 test -z "$as_dir" && as_dir=.
6272 for ac_prog in mkdir gmkdir; do
6273 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006274 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006275 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6276 'mkdir (GNU coreutils) '* | \
6277 'mkdir (coreutils) '* | \
6278 'mkdir (fileutils) '4.1*)
6279 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6280 break 3;;
6281 esac
6282 done
6283 done
6284 done
6285IFS=$as_save_IFS
6286
6287fi
6288
6289 test -d ./--version && rmdir ./--version
6290 if test "${ac_cv_path_mkdir+set}" = set; then
6291 MKDIR_P="$ac_cv_path_mkdir -p"
6292 else
6293 # As a last resort, use the slow shell script. Don't cache a
6294 # value for MKDIR_P within a source directory, because that will
6295 # break other packages using the cache if that directory is
6296 # removed, or if the value is a relative name.
6297 MKDIR_P="$ac_install_sh -d"
6298 fi
6299fi
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6301$as_echo "$MKDIR_P" >&6; }
6302
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303
6304# Not every filesystem supports hard links
6305
6306if test -z "$LN" ; then
6307 case $ac_sys_system in
6308 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309 *) LN=ln;;
6310 esac
6311fi
6312
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006313# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006314
6315ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6319$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320
6321# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006322if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 withval=$with_pydebug;
6324if test "$withval" != no
6325then
6326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6330$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006332 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006333else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335fi
6336else
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339fi
6340
6341
Victor Stinnerf4e47032019-04-25 00:56:28 +02006342# Check for --with-trace-refs
6343# --with-trace-refs
6344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6345$as_echo_n "checking for --with-trace-refs... " >&6; }
6346
6347# Check whether --with-trace-refs was given.
6348if test "${with_trace_refs+set}" = set; then :
6349 withval=$with_trace_refs;
6350else
6351 with_trace_refs=no
6352fi
6353
6354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6355$as_echo "$with_trace_refs" >&6; }
6356
6357if test "$with_trace_refs" = "yes"
6358then
6359
6360$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6361
6362fi
6363
6364# Check for --with-assertions.
6365# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006366assertions='false'
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6368$as_echo_n "checking for --with-assertions... " >&6; }
6369
6370# Check whether --with-assertions was given.
6371if test "${with_assertions+set}" = set; then :
6372 withval=$with_assertions;
6373if test "$withval" != no
6374then
6375 assertions='true'
6376fi
6377fi
6378
6379if test "$assertions" = 'true'; then
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6381$as_echo "yes" >&6; }
6382elif test "$Py_DEBUG" = 'true'; then
6383 assertions='true'
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6385$as_echo "implied by --with-pydebug" >&6; }
6386else
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6388$as_echo "no" >&6; }
6389fi
6390
Brett Cannon63d98bc2016-09-06 17:12:40 -07006391# Enable optimization flags
6392
6393
6394Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6396$as_echo_n "checking for --enable-optimizations... " >&6; }
6397# Check whether --enable-optimizations was given.
6398if test "${enable_optimizations+set}" = set; then :
6399 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006400if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006401then
6402 Py_OPT='true'
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6404$as_echo "yes" >&6; };
6405else
6406 Py_OPT='false'
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6408$as_echo "no" >&6; };
6409fi
6410else
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }
6413fi
6414
6415if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006416 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6417 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006418 # 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 +00006419 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006420 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006421 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006422 DEF_MAKE_RULE="build_all"
6423else
6424 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006425 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426 DEF_MAKE_RULE="all"
6427fi
6428
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006429# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6430# normal names in the default $PATH (ie: Ubuntu). They exist under the
6431# non-suffixed name in their versioned llvm directory.
6432
6433llvm_bin_dir=''
6434llvm_path="${PATH}"
6435if test "${CC}" = "clang"
6436then
6437 clang_bin=`which clang`
6438 # Some systems install clang elsewhere as a symlink to the real path
6439 # which is where the related llvm tools are located.
6440 if test -L "${clang_bin}"
6441 then
6442 clang_dir=`dirname "${clang_bin}"`
6443 clang_bin=`readlink "${clang_bin}"`
6444 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6445 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6446 fi
6447fi
6448
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006449# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6451$as_echo_n "checking for --with-lto... " >&6; }
6452
6453# Check whether --with-lto was given.
6454if test "${with_lto+set}" = set; then :
6455 withval=$with_lto;
6456if test "$withval" != no
6457then
6458 Py_LTO='true'
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6460$as_echo "yes" >&6; };
6461else
6462 Py_LTO='false'
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; };
6465fi
6466else
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
6471if test "$Py_LTO" = 'true' ; then
6472 case $CC in
6473 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006474
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006476$as_echo_n "checking target system type... " >&6; }
6477if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478 $as_echo_n "(cached) " >&6
6479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 if test "x$target_alias" = x; then
6481 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6485fi
6486
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6489$as_echo "$ac_cv_target" >&6; }
6490case $ac_cv_target in
6491*-*-*) ;;
6492*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6493esac
6494target=$ac_cv_target
6495ac_save_IFS=$IFS; IFS='-'
6496set x $ac_cv_target
6497shift
6498target_cpu=$1
6499target_vendor=$2
6500shift; shift
6501# Remember, the first character of IFS is used to create $*,
6502# except with old shells:
6503target_os=$*
6504IFS=$ac_save_IFS
6505case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6506
6507
6508# The aliases save the names the user supplied, while $host etc.
6509# will get canonicalized.
6510test -n "$target_alias" &&
6511 test "$program_prefix$program_suffix$program_transform_name" = \
6512 NONENONEs,x,x, &&
6513 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006514# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6515set dummy $target_alias-llvm-ar; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_LLVM_AR+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 case $LLVM_AR in
6522 [\\/]* | ?:[\\/]*)
6523 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6524 ;;
6525 *)
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in ${llvm_path}
6528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535 break 2
6536 fi
6537done
6538 done
6539IFS=$as_save_IFS
6540
6541 ;;
6542esac
6543fi
6544LLVM_AR=$ac_cv_path_LLVM_AR
6545if test -n "$LLVM_AR"; then
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6547$as_echo "$LLVM_AR" >&6; }
6548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554if test -z "$ac_cv_path_LLVM_AR"; then
6555 if test "$build" = "$target"; then
6556 ac_pt_LLVM_AR=$LLVM_AR
6557 # Extract the first word of "llvm-ar", so it can be a program name with args.
6558set dummy llvm-ar; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $ac_pt_LLVM_AR in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
6571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6576 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
6584 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6585 ;;
6586esac
6587fi
6588ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6589if test -n "$ac_pt_LLVM_AR"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6591$as_echo "$ac_pt_LLVM_AR" >&6; }
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597 LLVM_AR=$ac_pt_LLVM_AR
6598 else
6599 LLVM_AR="''"
6600 fi
6601else
6602 LLVM_AR="$ac_cv_path_LLVM_AR"
6603fi
6604
6605
6606 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6607 then
6608 LLVM_AR_FOUND="found"
6609 else
6610 LLVM_AR_FOUND="not-found"
6611 fi
6612 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6613 then
6614 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6615 if test -n "${found_llvm_ar}"
6616 then
6617 LLVM_AR='/usr/bin/xcrun llvm-ar'
6618 LLVM_AR_FOUND=found
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6620$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6621 fi
6622 fi
6623 if test $LLVM_AR_FOUND = not-found
6624 then
6625 LLVM_PROFR_ERR=yes
6626 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6627 else
6628 LLVM_AR_ERR=no
6629 fi
6630 AR="${LLVM_AR}"
6631 case $ac_sys_system in
6632 Darwin*)
6633 # Any changes made here should be reflected in the GCC+Darwin case below
6634 LTOFLAGS="-flto -Wl,-export_dynamic"
6635 ;;
6636 *)
6637 LTOFLAGS="-flto"
6638 ;;
6639 esac
6640 ;;
6641 *gcc*)
6642 case $ac_sys_system in
6643 Darwin*)
6644 LTOFLAGS="-flto -Wl,-export_dynamic"
6645 ;;
6646 *)
6647 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6648 ;;
6649 esac
6650 ;;
6651 esac
6652
6653 if test "$ac_cv_prog_cc_g" = "yes"
6654 then
6655 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6656 # to get debug symbols.
6657 LTOFLAGS="$LTOFLAGS -g"
6658 fi
6659
stratakisf92c7aa2018-12-04 15:54:01 +01006660 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006661 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006662fi
6663
6664# Enable PGO flags.
6665
6666
6667
6668
6669
6670
Gregory P. Smith799520c2016-09-07 16:10:00 -07006671# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6672set dummy $target_alias-llvm-profdata; ac_word=$2
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 case $LLVM_PROFDATA in
6679 [\\/]* | ?:[\\/]*)
6680 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6681 ;;
6682 *)
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006685do
6686 IFS=$as_save_IFS
6687 test -z "$as_dir" && as_dir=.
6688 for ac_exec_ext in '' $ac_executable_extensions; do
6689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692 break 2
6693 fi
6694done
6695 done
6696IFS=$as_save_IFS
6697
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698 ;;
6699esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6702if test -n "$LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6704$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710
Gregory P. Smith799520c2016-09-07 16:10:00 -07006711if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6712 if test "$build" = "$target"; then
6713 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6714 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6715set dummy llvm-profdata; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6719 $as_echo_n "(cached) " >&6
6720else
6721 case $ac_pt_LLVM_PROFDATA in
6722 [\\/]* | ?:[\\/]*)
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6724 ;;
6725 *)
6726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in ${llvm_path}
6728do
6729 IFS=$as_save_IFS
6730 test -z "$as_dir" && as_dir=.
6731 for ac_exec_ext in '' $ac_executable_extensions; do
6732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735 break 2
6736 fi
6737done
6738 done
6739IFS=$as_save_IFS
6740
6741 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6742 ;;
6743esac
6744fi
6745ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6746if test -n "$ac_pt_LLVM_PROFDATA"; then
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6748$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6749else
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751$as_echo "no" >&6; }
6752fi
6753
6754 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6755 else
6756 LLVM_PROFDATA="''"
6757 fi
6758else
6759 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6760fi
6761
6762
6763if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6764then
6765 LLVM_PROF_FOUND="found"
6766else
6767 LLVM_PROF_FOUND="not-found"
6768fi
6769if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6770then
6771 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6772 if test -n "${found_llvm_profdata}"
6773 then
6774 # llvm-profdata isn't directly in $PATH in some cases.
6775 # https://apple.stackexchange.com/questions/197053/
6776 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6777 LLVM_PROF_FOUND=found
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6779$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6780 fi
6781fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006782LLVM_PROF_ERR=no
6783case $CC in
6784 *clang*)
6785 # Any changes made here should be reflected in the GCC+Darwin case below
6786 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6790 if test $LLVM_PROF_FOUND = not-found
6791 then
6792 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006793 if test "${REQUIRE_PGO}" = "yes"
6794 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006795 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 -07006796 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 fi
6798 ;;
6799 *gcc*)
6800 case $ac_sys_system in
6801 Darwin*)
6802 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6803 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006806 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006807 then
6808 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006809 if test "${REQUIRE_PGO}" = "yes"
6810 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006811 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 -07006812 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 fi
6814 ;;
6815 *)
6816 PGO_PROF_GEN_FLAG="-fprofile-generate"
6817 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6818 LLVM_PROF_MERGER="true"
6819 LLVM_PROF_FILE=""
6820 ;;
6821 esac
6822 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006823 *icc*)
6824 PGO_PROF_GEN_FLAG="-prof-gen"
6825 PGO_PROF_USE_FLAG="-prof-use"
6826 LLVM_PROF_MERGER="true"
6827 LLVM_PROF_FILE=""
6828 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829esac
6830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6832# merged with this chunk of code?
6833
6834# Optimizer/debugger flags
6835# ------------------------
6836# (The following bit of code is complicated enough - please keep things
6837# indented properly. Just pretend you're editing Python code. ;-)
6838
6839# There are two parallel sets of case statements below, one that checks to
6840# see if OPT was set and one that does BASECFLAGS setting based upon
6841# compiler and platform. BASECFLAGS tweaks need to be made even if the
6842# user set OPT.
6843
Victor Stinner23a683a2019-04-12 21:27:37 +02006844case $CC in
6845 *clang*)
6846 cc_is_clang=1
6847 ;;
6848 *)
6849 if $CC --version 2>&1 | grep -q clang
6850 then
6851 cc_is_clang=1
6852 else
6853 cc_is_clang=
6854 fi
6855esac
6856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857# tweak OPT based on compiler and platform, only if the user didn't set
6858# it on the command line
6859
Victor Stinner9ed34a82017-05-02 22:35:58 +02006860
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006861if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862then
6863 case $GCC in
6864 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6866 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6867 WRAP="-fwrapv"
6868 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006869
Victor Stinner35f3d242017-04-21 12:35:24 +02006870 if test -n "${cc_is_clang}"
6871 then
6872 # Clang also needs -fwrapv
6873 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006874 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6875 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006876 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006877 fi
6878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 case $ac_cv_prog_cc_g in
6880 yes)
6881 if test "$Py_DEBUG" = 'true' ; then
6882 # Optimization messes up debuggers, so turn it off for
6883 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006885 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 else
Victor Stinner28205b22017-04-21 11:24:34 +02006887 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006888 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 else
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 fi
6892 ;;
6893 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006894 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895 ;;
6896 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898 case $ac_sys_system in
6899 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6900 ;;
6901 esac
6902 ;;
6903
6904 *)
6905 OPT="-O"
6906 ;;
6907 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908fi
6909
6910
6911
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006912
stratakiscf10a752018-12-19 18:19:01 +01006913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914# The -arch flags for universal builds on OSX
6915UNIVERSAL_ARCH_FLAGS=
6916
6917
6918# tweak BASECFLAGS based on compiler and platform
6919case $GCC in
6920yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006921 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006922
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6924$as_echo_n "checking for -Wextra... " >&6; }
6925 ac_save_cc="$CC"
6926 CC="$CC -Wextra -Werror"
6927 if ${ac_cv_extra_warnings+:} false; then :
6928 $as_echo_n "(cached) " >&6
6929else
6930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6931/* end confdefs.h. */
6932
6933
6934int
6935main ()
6936{
6937
6938 ;
6939 return 0;
6940}
6941
6942_ACEOF
6943if ac_fn_c_try_compile "$LINENO"; then :
6944
6945 ac_cv_extra_warnings=yes
6946
6947else
6948
6949 ac_cv_extra_warnings=no
6950
6951fi
6952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6953fi
6954
6955 CC="$ac_save_cc"
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6957$as_echo "$ac_cv_extra_warnings" >&6; }
6958
6959 if test $ac_cv_extra_warnings = yes
6960 then
6961 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6962 fi
6963
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964 # Python doesn't violate C99 aliasing rules, but older versions of
6965 # GCC produce warnings for legal Python code. Enable
6966 # -fno-strict-aliasing on versions of GCC that support but produce
6967 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6969$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 ac_save_cc="$CC"
6971 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006973 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006975else
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980int
6981main ()
6982{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006983
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006984 ;
6985 return 0;
6986}
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 CC="$ac_save_cc -fstrict-aliasing"
6992 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994/* end confdefs.h. */
6995
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997int
6998main ()
6999{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007000double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001 ;
7002 return 0;
7003}
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007006if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=no
7009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010else
Matthias Kloseb159a552010-04-25 21:00:44 +00007011
7012 ac_cv_no_strict_aliasing=yes
7013
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007014fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017else
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
7019 ac_cv_no_strict_aliasing=no
7020
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007023fi
7024
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7028$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030 then
7031 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7032 fi
7033
Zachary Ware5af85642015-12-21 12:09:17 -06007034 # ICC doesn't recognize the option, but only emits a warning
7035 ## XXX does it emit an unused result warning and can it be disabled?
7036 case "$CC" in
7037 *icc*)
7038 ac_cv_disable_unused_result_warning=no
7039 ;;
7040 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7042$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7043 ac_save_cc="$CC"
7044 CC="$CC -Wunused-result -Werror"
7045 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007046 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007047 $as_echo_n "(cached) " >&6
7048else
7049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050/* end confdefs.h. */
7051
7052
7053int
7054main ()
7055{
7056
7057 ;
7058 return 0;
7059}
7060
7061_ACEOF
7062if ac_fn_c_try_compile "$LINENO"; then :
7063
7064 ac_cv_disable_unused_result_warning=yes
7065
7066else
7067
7068 ac_cv_disable_unused_result_warning=no
7069
7070fi
7071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072fi
7073
7074 CFLAGS="$save_CFLAGS"
7075 CC="$ac_save_cc"
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7077$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007078 ;;
7079 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007080
7081 if test $ac_cv_disable_unused_result_warning = yes
7082 then
7083 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007084 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7085 fi
7086
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7088$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7089 ac_save_cc="$CC"
7090 CC="$CC -Wunused-parameter -Werror"
7091 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105
7106_ACEOF
7107if ac_fn_c_try_compile "$LINENO"; then :
7108
7109 ac_cv_disable_unused_parameter_warning=yes
7110
7111else
7112
7113 ac_cv_disable_unused_parameter_warning=no
7114
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117fi
7118
7119 CC="$ac_save_cc"
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7121$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7122
7123 if test $ac_cv_disable_unused_parameter_warning = yes
7124 then
7125 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7126 fi
7127
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7129$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7130 ac_save_cc="$CC"
7131 CC="$CC -Wmissing-field-initializers -Werror"
7132 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7133 $as_echo_n "(cached) " >&6
7134else
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */
7137
7138
7139int
7140main ()
7141{
7142
7143 ;
7144 return 0;
7145}
7146
7147_ACEOF
7148if ac_fn_c_try_compile "$LINENO"; then :
7149
7150 ac_cv_disable_missing_field_initializers=yes
7151
7152else
7153
7154 ac_cv_disable_missing_field_initializers=no
7155
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159
7160 CC="$ac_save_cc"
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7162$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7163
7164 if test $ac_cv_disable_missing_field_initializers = yes
7165 then
7166 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007167 fi
7168
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7170$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7171 ac_save_cc="$CC"
7172 CC="$CC -Wsign-compare"
7173 save_CFLAGS="$CFLAGS"
7174 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7175 $as_echo_n "(cached) " >&6
7176else
7177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7178/* end confdefs.h. */
7179
7180
7181int
7182main ()
7183{
7184
7185 ;
7186 return 0;
7187}
7188
7189_ACEOF
7190if ac_fn_c_try_compile "$LINENO"; then :
7191
7192 ac_cv_enable_sign_compare_warning=yes
7193
7194else
7195
7196 ac_cv_enable_sign_compare_warning=no
7197
7198fi
7199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7200fi
7201
7202 CFLAGS="$save_CFLAGS"
7203 CC="$ac_save_cc"
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7205$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7206
7207 if test $ac_cv_enable_sign_compare_warning = yes
7208 then
7209 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7210 fi
7211
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7213$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7214 ac_save_cc="$CC"
7215 CC="$CC -Wunreachable-code"
7216 save_CFLAGS="$CFLAGS"
7217 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7218 $as_echo_n "(cached) " >&6
7219else
7220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h. */
7222
7223
7224int
7225main ()
7226{
7227
7228 ;
7229 return 0;
7230}
7231
7232_ACEOF
7233if ac_fn_c_try_compile "$LINENO"; then :
7234
7235 ac_cv_enable_unreachable_code_warning=yes
7236
7237else
7238
7239 ac_cv_enable_unreachable_code_warning=no
7240
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243fi
7244
7245 CFLAGS="$save_CFLAGS"
7246 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007247
7248 # Don't enable unreachable code warning in debug mode, since it usually
7249 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007250 # Issue #24324: Unfortunately, the unreachable code warning does not work
7251 # correctly on gcc and has been silently removed from the compiler.
7252 # It is supported on clang but on OS X systems gcc may be an alias
7253 # for clang. Try to determine if the compiler is not really gcc and,
7254 # if so, only then enable the warning.
7255 if test $ac_cv_enable_unreachable_code_warning = yes && \
7256 test "$Py_DEBUG" != "true" && \
7257 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 then
7259 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007260 else
7261 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007262 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7264$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007265
INADA Naokie3364842018-06-05 20:40:53 +09007266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7267$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7268 ac_save_cc="$CC"
7269 CC="$CC -Werror -Wstrict-prototypes"
7270 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7271 $as_echo_n "(cached) " >&6
7272else
7273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7274/* end confdefs.h. */
7275
7276
7277int
7278main ()
7279{
7280
7281 ;
7282 return 0;
7283}
7284
7285_ACEOF
7286if ac_fn_c_try_compile "$LINENO"; then :
7287
7288 ac_cv_enable_strict_prototypes_warning=yes
7289
7290else
7291
7292 ac_cv_enable_strict_prototypes_warning=no
7293
7294fi
7295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7296fi
7297
7298 CC="$ac_save_cc"
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7300$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7301
7302 if test $ac_cv_enable_strict_prototypes_warning = yes
7303 then
7304 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7305 fi
7306
Victor Stinner193ee0a2017-02-06 14:24:00 +01007307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7308$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7309 ac_save_cc="$CC"
7310 CC="$CC -Werror=implicit-function-declaration"
7311 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7312 $as_echo_n "(cached) " >&6
7313else
7314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7315/* end confdefs.h. */
7316
7317
7318int
7319main ()
7320{
7321
7322 ;
7323 return 0;
7324}
7325
7326_ACEOF
7327if ac_fn_c_try_compile "$LINENO"; then :
7328
7329 ac_cv_enable_implicit_function_declaration_error=yes
7330
7331else
7332
7333 ac_cv_enable_implicit_function_declaration_error=no
7334
7335fi
7336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7337fi
7338
7339 CC="$ac_save_cc"
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7341$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7342
7343 if test $ac_cv_enable_implicit_function_declaration_error = yes
7344 then
7345 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7346 fi
7347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7349 # support. Without this, treatment of subnormals doesn't follow
7350 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007351 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352 alpha*)
7353 BASECFLAGS="$BASECFLAGS -mieee"
7354 ;;
7355 esac
7356
7357 case $ac_sys_system in
7358 SCO_SV*)
7359 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7360 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007361
Ned Deily87adb6e2013-10-18 21:09:56 -07007362 Darwin*)
7363 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7364 # used to be here, but non-Apple gcc doesn't accept them.
7365 if test "${CC}" = gcc
7366 then
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007369 case "${UNIVERSALSDK}" in
7370 */MacOSX10.4u.sdk)
7371 # Build using 10.4 SDK, force usage of gcc when the
7372 # compiler is gcc, otherwise the user will get very
7373 # confusing error messages when building on OSX 10.6
7374 CC=gcc-4.0
7375 CPP=cpp-4.0
7376 ;;
7377 esac
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007379$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381
Ned Deily87adb6e2013-10-18 21:09:56 -07007382 if test "${enable_universalsdk}"
7383 then
7384 case "$UNIVERSAL_ARCHS" in
7385 32-bit)
7386 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7387 LIPO_32BIT_FLAGS=""
7388 ARCH_RUN_32BIT=""
7389 ;;
7390 64-bit)
7391 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7392 LIPO_32BIT_FLAGS=""
7393 ARCH_RUN_32BIT="true"
7394 ;;
7395 all)
7396 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7397 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7398 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7399 ;;
7400 intel)
7401 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7402 LIPO_32BIT_FLAGS="-extract i386"
7403 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7404 ;;
7405 intel-32)
7406 UNIVERSAL_ARCH_FLAGS="-arch i386"
7407 LIPO_32BIT_FLAGS=""
7408 ARCH_RUN_32BIT=""
7409 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007410 intel-64)
7411 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7412 LIPO_32BIT_FLAGS=""
7413 ARCH_RUN_32BIT="true"
7414 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007415 3-way)
7416 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7417 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7418 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7419 ;;
7420 *)
7421 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7422 ;;
7423 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424
Ned Deily87adb6e2013-10-18 21:09:56 -07007425 if test "${UNIVERSALSDK}" != "/"
7426 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007427 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7428 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007430 else
7431 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7432 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 fi
7434 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 # Calculate an appropriate deployment target for this build:
7437 # The deployment target value is used explicitly to enable certain
7438 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007439 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007440 # component of the string returned by distutils.get_platform().
7441 #
7442 # Use the value from:
7443 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7444 # 2. the operating system version of the build machine if >= 10.6
7445 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7446 # below to pick either 10.3, 10.4, or 10.5 as the target.
7447 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448
Ned Deily87adb6e2013-10-18 21:09:56 -07007449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7450$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007451 cur_target_major=`sw_vers -productVersion | \
7452 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7453 cur_target_minor=`sw_vers -productVersion | \
7454 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7455 cur_target="${cur_target_major}.${cur_target_minor}"
7456 if test ${cur_target_major} -eq 10 && \
7457 test ${cur_target_minor} -ge 3 && \
7458 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007459 then
Ned Deily36820b62014-06-25 13:44:22 -07007460 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007461 cur_target=10.3
7462 if test ${enable_universalsdk}
7463 then
7464 case "$UNIVERSAL_ARCHS" in
7465 all|3-way|intel|64-bit)
7466 # These configurations were first supported in 10.5
7467 cur_target='10.5'
7468 ;;
7469 esac
7470 else
7471 if test `/usr/bin/arch` = "i386"
7472 then
7473 # 10.4 was the first release to support Intel archs
7474 cur_target="10.4"
7475 fi
7476 fi
7477 fi
7478 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007479
Ned Deily87adb6e2013-10-18 21:09:56 -07007480 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7481 # environment with a value that is the same as what we'll use
7482 # in the Makefile to ensure that we'll get the same compiler
7483 # environment during configure and build time.
7484 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7485 export MACOSX_DEPLOYMENT_TARGET
7486 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7488$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007489
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 # end of Darwin* tests
7491 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492 esac
7493 ;;
7494
7495*)
7496 case $ac_sys_system in
7497 OpenUNIX*|UnixWare*)
7498 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7499 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500 SCO_SV*)
7501 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7502 ;;
7503 esac
7504 ;;
7505esac
7506
Zachary Ware5af85642015-12-21 12:09:17 -06007507# ICC needs -fp-model strict or floats behave badly
7508case "$CC" in
7509*icc*)
7510 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7511 ;;
7512esac
7513
T. Woutersddbfa2c2017-05-23 01:30:49 +02007514if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515 :
7516else
7517 OPT="-DNDEBUG $OPT"
7518fi
7519
7520if test "$ac_arch_flags"
7521then
7522 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7523fi
7524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525# On some compilers, pthreads are available without further options
7526# (e.g. MacOS X). On some of these systems, the compiler will not
7527# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7528# So we have to see first whether pthreads are available without
7529# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7531$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007532if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534else
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536 ac_cv_pthread_is_default=no
7537else
Matthias Kloseb9621712010-04-24 17:59:49 +00007538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539/* end confdefs.h. */
7540
Stefan Krah7dba5942012-11-22 22:49:11 +01007541#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542#include <pthread.h>
7543
7544void* routine(void* p){return NULL;}
7545
7546int main(){
7547 pthread_t p;
7548 if(pthread_create(&p,NULL,routine,NULL)!=0)
7549 return 1;
7550 (void)pthread_detach(p);
7551 return 0;
7552}
7553
7554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007555if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556
7557 ac_cv_pthread_is_default=yes
7558 ac_cv_kthread=no
7559 ac_cv_pthread=no
7560
7561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566fi
7567
7568
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569fi
7570
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7572$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573
7574
7575if test $ac_cv_pthread_is_default = yes
7576then
7577 ac_cv_kpthread=no
7578else
7579# -Kpthread, if available, provides the right #defines
7580# and linker options to make pthread_create available
7581# Some compilers won't report that they do not support -Kpthread,
7582# so we need to run a program to see whether it really made the
7583# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7585$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007586if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588else
7589 ac_save_cc="$CC"
7590CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007591if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592 ac_cv_kpthread=no
7593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595/* end confdefs.h. */
7596
Stefan Krah7dba5942012-11-22 22:49:11 +01007597#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598#include <pthread.h>
7599
7600void* routine(void* p){return NULL;}
7601
7602int main(){
7603 pthread_t p;
7604 if(pthread_create(&p,NULL,routine,NULL)!=0)
7605 return 1;
7606 (void)pthread_detach(p);
7607 return 0;
7608}
7609
7610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007611if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612 ac_cv_kpthread=yes
7613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618fi
7619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620CC="$ac_save_cc"
7621fi
7622
Matthias Kloseb9621712010-04-24 17:59:49 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7624$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
7626
7627if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7628then
7629# -Kthread, if available, provides the right #defines
7630# and linker options to make pthread_create available
7631# Some compilers won't report that they do not support -Kthread,
7632# so we need to run a program to see whether it really made the
7633# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7635$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007636if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638else
7639 ac_save_cc="$CC"
7640CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007641if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642 ac_cv_kthread=no
7643else
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645/* end confdefs.h. */
7646
Stefan Krah7dba5942012-11-22 22:49:11 +01007647#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648#include <pthread.h>
7649
7650void* routine(void* p){return NULL;}
7651
7652int main(){
7653 pthread_t p;
7654 if(pthread_create(&p,NULL,routine,NULL)!=0)
7655 return 1;
7656 (void)pthread_detach(p);
7657 return 0;
7658}
7659
7660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007661if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662 ac_cv_kthread=yes
7663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668fi
7669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670CC="$ac_save_cc"
7671fi
7672
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7674$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675fi
7676
7677if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7678then
7679# -pthread, if available, provides the right #defines
7680# and linker options to make pthread_create available
7681# Some compilers won't report that they do not support -pthread,
7682# so we need to run a program to see whether it really made the
7683# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7685$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007686if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688else
7689 ac_save_cc="$CC"
7690CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007691if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692 ac_cv_pthread=no
7693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695/* end confdefs.h. */
7696
Stefan Krah7dba5942012-11-22 22:49:11 +01007697#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698#include <pthread.h>
7699
7700void* routine(void* p){return NULL;}
7701
7702int main(){
7703 pthread_t p;
7704 if(pthread_create(&p,NULL,routine,NULL)!=0)
7705 return 1;
7706 (void)pthread_detach(p);
7707 return 0;
7708}
7709
7710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007711if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712 ac_cv_pthread=yes
7713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7717 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718fi
7719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720CC="$ac_save_cc"
7721fi
7722
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7724$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725fi
7726
7727# If we have set a CC compiler flag for thread support then
7728# check if it works for CXX, too.
7729ac_cv_cxx_thread=no
7730if test ! -z "$CXX"
7731then
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7733$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734ac_save_cxx="$CXX"
7735
7736if test "$ac_cv_kpthread" = "yes"
7737then
7738 CXX="$CXX -Kpthread"
7739 ac_cv_cxx_thread=yes
7740elif test "$ac_cv_kthread" = "yes"
7741then
7742 CXX="$CXX -Kthread"
7743 ac_cv_cxx_thread=yes
7744elif test "$ac_cv_pthread" = "yes"
7745then
7746 CXX="$CXX -pthread"
7747 ac_cv_cxx_thread=yes
7748fi
7749
7750if test $ac_cv_cxx_thread = yes
7751then
7752 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7753 $CXX -c conftest.$ac_ext 2>&5
7754 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7755 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7756 then
7757 ac_cv_cxx_thread=yes
7758 else
7759 ac_cv_cxx_thread=no
7760 fi
7761 rm -fr conftest*
7762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7764$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765fi
7766CXX="$ac_save_cxx"
7767
7768
7769# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7771$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007772if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776/* end confdefs.h. */
7777#include <stdlib.h>
7778#include <stdarg.h>
7779#include <string.h>
7780#include <float.h>
7781
7782int
7783main ()
7784{
7785
7786 ;
7787 return 0;
7788}
7789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007790if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791 ac_cv_header_stdc=yes
7792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7796
7797if test $ac_cv_header_stdc = yes; then
7798 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800/* end confdefs.h. */
7801#include <string.h>
7802
7803_ACEOF
7804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 $EGREP "memchr" >/dev/null 2>&1; then :
7806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807else
7808 ac_cv_header_stdc=no
7809fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007810rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811
7812fi
7813
7814if test $ac_cv_header_stdc = yes; then
7815 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817/* end confdefs.h. */
7818#include <stdlib.h>
7819
7820_ACEOF
7821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $EGREP "free" >/dev/null 2>&1; then :
7823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824else
7825 ac_cv_header_stdc=no
7826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007827rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828
7829fi
7830
7831if test $ac_cv_header_stdc = yes; then
7832 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834 :
7835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837/* end confdefs.h. */
7838#include <ctype.h>
7839#include <stdlib.h>
7840#if ((' ' & 0x0FF) == 0x020)
7841# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7842# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7843#else
7844# define ISLOWER(c) \
7845 (('a' <= (c) && (c) <= 'i') \
7846 || ('j' <= (c) && (c) <= 'r') \
7847 || ('s' <= (c) && (c) <= 'z'))
7848# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7849#endif
7850
7851#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7852int
7853main ()
7854{
7855 int i;
7856 for (i = 0; i < 256; i++)
7857 if (XOR (islower (i), ISLOWER (i))
7858 || toupper (i) != TOUPPER (i))
7859 return 2;
7860 return 0;
7861}
7862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007863if ac_fn_c_try_run "$LINENO"; then :
7864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870fi
7871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872fi
7873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7875$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876if test $ac_cv_header_stdc = yes; then
7877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879
7880fi
7881
stratakise768c862018-01-23 16:11:24 +01007882for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007883fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007884ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007885sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007886utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007887poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007888sys/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 +01007889sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007890sys/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 +01007891sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007892sys/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 -07007893libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007894linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007895sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007896do :
7897 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7898ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007899if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007901#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007902_ACEOF
7903
7904fi
7905
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906done
7907
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007909for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7912$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007913if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007915else
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918#include <sys/types.h>
7919#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Martin v. Löwis11437992002-04-12 09:54:03 +00007921int
7922main ()
7923{
7924if ((DIR *) 0)
7925return 0;
7926 ;
7927 return 0;
7928}
7929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937eval ac_res=\$$as_ac_Header
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7939$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007940if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007942#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007943_ACEOF
7944
7945ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007946fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948done
7949# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7950if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7952$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955else
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960/* Override any GCC internal prototype to avoid an error.
7961 Use char because int might match the return type of a GCC
7962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963#ifdef __cplusplus
7964extern "C"
7965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007966char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 ;
7972 return 0;
7973}
7974_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975for ac_lib in '' dir; do
7976 if test -z "$ac_lib"; then
7977 ac_res="none required"
7978 else
7979 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985rm -f core conftest.err conftest.$ac_objext \
7986 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007987 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990done
Victor Stinnere0be4232011-10-25 13:06:09 +02007991if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993else
7994 ac_cv_search_opendir=no
7995fi
7996rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007997LIBS=$ac_func_search_save_LIBS
7998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8000$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008002if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008005fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
Michael W. Hudson54241132001-12-07 15:38:26 +00008007else
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8009$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008010if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008012else
8013 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017/* Override any GCC internal prototype to avoid an error.
8018 Use char because int might match the return type of a GCC
8019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020#ifdef __cplusplus
8021extern "C"
8022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008023char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ;
8029 return 0;
8030}
8031_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032for ac_lib in '' x; do
8033 if test -z "$ac_lib"; then
8034 ac_res="none required"
8035 else
8036 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008037 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008042rm -f core conftest.err conftest.$ac_objext \
8043 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008044 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047done
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050else
8051 ac_cv_search_opendir=no
8052fi
8053rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008054LIBS=$ac_func_search_save_LIBS
8055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8057$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008059if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062fi
8063
8064fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8067$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008068if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070else
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008072/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008073#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008074int
8075main ()
8076{
8077return makedev(0, 0);
8078 ;
8079 return 0;
8080}
8081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008083 ac_cv_header_sys_types_h_makedev=yes
8084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087rm -f core conftest.err conftest.$ac_objext \
8088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008089
8090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8092$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008093
8094if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008095ac_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 +02008096if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008099
8100fi
8101
8102
8103
8104 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 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 +02008106if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008107
Matthias Kloseb9621712010-04-24 17:59:49 +00008108$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008109
8110fi
8111
8112
8113 fi
8114fi
8115
Michael W. Hudson54241132001-12-07 15:38:26 +00008116
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008117# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8118# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8119SAVE_CFLAGS=$CFLAGS
8120CFLAGS="-std=c99 $CFLAGS"
8121for ac_header in bluetooth/bluetooth.h
8122do :
8123 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8124if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8125 cat >>confdefs.h <<_ACEOF
8126#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8127_ACEOF
8128
8129fi
8130
8131done
8132
8133CFLAGS=$SAVE_CFLAGS
8134
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008135# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8136for ac_header in net/if.h
8137do :
8138 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8139#ifdef STDC_HEADERS
8140# include <stdlib.h>
8141# include <stddef.h>
8142#else
8143# ifdef HAVE_STDLIB_H
8144# include <stdlib.h>
8145# endif
8146#endif
8147#ifdef HAVE_SYS_SOCKET_H
8148# include <sys/socket.h>
8149#endif
8150
8151"
Victor Stinnere0be4232011-10-25 13:06:09 +02008152if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008153 cat >>confdefs.h <<_ACEOF
8154#define HAVE_NET_IF_H 1
8155_ACEOF
8156
8157fi
8158
8159done
8160
8161
Martin v. Löwis11017b12006-01-14 18:12:57 +00008162# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008163for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008164do :
8165 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 +00008166#ifdef HAVE_ASM_TYPES_H
8167#include <asm/types.h>
8168#endif
8169#ifdef HAVE_SYS_SOCKET_H
8170#include <sys/socket.h>
8171#endif
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173"
Victor Stinnere0be4232011-10-25 13:06:09 +02008174if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008176#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008177_ACEOF
8178
8179fi
8180
8181done
8182
8183
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008184# On Linux, qrtr.h requires asm/types.h
8185for ac_header in linux/qrtr.h
8186do :
8187 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8188#ifdef HAVE_ASM_TYPES_H
8189#include <asm/types.h>
8190#endif
8191#ifdef HAVE_SYS_SOCKET_H
8192#include <sys/socket.h>
8193#endif
8194
8195"
8196if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8197 cat >>confdefs.h <<_ACEOF
8198#define HAVE_LINUX_QRTR_H 1
8199_ACEOF
8200
8201fi
8202
8203done
8204
8205
caaveryeffc12f2017-09-06 18:18:10 -04008206for ac_header in linux/vm_sockets.h
8207do :
8208 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8209#ifdef HAVE_SYS_SOCKET_H
8210#include <sys/socket.h>
8211#endif
8212
8213"
8214if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8215 cat >>confdefs.h <<_ACEOF
8216#define HAVE_LINUX_VM_SOCKETS_H 1
8217_ACEOF
8218
8219fi
8220
8221done
8222
8223
Charles-François Natali47413c12011-10-06 19:47:44 +02008224# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008225for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008226do :
8227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8228ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8229#ifdef HAVE_SYS_SOCKET_H
8230#include <sys/socket.h>
8231#endif
8232
8233"
8234if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8235 cat >>confdefs.h <<_ACEOF
8236#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8237_ACEOF
8238
8239fi
8240
8241done
8242
8243
Guido van Rossum627b2d71993-12-24 10:39:16 +00008244# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008245was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8247$as_echo_n "checking for clock_t in time.h... " >&6; }
8248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008249/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008250#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
8252_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008255 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008256else
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008261
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008263rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8266$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8269$as_echo_n "checking for makedev... " >&6; }
8270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008271/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008272
Jesus Cea740f53a2010-04-28 11:35:30 +00008273#if defined(MAJOR_IN_MKDEV)
8274#include <sys/mkdev.h>
8275#elif defined(MAJOR_IN_SYSMACROS)
8276#include <sys/sysmacros.h>
8277#else
8278#include <sys/types.h>
8279#endif
8280
Neal Norwitz11690112002-07-30 01:08:28 +00008281int
8282main ()
8283{
Jesus Cea740f53a2010-04-28 11:35:30 +00008284
8285 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008286 ;
8287 return 0;
8288}
Matthias Kloseb159a552010-04-25 21:00:44 +00008289
Neal Norwitz11690112002-07-30 01:08:28 +00008290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008291if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008292 ac_cv_has_makedev=yes
8293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296rm -f core conftest.err conftest.$ac_objext \
8297 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8299$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008300if test "$ac_cv_has_makedev" = "yes"; then
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008303
8304fi
8305
Christian Heimes985ecdc2013-11-20 11:46:18 +01008306# byte swapping
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8308$as_echo_n "checking for le64toh... " >&6; }
8309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8310/* end confdefs.h. */
8311
8312#ifdef HAVE_ENDIAN_H
8313#include <endian.h>
8314#elif defined(HAVE_SYS_ENDIAN_H)
8315#include <sys/endian.h>
8316#endif
8317
8318int
8319main ()
8320{
8321
8322 le64toh(1)
8323 ;
8324 return 0;
8325}
8326
8327_ACEOF
8328if ac_fn_c_try_link "$LINENO"; then :
8329 ac_cv_has_le64toh=yes
8330else
8331 ac_cv_has_le64toh=no
8332fi
8333rm -f core conftest.err conftest.$ac_objext \
8334 conftest$ac_exeext conftest.$ac_ext
8335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8336$as_echo "$ac_cv_has_le64toh" >&6; }
8337if test "$ac_cv_has_le64toh" = "yes"; then
8338
8339$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8340
8341fi
8342
Martin v. Löwis399a6892002-10-04 10:22:02 +00008343use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008344# Don't use largefile support for GNU/Hurd
8345case $ac_sys_system in GNU*)
8346 use_lfs=no
8347esac
8348
Martin v. Löwis399a6892002-10-04 10:22:02 +00008349if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008350# Two defines needed to enable largefile support on various platforms
8351# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008352case $ac_sys_system/$ac_sys_release in
8353AIX*)
8354
8355$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8356
8357 ;;
8358esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008364
Martin v. Löwis399a6892002-10-04 10:22:02 +00008365fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008366
Guido van Rossum84e7b241996-08-19 21:59:00 +00008367# Add some code to confdefs.h so that the test for off_t works on SCO
8368cat >> confdefs.h <<\EOF
8369#if defined(SCO_DS)
8370#undef _OFF_T
8371#endif
8372EOF
8373
Guido van Rossumef2255b2000-03-10 22:30:29 +00008374# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008375ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008376if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008377
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378else
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
8380cat >>confdefs.h <<_ACEOF
8381#define mode_t int
8382_ACEOF
8383
8384fi
8385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008389else
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
8391cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008393_ACEOF
8394
8395fi
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008398if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
8402cat >>confdefs.h <<_ACEOF
8403#define pid_t int
8404_ACEOF
8405
8406fi
8407
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008410#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008414if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008415
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
8418cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008420_ACEOF
8421
8422fi
8423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8425$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008426if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008431#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008432
8433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008436 ac_cv_type_uid_t=yes
8437else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008438 ac_cv_type_uid_t=no
8439fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008440rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8444$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008445if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008451
8452fi
8453
Mark Dickinson983bc162012-12-02 12:11:38 +00008454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008459
8460fi
8461
Stefan Krah1919b7e2012-03-21 18:25:23 +01008462ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8463if test "x$ac_cv_type___uint128_t" = xyes; then :
8464
8465$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8466
8467fi
8468
Jack Jansendd19cf82001-12-06 22:36:17 +00008469
Michael W. Hudson54241132001-12-07 15:38:26 +00008470# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008471# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472# The cast to long int works around a bug in the HP C Compiler
8473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8475# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8477$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008478if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008480else
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 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 +00008482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 if test "$ac_cv_type_int" = yes; then
8485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008487as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008488See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489 else
8490 ac_cv_sizeof_int=0
8491 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8496$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497
8498
8499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008501#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008502_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008503
8504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505# The cast to long int works around a bug in the HP C Compiler
8506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8508# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8510$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008511if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008513else
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 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 +00008515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 if test "$ac_cv_type_long" = yes; then
8518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008520as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008521See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522 else
8523 ac_cv_sizeof_long=0
8524 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8529$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530
8531
8532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008534#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008535_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008536
8537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538# The cast to long int works around a bug in the HP C Compiler
8539# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8540# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8541# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8543$as_echo_n "checking size of long long... " >&6; }
8544if ${ac_cv_sizeof_long_long+:} false; then :
8545 $as_echo_n "(cached) " >&6
8546else
8547 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8548
8549else
8550 if test "$ac_cv_type_long_long" = yes; then
8551 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8553as_fn_error 77 "cannot compute sizeof (long long)
8554See \`config.log' for more details" "$LINENO" 5; }
8555 else
8556 ac_cv_sizeof_long_long=0
8557 fi
8558fi
8559
8560fi
8561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8562$as_echo "$ac_cv_sizeof_long_long" >&6; }
8563
8564
8565
8566cat >>confdefs.h <<_ACEOF
8567#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8568_ACEOF
8569
8570
8571# The cast to long int works around a bug in the HP C Compiler
8572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8574# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8576$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008577if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 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 +00008581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 if test "$ac_cv_type_void_p" = yes; then
8584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008586as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008587See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588 else
8589 ac_cv_sizeof_void_p=0
8590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8595$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596
8597
8598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008600#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008601_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008602
8603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604# The cast to long int works around a bug in the HP C Compiler
8605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8609$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008610if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008612else
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 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 +00008614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 if test "$ac_cv_type_short" = yes; then
8617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008619as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008620See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621 else
8622 ac_cv_sizeof_short=0
8623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8628$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629
8630
8631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008633#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008634_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008635
8636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637# The cast to long int works around a bug in the HP C Compiler
8638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8640# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8642$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008643if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008645else
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 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 +00008647
Martin v. Löwis11437992002-04-12 09:54:03 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 if test "$ac_cv_type_float" = yes; then
8650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008652as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008653See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654 else
8655 ac_cv_sizeof_float=0
8656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8661$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662
8663
8664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008666#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008667_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008668
8669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670# The cast to long int works around a bug in the HP C Compiler
8671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8675$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008676if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 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 +00008680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 if test "$ac_cv_type_double" = yes; then
8683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008685as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008686See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 else
8688 ac_cv_sizeof_double=0
8689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691
Martin v. Löwis11437992002-04-12 09:54:03 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8694$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695
8696
8697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008699#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008700_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008701
8702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703# The cast to long int works around a bug in the HP C Compiler
8704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8706# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8708$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008709if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008711else
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 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 +00008713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 if test "$ac_cv_type_fpos_t" = yes; then
8716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008718as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008719See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720 else
8721 ac_cv_sizeof_fpos_t=0
8722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8727$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728
8729
8730
Martin v. Löwis11437992002-04-12 09:54:03 +00008731cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008732#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008733_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008734
Michael W. Hudson54241132001-12-07 15:38:26 +00008735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736# The cast to long int works around a bug in the HP C Compiler
8737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8739# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8741$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008742if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 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 +00008746
Martin v. Löwis18e16552006-02-15 17:27:45 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 if test "$ac_cv_type_size_t" = yes; then
8749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008751as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008752See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753 else
8754 ac_cv_sizeof_size_t=0
8755 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757
Martin v. Löwis18e16552006-02-15 17:27:45 +00008758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8760$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761
8762
8763
Martin v. Löwis18e16552006-02-15 17:27:45 +00008764cat >>confdefs.h <<_ACEOF
8765#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8766_ACEOF
8767
8768
Christian Heimes400adb02008-02-01 08:12:03 +00008769# The cast to long int works around a bug in the HP C Compiler
8770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8774$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 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 +00008779
Christian Heimes400adb02008-02-01 08:12:03 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type_pid_t" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008786 else
8787 ac_cv_sizeof_pid_t=0
8788 fi
8789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Christian Heimes400adb02008-02-01 08:12:03 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8793$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008794
8795
8796
8797cat >>confdefs.h <<_ACEOF
8798#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8799_ACEOF
8800
8801
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008802# The cast to long int works around a bug in the HP C Compiler
8803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8805# This bug is HP SR number 8606223364.
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8807$as_echo_n "checking size of uintptr_t... " >&6; }
8808if ${ac_cv_sizeof_uintptr_t+:} false; then :
8809 $as_echo_n "(cached) " >&6
8810else
8811 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8812
8813else
8814 if test "$ac_cv_type_uintptr_t" = yes; then
8815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8817as_fn_error 77 "cannot compute sizeof (uintptr_t)
8818See \`config.log' for more details" "$LINENO" 5; }
8819 else
8820 ac_cv_sizeof_uintptr_t=0
8821 fi
8822fi
8823
8824fi
8825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8826$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8827
8828
8829
8830cat >>confdefs.h <<_ACEOF
8831#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8832_ACEOF
8833
8834
Michael W. Hudson54241132001-12-07 15:38:26 +00008835
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008836
Eitan Adler3055c942018-05-15 22:58:09 -07008837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8838$as_echo_n "checking for long double... " >&6; }
8839if ${ac_cv_type_long_double+:} false; then :
8840 $as_echo_n "(cached) " >&6
8841else
8842 if test "$GCC" = yes; then
8843 ac_cv_type_long_double=yes
8844 else
8845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8846/* end confdefs.h. */
8847/* The Stardent Vistra knows sizeof (long double), but does
8848 not support it. */
8849 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008850int
8851main ()
8852{
Eitan Adler3055c942018-05-15 22:58:09 -07008853static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8854 sizeof (double) <= sizeof (long double))];
8855test_array [0] = 0;
8856return test_array [0];
8857
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008858 ;
8859 return 0;
8860}
8861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008862if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008863 ac_cv_type_long_double=yes
8864else
8865 ac_cv_type_long_double=no
8866fi
8867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8868 fi
8869fi
8870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8871$as_echo "$ac_cv_type_long_double" >&6; }
8872 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008875
Eitan Adler3055c942018-05-15 22:58:09 -07008876 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008877
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008878# The cast to long int works around a bug in the HP C Compiler
8879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8883$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 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 +00008888
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_long_double" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895 else
8896 ac_cv_sizeof_long_double=0
8897 fi
8898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8902$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903
8904
8905
8906cat >>confdefs.h <<_ACEOF
8907#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8908_ACEOF
8909
8910
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912# The cast to long int works around a bug in the HP C Compiler
8913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8915# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8917$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008918if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008920else
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 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 +00008922
Thomas Woutersb2137042007-02-01 18:02:27 +00008923else
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 if test "$ac_cv_type__Bool" = yes; then
8925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008927as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008928See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929 else
8930 ac_cv_sizeof__Bool=0
8931 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008933
Thomas Woutersb2137042007-02-01 18:02:27 +00008934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8936$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937
8938
8939
Thomas Woutersb2137042007-02-01 18:02:27 +00008940cat >>confdefs.h <<_ACEOF
8941#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8942_ACEOF
8943
8944
Thomas Woutersb2137042007-02-01 18:02:27 +00008945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946# The cast to long int works around a bug in the HP C Compiler
8947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8949# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8951$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008952if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008956#ifdef HAVE_SYS_TYPES_H
8957#include <sys/types.h>
8958#endif
8959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 if test "$ac_cv_type_off_t" = yes; then
8964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008966as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008967See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968 else
8969 ac_cv_sizeof_off_t=0
8970 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8975$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008976
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977
8978
Martin v. Löwis11437992002-04-12 09:54:03 +00008979cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008980#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008982
Michael W. Hudson54241132001-12-07 15:38:26 +00008983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8986$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008987if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008988 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008989
Matthias Kloseb9621712010-04-24 17:59:49 +00008990$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008991
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8993$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008997fi
8998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999# The cast to long int works around a bug in the HP C Compiler
9000# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9001# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9002# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9004$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007else
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009#ifdef HAVE_SYS_TYPES_H
9010#include <sys/types.h>
9011#endif
9012#ifdef HAVE_TIME_H
9013#include <time.h>
9014#endif
9015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 if test "$ac_cv_type_time_t" = yes; then
9020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009022as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009023See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024 else
9025 ac_cv_sizeof_time_t=0
9026 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009028
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9031$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009032
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033
9034
Martin v. Löwis11437992002-04-12 09:54:03 +00009035cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009036#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009038
Michael W. Hudson54241132001-12-07 15:38:26 +00009039
9040
Trent Mick635f6fb2000-08-23 21:33:05 +00009041# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009042ac_save_cc="$CC"
9043if test "$ac_cv_kpthread" = "yes"
9044then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009045elif test "$ac_cv_kthread" = "yes"
9046then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047elif test "$ac_cv_pthread" = "yes"
9048then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009049fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9052$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009053have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009056
9057 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009058int
9059main ()
9060{
Guido van Rossum12580492000-09-24 16:47:19 +00009061pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 ;
9063 return 0;
9064}
Matthias Kloseb159a552010-04-25 21:00:44 +00009065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009067if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009068 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9072$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009073if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9079$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009080if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082else
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009084#ifdef HAVE_PTHREAD_H
9085#include <pthread.h>
9086#endif
9087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 if test "$ac_cv_type_pthread_t" = yes; then
9092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009094as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009095See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096 else
9097 ac_cv_sizeof_pthread_t=0
9098 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100
Trent Mick635f6fb2000-08-23 21:33:05 +00009101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9103$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009105
9106
Martin v. Löwis11437992002-04-12 09:54:03 +00009107cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009108#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009109_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009110
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009111
Trent Mick635f6fb2000-08-23 21:33:05 +00009112fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009113
9114# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9115# This checking will be unnecessary after removing deprecated TLS API.
9116# The cast to long int works around a bug in the HP C Compiler
9117# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9118# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9119# This bug is HP SR number 8606223364.
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9121$as_echo_n "checking size of pthread_key_t... " >&6; }
9122if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9123 $as_echo_n "(cached) " >&6
9124else
9125 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9126"; then :
9127
9128else
9129 if test "$ac_cv_type_pthread_key_t" = yes; then
9130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9132as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9133See \`config.log' for more details" "$LINENO" 5; }
9134 else
9135 ac_cv_sizeof_pthread_key_t=0
9136 fi
9137fi
9138
9139fi
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9141$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9142
9143
9144
9145cat >>confdefs.h <<_ACEOF
9146#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9147_ACEOF
9148
9149
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9151$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9152if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154/* end confdefs.h. */
9155#include <pthread.h>
9156int
9157main ()
9158{
9159pthread_key_t k; k * 1;
9160 ;
9161 return 0;
9162}
9163_ACEOF
9164if ac_fn_c_try_compile "$LINENO"; then :
9165 ac_pthread_key_t_is_arithmetic_type=yes
9166else
9167 ac_pthread_key_t_is_arithmetic_type=no
9168
9169fi
9170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9172$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9173 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9174
9175$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9176
9177 fi
9178else
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180$as_echo "no" >&6; }
9181fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009182CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009183
Michael W. Hudson54241132001-12-07 15:38:26 +00009184
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009185case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009186 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009187 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9188 ;;
9189 Darwin/*)
9190 OTHER_LIBTOOL_OPT=""
9191 ;;
9192esac
9193
9194
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009195
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009196case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009197 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009198 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9199 if test "${enable_universalsdk}"; then
9200 :
9201 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009202 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009203 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009204 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009205 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009206 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009207 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009208 if test ${gcc_version} '<' 4.0
9209 then
9210 LIBTOOL_CRUFT="-lcc_dynamic"
9211 else
9212 LIBTOOL_CRUFT=""
9213 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009215 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009216else
Matthias Kloseb9621712010-04-24 17:59:49 +00009217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009218/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009219
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009220 #include <unistd.h>
9221 int main(int argc, char*argv[])
9222 {
9223 if (sizeof(long) == 4) {
9224 return 0;
9225 } else {
9226 return 1;
9227 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009228 }
9229
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009231if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232 ac_osx_32bit=yes
9233else
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238fi
9239
9240
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009241 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009242 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009243 i386)
9244 MACOSX_DEFAULT_ARCH="i386"
9245 ;;
9246 ppc)
9247 MACOSX_DEFAULT_ARCH="ppc"
9248 ;;
9249 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009250 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251 ;;
9252 esac
9253 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009254 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 i386)
9256 MACOSX_DEFAULT_ARCH="x86_64"
9257 ;;
9258 ppc)
9259 MACOSX_DEFAULT_ARCH="ppc64"
9260 ;;
9261 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009262 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263 ;;
9264 esac
9265
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009266 fi
9267
9268 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009269 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9273$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009274if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009276 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009278 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9283$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009284 if test $enable_shared = "yes"
9285 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009286 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 +00009287 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009288else
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291fi
9292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9294$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009295case $ac_sys_system/$ac_sys_release in
9296 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9301$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009302 ;;
9303 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009306 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009307esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310
Michael W. Hudson54241132001-12-07 15:38:26 +00009311
9312
9313
9314
Benjamin Peterson99f03762010-04-11 22:15:28 +00009315
Thomas Wouters477c8d52006-05-27 19:21:47 +00009316
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009317# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9318# -- usually .so, .sl on HP-UX, .dll on Cygwin
9319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9320$as_echo_n "checking the extension of shared libraries... " >&6; }
9321if test -z "$SHLIB_SUFFIX"; then
9322 case $ac_sys_system in
9323 hp*|HP*)
9324 case `uname -m` in
9325 ia64) SHLIB_SUFFIX=.so;;
9326 *) SHLIB_SUFFIX=.sl;;
9327 esac
9328 ;;
9329 CYGWIN*) SHLIB_SUFFIX=.dll;;
9330 *) SHLIB_SUFFIX=.so;;
9331 esac
9332fi
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9334$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009335
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009337# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338# (Shared libraries in this instance are shared modules to be loaded into
9339# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9341$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342if test -z "$LDSHARED"
9343then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009344 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009345 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009346 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009347 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009348 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009350 if test "$GCC" = "yes" ; then
9351 LDSHARED='$(CC) -shared'
9352 LDCXXSHARED='$(CXX) -shared'
9353 else
9354 LDSHARED='$(CC) -G'
9355 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009356 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009357 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009358 if test "$GCC" = "yes" ; then
9359 LDSHARED='$(CC) -shared'
9360 LDCXXSHARED='$(CXX) -shared'
9361 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009362 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009363 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009364 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009365 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009366 LDSHARED='$(CC) -bundle'
9367 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009368 if test "$enable_framework" ; then
9369 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009370 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9371 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009373 else
9374 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009375 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009377 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009378 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009379 LDSHARED='$(CC) -bundle'
9380 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009381 if test "$enable_framework" ; then
9382 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009383 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9384 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009385 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009386 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009387 # No framework, use the Python app as bundle-loader
9388 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009389 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009391 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009392 Darwin/*)
9393 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9394 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009395
Ned Deily36820b62014-06-25 13:44:22 -07009396 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9397 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9398 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9399 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9400 if test ${dep_target_major} -eq 10 && \
9401 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009402 then
Ned Deily36820b62014-06-25 13:44:22 -07009403 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009404 LDSHARED='$(CC) -bundle'
9405 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009406 if test "$enable_framework" ; then
9407 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009408 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9409 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009410 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009411 else
9412 # No framework, use the Python app as bundle-loader
9413 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9414 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009415 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009416 fi
Ned Deily36820b62014-06-25 13:44:22 -07009417 else
9418 # building for OS X 10.3 and later
9419 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9420 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9421 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009422 fi
9423 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009424 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009425 LDSHARED='$(CC) -shared'
9426 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009427 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009428 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009429 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009430 LDSHARED='$(CC) -shared'
9431 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009432 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009433 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009434 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009435 OpenBSD*)
9436 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9437 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009438 LDSHARED='$(CC) -shared $(CCSHARED)'
9439 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009440 else
9441 case `uname -r` in
9442 [01].* | 2.[0-7] | 2.[0-7].*)
9443 LDSHARED="ld -Bshareable ${LDFLAGS}"
9444 ;;
9445 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009446 LDSHARED='$(CC) -shared $(CCSHARED)'
9447 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009448 ;;
9449 esac
9450 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009452 LDSHARED='$(CC) -shared'
9453 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009454 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009455 if test "$GCC" = "yes" ; then
9456 LDSHARED='$(CC) -shared'
9457 LDCXXSHARED='$(CXX) -shared'
9458 else
9459 LDSHARED='$(CC) -G'
9460 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009461 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009462 SCO_SV*)
9463 LDSHARED='$(CC) -Wl,-G,-Bexport'
9464 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9465 CYGWIN*)
9466 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9467 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468 *) LDSHARED="ld";;
9469 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9472$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009473LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009474BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009475# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009476# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9478$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009479if test -z "$CCSHARED"
9480then
Guido van Rossum07397971997-04-29 21:49:50 +00009481 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009482 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009483 then CCSHARED="-fPIC";
9484 elif test `uname -p` = sparc;
9485 then CCSHARED="-xcode=pic32";
9486 else CCSHARED="-Kpic";
9487 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009488 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009489 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009490 else CCSHARED="+z";
9491 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009492 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009493 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009494 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009495 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009496 if test "$GCC" = "yes"
9497 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009498 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009499 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009500 SCO_SV*)
9501 if test "$GCC" = "yes"
9502 then CCSHARED="-fPIC"
9503 else CCSHARED="-Kpic -belf"
9504 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009505 VxWorks*)
9506 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9510$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009511# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009512# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9514$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009515if test -z "$LINKFORSHARED"
9516then
Guido van Rossum07397971997-04-29 21:49:50 +00009517 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009518 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009519 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009520 LINKFORSHARED="-Wl,-E -Wl,+s";;
9521# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009522 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009523 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009524 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009526 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009527
9528 # Issue #18075: the default maximum stack size (8MBytes) is too
9529 # small for the default recursion limit. Increase the stack size
9530 # to ensure that tests don't crash
9531 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9532
Jack Jansene578a632001-08-15 01:27:14 +00009533 if test "$enable_framework"
9534 then
Jack Jansenda49e192005-01-07 13:08:22 +00009535 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009536 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009537 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009538 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009539 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009540 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009541 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009542 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9543 then
9544 LINKFORSHARED="-Wl,--export-dynamic"
9545 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009546 SunOS/5*) case $CC in
9547 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009548 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009549 then
9550 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009551 fi;;
9552 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009553 CYGWIN*)
9554 if test $enable_shared = "no"
9555 then
9556 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9557 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009558 QNX*)
9559 # -Wl,-E causes the symbols to be added to the dynamic
9560 # symbol table so that they can be found when a module
9561 # is loaded. -N 2048K causes the stack size to be set
9562 # to 2048 kilobytes so that the stack doesn't overflow
9563 # when running test_compile.py.
9564 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009565 VxWorks*)
9566 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9570$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009571
Michael W. Hudson54241132001-12-07 15:38:26 +00009572
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009573
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9575$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009576if test ! "$LIBRARY" = "$LDLIBRARY"
9577then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009578 case $ac_sys_system in
9579 CYGWIN*)
9580 # Cygwin needs CCSHARED when building extension DLLs
9581 # but not when building the interpreter DLL.
9582 CFLAGSFORSHARED='';;
9583 *)
9584 CFLAGSFORSHARED='$(CCSHARED)'
9585 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9588$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009589
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9591# library (with --enable-shared).
9592# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009593# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9594# if it is not required, since it creates a dependency of the shared library
9595# to LIBS. This, in turn, means that applications linking the shared libpython
9596# don't need to link LIBS explicitly. The default should be only changed
9597# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598
Matthias Kloseb9621712010-04-24 17:59:49 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9600$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009601case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009602 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009603 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009604esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9606$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009607
9608
Guido van Rossum627b2d71993-12-24 10:39:16 +00009609# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9611$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009613 $as_echo_n "(cached) " >&6
9614else
9615 ac_check_lib_save_LIBS=$LIBS
9616LIBS="-lsendfile $LIBS"
9617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9618/* end confdefs.h. */
9619
9620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
9623#ifdef __cplusplus
9624extern "C"
9625#endif
9626char sendfile ();
9627int
9628main ()
9629{
9630return sendfile ();
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635if ac_fn_c_try_link "$LINENO"; then :
9636 ac_cv_lib_sendfile_sendfile=yes
9637else
9638 ac_cv_lib_sendfile_sendfile=no
9639fi
9640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
9642LIBS=$ac_check_lib_save_LIBS
9643fi
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9645$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009646if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009647 cat >>confdefs.h <<_ACEOF
9648#define HAVE_LIBSENDFILE 1
9649_ACEOF
9650
9651 LIBS="-lsendfile $LIBS"
9652
9653fi
9654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9656$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009657if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009659else
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009661LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665/* Override any GCC internal prototype to avoid an error.
9666 Use char because int might match the return type of a GCC
9667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009671char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009672int
9673main ()
9674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009687LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9690$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009691if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 cat >>confdefs.h <<_ACEOF
9693#define HAVE_LIBDL 1
9694_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009696 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009697
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698fi
9699 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9701$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009704else
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009706LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710/* Override any GCC internal prototype to avoid an error.
9711 Use char because int might match the return type of a GCC
9712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009713#ifdef __cplusplus
9714extern "C"
9715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009716char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009717int
9718main ()
9719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ;
9722 return 0;
9723}
9724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9735$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009736if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 cat >>confdefs.h <<_ACEOF
9738#define HAVE_LIBDLD 1
9739_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009740
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009741 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009742
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743fi
9744 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009745
Michael Felt0d3ccb42017-12-30 22:39:20 +01009746# checks for uuid.h location
9747for ac_header in uuid/uuid.h uuid.h
9748do :
9749 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9750ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9752 cat >>confdefs.h <<_ACEOF
9753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9754_ACEOF
9755
9756fi
9757
9758done
9759
9760
Berker Peksag9a10ff42017-11-08 23:09:16 +03009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9762$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9764/* end confdefs.h. */
9765#include <uuid/uuid.h>
9766int
9767main ()
9768{
9769
9770#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009771void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009772#endif
9773
9774 ;
9775 return 0;
9776}
9777_ACEOF
9778if ac_fn_c_try_compile "$LINENO"; then :
9779
9780$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9781
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9783$as_echo "yes" >&6; }
9784else
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
9787
9788fi
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9790
Michael Felt0d3ccb42017-12-30 22:39:20 +01009791# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009792# FreeBSD and OpenBSD provides support as well
9793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9794$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9796/* end confdefs.h. */
9797#include <uuid.h>
9798int
9799main ()
9800{
9801
9802#ifndef uuid_create
9803void *x = uuid_create
9804#endif
9805
9806 ;
9807 return 0;
9808}
9809_ACEOF
9810if ac_fn_c_try_compile "$LINENO"; then :
9811
9812$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9813
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9815$as_echo "yes" >&6; }
9816else
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
9819
9820fi
9821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9822
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009823# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9824# stream in big-endian byte-order
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9826$as_echo_n "checking for uuid_enc_be... " >&6; }
9827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9828/* end confdefs.h. */
9829#include <uuid.h>
9830int
9831main ()
9832{
9833
9834#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009835void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009836#endif
9837
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842if ac_fn_c_try_compile "$LINENO"; then :
9843
9844$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9845
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9847$as_echo "yes" >&6; }
9848else
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850$as_echo "no" >&6; }
9851
9852fi
9853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9854
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009855# 'Real Time' functions on Solaris
9856# posix4 on Solaris 2.6
9857# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009859$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009860if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009862else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009863 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867/* Override any GCC internal prototype to avoid an error.
9868 Use char because int might match the return type of a GCC
9869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870#ifdef __cplusplus
9871extern "C"
9872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009873char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009874int
9875main ()
9876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ;
9879 return 0;
9880}
9881_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882for ac_lib in '' pthread rt posix4; do
9883 if test -z "$ac_lib"; then
9884 ac_res="none required"
9885 else
9886 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892rm -f core conftest.err conftest.$ac_objext \
9893 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009894 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897done
Victor Stinnere0be4232011-10-25 13:06:09 +02009898if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900else
9901 ac_cv_search_sem_init=no
9902fi
9903rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009904LIBS=$ac_func_search_save_LIBS
9905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9907$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009909if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009911
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009912fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009913
Martin v. Löwis519adae2003-09-20 10:47:47 +00009914
Martin v. Löwis19d17342003-06-14 21:03:05 +00009915# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9917$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009918if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009920else
9921 ac_check_lib_save_LIBS=$LIBS
9922LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926/* Override any GCC internal prototype to avoid an error.
9927 Use char because int might match the return type of a GCC
9928 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009929#ifdef __cplusplus
9930extern "C"
9931#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009932char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009933int
9934main ()
9935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942 ac_cv_lib_intl_textdomain=yes
9943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009946rm -f core conftest.err conftest.$ac_objext \
9947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948LIBS=$ac_check_lib_save_LIBS
9949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9951$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009952if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009955
Brett Cannonc6d936e2009-06-07 20:09:53 +00009956 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009957fi
9958
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009959
9960# checks for system dependent C++ extensions support
9961case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9963$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009966
Georg Brandl59e87bd2011-02-15 19:48:59 +00009967 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
9970{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009971loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ;
9973 return 0;
9974}
Matthias Kloseb159a552010-04-25 21:00:44 +00009975
Martin v. Löwis11437992002-04-12 09:54:03 +00009976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009977if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009978
Matthias Kloseb159a552010-04-25 21:00:44 +00009979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009981
Matthias Kloseb159a552010-04-25 21:00:44 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009983$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009985else
Matthias Kloseb159a552010-04-25 21:00:44 +00009986
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009989
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009991rm -f core conftest.err conftest.$ac_objext \
9992 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009993 *) ;;
9994esac
9995
Christian Heimes985ecdc2013-11-20 11:46:18 +01009996# check for systems that require aligned memory access
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9998$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009999if ${ac_cv_aligned_required+:} false; then :
10000 $as_echo_n "(cached) " >&6
10001else
10002 if test "$cross_compiling" = yes; then :
10003 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010004else
10005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10006/* end confdefs.h. */
10007
10008int main()
10009{
10010 char s[16];
10011 int i, *p1, *p2;
10012 for (i=0; i < 16; i++)
10013 s[i] = i;
10014 p1 = (int*)(s+1);
10015 p2 = (int*)(s+2);
10016 if (*p1 == *p2)
10017 return 1;
10018 return 0;
10019}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010020_ACEOF
10021if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010022 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010024 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010025fi
10026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10027 conftest.$ac_objext conftest.beam conftest.$ac_ext
10028fi
10029
10030
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010031fi
10032
10033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10034$as_echo "$ac_cv_aligned_required" >&6; }
10035if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010036
10037$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10038
10039fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010040
10041# str, bytes and memoryview hash algorithm
10042
10043
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10045$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10046
10047# Check whether --with-hash_algorithm was given.
10048if test "${with_hash_algorithm+set}" = set; then :
10049 withval=$with_hash_algorithm;
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10051$as_echo "$withval" >&6; }
10052case "$withval" in
10053 siphash24)
10054 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10055
10056 ;;
10057 fnv)
10058 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10059
10060 ;;
10061 *)
10062 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10063 ;;
10064esac
10065
10066else
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10068$as_echo "default" >&6; }
10069fi
10070
10071
Charles-François Natalid30b0222014-05-08 23:08:51 +010010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10073$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10074
10075# Check whether --with-address_sanitizer was given.
10076if test "${with_address_sanitizer+set}" = set; then :
10077 withval=$with_address_sanitizer;
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10079$as_echo "$withval" >&6; }
10080BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10081LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010082# ASan works by controlling memory allocation, our own malloc interferes.
10083with_pymalloc="no"
10084
10085else
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
10088fi
10089
10090
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10092$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10093
10094# Check whether --with-memory_sanitizer was given.
10095if test "${with_memory_sanitizer+set}" = set; then :
10096 withval=$with_memory_sanitizer;
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10098$as_echo "$withval" >&6; }
10099BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10100LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10101# MSan works by controlling memory allocation, our own malloc interferes.
10102with_pymalloc="no"
10103
10104else
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10111$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10112
10113# Check whether --with-undefined_behavior_sanitizer was given.
10114if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10115 withval=$with_undefined_behavior_sanitizer;
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10117$as_echo "$withval" >&6; }
10118BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10119LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010120
10121else
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
10124fi
10125
10126
Guido van Rossum70c7f481998-03-26 18:44:10 +000010127# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10129$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010130if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010132else
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010134LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138/* Override any GCC internal prototype to avoid an error.
10139 Use char because int might match the return type of a GCC
10140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010141#ifdef __cplusplus
10142extern "C"
10143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010144char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010145int
10146main ()
10147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ;
10150 return 0;
10151}
10152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010155else
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158rm -f core conftest.err conftest.$ac_objext \
10159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10163$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010164if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010165 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010166fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010167 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10169$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010172else
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010174LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178/* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010181#ifdef __cplusplus
10182extern "C"
10183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010184char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010185int
10186main ()
10187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ;
10190 return 0;
10191}
10192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198rm -f core conftest.err conftest.$ac_objext \
10199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10203$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010204if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010205 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010206fi
10207 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10210$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010213if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10216$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010217LIBS="$withval $LIBS"
10218
10219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222fi
10223
Guido van Rossum7f43da71994-08-01 12:15:30 +000010224
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010225
10226
10227
10228
10229
10230
Victor Stinner23a683a2019-04-12 21:27:37 +020010231
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010232if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10233 if test -n "$ac_tool_prefix"; then
10234 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10235set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237$as_echo_n "checking for $ac_word... " >&6; }
10238if ${ac_cv_path_PKG_CONFIG+:} false; then :
10239 $as_echo_n "(cached) " >&6
10240else
10241 case $PKG_CONFIG in
10242 [\\/]* | ?:[\\/]*)
10243 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10244 ;;
10245 *)
10246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247for as_dir in $PATH
10248do
10249 IFS=$as_save_IFS
10250 test -z "$as_dir" && as_dir=.
10251 for ac_exec_ext in '' $ac_executable_extensions; do
10252 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10253 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10254 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255 break 2
10256 fi
10257done
10258 done
10259IFS=$as_save_IFS
10260
10261 ;;
10262esac
10263fi
10264PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10265if test -n "$PKG_CONFIG"; then
10266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10267$as_echo "$PKG_CONFIG" >&6; }
10268else
10269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
10271fi
10272
10273
10274fi
10275if test -z "$ac_cv_path_PKG_CONFIG"; then
10276 ac_pt_PKG_CONFIG=$PKG_CONFIG
10277 # Extract the first word of "pkg-config", so it can be a program name with args.
10278set dummy pkg-config; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10282 $as_echo_n "(cached) " >&6
10283else
10284 case $ac_pt_PKG_CONFIG in
10285 [\\/]* | ?:[\\/]*)
10286 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10287 ;;
10288 *)
10289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292 IFS=$as_save_IFS
10293 test -z "$as_dir" && as_dir=.
10294 for ac_exec_ext in '' $ac_executable_extensions; do
10295 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298 break 2
10299 fi
10300done
10301 done
10302IFS=$as_save_IFS
10303
10304 ;;
10305esac
10306fi
10307ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10308if test -n "$ac_pt_PKG_CONFIG"; then
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10310$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10311else
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316 if test "x$ac_pt_PKG_CONFIG" = x; then
10317 PKG_CONFIG=""
10318 else
10319 case $cross_compiling:$ac_tool_warned in
10320yes:)
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10323ac_tool_warned=yes ;;
10324esac
10325 PKG_CONFIG=$ac_pt_PKG_CONFIG
10326 fi
10327else
10328 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10329fi
10330
10331fi
10332if test -n "$PKG_CONFIG"; then
10333 _pkg_min_version=0.9.0
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10335$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10336 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10338$as_echo "yes" >&6; }
10339 else
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341$as_echo "no" >&6; }
10342 PKG_CONFIG=""
10343 fi
10344fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010345
10346# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10348$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010349
10350# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010352 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010353else
10354 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010355fi
10356
10357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10359$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010360
10361# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10363$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010364
10365# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010367 withval=$with_system_ffi;
10368fi
10369
10370
Zachary Waref40d4dd2016-09-17 01:25:24 -050010371if test "$ac_sys_system" = "Darwin"
10372then
10373 case "$with_system_ffi" in
10374 "")
10375 with_system_ffi="no"
10376 ;;
10377 yes|no)
10378 ;;
10379 *)
10380 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10381 ;;
10382 esac
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10384$as_echo "$with_system_ffi" >&6; }
10385else
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10387$as_echo "yes" >&6; }
10388 if test "$with_system_ffi" != ""
10389 then
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10391$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10392 fi
10393 with_system_ffi="yes"
10394fi
Zachary Ware935043d2016-09-09 17:01:21 -070010395
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010396if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010397 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10398else
10399 LIBFFI_INCLUDEDIR=""
10400fi
10401
10402
Stefan Krah60187b52012-03-23 19:06:27 +010010403# Check for use of the system libmpdec library
10404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10405$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10406
10407# Check whether --with-system_libmpdec was given.
10408if test "${with_system_libmpdec+set}" = set; then :
10409 withval=$with_system_libmpdec;
10410else
10411 with_system_libmpdec="no"
10412fi
10413
10414
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10416$as_echo "$with_system_libmpdec" >&6; }
10417
Benjamin Peterson076ed002010-10-31 17:11:02 +000010418# Check for support for loadable sqlite extensions
10419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10420$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10421# Check whether --enable-loadable-sqlite-extensions was given.
10422if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10423 enableval=$enable_loadable_sqlite_extensions;
10424else
10425 enable_loadable_sqlite_extensions="no"
10426fi
10427
10428
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10430$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10431
Ned Deilyd819b932013-09-06 01:07:05 -070010432# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10433
10434
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10436$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10437
10438# Check whether --with-tcltk-includes was given.
10439if test "${with_tcltk_includes+set}" = set; then :
10440 withval=$with_tcltk_includes;
10441else
10442 with_tcltk_includes="default"
10443fi
10444
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10446$as_echo "$with_tcltk_includes" >&6; }
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10448$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10449
10450# Check whether --with-tcltk-libs was given.
10451if test "${with_tcltk_libs+set}" = set; then :
10452 withval=$with_tcltk_libs;
10453else
10454 with_tcltk_libs="default"
10455fi
10456
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10458$as_echo "$with_tcltk_libs" >&6; }
10459if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10460then
10461 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10462 then
10463 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10464 fi
10465 TCLTK_INCLUDES=""
10466 TCLTK_LIBS=""
10467else
10468 TCLTK_INCLUDES="$with_tcltk_includes"
10469 TCLTK_LIBS="$with_tcltk_libs"
10470fi
10471
Matthias Klose55708cc2009-04-30 08:06:49 +000010472# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10474$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010475
10476# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010477if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010478 withval=$with_dbmliborder;
10479if test x$with_dbmliborder = xyes
10480then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010481as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010482else
10483 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10484 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10485 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010486 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010487 fi
10488 done
10489fi
10490fi
10491
Matthias Kloseb9621712010-04-24 17:59:49 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10493$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010494
Martin v. Löwis11437992002-04-12 09:54:03 +000010495# Templates for things AC_DEFINEd more than once.
10496# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010497
10498
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010499if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010500then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010501 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010503
10504 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010505elif test "$ac_cv_kpthread" = "yes"
10506then
10507 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010508 if test "$ac_cv_cxx_thread" = "yes"; then
10509 CXX="$CXX -Kpthread"
10510 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010511 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010512elif test "$ac_cv_kthread" = "yes"
10513then
10514 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010515 if test "$ac_cv_cxx_thread" = "yes"; then
10516 CXX="$CXX -Kthread"
10517 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010518 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010519elif test "$ac_cv_pthread" = "yes"
10520then
10521 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010522 if test "$ac_cv_cxx_thread" = "yes"; then
10523 CXX="$CXX -pthread"
10524 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010526else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010527 if test ! -z "$withval" -a -d "$withval"
10528 then LDFLAGS="$LDFLAGS -L$withval"
10529 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010530
10531 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010532 # define _POSIX_THREADS in unistd.h. Some apparently don't
10533 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10535$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010538
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010539#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010540#ifdef _POSIX_THREADS
10541yes
10542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010543
10544_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547 unistd_defines_pthreads=yes
10548else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010549 unistd_defines_pthreads=no
10550fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010551rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10554$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010557
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010558 # Just looking for pthread_create in libpthread is not enough:
10559 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10560 # So we really have to include pthread.h, and then link.
10561 _libs=$LIBS
10562 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10564$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010567
10568#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010569#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010570
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010571void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010572int
10573main ()
10574{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010575
10576pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 ;
10578 return 0;
10579}
10580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10584$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010586
Guido van Rossum02a1c402000-02-25 19:26:31 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010589 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010591if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010592
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010593 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010594
Guido van Rossumad678af1998-10-02 14:42:15 +000010595else
Guido van Rossumad678af1998-10-02 14:42:15 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10598$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010603LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607/* Override any GCC internal prototype to avoid an error.
10608 Use char because int might match the return type of a GCC
10609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010610#ifdef __cplusplus
10611extern "C"
10612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010613char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010627rm -f core conftest.err conftest.$ac_objext \
10628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010629LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10632$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010633if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010634
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010635 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010636 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010637
Greg Steinadf63d62000-07-05 10:38:09 +000010638else
Greg Steinadf63d62000-07-05 10:38:09 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10641$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010646LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650/* Override any GCC internal prototype to avoid an error.
10651 Use char because int might match the return type of a GCC
10652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010653#ifdef __cplusplus
10654extern "C"
10655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010656char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010657int
10658main ()
10659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ;
10662 return 0;
10663}
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670rm -f core conftest.err conftest.$ac_objext \
10671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010672LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10675$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010676if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010677
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010678 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010679 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010680
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010681else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010682
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10684$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010685if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010687else
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010689LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693/* Override any GCC internal prototype to avoid an error.
10694 Use char because int might match the return type of a GCC
10695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010696#ifdef __cplusplus
10697extern "C"
10698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010699char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ;
10705 return 0;
10706}
10707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010713rm -f core conftest.err conftest.$ac_objext \
10714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10718$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010719if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010720
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010721 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010722 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010723
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010724else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10727$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010728if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010732LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736/* Override any GCC internal prototype to avoid an error.
10737 Use char because int might match the return type of a GCC
10738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010739#ifdef __cplusplus
10740extern "C"
10741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010742char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010743int
10744main ()
10745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ;
10748 return 0;
10749}
10750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010752 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010756rm -f core conftest.err conftest.$ac_objext \
10757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010758LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10761$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010762if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010764 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010765 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010766
Guido van Rossumb93a8621998-05-07 13:27:32 +000010767else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010768
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010769 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10770
Guido van Rossum2d38f911996-06-26 19:47:01 +000010771fi
10772
Guido van Rossum627b2d71993-12-24 10:39:16 +000010773
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010774fi
10775
Guido van Rossum0be3e491997-05-22 20:33:33 +000010776fi
10777
Guido van Rossum49545951997-12-02 19:28:29 +000010778fi
10779
Guido van Rossumb93a8621998-05-07 13:27:32 +000010780fi
10781
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783rm -f core conftest.err conftest.$ac_objext \
10784 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10787$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790else
Martin v. Löwis11437992002-04-12 09:54:03 +000010791 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010792LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796/* Override any GCC internal prototype to avoid an error.
10797 Use char because int might match the return type of a GCC
10798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010799#ifdef __cplusplus
10800extern "C"
10801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010802char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010803int
10804main ()
10805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 ;
10808 return 0;
10809}
10810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010816rm -f core conftest.err conftest.$ac_objext \
10817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10821$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010822if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010823
Martin v. Löwis130fb172001-07-19 11:00:41 +000010824 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010825
Guido van Rossum627b2d71993-12-24 10:39:16 +000010826fi
10827
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010828
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010829fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010830
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010831if test "$posix_threads" = "yes"; then
10832 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010833
Matthias Kloseb9621712010-04-24 17:59:49 +000010834$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835
10836 fi
10837
10838 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10839 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010840 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010842
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843 ;;
10844 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010845$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846
10847 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010848 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010849$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010850
10851 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852 esac
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10855$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010856 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858else
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860 ac_cv_pthread_system_supported=no
10861else
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010864
10865 #include <stdio.h>
10866 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010867 void *foo(void *parm) {
10868 return NULL;
10869 }
10870 main() {
10871 pthread_attr_t attr;
10872 pthread_t id;
10873 if (pthread_attr_init(&attr)) exit(-1);
10874 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10875 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10876 exit(0);
10877 }
10878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010879if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010880 ac_cv_pthread_system_supported=yes
10881else
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010886fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888
Guido van Rossum627b2d71993-12-24 10:39:16 +000010889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10892$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010893 if test "$ac_cv_pthread_system_supported" = "yes"; then
10894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896
10897 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 for ac_func in pthread_sigmask
10899do :
10900 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010901if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010903#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010904_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010905 case $ac_sys_system in
10906 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010909
10910 ;;
10911 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912fi
10913done
10914
pdoxe14679c2017-10-05 00:01:56 -070010915 for ac_func in pthread_getcpuclockid
10916do :
10917 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10918if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10919 cat >>confdefs.h <<_ACEOF
10920#define HAVE_PTHREAD_GETCPUCLOCKID 1
10921_ACEOF
10922
10923fi
10924done
10925
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926fi
10927
10928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10932$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939 ipv6=no
10940 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10942$as_echo "yes" >&6; }
10943 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944
10945 ipv6=yes
10946 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948else
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 /* AF_INET6 available check */
10953#include <sys/types.h>
10954#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010955int
10956main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010958int domain = AF_INET6;
10959 ;
10960 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961}
Martin v. Löwis11437992002-04-12 09:54:03 +000010962_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010963if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10966$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969else
Matthias Kloseb159a552010-04-25 21:00:44 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010978if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10980$as_echo_n "checking if RFC2553 API is available... " >&6; }
10981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010983
10984 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010985#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010989struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010990 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ;
10992 return 0;
10993}
Matthias Kloseb159a552010-04-25 21:00:44 +000010994
Martin v. Löwis11437992002-04-12 09:54:03 +000010995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011000 ipv6=yes
11001
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002else
Matthias Kloseb159a552010-04-25 21:00:44 +000011003
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011006 ipv6=no
11007
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011010fi
11011
11012if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011014
11015fi
11016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017fi
11018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019
11020ipv6type=unknown
11021ipv6lib=none
11022ipv6trylibc=no
11023
11024if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11026$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011027 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11028 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029 case $i in
11030 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011032/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011033
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034#include <netinet/in.h>
11035#ifdef IPV6_INRIA_VERSION
11036yes
11037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011038_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011041 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044
11045 ;;
11046 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050#include <netinet/in.h>
11051#ifdef __KAME__
11052yes
11053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057 ipv6type=$i;
11058 ipv6lib=inet6
11059 ipv6libdir=/usr/local/v6/lib
11060 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063
11064 ;;
11065 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011067/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011068
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069#include <features.h>
11070#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11071yes
11072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011073_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011076 ipv6type=$i;
11077 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080
11081 ;;
11082 linux-inet6)
11083 if test -d /usr/inet6; then
11084 ipv6type=$i
11085 ipv6lib=inet6
11086 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011087 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011088 fi
11089 ;;
11090 solaris)
11091 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011092 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 ipv6type=$i
11094 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095 fi
11096 fi
11097 ;;
11098 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102#include <sys/param.h>
11103#ifdef _TOSHIBA_INET6
11104yes
11105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 ipv6type=$i;
11110 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011111 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011113rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114
11115 ;;
11116 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120#include </usr/local/v6/include/sys/v6config.h>
11121#ifdef __V6D__
11122yes
11123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011124_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127 ipv6type=$i;
11128 ipv6lib=v6;
11129 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011130 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011132rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133
11134 ;;
11135 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011137/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011138
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139#include <sys/param.h>
11140#ifdef _ZETA_MINAMI_INET6
11141yes
11142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011143_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146 ipv6type=$i;
11147 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011148 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011150rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151
11152 ;;
11153 esac
11154 if test "$ipv6type" != "unknown"; then
11155 break
11156 fi
11157 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11159$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160fi
11161
11162if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11163 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11164 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11165 echo "using lib$ipv6lib"
11166 else
11167 if test $ipv6trylibc = "yes"; then
11168 echo "using libc"
11169 else
11170 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11171 echo "You need to fetch lib$ipv6lib.a from appropriate"
11172 echo 'ipv6 kit and compile beforehand.'
11173 exit 1
11174 fi
11175 fi
11176fi
11177
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11179$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11181/* end confdefs.h. */
11182 /* CAN_RAW_FD_FRAMES available check */
11183#include <linux/can/raw.h>
11184int
11185main ()
11186{
11187int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11188 ;
11189 return 0;
11190}
11191_ACEOF
11192if ac_fn_c_try_compile "$LINENO"; then :
11193
11194
11195$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11196
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11198$as_echo "yes" >&6; }
11199
11200else
11201
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11203$as_echo "no" >&6; }
11204
11205fi
11206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11207
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011208# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11210$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011213if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214 withval=$with_doc_strings;
11215fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011216
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
11218if test -z "$with_doc_strings"
11219then with_doc_strings="yes"
11220fi
11221if test "$with_doc_strings" != "no"
11222then
11223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011225
11226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11228$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011229
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011230# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11232$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236 withval=$with_pymalloc;
11237fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011238
Neil Schemenauera35c6882001-02-27 04:45:05 +000011239
Neil Schemenauer16c22972002-03-22 15:34:49 +000011240if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011241then
11242 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011243fi
11244if test "$with_pymalloc" != "no"
11245then
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011248
11249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11251$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011252
Nick Coghlan6ea41862017-06-11 13:16:15 +100011253# Check for --with-c-locale-coercion
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11255$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11256
11257# Check whether --with-c-locale-coercion was given.
11258if test "${with_c_locale_coercion+set}" = set; then :
11259 withval=$with_c_locale_coercion;
11260fi
11261
11262
11263if test -z "$with_c_locale_coercion"
11264then
11265 with_c_locale_coercion="yes"
11266fi
11267if test "$with_c_locale_coercion" != "no"
11268then
11269
11270$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11271
11272fi
11273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11274$as_echo "$with_c_locale_coercion" >&6; }
11275
Benjamin Peterson05159c42009-12-03 03:01:27 +000011276# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11278$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011279
11280# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011281if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011282 withval=$with_valgrind;
11283else
11284 with_valgrind=no
11285fi
11286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11288$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011289if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 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 +020011291if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011294
11295else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011296 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011297
11298fi
11299
11300
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011301 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011302fi
11303
Łukasz Langaa785c872016-09-09 17:37:37 -070011304# Check for DTrace support
11305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11306$as_echo_n "checking for --with-dtrace... " >&6; }
11307
11308# Check whether --with-dtrace was given.
11309if test "${with_dtrace+set}" = set; then :
11310 withval=$with_dtrace;
11311else
11312 with_dtrace=no
11313fi
11314
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11316$as_echo "$with_dtrace" >&6; }
11317
11318
11319
11320
11321
11322DTRACE=
11323DFLAGS=
11324DTRACE_HEADERS=
11325DTRACE_OBJS=
11326
11327if test "$with_dtrace" = "yes"
11328then
11329 # Extract the first word of "dtrace", so it can be a program name with args.
11330set dummy dtrace; ac_word=$2
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11332$as_echo_n "checking for $ac_word... " >&6; }
11333if ${ac_cv_path_DTRACE+:} false; then :
11334 $as_echo_n "(cached) " >&6
11335else
11336 case $DTRACE in
11337 [\\/]* | ?:[\\/]*)
11338 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11339 ;;
11340 *)
11341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342for as_dir in $PATH
11343do
11344 IFS=$as_save_IFS
11345 test -z "$as_dir" && as_dir=.
11346 for ac_exec_ext in '' $ac_executable_extensions; do
11347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350 break 2
11351 fi
11352done
11353 done
11354IFS=$as_save_IFS
11355
11356 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11357 ;;
11358esac
11359fi
11360DTRACE=$ac_cv_path_DTRACE
11361if test -n "$DTRACE"; then
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11363$as_echo "$DTRACE" >&6; }
11364else
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366$as_echo "no" >&6; }
11367fi
11368
11369
11370 if test "$DTRACE" = "not found"; then
11371 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11372 fi
11373
11374$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11375
11376 DTRACE_HEADERS="Include/pydtrace_probes.h"
11377
11378 # On OS X, DTrace providers do not need to be explicitly compiled and
11379 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11380 # generation flag '-G'. We check for presence of this flag, rather than
11381 # hardcoding support by OS, in the interest of robustness.
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11383$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11384if ${ac_cv_dtrace_link+:} false; then :
11385 $as_echo_n "(cached) " >&6
11386else
11387 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011388 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011389 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11390 ac_cv_dtrace_link=yes
11391
11392fi
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11394$as_echo "$ac_cv_dtrace_link" >&6; }
11395 if test "$ac_cv_dtrace_link" = "yes"; then
11396 DTRACE_OBJS="Python/pydtrace.o"
11397 fi
11398fi
11399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011400# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011401
Guido van Rossum98935bf2001-09-05 19:13:16 +000011402DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011403
Guido van Rossume97ee181999-12-20 21:27:22 +000011404# the dlopen() function means we might want to use dynload_shlib.o. some
11405# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011406for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011407do :
11408 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011409if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011412_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011413
Guido van Rossume97ee181999-12-20 21:27:22 +000011414fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011415done
Guido van Rossume97ee181999-12-20 21:27:22 +000011416
Michael W. Hudson54241132001-12-07 15:38:26 +000011417
Guido van Rossume97ee181999-12-20 21:27:22 +000011418# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11419# loading of modules.
11420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11422$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011423if test -z "$DYNLOADFILE"
11424then
11425 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011426 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11427 if test "$ac_cv_func_dlopen" = yes
11428 then DYNLOADFILE="dynload_shlib.o"
11429 else DYNLOADFILE="dynload_aix.o"
11430 fi
11431 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011432 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011433 *)
11434 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11435 # out any dynamic loading
11436 if test "$ac_cv_func_dlopen" = yes
11437 then DYNLOADFILE="dynload_shlib.o"
11438 else DYNLOADFILE="dynload_stub.o"
11439 fi
11440 ;;
11441 esac
11442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11444$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011445if test "$DYNLOADFILE" != "dynload_stub.o"
11446then
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011449
11450fi
11451
Neil Schemenauer4e425612001-06-19 15:44:15 +000011452# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11453
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11456$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011457if test -z "$MACHDEP_OBJS"
11458then
Jack Jansene578a632001-08-15 01:27:14 +000011459 MACHDEP_OBJS=$extra_machdep_objs
11460else
11461 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011462fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011463if test -z "$MACHDEP_OBJS"; then
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11465$as_echo "none" >&6; }
11466else
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11468$as_echo "$MACHDEP_OBJS" >&6; }
11469fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011470
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011472for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011473 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11474 faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011475 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011476 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011477 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011478 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011479 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011480 if_nameindex \
Inada Naokibee31ce2019-05-30 16:35:41 +090011481 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011482 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011483 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011484 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011485 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11486 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011487 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011488 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011489 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011490 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11491 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011492 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011493 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011494 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011495 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011496 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011497do :
11498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11499ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011500if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011503_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011504
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011505fi
11506done
11507
Michael W. Hudson54241132001-12-07 15:38:26 +000011508
Benjamin Peterson40caa052018-09-12 15:52:40 -070011509# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11510# links. Some libc implementations have a stub lchmod implementation that always
11511# returns an error.
11512if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011513 for ac_func in lchmod
11514do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011515 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11516if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011517 cat >>confdefs.h <<_ACEOF
11518#define HAVE_LCHMOD 1
11519_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011520
11521fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011522done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011523
11524fi
11525
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011526ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11527 #include <dirent.h>
11528"
11529if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11530
11531$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11532
11533fi
11534
11535
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011536# For some functions, having a definition is not sufficient, since
11537# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11539$as_echo_n "checking for chroot... " >&6; }
11540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011542#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543int
11544main ()
11545{
11546void *x=chroot
11547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552
Matthias Kloseb9621712010-04-24 17:59:49 +000011553$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011554
Matthias Kloseb159a552010-04-25 21:00:44 +000011555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011556$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011560
11561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11564$as_echo_n "checking for link... " >&6; }
11565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011567#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568int
11569main ()
11570{
11571void *x=link
11572 ;
11573 return 0;
11574}
11575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011579
Matthias Kloseb159a552010-04-25 21:00:44 +000011580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011581$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11584$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585
11586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11589$as_echo_n "checking for symlink... " >&6; }
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011592#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593int
11594main ()
11595{
11596void *x=symlink
11597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011604
Matthias Kloseb159a552010-04-25 21:00:44 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011606$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011610
11611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11614$as_echo_n "checking for fchdir... " >&6; }
11615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011617#include <unistd.h>
11618int
11619main ()
11620{
11621void *x=fchdir
11622 ;
11623 return 0;
11624}
11625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011629
Matthias Kloseb159a552010-04-25 21:00:44 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011631$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011632else
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11634$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011635
11636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11639$as_echo_n "checking for fsync... " >&6; }
11640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011641/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011642#include <unistd.h>
11643int
11644main ()
11645{
11646void *x=fsync
11647 ;
11648 return 0;
11649}
11650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011654
Matthias Kloseb159a552010-04-25 21:00:44 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011660
11661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11664$as_echo_n "checking for fdatasync... " >&6; }
11665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011666/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011667#include <unistd.h>
11668int
11669main ()
11670{
11671void *x=fdatasync
11672 ;
11673 return 0;
11674}
11675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011679
Matthias Kloseb159a552010-04-25 21:00:44 +000011680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682else
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11684$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011685
11686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11689$as_echo_n "checking for epoll... " >&6; }
11690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011691/* end confdefs.h. */
11692#include <sys/epoll.h>
11693int
11694main ()
11695{
11696void *x=epoll_create
11697 ;
11698 return 0;
11699}
11700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011704
Matthias Kloseb159a552010-04-25 21:00:44 +000011705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011706$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011707else
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011710
11711fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11714$as_echo_n "checking for epoll_create1... " >&6; }
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717#include <sys/epoll.h>
11718int
11719main ()
11720{
11721void *x=epoll_create1
11722 ;
11723 return 0;
11724}
11725_ACEOF
11726if ac_fn_c_try_compile "$LINENO"; then :
11727
11728$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11729
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11731$as_echo "yes" >&6; }
11732else
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
11735
11736fi
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11739$as_echo_n "checking for kqueue... " >&6; }
11740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011741/* end confdefs.h. */
11742
11743#include <sys/types.h>
11744#include <sys/event.h>
11745
11746int
11747main ()
11748{
11749int x=kqueue()
11750 ;
11751 return 0;
11752}
11753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757
Matthias Kloseb159a552010-04-25 21:00:44 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011759$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011763
11764fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11767$as_echo_n "checking for prlimit... " >&6; }
11768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11769/* end confdefs.h. */
11770
11771#include <sys/time.h>
11772#include <sys/resource.h>
11773
11774int
11775main ()
11776{
11777void *x=prlimit
11778 ;
11779 return 0;
11780}
11781_ACEOF
11782if ac_fn_c_try_compile "$LINENO"; then :
11783
11784$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11785
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11787$as_echo "yes" >&6; }
11788else
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791
11792fi
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11796$as_echo_n "checking for memfd_create... " >&6; }
11797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11798/* end confdefs.h. */
11799
11800#ifdef HAVE_SYS_MMAN_H
11801#include <sys/mman.h>
11802#endif
11803#ifdef HAVE_SYS_MEMFD_H
11804#include <sys/memfd.h>
11805#endif
11806
11807int
11808main ()
11809{
11810void *x=memfd_create
11811 ;
11812 return 0;
11813}
11814_ACEOF
11815if ac_fn_c_try_compile "$LINENO"; then :
11816
11817$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11818
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11820$as_echo "yes" >&6; }
11821else
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
11824
11825fi
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827
Martin v. Löwisd5843682002-11-21 20:41:28 +000011828# On some systems (eg. FreeBSD 5), we would find a definition of the
11829# functions ctermid_r, setgroups in the library, but no prototype
11830# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11831# address to avoid compiler warnings and potential miscompilations
11832# because of the missing prototypes.
11833
Matthias Kloseb9621712010-04-24 17:59:49 +000011834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11835$as_echo_n "checking for ctermid_r... " >&6; }
11836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011837/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011838
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839#include <stdio.h>
11840
Martin v. Löwisd5843682002-11-21 20:41:28 +000011841int
11842main ()
11843{
11844void* p = ctermid_r
11845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011852
Matthias Kloseb159a552010-04-25 21:00:44 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011854$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11857$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011858
11859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11861
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11863$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011864if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011865 $as_echo_n "(cached) " >&6
11866else
11867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011869#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011870int
11871main ()
11872{
11873void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011874
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011875 ;
11876 return 0;
11877}
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011880 ac_cv_flock_decl=yes
11881else
11882 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011883
11884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011886
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011887fi
11888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11889$as_echo "$ac_cv_flock_decl" >&6; }
11890if test "x${ac_cv_flock_decl}" = xyes; then
11891 for ac_func in flock
11892do :
11893 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011895 cat >>confdefs.h <<_ACEOF
11896#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011897_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011898
Antoine Pitroua3000072010-09-07 14:52:42 +000011899else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011901$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011903 $as_echo_n "(cached) " >&6
11904else
11905 ac_check_lib_save_LIBS=$LIBS
11906LIBS="-lbsd $LIBS"
11907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908/* end confdefs.h. */
11909
11910/* Override any GCC internal prototype to avoid an error.
11911 Use char because int might match the return type of a GCC
11912 builtin and then its argument prototype would still apply. */
11913#ifdef __cplusplus
11914extern "C"
11915#endif
11916char flock ();
11917int
11918main ()
11919{
11920return flock ();
11921 ;
11922 return 0;
11923}
11924_ACEOF
11925if ac_fn_c_try_link "$LINENO"; then :
11926 ac_cv_lib_bsd_flock=yes
11927else
11928 ac_cv_lib_bsd_flock=no
11929fi
11930rm -f core conftest.err conftest.$ac_objext \
11931 conftest$ac_exeext conftest.$ac_ext
11932LIBS=$ac_check_lib_save_LIBS
11933fi
11934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11935$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011936if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011937 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011938
11939
11940$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11941
11942
11943fi
11944
11945
11946fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011947done
11948
Antoine Pitroua3000072010-09-07 14:52:42 +000011949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11952$as_echo_n "checking for getpagesize... " >&6; }
11953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011954/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011955
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956#include <unistd.h>
11957
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011958int
11959main ()
11960{
11961void* p = getpagesize
11962 ;
11963 return 0;
11964}
11965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011969
Matthias Kloseb159a552010-04-25 21:00:44 +000011970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011971$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972else
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011975
11976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011978
Victor Stinner984890f2011-11-24 13:53:38 +010011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11980$as_echo_n "checking for broken unsetenv... " >&6; }
11981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
11983
11984#include <stdlib.h>
11985
11986int
11987main ()
11988{
11989int res = unsetenv("DUMMY")
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994if ac_fn_c_try_compile "$LINENO"; then :
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
11997else
11998
11999$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12000
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12002$as_echo "yes" >&6; }
12003
12004fi
12005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12006
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012007for ac_prog in true
12008do
12009 # Extract the first word of "$ac_prog", so it can be a program name with args.
12010set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12012$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012015else
12016 if test -n "$TRUE"; then
12017 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12018else
12019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12020for as_dir in $PATH
12021do
12022 IFS=$as_save_IFS
12023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012026 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 $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 +000012028 break 2
12029 fi
12030done
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012033
12034fi
12035fi
12036TRUE=$ac_cv_prog_TRUE
12037if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12039$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012043fi
12044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012046 test -n "$TRUE" && break
12047done
12048test -n "$TRUE" || TRUE="/bin/true"
12049
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12052$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012053if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012055else
12056 ac_check_lib_save_LIBS=$LIBS
12057LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061/* Override any GCC internal prototype to avoid an error.
12062 Use char because int might match the return type of a GCC
12063 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012064#ifdef __cplusplus
12065extern "C"
12066#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012067char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012068int
12069main ()
12070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077 ac_cv_lib_c_inet_aton=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083LIBS=$ac_check_lib_save_LIBS
12084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12086$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012088 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12091$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094else
12095 ac_check_lib_save_LIBS=$LIBS
12096LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100/* Override any GCC internal prototype to avoid an error.
12101 Use char because int might match the return type of a GCC
12102 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012103#ifdef __cplusplus
12104extern "C"
12105#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012106char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012107int
12108main ()
12109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012111 ;
12112 return 0;
12113}
12114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116 ac_cv_lib_resolv_inet_aton=yes
12117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012120rm -f core conftest.err conftest.$ac_objext \
12121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012122LIBS=$ac_check_lib_save_LIBS
12123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12125$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127 cat >>confdefs.h <<_ACEOF
12128#define HAVE_LIBRESOLV 1
12129_ACEOF
12130
12131 LIBS="-lresolv $LIBS"
12132
12133fi
12134
12135
12136fi
12137
12138
Christian Heimesd0764e22007-12-04 15:00:33 +000012139# On Tru64, chflags seems to be present, but calling it will
12140# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12142$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012147 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012150/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012151
Christian Heimesd0764e22007-12-04 15:00:33 +000012152#include <sys/stat.h>
12153#include <unistd.h>
12154int main(int argc, char*argv[])
12155{
12156 if(chflags(argv[0], 0) != 0)
12157 return 1;
12158 return 0;
12159}
Ned Deily3eb67d52011-06-28 00:00:28 -070012160
Christian Heimesd0764e22007-12-04 15:00:33 +000012161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012163 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012169fi
12170
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12174$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012175if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012178 ac_cv_have_chflags="yes"
12179else
12180 ac_cv_have_chflags="no"
12181fi
12182
12183fi
12184if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012187
12188fi
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12191$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012196 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012199/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012200
Christian Heimesd0764e22007-12-04 15:00:33 +000012201#include <sys/stat.h>
12202#include <unistd.h>
12203int main(int argc, char*argv[])
12204{
12205 if(lchflags(argv[0], 0) != 0)
12206 return 1;
12207 return 0;
12208}
Ned Deily3eb67d52011-06-28 00:00:28 -070012209
Christian Heimesd0764e22007-12-04 15:00:33 +000012210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012212 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012218fi
12219
12220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12223$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012224if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012227 ac_cv_have_lchflags="yes"
12228else
12229 ac_cv_have_lchflags="no"
12230fi
12231
12232fi
12233if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012236
12237fi
12238
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012239case $ac_sys_system/$ac_sys_release in
12240Darwin/*)
12241 _CUR_CFLAGS="${CFLAGS}"
12242 _CUR_LDFLAGS="${LDFLAGS}"
12243 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12244 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12245 ;;
12246esac
12247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12249$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012250if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012252else
12253 ac_check_lib_save_LIBS=$LIBS
12254LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012256/* end confdefs.h. */
12257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258/* Override any GCC internal prototype to avoid an error.
12259 Use char because int might match the return type of a GCC
12260 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012261#ifdef __cplusplus
12262extern "C"
12263#endif
12264char inflateCopy ();
12265int
12266main ()
12267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269 ;
12270 return 0;
12271}
12272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012273if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274 ac_cv_lib_z_inflateCopy=yes
12275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278rm -f core conftest.err conftest.$ac_objext \
12279 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012280LIBS=$ac_check_lib_save_LIBS
12281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12283$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012284if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012285
Matthias Kloseb9621712010-04-24 17:59:49 +000012286$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012287
12288fi
12289
12290
12291case $ac_sys_system/$ac_sys_release in
12292Darwin/*)
12293 CFLAGS="${_CUR_CFLAGS}"
12294 LDFLAGS="${_CUR_LDFLAGS}"
12295 ;;
12296esac
12297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12299$as_echo_n "checking for hstrerror... " >&6; }
12300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012301/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012302
Martin v. Löwise9416172003-05-03 10:12:45 +000012303#include <netdb.h>
12304
Martin v. Löwise9416172003-05-03 10:12:45 +000012305int
12306main ()
12307{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012308void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012309 ;
12310 return 0;
12311}
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012314
Matthias Kloseb9621712010-04-24 17:59:49 +000012315$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
Matthias Kloseb159a552010-04-25 21:00:44 +000012317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012318$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12321$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012322
12323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012324rm -f core conftest.err conftest.$ac_objext \
12325 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12328$as_echo_n "checking for inet_aton... " >&6; }
12329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012330/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012331
Martin v. Löwis86d66262006-02-17 08:40:11 +000012332#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012333#include <sys/socket.h>
12334#include <netinet/in.h>
12335#include <arpa/inet.h>
12336
Martin v. Löwise9416172003-05-03 10:12:45 +000012337int
12338main ()
12339{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012340void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012348
Matthias Kloseb159a552010-04-25 21:00:44 +000012349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012350$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012351else
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12353$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012354
12355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012356rm -f core conftest.err conftest.$ac_objext \
12357 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12360$as_echo_n "checking for inet_pton... " >&6; }
12361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012363
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012364#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012365#include <sys/socket.h>
12366#include <netinet/in.h>
12367#include <arpa/inet.h>
12368
Martin v. Löwise9416172003-05-03 10:12:45 +000012369int
12370main ()
12371{
12372void* p = inet_pton
12373 ;
12374 return 0;
12375}
12376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012380
Matthias Kloseb159a552010-04-25 21:00:44 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012382$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12385$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012386
12387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012389
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012390# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12392$as_echo_n "checking for setgroups... " >&6; }
12393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012394/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012395
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012396#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012397#ifdef HAVE_GRP_H
12398#include <grp.h>
12399#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012400
Martin v. Löwisd5843682002-11-21 20:41:28 +000012401int
12402main ()
12403{
12404void* p = setgroups
12405 ;
12406 return 0;
12407}
12408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012412
Matthias Kloseb159a552010-04-25 21:00:44 +000012413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012414$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012418
12419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012421
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012422# check for openpty and forkpty
12423
12424for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012425do :
12426 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012427if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012430_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012432else
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12434$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012435if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012437else
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012439LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443/* Override any GCC internal prototype to avoid an error.
12444 Use char because int might match the return type of a GCC
12445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012446#ifdef __cplusplus
12447extern "C"
12448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012449char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core conftest.err conftest.$ac_objext \
12464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012465LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12468$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012471 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12474$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012475if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012477else
12478 ac_check_lib_save_LIBS=$LIBS
12479LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012481/* end confdefs.h. */
12482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483/* Override any GCC internal prototype to avoid an error.
12484 Use char because int might match the return type of a GCC
12485 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012486#ifdef __cplusplus
12487extern "C"
12488#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012489char openpty ();
12490int
12491main ()
12492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012494 ;
12495 return 0;
12496}
12497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012499 ac_cv_lib_bsd_openpty=yes
12500else
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012503rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505LIBS=$ac_check_lib_save_LIBS
12506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12508$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012509if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012511 LIBS="$LIBS -lbsd"
12512fi
12513
12514
12515fi
12516
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517
12518fi
12519done
12520
12521for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012522do :
12523 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012524if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012526#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012527_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012528
Fred Drake8cef4cf2000-06-28 16:40:38 +000012529else
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12531$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012532if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012534else
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012536LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540/* Override any GCC internal prototype to avoid an error.
12541 Use char because int might match the return type of a GCC
12542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012543#ifdef __cplusplus
12544extern "C"
12545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012546char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012547int
12548main ()
12549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012550return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 ;
12552 return 0;
12553}
12554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560rm -f core conftest.err conftest.$ac_objext \
12561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012562LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12565$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12571$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012572if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012574else
12575 ac_check_lib_save_LIBS=$LIBS
12576LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012578/* end confdefs.h. */
12579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580/* Override any GCC internal prototype to avoid an error.
12581 Use char because int might match the return type of a GCC
12582 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012583#ifdef __cplusplus
12584extern "C"
12585#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012586char forkpty ();
12587int
12588main ()
12589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012591 ;
12592 return 0;
12593}
12594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012596 ac_cv_lib_bsd_forkpty=yes
12597else
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012600rm -f core conftest.err conftest.$ac_objext \
12601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602LIBS=$ac_check_lib_save_LIBS
12603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12605$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012606if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012608 LIBS="$LIBS -lbsd"
12609fi
12610
12611
12612fi
12613
Fred Drake8cef4cf2000-06-28 16:40:38 +000012614
12615fi
12616done
12617
Jack Jansendd19cf82001-12-06 22:36:17 +000012618
Michael W. Hudson54241132001-12-07 15:38:26 +000012619# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012620for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012621do :
12622 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12623ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012624if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012627_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012628
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012630done
12631
Michael W. Hudson54241132001-12-07 15:38:26 +000012632
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012633ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012634if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012635 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012636
Martin v. Löwis1142de32002-03-29 16:28:31 +000012637else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012639 *" dup2.$ac_objext "* ) ;;
12640 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012642esac
12643
Martin v. Löwis1142de32002-03-29 16:28:31 +000012644fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012645
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012646ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012647if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012648 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12649
12650else
12651 case " $LIBOBJS " in
12652 *" strdup.$ac_objext "* ) ;;
12653 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12654 ;;
12655esac
12656
12657fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012658
12659
12660for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012661do :
12662 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012670int
12671main ()
12672{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012673getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012681
Guido van Rossum627b2d71993-12-24 10:39:16 +000012682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012684
Guido van Rossum627b2d71993-12-24 10:39:16 +000012685fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012686done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012687
Jack Jansen150753c2003-03-29 22:07:47 +000012688for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012689do :
12690 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012692 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012696/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012697#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012698int
12699main ()
12700{
12701setpgrp(0,0);
12702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012709
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012712
12713fi
12714done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012715
Thomas Wouters3a584202000-08-05 23:28:51 +000012716for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012717do :
12718 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012719if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012721#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012725#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_compile "$LINENO"; then :
12735
Guido van Rossum627b2d71993-12-24 10:39:16 +000012736else
Skip Montanaro6dead952003-09-25 14:50:04 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012739
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Guido van Rossum627b2d71993-12-24 10:39:16 +000012741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012745done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746
Michael W. Hudson54241132001-12-07 15:38:26 +000012747
Gregory P. Smith387512c2018-12-30 15:42:32 -080012748# We search for both crypt and crypt_r as one or the other may be defined
12749# This gets us our -lcrypt in LIBS when required on the target platform.
12750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12751$as_echo_n "checking for library containing crypt... " >&6; }
12752if ${ac_cv_search_crypt+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754else
12755 ac_func_search_save_LIBS=$LIBS
12756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12757/* end confdefs.h. */
12758
12759/* Override any GCC internal prototype to avoid an error.
12760 Use char because int might match the return type of a GCC
12761 builtin and then its argument prototype would still apply. */
12762#ifdef __cplusplus
12763extern "C"
12764#endif
12765char crypt ();
12766int
12767main ()
12768{
12769return crypt ();
12770 ;
12771 return 0;
12772}
12773_ACEOF
12774for ac_lib in '' crypt; do
12775 if test -z "$ac_lib"; then
12776 ac_res="none required"
12777 else
12778 ac_res=-l$ac_lib
12779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12780 fi
12781 if ac_fn_c_try_link "$LINENO"; then :
12782 ac_cv_search_crypt=$ac_res
12783fi
12784rm -f core conftest.err conftest.$ac_objext \
12785 conftest$ac_exeext
12786 if ${ac_cv_search_crypt+:} false; then :
12787 break
12788fi
12789done
12790if ${ac_cv_search_crypt+:} false; then :
12791
12792else
12793 ac_cv_search_crypt=no
12794fi
12795rm conftest.$ac_ext
12796LIBS=$ac_func_search_save_LIBS
12797fi
12798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12799$as_echo "$ac_cv_search_crypt" >&6; }
12800ac_res=$ac_cv_search_crypt
12801if test "$ac_res" != no; then :
12802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12803
12804fi
12805
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12807$as_echo_n "checking for library containing crypt_r... " >&6; }
12808if ${ac_cv_search_crypt_r+:} false; then :
12809 $as_echo_n "(cached) " >&6
12810else
12811 ac_func_search_save_LIBS=$LIBS
12812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12813/* end confdefs.h. */
12814
12815/* Override any GCC internal prototype to avoid an error.
12816 Use char because int might match the return type of a GCC
12817 builtin and then its argument prototype would still apply. */
12818#ifdef __cplusplus
12819extern "C"
12820#endif
12821char crypt_r ();
12822int
12823main ()
12824{
12825return crypt_r ();
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830for ac_lib in '' crypt; do
12831 if test -z "$ac_lib"; then
12832 ac_res="none required"
12833 else
12834 ac_res=-l$ac_lib
12835 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12836 fi
12837 if ac_fn_c_try_link "$LINENO"; then :
12838 ac_cv_search_crypt_r=$ac_res
12839fi
12840rm -f core conftest.err conftest.$ac_objext \
12841 conftest$ac_exeext
12842 if ${ac_cv_search_crypt_r+:} false; then :
12843 break
12844fi
12845done
12846if ${ac_cv_search_crypt_r+:} false; then :
12847
12848else
12849 ac_cv_search_crypt_r=no
12850fi
12851rm conftest.$ac_ext
12852LIBS=$ac_func_search_save_LIBS
12853fi
12854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12855$as_echo "$ac_cv_search_crypt_r" >&6; }
12856ac_res=$ac_cv_search_crypt_r
12857if test "$ac_res" != no; then :
12858 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12859
12860fi
12861
12862
12863ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12864if test "x$ac_cv_func_crypt_r" = xyes; then :
12865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12866/* end confdefs.h. */
12867
12868#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12869#include <crypt.h>
12870
12871int
12872main ()
12873{
12874
12875struct crypt_data d;
12876char *r = crypt_r("", "", &d);
12877
12878 ;
12879 return 0;
12880}
12881_ACEOF
12882if ac_fn_c_try_compile "$LINENO"; then :
12883
12884$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12885
12886fi
12887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12888
12889fi
12890
12891
Victor Stinnere0be4232011-10-25 13:06:09 +020012892for ac_func in clock_gettime
12893do :
12894 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12895if test "x$ac_cv_func_clock_gettime" = xyes; then :
12896 cat >>confdefs.h <<_ACEOF
12897#define HAVE_CLOCK_GETTIME 1
12898_ACEOF
12899
12900else
12901
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12903$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12904if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12905 $as_echo_n "(cached) " >&6
12906else
12907 ac_check_lib_save_LIBS=$LIBS
12908LIBS="-lrt $LIBS"
12909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910/* end confdefs.h. */
12911
12912/* Override any GCC internal prototype to avoid an error.
12913 Use char because int might match the return type of a GCC
12914 builtin and then its argument prototype would still apply. */
12915#ifdef __cplusplus
12916extern "C"
12917#endif
12918char clock_gettime ();
12919int
12920main ()
12921{
12922return clock_gettime ();
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927if ac_fn_c_try_link "$LINENO"; then :
12928 ac_cv_lib_rt_clock_gettime=yes
12929else
12930 ac_cv_lib_rt_clock_gettime=no
12931fi
12932rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
12934LIBS=$ac_check_lib_save_LIBS
12935fi
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12937$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12938if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12939
Victor Stinner7efb8332014-08-29 15:41:08 +020012940 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012941 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12942
12943
12944$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12945
12946
12947fi
12948
12949
12950fi
12951done
12952
12953
12954for ac_func in clock_getres
12955do :
12956 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12957if test "x$ac_cv_func_clock_getres" = xyes; then :
12958 cat >>confdefs.h <<_ACEOF
12959#define HAVE_CLOCK_GETRES 1
12960_ACEOF
12961
12962else
12963
12964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12965$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12966if ${ac_cv_lib_rt_clock_getres+:} false; then :
12967 $as_echo_n "(cached) " >&6
12968else
12969 ac_check_lib_save_LIBS=$LIBS
12970LIBS="-lrt $LIBS"
12971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972/* end confdefs.h. */
12973
12974/* Override any GCC internal prototype to avoid an error.
12975 Use char because int might match the return type of a GCC
12976 builtin and then its argument prototype would still apply. */
12977#ifdef __cplusplus
12978extern "C"
12979#endif
12980char clock_getres ();
12981int
12982main ()
12983{
12984return clock_getres ();
12985 ;
12986 return 0;
12987}
12988_ACEOF
12989if ac_fn_c_try_link "$LINENO"; then :
12990 ac_cv_lib_rt_clock_getres=yes
12991else
12992 ac_cv_lib_rt_clock_getres=no
12993fi
12994rm -f core conftest.err conftest.$ac_objext \
12995 conftest$ac_exeext conftest.$ac_ext
12996LIBS=$ac_check_lib_save_LIBS
12997fi
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12999$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13000if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13001
13002 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13003
13004
13005fi
13006
13007
13008fi
13009done
13010
13011
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013012for ac_func in clock_settime
13013do :
13014 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13015if test "x$ac_cv_func_clock_settime" = xyes; then :
13016 cat >>confdefs.h <<_ACEOF
13017#define HAVE_CLOCK_SETTIME 1
13018_ACEOF
13019
13020else
13021
13022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13023$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13024if ${ac_cv_lib_rt_clock_settime+:} false; then :
13025 $as_echo_n "(cached) " >&6
13026else
13027 ac_check_lib_save_LIBS=$LIBS
13028LIBS="-lrt $LIBS"
13029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030/* end confdefs.h. */
13031
13032/* Override any GCC internal prototype to avoid an error.
13033 Use char because int might match the return type of a GCC
13034 builtin and then its argument prototype would still apply. */
13035#ifdef __cplusplus
13036extern "C"
13037#endif
13038char clock_settime ();
13039int
13040main ()
13041{
13042return clock_settime ();
13043 ;
13044 return 0;
13045}
13046_ACEOF
13047if ac_fn_c_try_link "$LINENO"; then :
13048 ac_cv_lib_rt_clock_settime=yes
13049else
13050 ac_cv_lib_rt_clock_settime=no
13051fi
13052rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
13054LIBS=$ac_check_lib_save_LIBS
13055fi
13056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13057$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13058if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13059
13060 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13061
13062
13063fi
13064
13065
13066fi
13067done
13068
13069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13071$as_echo_n "checking for major... " >&6; }
13072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013074
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013075#if defined(MAJOR_IN_MKDEV)
13076#include <sys/mkdev.h>
13077#elif defined(MAJOR_IN_SYSMACROS)
13078#include <sys/sysmacros.h>
13079#else
13080#include <sys/types.h>
13081#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013082
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013083int
13084main ()
13085{
13086
13087 makedev(major(0),minor(0));
13088
13089 ;
13090 return 0;
13091}
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13099$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013100
13101else
Skip Montanaro6dead952003-09-25 14:50:04 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13104$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013105
13106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107rm -f core conftest.err conftest.$ac_objext \
13108 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013109
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013110# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013111# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13113$as_echo_n "checking for getaddrinfo... " >&6; }
13114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013115/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013116
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013117#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013118#include <sys/socket.h>
13119#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013120#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122int
13123main ()
13124{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013125getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 ;
13127 return 0;
13128}
13129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131 have_getaddrinfo=yes
13132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013135rm -f core conftest.err conftest.$ac_objext \
13136 conftest$ac_exeext conftest.$ac_ext
13137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13138$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139if test $have_getaddrinfo = yes
13140then
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13142$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013143 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013147
13148if test "${enable_ipv6+set}" = set; then
13149 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13150else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013152fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153else
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156
Stefan Krah19c21392012-11-22 23:47:32 +010013157#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158#include <sys/types.h>
13159#include <netdb.h>
13160#include <string.h>
13161#include <sys/socket.h>
13162#include <netinet/in.h>
13163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013165{
13166 int passive, gaierr, inet4 = 0, inet6 = 0;
13167 struct addrinfo hints, *ai, *aitop;
13168 char straddr[INET6_ADDRSTRLEN], strport[16];
13169
13170 for (passive = 0; passive <= 1; passive++) {
13171 memset(&hints, 0, sizeof(hints));
13172 hints.ai_family = AF_UNSPEC;
13173 hints.ai_flags = passive ? AI_PASSIVE : 0;
13174 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013175 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13177 (void)gai_strerror(gaierr);
13178 goto bad;
13179 }
13180 for (ai = aitop; ai; ai = ai->ai_next) {
13181 if (ai->ai_addr == NULL ||
13182 ai->ai_addrlen == 0 ||
13183 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13184 straddr, sizeof(straddr), strport, sizeof(strport),
13185 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13186 goto bad;
13187 }
13188 switch (ai->ai_family) {
13189 case AF_INET:
13190 if (strcmp(strport, "54321") != 0) {
13191 goto bad;
13192 }
13193 if (passive) {
13194 if (strcmp(straddr, "0.0.0.0") != 0) {
13195 goto bad;
13196 }
13197 } else {
13198 if (strcmp(straddr, "127.0.0.1") != 0) {
13199 goto bad;
13200 }
13201 }
13202 inet4++;
13203 break;
13204 case AF_INET6:
13205 if (strcmp(strport, "54321") != 0) {
13206 goto bad;
13207 }
13208 if (passive) {
13209 if (strcmp(straddr, "::") != 0) {
13210 goto bad;
13211 }
13212 } else {
13213 if (strcmp(straddr, "::1") != 0) {
13214 goto bad;
13215 }
13216 }
13217 inet6++;
13218 break;
13219 case AF_UNSPEC:
13220 goto bad;
13221 break;
13222 default:
13223 /* another family support? */
13224 break;
13225 }
13226 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013227 freeaddrinfo(aitop);
13228 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229 }
13230
13231 if (!(inet4 == 0 || inet4 == 2))
13232 goto bad;
13233 if (!(inet6 == 0 || inet6 == 2))
13234 goto bad;
13235
13236 if (aitop)
13237 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239
13240 bad:
13241 if (aitop)
13242 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013243 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244}
13245
Martin v. Löwis11437992002-04-12 09:54:03 +000013246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13261$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13262
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013263if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264then
13265 if test $ipv6 = yes
13266 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267 echo 'Fatal: You must get working getaddrinfo() function.'
13268 echo ' or you can specify "--disable-ipv6"'.
13269 exit 1
13270 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013271else
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013274
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013276
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013277for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013278do :
13279 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013280if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013282#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013283_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285fi
13286done
13287
Michael W. Hudson54241132001-12-07 15:38:26 +000013288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13291$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013292if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297#include <sys/types.h>
13298#include <sys/time.h>
13299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
13304if ((struct tm *) 0)
13305return 0;
13306 ;
13307 return 0;
13308}
13309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013310if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013312else
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13318$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013319if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322
13323fi
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13326$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013327if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329else
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013331/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332#include <sys/types.h>
13333#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335int
13336main ()
13337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338struct tm tm;
13339 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346 ac_cv_struct_tm=time.h
13347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13353$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013354if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360ac_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 +000013361#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363"
Victor Stinnere0be4232011-10-25 13:06:09 +020013364if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
13366cat >>confdefs.h <<_ACEOF
13367#define HAVE_STRUCT_TM_TM_ZONE 1
13368_ACEOF
13369
13370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376
13377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13379"
Victor Stinnere0be4232011-10-25 13:06:09 +020013380if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384fi
13385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388_ACEOF
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13391$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013392if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013396/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013397#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398#if !HAVE_DECL_TZNAME
13399extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411 ac_cv_var_tzname=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415rm -f core conftest.err conftest.$ac_objext \
13416 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13419$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013420 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013424 fi
13425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427ac_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 +020013428if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
13430cat >>confdefs.h <<_ACEOF
13431#define HAVE_STRUCT_STAT_ST_RDEV 1
13432_ACEOF
13433
13434
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013435fi
13436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437ac_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 +020013438if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440cat >>confdefs.h <<_ACEOF
13441#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13442_ACEOF
13443
13444
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013445fi
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447ac_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 +020013448if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013449
13450cat >>confdefs.h <<_ACEOF
13451#define HAVE_STRUCT_STAT_ST_FLAGS 1
13452_ACEOF
13453
13454
13455fi
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457ac_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 +020013458if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013459
13460cat >>confdefs.h <<_ACEOF
13461#define HAVE_STRUCT_STAT_ST_GEN 1
13462_ACEOF
13463
13464
13465fi
13466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467ac_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 +020013468if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013469
13470cat >>confdefs.h <<_ACEOF
13471#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13472_ACEOF
13473
13474
13475fi
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477ac_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 +020013478if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480cat >>confdefs.h <<_ACEOF
13481#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13482_ACEOF
13483
13484
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013485fi
13486
Stefan Krah267b6392016-04-26 01:09:18 +020013487ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13488 #include <sys/types.h>
13489 #include <pwd.h>
13490
13491"
13492if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13493
13494cat >>confdefs.h <<_ACEOF
13495#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13496_ACEOF
13497
13498
13499fi
13500ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13501 #include <sys/types.h>
13502 #include <pwd.h>
13503
13504"
13505if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13506
13507cat >>confdefs.h <<_ACEOF
13508#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13509_ACEOF
13510
13511
13512fi
13513
Zachary Ware6a6967e2016-10-01 00:47:27 -050013514# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13515ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13516"
13517if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13518
13519cat >>confdefs.h <<_ACEOF
13520#define HAVE_SIGINFO_T_SI_BAND 1
13521_ACEOF
13522
13523
13524fi
13525
Michael W. Hudson54241132001-12-07 15:38:26 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13528$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013529if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531else
Matthias Kloseb159a552010-04-25 21:00:44 +000013532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013535#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013536int
13537main ()
13538{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ;
13541 return 0;
13542}
13543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013544if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545 ac_cv_header_time_altzone=yes
13546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551fi
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13554$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013558
13559fi
13560
Guido van Rossumda88dad1995-01-26 00:46:29 +000013561was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13563$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013565/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013566
13567#include <sys/types.h>
13568#include <sys/select.h>
13569#include <sys/time.h>
13570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571int
13572main ()
13573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574;
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013584 was_it_defined=yes
13585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13589$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13592$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013593if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595else
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013597/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013598#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013599int
13600main ()
13601{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 ;
13604 return 0;
13605}
13606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608 ac_cv_struct_addrinfo=yes
13609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13613fi
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13616$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013617if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620
13621fi
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13624$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013625if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013629/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630
13631# include <sys/types.h>
13632# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013633int
13634main ()
13635{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ;
13638 return 0;
13639}
13640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013642 ac_cv_struct_sockaddr_storage=yes
13643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13650$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013654
13655fi
13656
Christian Heimesdffa3942016-09-05 23:54:41 +020013657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13658$as_echo_n "checking for sockaddr_alg... " >&6; }
13659if ${ac_cv_struct_sockaddr_alg+:} false; then :
13660 $as_echo_n "(cached) " >&6
13661else
13662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13663/* end confdefs.h. */
13664
13665# include <sys/types.h>
13666# include <sys/socket.h>
13667# include <linux/if_alg.h>
13668int
13669main ()
13670{
13671struct sockaddr_alg s
13672 ;
13673 return 0;
13674}
13675_ACEOF
13676if ac_fn_c_try_compile "$LINENO"; then :
13677 ac_cv_struct_sockaddr_alg=yes
13678else
13679 ac_cv_struct_sockaddr_alg=no
13680fi
13681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682fi
13683
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13685$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13686if test $ac_cv_struct_sockaddr_alg = yes; then
13687
13688$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13689
13690fi
13691
Guido van Rossum627b2d71993-12-24 10:39:16 +000013692# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13695$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013701$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013702int
13703main ()
13704{
13705static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013706test_array [0] = 0;
13707return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
13709 ;
13710 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013711}
Martin v. Löwis11437992002-04-12 09:54:03 +000013712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013714 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13721$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013724
13725fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13728$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013729if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735int
13736main ()
13737{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013738
Martin v. Löwis11437992002-04-12 09:54:03 +000013739#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013740 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013742 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744 char const *const *pcpcc;
13745 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 /* NEC SVR4.0.2 mips cc rejects this. */
13747 struct point {int x, y;};
13748 static struct point const zero = {0,0};
13749 /* AIX XL C 1.02.0.0 rejects this.
13750 It does not let you subtract one const X* pointer from another in
13751 an arm of an if-expression whose if-part is not a constant
13752 expression */
13753 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756 ++pcpcc;
13757 ppc = (char**) pcpcc;
13758 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013759 { /* SCO 3.2v4 cc rejects this sort of thing. */
13760 char tx;
13761 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 }
13767 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13768 int x[] = {25, 17};
13769 const int *foo = &x[0];
13770 ++foo;
13771 }
13772 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13773 typedef const int *iptr;
13774 iptr p = 0;
13775 ++p;
13776 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013777 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013779 struct s { int j; const int *ap[3]; } bx;
13780 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 }
13782 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13783 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013786 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013787#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 ;
13790 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013791}
Martin v. Löwis11437992002-04-12 09:54:03 +000013792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013793if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794 ac_cv_c_const=yes
13795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13801$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805
13806fi
13807
Michael W. Hudson54241132001-12-07 15:38:26 +000013808
Guido van Rossumda88dad1995-01-26 00:46:29 +000013809works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13811$as_echo_n "checking for working signed char... " >&6; }
13812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815int
13816main ()
13817{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 ;
13820 return 0;
13821}
13822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013824 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013825else
Skip Montanaro6dead952003-09-25 14:50:04 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013829
Guido van Rossum7f43da71994-08-01 12:15:30 +000013830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13833$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834
Guido van Rossumda88dad1995-01-26 00:46:29 +000013835have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13837$as_echo_n "checking for prototypes... " >&6; }
13838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013839/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013840int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013841int
13842main ()
13843{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Matthias Kloseb159a552010-04-25 21:00:44 +000013853 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13857$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013858
Guido van Rossumda88dad1995-01-26 00:46:29 +000013859works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13861$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013863/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013864
13865#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013866int foo(int x, ...) {
13867 va_list va;
13868 va_start(va, x);
13869 va_arg(va, int);
13870 va_arg(va, char *);
13871 va_arg(va, double);
13872 return 0;
13873}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013874
Martin v. Löwis11437992002-04-12 09:54:03 +000013875int
13876main ()
13877{
Guido van Rossum90eea071996-08-30 20:58:57 +000013878return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 ;
13880 return 0;
13881}
13882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013888 works=yes
13889
Guido van Rossum627b2d71993-12-24 10:39:16 +000013890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13893$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894
Martin v. Löwisd6320502004-08-12 13:45:08 +000013895# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13897$as_echo_n "checking for socketpair... " >&6; }
13898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013899/* end confdefs.h. */
13900
13901#include <sys/types.h>
13902#include <sys/socket.h>
13903
13904int
13905main ()
13906{
13907void *x=socketpair
13908 ;
13909 return 0;
13910}
13911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013915
Matthias Kloseb159a552010-04-25 21:00:44 +000013916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013917$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013918else
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13920$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013921
13922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013924
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013925# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13927$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013929/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013930#include <sys/types.h>
13931#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013932int
13933main ()
13934{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935struct sockaddr x;
13936x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 ;
13938 return 0;
13939}
13940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if ac_fn_c_try_compile "$LINENO"; then :
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13943$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946
13947else
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13949$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013950
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013954# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
13956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13963$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964 OLD_CFLAGS=$CFLAGS
13965 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968
13969# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971int
13972main ()
13973{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013974
13975 char *name;
13976 struct hostent *he, *res;
13977 char buffer[2048];
13978 int buflen = 2048;
13979 int h_errnop;
13980
13981 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
13983 ;
13984 return 0;
13985}
13986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13995$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997else
Skip Montanaro6dead952003-09-25 14:50:04 +000013998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14000$as_echo "no" >&6; }
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14002$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014004/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Martin v. Löwis11437992002-04-12 09:54:03 +000014008int
14009main ()
14010{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011
14012 char *name;
14013 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014014 char buffer[2048];
14015 int buflen = 2048;
14016 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017
Matthias Kloseb159a552010-04-25 21:00:44 +000014018 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
14020 ;
14021 return 0;
14022}
14023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014027
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Matthias Kloseb159a552010-04-25 21:00:44 +000014029$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14032$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034else
Skip Montanaro6dead952003-09-25 14:50:04 +000014035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14037$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14039$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14041/* end confdefs.h. */
14042
14043# include <netdb.h>
14044
14045int
14046main ()
14047{
14048
14049 char *name;
14050 struct hostent *he;
14051 struct hostent_data data;
14052
14053 (void) gethostbyname_r(name, he, &data);
14054
14055 ;
14056 return 0;
14057}
14058_ACEOF
14059if ac_fn_c_try_compile "$LINENO"; then :
14060
14061 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14062
14063
14064$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14065
14066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14067$as_echo "yes" >&6; }
14068
14069else
14070
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14072$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082 CFLAGS=$OLD_CFLAGS
14083
14084else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 for ac_func in gethostbyname
14087do :
14088 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014089if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014092_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014095done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098fi
14099
Michael W. Hudson54241132001-12-07 15:38:26 +000014100
14101
14102
14103
14104
14105
Guido van Rossum627b2d71993-12-24 10:39:16 +000014106# checks for system services
14107# (none yet)
14108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014109# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014110ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014111if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014112
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14115$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014116if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014118else
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014120LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124/* Override any GCC internal prototype to avoid an error.
14125 Use char because int might match the return type of a GCC
14126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014127#ifdef __cplusplus
14128extern "C"
14129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014130char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 ;
14136 return 0;
14137}
14138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014141else
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014144rm -f core conftest.err conftest.$ac_objext \
14145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014146LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14149$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014150if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 cat >>confdefs.h <<_ACEOF
14152#define HAVE_LIBIEEE 1
14153_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014154
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014155 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014156
Guido van Rossum627b2d71993-12-24 10:39:16 +000014157fi
14158
Michael W. Hudson54241132001-12-07 15:38:26 +000014159
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014160fi
14161
Michael W. Hudson54241132001-12-07 15:38:26 +000014162
Guido van Rossum7f43da71994-08-01 12:15:30 +000014163# check for --with-libm=...
14164
Guido van Rossum563e7081996-09-10 18:20:48 +000014165case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014166Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014167*) LIBM=-lm
14168esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14170$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014173if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014175if test "$withval" = no
14176then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14178$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014179elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014180then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14182$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014183else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014184fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014185else
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14187$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188fi
14189
Guido van Rossum7f43da71994-08-01 12:15:30 +000014190
14191# check for --with-libc=...
14192
Matthias Kloseb9621712010-04-24 17:59:49 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14194$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014199if test "$withval" = no
14200then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14202$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014203elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014204then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14206$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014207else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014208fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14211$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212fi
14213
Guido van Rossum7f43da71994-08-01 12:15:30 +000014214
Stefan Krah1919b7e2012-03-21 18:25:23 +010014215# **************************************
14216# * Check for gcc x64 inline assembler *
14217# **************************************
14218
14219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14220$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14222/* end confdefs.h. */
14223
14224int
14225main ()
14226{
14227
14228 __asm__ __volatile__ ("movq %rcx, %rax");
14229
14230 ;
14231 return 0;
14232}
14233_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014234if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014235 have_gcc_asm_for_x64=yes
14236else
14237 have_gcc_asm_for_x64=no
14238fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014239rm -f core conftest.err conftest.$ac_objext \
14240 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14242$as_echo "$have_gcc_asm_for_x64" >&6; }
14243if test "$have_gcc_asm_for_x64" = yes
14244then
14245
14246$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14247
14248fi
14249
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014250# **************************************************
14251# * Check for various properties of floating point *
14252# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014253
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14255$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14256if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014258else
14259
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014260
14261ax_cv_c_float_words_bigendian=unknown
14262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014263/* end confdefs.h. */
14264
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014265
14266double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14267
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268
14269_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270if ac_fn_c_try_compile "$LINENO"; then :
14271
14272
14273if grep noonsees conftest.$ac_objext >/dev/null ; then
14274 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014275fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014276if grep seesnoon conftest.$ac_objext >/dev/null ; then
14277 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14278 ax_cv_c_float_words_bigendian=no
14279 else
14280 ax_cv_c_float_words_bigendian=unknown
14281 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282fi
14283
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284
14285fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14289$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014290
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014291case $ax_cv_c_float_words_bigendian in
14292 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014294$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14295 ;;
14296 no)
14297 ;;
14298 *)
14299 as_fn_error $? "
14300
14301Unknown float word ordering. You need to manually preset
14302ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14303
14304 " "$LINENO" 5 ;;
14305esac
14306
14307
14308if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309then
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014312
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014313elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014314then
14315
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014316$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14317
14318else
14319 # Some ARM platforms use a mixed-endian representation for doubles.
14320 # While Python doesn't currently have full support for these platforms
14321 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14322 # conversions work.
14323 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14324 # or little, then it must be this?
14325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014327
14328fi
14329
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014330# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014331# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014332# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014333# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014334# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014335# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014336
14337# This inline assembler syntax may also work for suncc and icc,
14338# so we try it on all platforms.
14339
Matthias Kloseb9621712010-04-24 17:59:49 +000014340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14341$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014343/* end confdefs.h. */
14344
14345int
14346main ()
14347{
14348
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014349 unsigned short cw;
14350 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14351 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014352
14353 ;
14354 return 0;
14355}
14356_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014357if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014358 have_gcc_asm_for_x87=yes
14359else
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014361fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014362rm -f core conftest.err conftest.$ac_objext \
14363 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14365$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014366if test "$have_gcc_asm_for_x87" = yes
14367then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014370
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14374$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376/* end confdefs.h. */
14377
14378int
14379main ()
14380{
14381
14382 unsigned int fpcr;
14383 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14384 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14385
14386 ;
14387 return 0;
14388}
14389_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014390if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014391 have_gcc_asm_for_mc68881=yes
14392else
14393 have_gcc_asm_for_mc68881=no
14394fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014395rm -f core conftest.err conftest.$ac_objext \
14396 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14398$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14399if test "$have_gcc_asm_for_mc68881" = yes
14400then
14401
14402$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14403
14404fi
14405
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014406# Detect whether system arithmetic is subject to x87-style double
14407# rounding issues. The result of this test has little meaning on non
14408# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14409# mode is round-to-nearest and double rounding issues are present, and
14410# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14412$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014413# $BASECFLAGS may affect the result
14414ac_save_cc="$CC"
14415CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014416if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014417 ac_cv_x87_double_rounding=no
14418else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014420/* end confdefs.h. */
14421
14422#include <stdlib.h>
14423#include <math.h>
14424int main() {
14425 volatile double x, y, z;
14426 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14427 x = 0.99999999999999989; /* 1-2**-53 */
14428 y = 1./x;
14429 if (y != 1.)
14430 exit(0);
14431 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14432 x = 1e16;
14433 y = 2.99999;
14434 z = x + y;
14435 if (z != 1e16+4.)
14436 exit(0);
14437 /* both tests show evidence of double rounding */
14438 exit(1);
14439}
14440
14441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014442if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443 ac_cv_x87_double_rounding=no
14444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014449fi
14450
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014451CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14453$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014454if test "$ac_cv_x87_double_rounding" = yes
14455then
14456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014458
14459fi
14460
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014461# ************************************
14462# * Check for mathematical functions *
14463# ************************************
14464
14465LIBS_SAVE=$LIBS
14466LIBS="$LIBS $LIBM"
14467
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014468for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14469do :
14470 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14471ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014472if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014473 cat >>confdefs.h <<_ACEOF
14474#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14475_ACEOF
14476
14477fi
14478done
14479
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014480for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014481do :
14482 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14483ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014484if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014485 cat >>confdefs.h <<_ACEOF
14486#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14487_ACEOF
14488
14489fi
14490done
14491
14492ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14493"
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_ISINF $ac_have_decl
14502_ACEOF
14503ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14504"
Victor Stinnere0be4232011-10-25 13:06:09 +020014505if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_ISNAN $ac_have_decl
14513_ACEOF
14514ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14515"
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014517 ac_have_decl=1
14518else
14519 ac_have_decl=0
14520fi
14521
14522cat >>confdefs.h <<_ACEOF
14523#define HAVE_DECL_ISFINITE $ac_have_decl
14524_ACEOF
14525
14526
Mark Dickinsona614f042009-11-28 12:48:43 +000014527# For multiprocessing module, check that sem_open
14528# actually works. For FreeBSD versions <= 7.2,
14529# the kernel module that provides POSIX semaphores
14530# isn't loaded by default, so an attempt to call
14531# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14533$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014534if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014538 ac_cv_posix_semaphores_enabled=yes
14539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014541/* end confdefs.h. */
14542
14543#include <unistd.h>
14544#include <fcntl.h>
14545#include <stdio.h>
14546#include <semaphore.h>
14547#include <sys/stat.h>
14548
14549int main(void) {
14550 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14551 if (a == SEM_FAILED) {
14552 perror("sem_open");
14553 return 1;
14554 }
14555 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014556 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014557 return 0;
14558}
14559
14560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014561if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014562 ac_cv_posix_semaphores_enabled=yes
14563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014568fi
14569
14570
Mark Dickinsona614f042009-11-28 12:48:43 +000014571fi
14572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14574$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014575if test $ac_cv_posix_semaphores_enabled = no
14576then
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014579
14580fi
14581
Mark Dickinson10683072009-04-18 21:18:19 +000014582# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14584$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014585if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014589 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014592/* end confdefs.h. */
14593
14594#include <unistd.h>
14595#include <fcntl.h>
14596#include <stdio.h>
14597#include <semaphore.h>
14598#include <sys/stat.h>
14599
14600int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014601 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014602 int count;
14603 int res;
14604 if(a==SEM_FAILED){
14605 perror("sem_open");
14606 return 1;
14607
14608 }
14609 res = sem_getvalue(a, &count);
14610 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014611 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014612 return res==-1 ? 1 : 0;
14613}
14614
Mark Dickinson10683072009-04-18 21:18:19 +000014615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014616if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014617 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014618else
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014623fi
14624
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014625
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014626fi
14627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14629$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014630if test $ac_cv_broken_sem_getvalue = yes
14631then
14632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014634
14635fi
14636
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014637ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14638"
14639if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14640 ac_have_decl=1
14641else
14642 ac_have_decl=0
14643fi
14644
14645cat >>confdefs.h <<_ACEOF
14646#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14647_ACEOF
14648ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14649"
14650if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14651 ac_have_decl=1
14652else
14653 ac_have_decl=0
14654fi
14655
14656cat >>confdefs.h <<_ACEOF
14657#define HAVE_DECL_RTLD_NOW $ac_have_decl
14658_ACEOF
14659ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14660"
14661if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14662 ac_have_decl=1
14663else
14664 ac_have_decl=0
14665fi
14666
14667cat >>confdefs.h <<_ACEOF
14668#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14669_ACEOF
14670ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14680_ACEOF
14681ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14691_ACEOF
14692ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14693"
14694if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14695 ac_have_decl=1
14696else
14697 ac_have_decl=0
14698fi
14699
14700cat >>confdefs.h <<_ACEOF
14701#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14702_ACEOF
14703ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14704"
14705if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14706 ac_have_decl=1
14707else
14708 ac_have_decl=0
14709fi
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14713_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014714ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14715"
14716if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14717 ac_have_decl=1
14718else
14719 ac_have_decl=0
14720fi
14721
14722cat >>confdefs.h <<_ACEOF
14723#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14724_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014725
14726
Mark Dickinsonbd792642009-03-18 20:06:12 +000014727# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14729$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014730# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014731if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014732 enableval=$enable_big_digits; case $enable_big_digits in
14733yes)
14734 enable_big_digits=30 ;;
14735no)
14736 enable_big_digits=15 ;;
1473715|30)
14738 ;;
14739*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014740 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 +000014741esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14743$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014744
14745cat >>confdefs.h <<_ACEOF
14746#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14747_ACEOF
14748
14749
14750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14752$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014753fi
14754
14755
Guido van Rossumef2255b2000-03-10 22:30:29 +000014756# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014757ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014758if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014759
14760
Matthias Kloseb9621712010-04-24 17:59:49 +000014761$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014762
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014763 wchar_h="yes"
14764
Guido van Rossumef2255b2000-03-10 22:30:29 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014767
14768fi
14769
Michael W. Hudson54241132001-12-07 15:38:26 +000014770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014772# determine wchar_t size
14773if test "$wchar_h" = yes
14774then
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14777# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14778# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14780$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14785"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 if test "$ac_cv_type_wchar_t" = yes; then
14789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014791as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 else
14794 ac_cv_sizeof_wchar_t=0
14795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14800$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801
14802
14803
Martin v. Löwis11437992002-04-12 09:54:03 +000014804cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014805#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014806_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014807
Michael W. Hudson54241132001-12-07 15:38:26 +000014808
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014809fi
14810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14812$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014813have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014815/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014816
14817#include <tcl.h>
14818#if TCL_UTF_MAX != 6
14819# error "NOT UCS4_TCL"
14820#endif
14821int
14822main ()
14823{
14824
14825 ;
14826 return 0;
14827}
14828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014830
14831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014833
14834 have_ucs4_tcl=yes
14835
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14839$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014840
Skip Montanaro6dead952003-09-25 14:50:04 +000014841# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014842if test "$wchar_h" = yes
14843then
14844 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14846$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014847 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014849else
14850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014852 ac_cv_wchar_t_signed=yes
14853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014855/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014856
14857 #include <wchar.h>
14858 int main()
14859 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014860 /* Success: exit code 0 */
14861 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014862 }
14863
14864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014865if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014866 ac_cv_wchar_t_signed=yes
14867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014872fi
14873
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014874fi
14875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14877$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878fi
14879
Michael Osipov3738fad2018-08-24 18:17:19 +020014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14881$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014882# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014883if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014884 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014885then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014888
Michael Osipov3738fad2018-08-24 18:17:19 +020014889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14890$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014891else
Michael Osipov3738fad2018-08-24 18:17:19 +020014892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14893$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014894fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014895
14896# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14898$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014899if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ac_cv_c_bigendian=unknown
14903 # See if we're dealing with a universal compiler.
14904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905/* end confdefs.h. */
14906#ifndef __APPLE_CC__
14907 not a universal capable compiler
14908 #endif
14909 typedef int dummy;
14910
Skip Montanaro6dead952003-09-25 14:50:04 +000014911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if ac_fn_c_try_compile "$LINENO"; then :
14913
14914 # Check for potential -arch flags. It is not universal unless
14915 # there are at least two -arch flags with different values.
14916 ac_arch=
14917 ac_prev=
14918 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14919 if test -n "$ac_prev"; then
14920 case $ac_word in
14921 i?86 | x86_64 | ppc | ppc64)
14922 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14923 ac_arch=$ac_word
14924 else
14925 ac_cv_c_bigendian=universal
14926 break
14927 fi
14928 ;;
14929 esac
14930 ac_prev=
14931 elif test "x$ac_word" = "x-arch"; then
14932 ac_prev=arch
14933 fi
14934 done
14935fi
14936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937 if test $ac_cv_c_bigendian = unknown; then
14938 # See if sys/param.h defines the BYTE_ORDER macro.
14939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014940/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014943
Martin v. Löwis11437992002-04-12 09:54:03 +000014944int
14945main ()
14946{
Matthias Kloseb9621712010-04-24 17:59:49 +000014947#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14948 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14949 && LITTLE_ENDIAN)
14950 bogus endian macros
14951 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
14953 ;
14954 return 0;
14955}
14956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014958 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014960/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014961#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964int
14965main ()
14966{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014967#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 not big endian
14969 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
14971 ;
14972 return 0;
14973}
14974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014976 ac_cv_c_bigendian=yes
14977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014981fi
14982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14983 fi
14984 if test $ac_cv_c_bigendian = unknown; then
14985 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014987/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014988#include <limits.h>
14989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990int
14991main ()
14992{
Matthias Kloseb9621712010-04-24 17:59:49 +000014993#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14994 bogus endian macros
14995 #endif
14996
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ;
14998 return 0;
14999}
15000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015001if ac_fn_c_try_compile "$LINENO"; then :
15002 # It does; now see whether it defined to _BIG_ENDIAN or not.
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004/* end confdefs.h. */
15005#include <limits.h>
15006
15007int
15008main ()
15009{
15010#ifndef _BIG_ENDIAN
15011 not big endian
15012 #endif
15013
15014 ;
15015 return 0;
15016}
15017_ACEOF
15018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015020else
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15024fi
15025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15026 fi
15027 if test $ac_cv_c_bigendian = unknown; then
15028 # Compile a test program.
15029 if test "$cross_compiling" = yes; then :
15030 # Try to guess by grepping values from an object file.
15031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15032/* end confdefs.h. */
15033short int ascii_mm[] =
15034 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15035 short int ascii_ii[] =
15036 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15037 int use_ascii (int i) {
15038 return ascii_mm[i] + ascii_ii[i];
15039 }
15040 short int ebcdic_ii[] =
15041 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15042 short int ebcdic_mm[] =
15043 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15044 int use_ebcdic (int i) {
15045 return ebcdic_mm[i] + ebcdic_ii[i];
15046 }
15047 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048
Matthias Kloseb9621712010-04-24 17:59:49 +000015049int
15050main ()
15051{
15052return use_ascii (foo) == use_ebcdic (foo);
15053 ;
15054 return 0;
15055}
15056_ACEOF
15057if ac_fn_c_try_compile "$LINENO"; then :
15058 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15059 ac_cv_c_bigendian=yes
15060 fi
15061 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15062 if test "$ac_cv_c_bigendian" = unknown; then
15063 ac_cv_c_bigendian=no
15064 else
15065 # finding both strings is unlikely to happen, but who knows?
15066 ac_cv_c_bigendian=unknown
15067 fi
15068 fi
15069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015071else
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015073/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015075int
15076main ()
15077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 /* Are we little or big endian? From Harbison&Steele. */
15080 union
15081 {
15082 long int l;
15083 char c[sizeof (long int)];
15084 } u;
15085 u.l = 1;
15086 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087
15088 ;
15089 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090}
Martin v. Löwis11437992002-04-12 09:54:03 +000015091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015092if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093 ac_cv_c_bigendian=no
15094else
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15104$as_echo "$ac_cv_c_bigendian" >&6; }
15105 case $ac_cv_c_bigendian in #(
15106 yes)
15107 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15108;; #(
15109 no)
15110 ;; #(
15111 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 ;; #(
15116 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015117 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015118 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015120
Michael W. Hudson54241132001-12-07 15:38:26 +000015121
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015122# ABI version string for Python extension modules. This appears between the
15123# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15124# from the following attributes which affect the ABI of this Python build (in
15125# this order):
15126#
15127# * The Python implementation (always 'cpython-' for us)
15128# * The major and minor version numbers
15129# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015130#
15131# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015132# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15133# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015134#
15135# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15136# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015137
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15139$as_echo_n "checking ABIFLAGS... " >&6; }
15140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15141$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15143$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015144SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15146$as_echo "$SOABI" >&6; }
15147
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015148# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15149if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015150 # Similar to SOABI but remove "d" flag from ABIFLAGS
15151
15152 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15153
15154cat >>confdefs.h <<_ACEOF
15155#define ALT_SOABI "${ALT_SOABI}"
15156_ACEOF
15157
15158fi
15159
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015160
15161case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015162 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015163 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15164 *)
15165 EXT_SUFFIX=${SHLIB_SUFFIX};;
15166esac
15167
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15169$as_echo_n "checking LDVERSION... " >&6; }
15170LDVERSION='$(VERSION)$(ABIFLAGS)'
15171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15172$as_echo "$LDVERSION" >&6; }
15173
E. M. Brayc994c8f2019-05-24 17:33:47 +020015174# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015175
E. M. Brayb1fc4172019-05-24 18:39:39 +020015176if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015177 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015178else
15179 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015180fi
15181
doko@python.org87421192013-01-26 11:39:31 +010015182
doko@ubuntu.com55532312016-06-14 08:55:19 +020015183if test x$PLATFORM_TRIPLET = x; then
15184 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15185else
15186 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15187fi
doko@python.org87421192013-01-26 11:39:31 +010015188
15189
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015190# Check whether right shifting a negative integer extends the sign bit
15191# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15193$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015194if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015196else
Martin v. Löwis11437992002-04-12 09:54:03 +000015197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015199 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015200else
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015202/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015203
15204int main()
15205{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015206 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015207}
15208
Martin v. Löwis11437992002-04-12 09:54:03 +000015209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015210if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015211 ac_cv_rshift_extends_sign=yes
15212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015217fi
15218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219fi
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15222$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015223if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015224then
Martin v. Löwis11437992002-04-12 09:54:03 +000015225
Matthias Kloseb9621712010-04-24 17:59:49 +000015226$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015227
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015228fi
15229
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015230# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15232$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015233if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015235else
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015238/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015239#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015240int
15241main ()
15242{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015243
15244 FILE *f = fopen("/dev/null", "r");
15245 flockfile(f);
15246 getc_unlocked(f);
15247 funlockfile(f);
15248
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ;
15250 return 0;
15251}
15252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015253if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015254 ac_cv_have_getc_unlocked=yes
15255else
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 ac_cv_have_getc_unlocked=no
15257fi
15258rm -f core conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15263$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015264if test "$ac_cv_have_getc_unlocked" = yes
15265then
Martin v. Löwis11437992002-04-12 09:54:03 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015268
15269fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015270
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015271# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015272# save the value of LIBS so we don't actually link Python with readline
15273LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015274
Gregory P. Smith18820942008-09-07 06:24:49 +000015275# On some systems we need to link readline to a termcap compatible
15276# library. NOTE: Keep the precedence of listed libraries synchronised
15277# with setup.py.
15278py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15280$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015281for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015282 if test -z "$py_libtermcap"; then
15283 READLINE_LIBS="-lreadline"
15284 else
15285 READLINE_LIBS="-lreadline -l$py_libtermcap"
15286 fi
15287 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015289/* end confdefs.h. */
15290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291/* Override any GCC internal prototype to avoid an error.
15292 Use char because int might match the return type of a GCC
15293 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015294#ifdef __cplusplus
15295extern "C"
15296#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015297char readline ();
15298int
15299main ()
15300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015302 ;
15303 return 0;
15304}
15305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015306if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015307 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015309rm -f core conftest.err conftest.$ac_objext \
15310 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015311 if test $py_cv_lib_readline = yes; then
15312 break
15313 fi
15314done
15315# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15316#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015317if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15319$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015320else
Matthias Kloseb9621712010-04-24 17:59:49 +000015321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15322$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015323
Matthias Kloseb9621712010-04-24 17:59:49 +000015324$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015325
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015326fi
15327
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015328# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015330/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015331#include <readline/readline.h>
15332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015333if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015334 have_readline=yes
15335else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015336 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015337
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015338fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015339rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015340if test $have_readline = yes
15341then
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015343/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015344#include <readline/readline.h>
15345
15346_ACEOF
15347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015351
15352fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015353rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015356/* end confdefs.h. */
15357#include <readline/readline.h>
15358
15359_ACEOF
15360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015364
15365fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015366rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015367
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015368fi
15369
Martin v. Löwis0daad592001-09-30 21:09:59 +000015370# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15372$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015373if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015375else
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015377LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015401rm -f core conftest.err conftest.$ac_objext \
15402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015403LIBS=$ac_check_lib_save_LIBS
15404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15406$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015407if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015410
Martin v. Löwis0daad592001-09-30 21:09:59 +000015411fi
15412
Michael W. Hudson54241132001-12-07 15:38:26 +000015413
Thomas Wouters89d996e2007-09-08 17:39:28 +000015414# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15416$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015417if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015419else
15420 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015421LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015423/* end confdefs.h. */
15424
15425/* Override any GCC internal prototype to avoid an error.
15426 Use char because int might match the return type of a GCC
15427 builtin and then its argument prototype would still apply. */
15428#ifdef __cplusplus
15429extern "C"
15430#endif
15431char rl_completion_display_matches_hook ();
15432int
15433main ()
15434{
15435return rl_completion_display_matches_hook ();
15436 ;
15437 return 0;
15438}
15439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015441 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015445rm -f core conftest.err conftest.$ac_objext \
15446 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015447LIBS=$ac_check_lib_save_LIBS
15448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15450$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015451if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015454
15455fi
15456
15457
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015458# also in 4.0, but not in editline
15459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15460$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15461if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15462 $as_echo_n "(cached) " >&6
15463else
15464 ac_check_lib_save_LIBS=$LIBS
15465LIBS="-lreadline $READLINE_LIBS $LIBS"
15466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15467/* end confdefs.h. */
15468
15469/* Override any GCC internal prototype to avoid an error.
15470 Use char because int might match the return type of a GCC
15471 builtin and then its argument prototype would still apply. */
15472#ifdef __cplusplus
15473extern "C"
15474#endif
15475char rl_resize_terminal ();
15476int
15477main ()
15478{
15479return rl_resize_terminal ();
15480 ;
15481 return 0;
15482}
15483_ACEOF
15484if ac_fn_c_try_link "$LINENO"; then :
15485 ac_cv_lib_readline_rl_resize_terminal=yes
15486else
15487 ac_cv_lib_readline_rl_resize_terminal=no
15488fi
15489rm -f core conftest.err conftest.$ac_objext \
15490 conftest$ac_exeext conftest.$ac_ext
15491LIBS=$ac_check_lib_save_LIBS
15492fi
15493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15494$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15495if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15496
15497$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15498
15499fi
15500
15501
Martin v. Löwis0daad592001-09-30 21:09:59 +000015502# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15504$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015505if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015507else
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015509LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513/* Override any GCC internal prototype to avoid an error.
15514 Use char because int might match the return type of a GCC
15515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015516#ifdef __cplusplus
15517extern "C"
15518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015519char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015520int
15521main ()
15522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ;
15525 return 0;
15526}
15527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015530else
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015533rm -f core conftest.err conftest.$ac_objext \
15534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015535LIBS=$ac_check_lib_save_LIBS
15536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15538$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015539if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015542
Guido van Rossum353ae582001-07-10 16:45:32 +000015543fi
15544
Jack Jansendd19cf82001-12-06 22:36:17 +000015545
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015546# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015548/* end confdefs.h. */
15549#include <readline/readline.h>
15550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015551if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015552 have_readline=yes
15553else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015554 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015555
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015556fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015557rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015558if test $have_readline = yes
15559then
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015561/* end confdefs.h. */
15562#include <readline/readline.h>
15563
15564_ACEOF
15565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015569
15570fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015571rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572
15573fi
15574
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15576$as_echo_n "checking for append_history in -lreadline... " >&6; }
15577if ${ac_cv_lib_readline_append_history+:} false; then :
15578 $as_echo_n "(cached) " >&6
15579else
15580 ac_check_lib_save_LIBS=$LIBS
15581LIBS="-lreadline $READLINE_LIBS $LIBS"
15582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15583/* end confdefs.h. */
15584
15585/* Override any GCC internal prototype to avoid an error.
15586 Use char because int might match the return type of a GCC
15587 builtin and then its argument prototype would still apply. */
15588#ifdef __cplusplus
15589extern "C"
15590#endif
15591char append_history ();
15592int
15593main ()
15594{
15595return append_history ();
15596 ;
15597 return 0;
15598}
15599_ACEOF
15600if ac_fn_c_try_link "$LINENO"; then :
15601 ac_cv_lib_readline_append_history=yes
15602else
15603 ac_cv_lib_readline_append_history=no
15604fi
15605rm -f core conftest.err conftest.$ac_objext \
15606 conftest$ac_exeext conftest.$ac_ext
15607LIBS=$ac_check_lib_save_LIBS
15608fi
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15610$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15611if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15612
15613$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15614
15615fi
15616
15617
Martin v. Löwis82bca632006-02-10 20:49:30 +000015618# End of readline checks: restore LIBS
15619LIBS=$LIBS_no_readline
15620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15622$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015623if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015625else
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
Matthias Kloseb9621712010-04-24 17:59:49 +000015627if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015628 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015631/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015632
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015633#include <stdlib.h>
15634#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015635int main()
15636{
15637 int val1 = nice(1);
15638 if (val1 != -1 && val1 == nice(2))
15639 exit(0);
15640 exit(1);
15641}
15642
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015644if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015645 ac_cv_broken_nice=yes
15646else
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015651fi
15652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653fi
15654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15656$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015657if test "$ac_cv_broken_nice" = yes
15658then
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015661
15662fi
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15665$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015670 ac_cv_broken_poll=no
15671else
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015673/* end confdefs.h. */
15674
15675#include <poll.h>
15676
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015677int main()
15678{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015679 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015680 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681
15682 close (42);
15683
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015684 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015685 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015686 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015687 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015688 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015689 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015690 return 1;
15691}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015692
15693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015694if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695 ac_cv_broken_poll=yes
15696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015703fi
15704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15706$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015707if test "$ac_cv_broken_poll" = yes
15708then
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015711
15712fi
15713
Martin v. Löwis1d459062005-03-14 21:23:33 +000015714# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15716$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015717if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719else
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015722 ac_cv_working_tzset=no
15723else
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015725/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015726
15727#include <stdlib.h>
15728#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015729#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015730
15731#if HAVE_TZNAME
15732extern char *tzname[];
15733#endif
15734
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735int main()
15736{
Brett Cannon18367812003-09-19 00:59:16 +000015737 /* Note that we need to ensure that not only does tzset(3)
15738 do 'something' with localtime, but it works as documented
15739 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015740 This includes making sure that tzname is set properly if
15741 tm->tm_zone does not exist since it is the alternative way
15742 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015743
15744 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015745 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015746 */
15747
Martin v. Löwis1d459062005-03-14 21:23:33 +000015748 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015749 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15750
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015751 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015752 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015753 if (localtime(&groundhogday)->tm_hour != 0)
15754 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015755#if HAVE_TZNAME
15756 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15757 if (strcmp(tzname[0], "UTC") ||
15758 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15759 exit(1);
15760#endif
Brett Cannon18367812003-09-19 00:59:16 +000015761
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015762 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015763 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015764 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015766#if HAVE_TZNAME
15767 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15768 exit(1);
15769#endif
Brett Cannon18367812003-09-19 00:59:16 +000015770
15771 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15772 tzset();
15773 if (localtime(&groundhogday)->tm_hour != 11)
15774 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015775#if HAVE_TZNAME
15776 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15777 exit(1);
15778#endif
15779
15780#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015781 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15782 exit(1);
15783 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15784 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015785#endif
Brett Cannon18367812003-09-19 00:59:16 +000015786
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015787 exit(0);
15788}
15789
15790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015791if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015792 ac_cv_working_tzset=yes
15793else
Matthias Kloseb9621712010-04-24 17:59:49 +000015794 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798fi
15799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800fi
15801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15803$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015804if test "$ac_cv_working_tzset" = yes
15805then
15806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015808
15809fi
15810
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015811# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15813$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015814if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015816else
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015818/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015819#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015820int
15821main ()
15822{
15823
15824struct stat st;
15825st.st_mtim.tv_nsec = 1;
15826
15827 ;
15828 return 0;
15829}
15830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015832 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15837fi
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15840$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015841if test "$ac_cv_stat_tv_nsec" = yes
15842then
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015845
15846fi
15847
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015848# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15850$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015851if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015853else
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015855/* end confdefs.h. */
15856#include <sys/stat.h>
15857int
15858main ()
15859{
15860
15861struct stat st;
15862st.st_mtimespec.tv_nsec = 1;
15863
15864 ;
15865 return 0;
15866}
15867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015869 ac_cv_stat_tv_nsec2=yes
15870else
Matthias Kloseb9621712010-04-24 17:59:49 +000015871 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15874fi
15875
Matthias Kloseb9621712010-04-24 17:59:49 +000015876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15877$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015878if test "$ac_cv_stat_tv_nsec2" = yes
15879then
15880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015882
15883fi
15884
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015885# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015886ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015887if test "$cross_compiling" = no; then
15888 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15889fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015890
15891for ac_header in curses.h ncurses.h
15892do :
15893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15894ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15896 cat >>confdefs.h <<_ACEOF
15897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15898_ACEOF
15899
15900fi
15901
15902done
15903
15904
15905# On Solaris, term.h requires curses.h
15906for ac_header in term.h
15907do :
15908 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15909#ifdef HAVE_CURSES_H
15910#include <curses.h>
15911#endif
15912
15913"
15914if test "x$ac_cv_header_term_h" = xyes; then :
15915 cat >>confdefs.h <<_ACEOF
15916#define HAVE_TERM_H 1
15917_ACEOF
15918
15919fi
15920
15921done
15922
15923
Jack Jansen666b1e72001-10-31 12:11:48 +000015924# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15926$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015927if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015929else
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015931/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015932#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015933int
15934main ()
15935{
Jack Jansen666b1e72001-10-31 12:11:48 +000015936
15937 int rtn;
15938 rtn = mvwdelch(0,0,0);
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ;
15941 return 0;
15942}
15943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015944if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015945 ac_cv_mvwdelch_is_expression=yes
15946else
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15950fi
15951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15953$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015954
15955if test "$ac_cv_mvwdelch_is_expression" = yes
15956then
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015959
15960fi
15961
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015962# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15963# structs since version 5.7. If the macro is defined as zero before including
15964# [n]curses.h, ncurses will expose fields of the structs regardless of the
15965# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15967$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015968if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015970else
Matthias Kloseb9621712010-04-24 17:59:49 +000015971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015972/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015973
15974 #define NCURSES_OPAQUE 0
15975 #include <curses.h>
15976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977int
15978main ()
15979{
Jack Jansen666b1e72001-10-31 12:11:48 +000015980
15981 WINDOW *w;
15982 w->_flags = 0;
15983
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 ;
15985 return 0;
15986}
15987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015988if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015989 ac_cv_window_has_flags=yes
15990else
Matthias Kloseb9621712010-04-24 17:59:49 +000015991 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15994fi
15995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15997$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015998
Jack Jansen666b1e72001-10-31 12:11:48 +000015999
16000if test "$ac_cv_window_has_flags" = yes
16001then
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
Matthias Kloseb9621712010-04-24 17:59:49 +000016003$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016004
16005fi
16006
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16008$as_echo_n "checking for is_pad... " >&6; }
16009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010/* end confdefs.h. */
16011#include <curses.h>
16012int
16013main ()
16014{
16015
16016#ifndef is_pad
16017void *x=is_pad
16018#endif
16019
16020 ;
16021 return 0;
16022}
16023_ACEOF
16024if ac_fn_c_try_compile "$LINENO"; then :
16025
16026$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16027
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16029$as_echo "yes" >&6; }
16030else
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032$as_echo "no" >&6; }
16033
16034fi
16035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16038$as_echo_n "checking for is_term_resized... " >&6; }
16039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040/* end confdefs.h. */
16041#include <curses.h>
16042int
16043main ()
16044{
16045void *x=is_term_resized
16046 ;
16047 return 0;
16048}
16049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016053
Matthias Kloseb159a552010-04-25 21:00:44 +000016054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016055$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016056else
Matthias Kloseb9621712010-04-24 17:59:49 +000016057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16058$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016059
16060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16064$as_echo_n "checking for resize_term... " >&6; }
16065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066/* end confdefs.h. */
16067#include <curses.h>
16068int
16069main ()
16070{
16071void *x=resize_term
16072 ;
16073 return 0;
16074}
16075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016076if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016079
Matthias Kloseb159a552010-04-25 21:00:44 +000016080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082else
Matthias Kloseb9621712010-04-24 17:59:49 +000016083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16084$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016085
16086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16090$as_echo_n "checking for resizeterm... " >&6; }
16091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016092/* end confdefs.h. */
16093#include <curses.h>
16094int
16095main ()
16096{
16097void *x=resizeterm
16098 ;
16099 return 0;
16100}
16101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016102if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016103
Matthias Kloseb9621712010-04-24 17:59:49 +000016104$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016105
Matthias Kloseb159a552010-04-25 21:00:44 +000016106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016107$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016108else
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016111
16112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016114
16115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16116$as_echo_n "checking for immedok... " >&6; }
16117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16118/* end confdefs.h. */
16119#include <curses.h>
16120int
16121main ()
16122{
16123
16124#ifndef immedok
16125void *x=immedok
16126#endif
16127
16128 ;
16129 return 0;
16130}
16131_ACEOF
16132if ac_fn_c_try_compile "$LINENO"; then :
16133
16134$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16135
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16137$as_echo "yes" >&6; }
16138else
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16140$as_echo "no" >&6; }
16141
16142fi
16143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144
16145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16146$as_echo_n "checking for syncok... " >&6; }
16147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148/* end confdefs.h. */
16149#include <curses.h>
16150int
16151main ()
16152{
16153
16154#ifndef syncok
16155void *x=syncok
16156#endif
16157
16158 ;
16159 return 0;
16160}
16161_ACEOF
16162if ac_fn_c_try_compile "$LINENO"; then :
16163
16164$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16165
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16167$as_echo "yes" >&6; }
16168else
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170$as_echo "no" >&6; }
16171
16172fi
16173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16174
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16176$as_echo_n "checking for wchgat... " >&6; }
16177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178/* end confdefs.h. */
16179#include <curses.h>
16180int
16181main ()
16182{
16183
16184#ifndef wchgat
16185void *x=wchgat
16186#endif
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
16192if ac_fn_c_try_compile "$LINENO"; then :
16193
16194$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16195
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16197$as_echo "yes" >&6; }
16198else
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16200$as_echo "no" >&6; }
16201
16202fi
16203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16204
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16206$as_echo_n "checking for filter... " >&6; }
16207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16208/* end confdefs.h. */
16209#include <curses.h>
16210int
16211main ()
16212{
16213
16214#ifndef filter
16215void *x=filter
16216#endif
16217
16218 ;
16219 return 0;
16220}
16221_ACEOF
16222if ac_fn_c_try_compile "$LINENO"; then :
16223
16224$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16225
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16227$as_echo "yes" >&6; }
16228else
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230$as_echo "no" >&6; }
16231
16232fi
16233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16234
16235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16236$as_echo_n "checking for has_key... " >&6; }
16237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h. */
16239#include <curses.h>
16240int
16241main ()
16242{
16243
16244#ifndef has_key
16245void *x=has_key
16246#endif
16247
16248 ;
16249 return 0;
16250}
16251_ACEOF
16252if ac_fn_c_try_compile "$LINENO"; then :
16253
16254$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16255
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16257$as_echo "yes" >&6; }
16258else
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16260$as_echo "no" >&6; }
16261
16262fi
16263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16264
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16266$as_echo_n "checking for typeahead... " >&6; }
16267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268/* end confdefs.h. */
16269#include <curses.h>
16270int
16271main ()
16272{
16273
16274#ifndef typeahead
16275void *x=typeahead
16276#endif
16277
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282if ac_fn_c_try_compile "$LINENO"; then :
16283
16284$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16285
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16287$as_echo "yes" >&6; }
16288else
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16290$as_echo "no" >&6; }
16291
16292fi
16293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16294
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16296$as_echo_n "checking for use_env... " >&6; }
16297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16298/* end confdefs.h. */
16299#include <curses.h>
16300int
16301main ()
16302{
16303
16304#ifndef use_env
16305void *x=use_env
16306#endif
16307
16308 ;
16309 return 0;
16310}
16311_ACEOF
16312if ac_fn_c_try_compile "$LINENO"; then :
16313
16314$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16315
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16317$as_echo "yes" >&6; }
16318else
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16320$as_echo "no" >&6; }
16321
16322fi
16323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016324# last curses configure check
16325CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16328$as_echo "$as_me: checking for device files" >&6;}
16329
16330if test "x$cross_compiling" = xyes; then
16331 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16333$as_echo_n "checking for /dev/ptmx... " >&6; }
16334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16335$as_echo "not set" >&6; }
16336 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16337 fi
16338 if test "${ac_cv_file__dev_ptc+set}" != set; then
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16340$as_echo_n "checking for /dev/ptc... " >&6; }
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16342$as_echo "not set" >&6; }
16343 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16344 fi
16345fi
16346
Matthias Kloseb9621712010-04-24 17:59:49 +000016347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16348$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016349if ${ac_cv_file__dev_ptmx+:} false; then :
16350 $as_echo_n "(cached) " >&6
16351else
16352 test "$cross_compiling" = yes &&
16353 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16354if test -r "/dev/ptmx"; then
16355 ac_cv_file__dev_ptmx=yes
16356else
16357 ac_cv_file__dev_ptmx=no
16358fi
16359fi
16360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16361$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16362if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016363
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016364fi
16365
16366if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016367
Matthias Kloseb9621712010-04-24 17:59:49 +000016368$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016369
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16372$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016373if ${ac_cv_file__dev_ptc+:} false; then :
16374 $as_echo_n "(cached) " >&6
16375else
16376 test "$cross_compiling" = yes &&
16377 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16378if test -r "/dev/ptc"; then
16379 ac_cv_file__dev_ptc=yes
16380else
16381 ac_cv_file__dev_ptc=no
16382fi
16383fi
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16385$as_echo "$ac_cv_file__dev_ptc" >&6; }
16386if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016387
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016388fi
16389
16390if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016393
Neal Norwitz865400f2003-03-21 01:42:58 +000016394fi
16395
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016396if test $ac_sys_system = Darwin
16397then
16398 LIBS="$LIBS -framework CoreFoundation"
16399fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16402$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016403if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016404 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016405else
Matthias Kloseb9621712010-04-24 17:59:49 +000016406 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016407 ac_cv_have_size_t_format="cross -- assuming yes"
16408
Thomas Wouters477c8d52006-05-27 19:21:47 +000016409else
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016411/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016412
Thomas Wouters477c8d52006-05-27 19:21:47 +000016413#include <stdio.h>
16414#include <stddef.h>
16415#include <string.h>
16416
Christian Heimes2c181612007-12-17 20:04:13 +000016417#ifdef HAVE_SYS_TYPES_H
16418#include <sys/types.h>
16419#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016420
16421#ifdef HAVE_SSIZE_T
16422typedef ssize_t Py_ssize_t;
16423#elif SIZEOF_VOID_P == SIZEOF_LONG
16424typedef long Py_ssize_t;
16425#else
16426typedef int Py_ssize_t;
16427#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016428
Christian Heimes2c181612007-12-17 20:04:13 +000016429int main()
16430{
16431 char buffer[256];
16432
Thomas Wouters477c8d52006-05-27 19:21:47 +000016433 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16434 return 1;
16435
Thomas Wouters89f507f2006-12-13 04:49:30 +000016436 if (strcmp(buffer, "123"))
16437 return 1;
16438
16439 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16440 return 1;
16441
16442 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016443 return 1;
16444
16445 return 0;
16446}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016447
Thomas Wouters477c8d52006-05-27 19:21:47 +000016448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016449if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016450 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016451else
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016456fi
16457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16460$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016461if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016462
Matthias Kloseb9621712010-04-24 17:59:49 +000016463$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016464
16465fi
16466
Matthias Kloseb9621712010-04-24 17:59:49 +000016467ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016468#ifdef HAVE_SYS_TYPES_H
16469#include <sys/types.h>
16470#endif
16471#ifdef HAVE_SYS_SOCKET_H
16472#include <sys/socket.h>
16473#endif
16474
Matthias Kloseb9621712010-04-24 17:59:49 +000016475"
Victor Stinnere0be4232011-10-25 13:06:09 +020016476if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016477
Martin v. Löwis11437992002-04-12 09:54:03 +000016478else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016479
Matthias Kloseb9621712010-04-24 17:59:49 +000016480$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016481
16482fi
16483
Michael W. Hudson54241132001-12-07 15:38:26 +000016484
Matthias Kloseb9621712010-04-24 17:59:49 +000016485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16486$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016487if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016488 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016489else
Matthias Kloseb9621712010-04-24 17:59:49 +000016490 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016491 ac_cv_broken_mbstowcs=no
16492else
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016494/* end confdefs.h. */
16495
Stefan Krah19c21392012-11-22 23:47:32 +010016496#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016497#include<stdlib.h>
16498int main() {
16499 size_t len = -1;
16500 const char *str = "text";
16501 len = mbstowcs(NULL, str, 0);
16502 return (len != 4);
16503}
16504
16505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016506if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016507 ac_cv_broken_mbstowcs=no
16508else
Matthias Kloseb9621712010-04-24 17:59:49 +000016509 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16512 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016513fi
16514
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016515fi
16516
Matthias Kloseb9621712010-04-24 17:59:49 +000016517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16518$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016519if test "$ac_cv_broken_mbstowcs" = yes
16520then
16521
Matthias Kloseb9621712010-04-24 17:59:49 +000016522$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016523
16524fi
16525
Antoine Pitroub52ec782009-01-25 16:34:23 +000016526# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16528$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016529
16530# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016531if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016532 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016533if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016534then
16535
Matthias Kloseb9621712010-04-24 17:59:49 +000016536$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16539$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016540fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016541if test "$withval" = no
16542then
16543
16544$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16545
Matthias Kloseb9621712010-04-24 17:59:49 +000016546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16547$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016548fi
16549
Antoine Pitrou042b1282010-08-13 21:15:58 +000016550else
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16552$as_echo "no value specified" >&6; }
16553fi
16554
Antoine Pitroub52ec782009-01-25 16:34:23 +000016555
Matthias Kloseb17289e2012-03-15 19:51:34 +010016556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16557$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16558if ${ac_cv_computed_gotos+:} false; then :
16559 $as_echo_n "(cached) " >&6
16560else
16561 if test "$cross_compiling" = yes; then :
16562 if test "${with_computed_gotos+set}" = set; then
16563 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16564 else
16565 ac_cv_computed_gotos=no
16566 fi
16567else
16568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16569/* end confdefs.h. */
16570
16571int main(int argc, char **argv)
16572{
16573 static void *targets[1] = { &&LABEL1 };
16574 goto LABEL2;
16575LABEL1:
16576 return 0;
16577LABEL2:
16578 goto *targets[0];
16579 return 1;
16580}
16581
16582_ACEOF
16583if ac_fn_c_try_run "$LINENO"; then :
16584 ac_cv_computed_gotos=yes
16585else
16586 ac_cv_computed_gotos=no
16587fi
16588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16589 conftest.$ac_objext conftest.beam conftest.$ac_ext
16590fi
16591
16592fi
16593
16594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16595$as_echo "$ac_cv_computed_gotos" >&6; }
16596case "$ac_cv_computed_gotos" in yes*)
16597
16598$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16599
16600esac
16601
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016602case $ac_sys_system in
16603AIX*)
16604
16605$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16606 ;;
16607esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016608
Michael W. Hudson54241132001-12-07 15:38:26 +000016609
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016610
16611
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016612for h in `(cd $srcdir;echo Python/thread_*.h)`
16613do
16614 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16615done
16616
Michael W. Hudson54241132001-12-07 15:38:26 +000016617
Victor Stinner21a74a92019-04-11 22:28:12 +020016618SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16620$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016621for dir in $SRCDIRS; do
16622 if test ! -d $dir; then
16623 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016624 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016625done
Matthias Kloseb9621712010-04-24 17:59:49 +000016626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16627$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016628
Stefan Krah1919b7e2012-03-21 18:25:23 +010016629# Availability of -O2:
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16631$as_echo_n "checking for -O2... " >&6; }
16632saved_cflags="$CFLAGS"
16633CFLAGS="-O2"
16634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16635/* end confdefs.h. */
16636
16637int
16638main ()
16639{
16640
16641
16642 ;
16643 return 0;
16644}
16645_ACEOF
16646if ac_fn_c_try_compile "$LINENO"; then :
16647 have_O2=yes
16648else
16649 have_O2=no
16650fi
16651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16653$as_echo "$have_O2" >&6; }
16654CFLAGS="$saved_cflags"
16655
16656# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16657# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16659$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16660saved_cflags="$CFLAGS"
16661CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16662if test "$have_O2" = no; then
16663 CFLAGS=""
16664fi
16665if test "$cross_compiling" = yes; then :
16666 have_glibc_memmove_bug=undefined
16667else
16668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669/* end confdefs.h. */
16670
16671#include <stdio.h>
16672#include <stdlib.h>
16673#include <string.h>
16674void foo(void *p, void *q) { memmove(p, q, 19); }
16675int main() {
16676 char a[32] = "123456789000000000";
16677 foo(&a[9], a);
16678 if (strcmp(a, "123456789123456789000000000") != 0)
16679 return 1;
16680 foo(a, &a[9]);
16681 if (strcmp(a, "123456789000000000") != 0)
16682 return 1;
16683 return 0;
16684}
16685
16686_ACEOF
16687if ac_fn_c_try_run "$LINENO"; then :
16688 have_glibc_memmove_bug=no
16689else
16690 have_glibc_memmove_bug=yes
16691fi
16692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16693 conftest.$ac_objext conftest.beam conftest.$ac_ext
16694fi
16695
16696CFLAGS="$saved_cflags"
16697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16698$as_echo "$have_glibc_memmove_bug" >&6; }
16699if test "$have_glibc_memmove_bug" = yes; then
16700
16701$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16702
16703fi
16704
16705if test "$have_gcc_asm_for_x87" = yes; then
16706 # Some versions of gcc miscompile inline asm:
16707 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16708 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16709 case $CC in
16710 *gcc*)
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16712$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16713 saved_cflags="$CFLAGS"
16714 CFLAGS="-O2"
16715 if test "$cross_compiling" = yes; then :
16716 have_ipa_pure_const_bug=undefined
16717else
16718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16719/* end confdefs.h. */
16720
16721 __attribute__((noinline)) int
16722 foo(int *p) {
16723 int r;
16724 asm ( "movl \$6, (%1)\n\t"
16725 "xorl %0, %0\n\t"
16726 : "=r" (r) : "r" (p) : "memory"
16727 );
16728 return r;
16729 }
16730 int main() {
16731 int p = 8;
16732 if ((foo(&p) ? : p) != 6)
16733 return 1;
16734 return 0;
16735 }
16736
16737_ACEOF
16738if ac_fn_c_try_run "$LINENO"; then :
16739 have_ipa_pure_const_bug=no
16740else
16741 have_ipa_pure_const_bug=yes
16742fi
16743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16744 conftest.$ac_objext conftest.beam conftest.$ac_ext
16745fi
16746
16747 CFLAGS="$saved_cflags"
16748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16749$as_echo "$have_ipa_pure_const_bug" >&6; }
16750 if test "$have_ipa_pure_const_bug" = yes; then
16751
16752$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16753
16754 fi
16755 ;;
16756 esac
16757fi
16758
Victor Stinner4f5366e2015-01-09 02:13:19 +010016759# Check for stdatomic.h
16760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16761$as_echo_n "checking for stdatomic.h... " >&6; }
16762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763/* end confdefs.h. */
16764
16765
16766 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016767 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016768 int main() {
16769 int loaded_value = atomic_load(&value);
16770 return 0;
16771 }
16772
16773
16774_ACEOF
16775if ac_fn_c_try_link "$LINENO"; then :
16776 have_stdatomic_h=yes
16777else
16778 have_stdatomic_h=no
16779fi
16780rm -f core conftest.err conftest.$ac_objext \
16781 conftest$ac_exeext conftest.$ac_ext
16782
16783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16784$as_echo "$have_stdatomic_h" >&6; }
16785
16786if test "$have_stdatomic_h" = yes; then
16787
16788$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16789
16790fi
16791
16792# Check for GCC >= 4.7 __atomic builtins
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16794$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16796/* end confdefs.h. */
16797
16798
16799 volatile int val = 1;
16800 int main() {
16801 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16802 return 0;
16803 }
16804
16805
16806_ACEOF
16807if ac_fn_c_try_link "$LINENO"; then :
16808 have_builtin_atomic=yes
16809else
16810 have_builtin_atomic=no
16811fi
16812rm -f core conftest.err conftest.$ac_objext \
16813 conftest$ac_exeext conftest.$ac_ext
16814
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16816$as_echo "$have_builtin_atomic" >&6; }
16817
16818if test "$have_builtin_atomic" = yes; then
16819
16820$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16821
16822fi
16823
Ned Deily322f5ba2013-11-21 23:01:59 -080016824# ensurepip option
16825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16826$as_echo_n "checking for ensurepip... " >&6; }
16827
16828# Check whether --with-ensurepip was given.
16829if test "${with_ensurepip+set}" = set; then :
16830 withval=$with_ensurepip;
16831else
16832 with_ensurepip=upgrade
16833fi
16834
16835case $with_ensurepip in #(
16836 yes|upgrade) :
16837 ENSUREPIP=upgrade ;; #(
16838 install) :
16839 ENSUREPIP=install ;; #(
16840 no) :
16841 ENSUREPIP=no ;; #(
16842 *) :
16843 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16844esac
16845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16846$as_echo "$ENSUREPIP" >&6; }
16847
16848
Victor Stinner35a97c02015-03-08 02:59:09 +010016849# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16851$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16853/* end confdefs.h. */
16854
16855
16856 #include <dirent.h>
16857
16858 int main() {
16859 struct dirent entry;
16860 return entry.d_type == DT_UNKNOWN;
16861 }
16862
16863
16864_ACEOF
16865if ac_fn_c_try_link "$LINENO"; then :
16866 have_dirent_d_type=yes
16867else
16868 have_dirent_d_type=no
16869fi
16870rm -f core conftest.err conftest.$ac_objext \
16871 conftest$ac_exeext conftest.$ac_ext
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16873$as_echo "$have_dirent_d_type" >&6; }
16874
16875if test "$have_dirent_d_type" = yes; then
16876
16877$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16878
16879fi
16880
Victor Stinner9eb57c52015-03-19 22:21:49 +010016881# check if the Linux getrandom() syscall is available
16882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16883$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16885/* end confdefs.h. */
16886
16887
Victor Stinner1b80b242016-04-12 22:34:58 +020016888 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016889 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016890 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016891
16892 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016893 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016894 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016895 const int flags = GRND_NONBLOCK;
16896 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016897 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016898 return 0;
16899 }
16900
16901
16902_ACEOF
16903if ac_fn_c_try_link "$LINENO"; then :
16904 have_getrandom_syscall=yes
16905else
16906 have_getrandom_syscall=no
16907fi
16908rm -f core conftest.err conftest.$ac_objext \
16909 conftest$ac_exeext conftest.$ac_ext
16910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16911$as_echo "$have_getrandom_syscall" >&6; }
16912
16913if test "$have_getrandom_syscall" = yes; then
16914
16915$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16916
16917fi
16918
Victor Stinner3abf44e2015-09-18 15:38:37 +020016919# check if the getrandom() function is available
16920# the test was written for the Solaris function of <sys/random.h>
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16922$as_echo_n "checking for the getrandom() function... " >&6; }
16923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16924/* end confdefs.h. */
16925
16926
16927 #include <sys/random.h>
16928
16929 int main() {
16930 char buffer[1];
16931 const size_t buflen = sizeof(buffer);
16932 const int flags = 0;
16933 /* ignore the result, Python checks for ENOSYS at runtime */
16934 (void)getrandom(buffer, buflen, flags);
16935 return 0;
16936 }
16937
16938
16939_ACEOF
16940if ac_fn_c_try_link "$LINENO"; then :
16941 have_getrandom=yes
16942else
16943 have_getrandom=no
16944fi
16945rm -f core conftest.err conftest.$ac_objext \
16946 conftest$ac_exeext conftest.$ac_ext
16947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16948$as_echo "$have_getrandom" >&6; }
16949
16950if test "$have_getrandom" = yes; then
16951
16952$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16953
16954fi
16955
Neil Schemenauer5741c452019-02-08 10:48:46 -080016956# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16957# shm_* may only be available if linking against librt
16958save_LIBS="$LIBS"
16959save_includes_default="$ac_includes_default"
16960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16961$as_echo_n "checking for library containing shm_open... " >&6; }
16962if ${ac_cv_search_shm_open+:} false; then :
16963 $as_echo_n "(cached) " >&6
16964else
16965 ac_func_search_save_LIBS=$LIBS
16966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16967/* end confdefs.h. */
16968
16969/* Override any GCC internal prototype to avoid an error.
16970 Use char because int might match the return type of a GCC
16971 builtin and then its argument prototype would still apply. */
16972#ifdef __cplusplus
16973extern "C"
16974#endif
16975char shm_open ();
16976int
16977main ()
16978{
16979return shm_open ();
16980 ;
16981 return 0;
16982}
16983_ACEOF
16984for ac_lib in '' rt; do
16985 if test -z "$ac_lib"; then
16986 ac_res="none required"
16987 else
16988 ac_res=-l$ac_lib
16989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16990 fi
16991 if ac_fn_c_try_link "$LINENO"; then :
16992 ac_cv_search_shm_open=$ac_res
16993fi
16994rm -f core conftest.err conftest.$ac_objext \
16995 conftest$ac_exeext
16996 if ${ac_cv_search_shm_open+:} false; then :
16997 break
16998fi
16999done
17000if ${ac_cv_search_shm_open+:} false; then :
17001
17002else
17003 ac_cv_search_shm_open=no
17004fi
17005rm conftest.$ac_ext
17006LIBS=$ac_func_search_save_LIBS
17007fi
17008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17009$as_echo "$ac_cv_search_shm_open" >&6; }
17010ac_res=$ac_cv_search_shm_open
17011if test "$ac_res" != no; then :
17012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17013
17014fi
17015
17016if test "$ac_cv_search_shm_open" = "-lrt"; then
17017
17018$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17019
17020fi
17021for ac_header in sys/mman.h
17022do :
17023 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17024if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17025 cat >>confdefs.h <<_ACEOF
17026#define HAVE_SYS_MMAN_H 1
17027_ACEOF
17028
17029fi
17030
17031done
17032
17033# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17034ac_includes_default="\
17035${ac_includes_default}
17036#ifndef __cplusplus
17037# ifdef HAVE_SYS_MMAN_H
17038# include <sys/mman.h>
17039# endif
17040#endif
17041"
17042for ac_func in shm_open shm_unlink
17043do :
17044 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17045ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17046if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17047 cat >>confdefs.h <<_ACEOF
17048#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17049_ACEOF
17050
17051fi
17052done
17053
17054# we don't want to link with librt always, restore LIBS
17055LIBS="$save_LIBS"
17056ac_includes_default="$save_includes_default"
17057
Christian Heimesff5be6e2018-01-20 13:19:21 +010017058# Check for usable OpenSSL
17059
17060 found=false
17061
17062# Check whether --with-openssl was given.
17063if test "${with_openssl+set}" = set; then :
17064 withval=$with_openssl;
17065 case "$withval" in
17066 "" | y | ye | yes | n | no)
17067 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17068 ;;
17069 *) ssldirs="$withval"
17070 ;;
17071 esac
17072
17073else
17074
17075 # if pkg-config is installed and openssl has installed a .pc file,
17076 # then use that information and don't search ssldirs
17077 if test -n "$ac_tool_prefix"; then
17078 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17079set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17081$as_echo_n "checking for $ac_word... " >&6; }
17082if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17083 $as_echo_n "(cached) " >&6
17084else
17085 if test -n "$PKG_CONFIG"; then
17086 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17087else
17088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17089for as_dir in $PATH
17090do
17091 IFS=$as_save_IFS
17092 test -z "$as_dir" && as_dir=.
17093 for ac_exec_ext in '' $ac_executable_extensions; do
17094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17095 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17097 break 2
17098 fi
17099done
17100 done
17101IFS=$as_save_IFS
17102
17103fi
17104fi
17105PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17106if test -n "$PKG_CONFIG"; then
17107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17108$as_echo "$PKG_CONFIG" >&6; }
17109else
17110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17111$as_echo "no" >&6; }
17112fi
17113
17114
17115fi
17116if test -z "$ac_cv_prog_PKG_CONFIG"; then
17117 ac_ct_PKG_CONFIG=$PKG_CONFIG
17118 # Extract the first word of "pkg-config", so it can be a program name with args.
17119set dummy pkg-config; ac_word=$2
17120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17121$as_echo_n "checking for $ac_word... " >&6; }
17122if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17123 $as_echo_n "(cached) " >&6
17124else
17125 if test -n "$ac_ct_PKG_CONFIG"; then
17126 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17127else
17128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17129for as_dir in $PATH
17130do
17131 IFS=$as_save_IFS
17132 test -z "$as_dir" && as_dir=.
17133 for ac_exec_ext in '' $ac_executable_extensions; do
17134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17135 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17137 break 2
17138 fi
17139done
17140 done
17141IFS=$as_save_IFS
17142
17143fi
17144fi
17145ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17146if test -n "$ac_ct_PKG_CONFIG"; then
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17148$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17149else
17150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17151$as_echo "no" >&6; }
17152fi
17153
17154 if test "x$ac_ct_PKG_CONFIG" = x; then
17155 PKG_CONFIG=""
17156 else
17157 case $cross_compiling:$ac_tool_warned in
17158yes:)
17159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17161ac_tool_warned=yes ;;
17162esac
17163 PKG_CONFIG=$ac_ct_PKG_CONFIG
17164 fi
17165else
17166 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17167fi
17168
17169 if test x"$PKG_CONFIG" != x""; then
17170 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17171 if test $? = 0; then
17172 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17173 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17174 found=true
17175 fi
17176 fi
17177
17178 # no such luck; use some default ssldirs
17179 if ! $found; then
17180 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17181 fi
17182
17183
17184fi
17185
17186
17187
17188 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17189 # an 'openssl' subdirectory
17190
17191 if ! $found; then
17192 OPENSSL_INCLUDES=
17193 for ssldir in $ssldirs; do
17194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17195$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17196 if test -f "$ssldir/include/openssl/ssl.h"; then
17197 OPENSSL_INCLUDES="-I$ssldir/include"
17198 OPENSSL_LDFLAGS="-L$ssldir/lib"
17199 OPENSSL_LIBS="-lssl -lcrypto"
17200 found=true
17201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17202$as_echo "yes" >&6; }
17203 break
17204 else
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17206$as_echo "no" >&6; }
17207 fi
17208 done
17209
17210 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17211 # it will just work!
17212 fi
17213
17214 # try the preprocessor and linker with our new flags,
17215 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17216
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17218$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17219 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17220 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17221
17222 save_LIBS="$LIBS"
17223 save_LDFLAGS="$LDFLAGS"
17224 save_CPPFLAGS="$CPPFLAGS"
17225 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17226 LIBS="$OPENSSL_LIBS $LIBS"
17227 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17229/* end confdefs.h. */
17230#include <openssl/ssl.h>
17231int
17232main ()
17233{
17234SSL_new(NULL)
17235 ;
17236 return 0;
17237}
17238_ACEOF
17239if ac_fn_c_try_link "$LINENO"; then :
17240
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17242$as_echo "yes" >&6; }
17243 have_openssl=yes
17244
17245else
17246
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17248$as_echo "no" >&6; }
17249 have_openssl=no
17250
17251fi
17252rm -f core conftest.err conftest.$ac_objext \
17253 conftest$ac_exeext conftest.$ac_ext
17254 CPPFLAGS="$save_CPPFLAGS"
17255 LDFLAGS="$save_LDFLAGS"
17256 LIBS="$save_LIBS"
17257
17258
17259
17260
17261
17262
17263if test "$have_openssl" = yes; then
17264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17265$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17266
17267 save_LIBS="$LIBS"
17268 save_LDFLAGS="$LDFLAGS"
17269 save_CPPFLAGS="$CPPFLAGS"
17270 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17271 LIBS="$OPENSSL_LIBS $LIBS"
17272 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17273
17274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17275/* end confdefs.h. */
17276
17277 #include <openssl/x509_vfy.h>
17278
17279int
17280main ()
17281{
17282
17283 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17284 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17285 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17286 X509_VERIFY_PARAM_set_hostflags(p, 0);
17287
17288 ;
17289 return 0;
17290}
17291
17292_ACEOF
17293if ac_fn_c_try_link "$LINENO"; then :
17294
17295 ac_cv_has_x509_verify_param_set1_host=yes
17296
17297else
17298
17299 ac_cv_has_x509_verify_param_set1_host=no
17300
17301fi
17302rm -f core conftest.err conftest.$ac_objext \
17303 conftest$ac_exeext conftest.$ac_ext
17304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17305$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17306 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17307
17308$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17309
17310 fi
17311
17312 CPPFLAGS="$save_CPPFLAGS"
17313 LDFLAGS="$save_LDFLAGS"
17314 LIBS="$save_LIBS"
17315fi
17316
Christian Heimes892d66e2018-01-29 14:10:18 +010017317# ssl module default cipher suite string
17318
17319
17320
17321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17322$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17323
17324# Check whether --with-ssl-default-suites was given.
17325if test "${with_ssl_default_suites+set}" = set; then :
17326 withval=$with_ssl_default_suites;
17327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17328$as_echo "$withval" >&6; }
17329case "$withval" in
17330 python)
17331 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17332
17333 ;;
17334 openssl)
17335 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17336
17337 ;;
17338 *)
17339 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17340
17341 cat >>confdefs.h <<_ACEOF
17342#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17343_ACEOF
17344
17345 ;;
17346esac
17347
17348else
17349
17350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17351$as_echo "python" >&6; }
17352$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17353
17354
17355fi
17356
17357
17358
Guido van Rossum627b2d71993-12-24 10:39:16 +000017359# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017360ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017361
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017362ac_config_files="$ac_config_files Modules/ld_so_aix"
17363
Martin v. Löwis11437992002-04-12 09:54:03 +000017364cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017365# This file is a shell script that caches the results of configure
17366# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017367# scripts and configure runs, see configure's option --config-cache.
17368# It is not useful on other systems. If it contains results you don't
17369# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017370#
Martin v. Löwis11437992002-04-12 09:54:03 +000017371# config.status only pays attention to the cache file if you give it
17372# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017373#
Skip Montanaro6dead952003-09-25 14:50:04 +000017374# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017375# loading this file, other *unset* `ac_cv_foo' will be assigned the
17376# following values.
17377
17378_ACEOF
17379
Guido van Rossumf78abae1997-01-21 22:02:36 +000017380# The following way of writing the cache mishandles newlines in values,
17381# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017383# Ultrix sh set writes to stderr and can't be redirected directly,
17384# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385(
17386 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17387 eval ac_val=\$$ac_var
17388 case $ac_val in #(
17389 *${as_nl}*)
17390 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17392$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 esac
17394 case $ac_var in #(
17395 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17397 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 esac ;;
17399 esac
17400 done
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17404 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017405 # `set' does not quote correctly, so add quotes: double-quote
17406 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017407 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017408 "s/'/'\\\\''/g;
17409 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017411 *)
17412 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 esac |
17416 sort
17417) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17423 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17425 :end' >>confcache
17426if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17427 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017428 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17430$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017431 if test ! -f "$cache_file" || test -h "$cache_file"; then
17432 cat confcache >"$cache_file"
17433 else
17434 case $cache_file in #(
17435 */* | ?:*)
17436 mv -f confcache "$cache_file"$$ &&
17437 mv -f "$cache_file"$$ "$cache_file" ;; #(
17438 *)
17439 mv -f confcache "$cache_file" ;;
17440 esac
17441 fi
17442 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017443 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17445$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017446 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017447fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017448rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017450test "x$prefix" = xNONE && prefix=$ac_default_prefix
17451# Let make expand exec_prefix.
17452test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017453
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017454DEFS=-DHAVE_CONFIG_H
17455
Skip Montanaro6dead952003-09-25 14:50:04 +000017456ac_libobjs=
17457ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017458U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017459for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17460 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17464 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017465 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17466 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017467done
17468LIBOBJS=$ac_libobjs
17469
17470LTLIBOBJS=$ac_ltlibobjs
17471
17472
Martin v. Löwis11437992002-04-12 09:54:03 +000017473
Matthias Kloseb9621712010-04-24 17:59:49 +000017474
Victor Stinnere0be4232011-10-25 13:06:09 +020017475: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017476ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017477ac_clean_files_save=$ac_clean_files
17478ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017479{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17480$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17481as_write_fail=0
17482cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483#! $SHELL
17484# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017485# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017486# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017487# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017488
Martin v. Löwis11437992002-04-12 09:54:03 +000017489debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017490ac_cs_recheck=false
17491ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017492
Matthias Kloseb9621712010-04-24 17:59:49 +000017493SHELL=\${CONFIG_SHELL-$SHELL}
17494export SHELL
17495_ASEOF
17496cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17497## -------------------- ##
17498## M4sh Initialization. ##
17499## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501# Be more Bourne compatible
17502DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017503if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017504 emulate sh
17505 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017506 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017507 # is contrary to our usage. Disable this feature.
17508 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017510else
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 case `(set -o) 2>/dev/null` in #(
17512 *posix*) :
17513 set -o posix ;; #(
17514 *) :
17515 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017517fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017518
17519
Matthias Kloseb9621712010-04-24 17:59:49 +000017520as_nl='
17521'
17522export as_nl
17523# Printing a long string crashes Solaris 7 /usr/bin/printf.
17524as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17525as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17526as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17527# Prefer a ksh shell builtin over an external printf program on Solaris,
17528# but without wasting forks for bash or zsh.
17529if test -z "$BASH_VERSION$ZSH_VERSION" \
17530 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17531 as_echo='print -r --'
17532 as_echo_n='print -rn --'
17533elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17534 as_echo='printf %s\n'
17535 as_echo_n='printf %s'
17536else
17537 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17538 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17539 as_echo_n='/usr/ucb/echo -n'
17540 else
17541 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17542 as_echo_n_body='eval
17543 arg=$1;
17544 case $arg in #(
17545 *"$as_nl"*)
17546 expr "X$arg" : "X\\(.*\\)$as_nl";
17547 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17548 esac;
17549 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17550 '
17551 export as_echo_n_body
17552 as_echo_n='sh -c $as_echo_n_body as_echo'
17553 fi
17554 export as_echo_body
17555 as_echo='sh -c $as_echo_body as_echo'
17556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017557
17558# The user is always right.
17559if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017560 PATH_SEPARATOR=:
17561 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17562 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17563 PATH_SEPARATOR=';'
17564 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567
17568# IFS
17569# We need space, tab and new line, in precisely that order. Quoting is
17570# there to prevent editors from complaining about space-tab.
17571# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17572# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573IFS=" "" $as_nl"
17574
17575# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017576as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017577case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 *[\\/]* ) as_myself=$0 ;;
17579 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017580for as_dir in $PATH
17581do
17582 IFS=$as_save_IFS
17583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017584 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17585 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588 ;;
17589esac
17590# We did not find ourselves, most probably we were run as `sh COMMAND'
17591# in which case we are not to be found in the path.
17592if test "x$as_myself" = x; then
17593 as_myself=$0
17594fi
17595if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17597 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598fi
17599
Matthias Kloseb9621712010-04-24 17:59:49 +000017600# Unset variables that we do not need and which cause bugs (e.g. in
17601# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17602# suppresses any "Segmentation fault" message there. '((' could
17603# trigger a bug in pdksh 5.2.14.
17604for as_var in BASH_ENV ENV MAIL MAILPATH
17605do eval test x\${$as_var+set} = xset \
17606 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607done
17608PS1='$ '
17609PS2='> '
17610PS4='+ '
17611
17612# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017613LC_ALL=C
17614export LC_ALL
17615LANGUAGE=C
17616export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617
Matthias Kloseb9621712010-04-24 17:59:49 +000017618# CDPATH.
17619(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17620
17621
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017622# as_fn_error STATUS ERROR [LINENO LOG_FD]
17623# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017624# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17625# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017627as_fn_error ()
17628{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017629 as_status=$1; test $as_status -eq 0 && as_status=1
17630 if test "$4"; then
17631 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17632 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017634 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017635 as_fn_exit $as_status
17636} # as_fn_error
17637
17638
17639# as_fn_set_status STATUS
17640# -----------------------
17641# Set $? to STATUS, without forking.
17642as_fn_set_status ()
17643{
17644 return $1
17645} # as_fn_set_status
17646
17647# as_fn_exit STATUS
17648# -----------------
17649# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17650as_fn_exit ()
17651{
17652 set +e
17653 as_fn_set_status $1
17654 exit $1
17655} # as_fn_exit
17656
17657# as_fn_unset VAR
17658# ---------------
17659# Portably unset VAR.
17660as_fn_unset ()
17661{
17662 { eval $1=; unset $1;}
17663}
17664as_unset=as_fn_unset
17665# as_fn_append VAR VALUE
17666# ----------------------
17667# Append the text in VALUE to the end of the definition contained in VAR. Take
17668# advantage of any shell optimizations that allow amortized linear growth over
17669# repeated appends, instead of the typical quadratic growth present in naive
17670# implementations.
17671if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17672 eval 'as_fn_append ()
17673 {
17674 eval $1+=\$2
17675 }'
17676else
17677 as_fn_append ()
17678 {
17679 eval $1=\$$1\$2
17680 }
17681fi # as_fn_append
17682
17683# as_fn_arith ARG...
17684# ------------------
17685# Perform arithmetic evaluation on the ARGs, and store the result in the
17686# global $as_val. Take advantage of shells that can avoid forks. The arguments
17687# must be portable across $(()) and expr.
17688if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17689 eval 'as_fn_arith ()
17690 {
17691 as_val=$(( $* ))
17692 }'
17693else
17694 as_fn_arith ()
17695 {
17696 as_val=`expr "$@" || test $? -eq 1`
17697 }
17698fi # as_fn_arith
17699
17700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701if expr a : '\(a\)' >/dev/null 2>&1 &&
17702 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17703 as_expr=expr
17704else
17705 as_expr=false
17706fi
17707
17708if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17709 as_basename=basename
17710else
17711 as_basename=false
17712fi
17713
Matthias Kloseb9621712010-04-24 17:59:49 +000017714if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17715 as_dirname=dirname
17716else
17717 as_dirname=false
17718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720as_me=`$as_basename -- "$0" ||
17721$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17722 X"$0" : 'X\(//\)$' \| \
17723 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017724$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 sed '/^.*\/\([^/][^/]*\)\/*$/{
17726 s//\1/
17727 q
17728 }
17729 /^X\/\(\/\/\)$/{
17730 s//\1/
17731 q
17732 }
17733 /^X\/\(\/\).*/{
17734 s//\1/
17735 q
17736 }
17737 s/.*/./; q'`
17738
Matthias Kloseb9621712010-04-24 17:59:49 +000017739# Avoid depending upon Character Ranges.
17740as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17741as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17742as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17743as_cr_digits='0123456789'
17744as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745
17746ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017747case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017749 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 xy) ECHO_C='\c';;
17752 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17753 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 esac;;
17755*)
17756 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017758
Martin v. Löwis11437992002-04-12 09:54:03 +000017759rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760if test -d conf$$.dir; then
17761 rm -f conf$$.dir/conf$$.file
17762else
17763 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017764 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017766if (echo >conf$$.file) 2>/dev/null; then
17767 if ln -s conf$$.file conf$$ 2>/dev/null; then
17768 as_ln_s='ln -s'
17769 # ... but there are two gotchas:
17770 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17771 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017772 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017774 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 elif ln conf$$.file conf$$ 2>/dev/null; then
17776 as_ln_s=ln
17777 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017778 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017780else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017781 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17784rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017785
Matthias Kloseb9621712010-04-24 17:59:49 +000017786
17787# as_fn_mkdir_p
17788# -------------
17789# Create "$as_dir" as a directory, including parents if necessary.
17790as_fn_mkdir_p ()
17791{
17792
17793 case $as_dir in #(
17794 -*) as_dir=./$as_dir;;
17795 esac
17796 test -d "$as_dir" || eval $as_mkdir_p || {
17797 as_dirs=
17798 while :; do
17799 case $as_dir in #(
17800 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17801 *) as_qdir=$as_dir;;
17802 esac
17803 as_dirs="'$as_qdir' $as_dirs"
17804 as_dir=`$as_dirname -- "$as_dir" ||
17805$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17806 X"$as_dir" : 'X\(//\)[^/]' \| \
17807 X"$as_dir" : 'X\(//\)$' \| \
17808 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17809$as_echo X"$as_dir" |
17810 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17811 s//\1/
17812 q
17813 }
17814 /^X\(\/\/\)[^/].*/{
17815 s//\1/
17816 q
17817 }
17818 /^X\(\/\/\)$/{
17819 s//\1/
17820 q
17821 }
17822 /^X\(\/\).*/{
17823 s//\1/
17824 q
17825 }
17826 s/.*/./; q'`
17827 test -d "$as_dir" && break
17828 done
17829 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017830 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017831
17832
17833} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017834if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017835 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017836else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017837 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017838 as_mkdir_p=false
17839fi
17840
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017841
17842# as_fn_executable_p FILE
17843# -----------------------
17844# Test if FILE is an executable regular file.
17845as_fn_executable_p ()
17846{
17847 test -f "$1" && test -x "$1"
17848} # as_fn_executable_p
17849as_test_x='test -x'
17850as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017851
17852# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017853as_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 +000017854
17855# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017856as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
17858
Martin v. Löwis11437992002-04-12 09:54:03 +000017859exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017860## ----------------------------------- ##
17861## Main body of $CONFIG_STATUS script. ##
17862## ----------------------------------- ##
17863_ASEOF
17864test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
Matthias Kloseb9621712010-04-24 17:59:49 +000017866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17867# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017868# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869# values after options handling.
17870ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017871This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017872generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
17874 CONFIG_FILES = $CONFIG_FILES
17875 CONFIG_HEADERS = $CONFIG_HEADERS
17876 CONFIG_LINKS = $CONFIG_LINKS
17877 CONFIG_COMMANDS = $CONFIG_COMMANDS
17878 $ $0 $@
17879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880on `(hostname || uname -n) 2>/dev/null | sed 1q`
17881"
17882
Martin v. Löwis11437992002-04-12 09:54:03 +000017883_ACEOF
17884
Matthias Kloseb9621712010-04-24 17:59:49 +000017885case $ac_config_files in *"
17886"*) set x $ac_config_files; shift; ac_config_files=$*;;
17887esac
17888
17889case $ac_config_headers in *"
17890"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17891esac
17892
17893
17894cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017895# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017896config_files="$ac_config_files"
17897config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017902ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017903\`$as_me' instantiates files and other configuration actions
17904from templates according to the current configuration. Unless the files
17905and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
Matthias Kloseb9621712010-04-24 17:59:49 +000017907Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017908
17909 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017911 --config print configuration, then exit
17912 -q, --quiet, --silent
17913 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 -d, --debug don't remove temporary files
17915 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 --file=FILE[:TEMPLATE]
17917 instantiate the configuration file FILE
17918 --header=FILE[:TEMPLATE]
17919 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017920
17921Configuration files:
17922$config_files
17923
17924Configuration headers:
17925$config_headers
17926
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017927Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17931ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017932ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017933python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017934configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017935 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017937Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017938This config.status script is free software; the Free Software Foundation
17939gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940
17941ac_pwd='$ac_pwd'
17942srcdir='$srcdir'
17943INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017944MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017945test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017946_ACEOF
17947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17949# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017950ac_need_defaults=:
17951while test $# != 0
17952do
17953 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017954 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17956 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 --*=)
17960 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17961 ac_optarg=
17962 ac_shift=:
17963 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017965 ac_option=$1
17966 ac_optarg=$2
17967 ac_shift=shift
17968 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 esac
17970
Skip Montanaro6dead952003-09-25 14:50:04 +000017971 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017973 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17974 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017976 $as_echo "$ac_cs_version"; exit ;;
17977 --config | --confi | --conf | --con | --co | --c )
17978 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 debug=: ;;
17981 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017982 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017983 case $ac_optarg in
17984 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017985 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017986 esac
17987 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 ac_need_defaults=false;;
17989 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017990 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017991 case $ac_optarg in
17992 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17993 esac
17994 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017996 --he | --h)
17997 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017998 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017999Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018001 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018002 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18003 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18004 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
18006 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018007 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018008Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018009
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
18013 esac
18014 shift
18015done
18016
Skip Montanaro6dead952003-09-25 14:50:04 +000018017ac_configure_extra_args=
18018
18019if $ac_cs_silent; then
18020 exec 6>/dev/null
18021 ac_configure_extra_args="$ac_configure_extra_args --silent"
18022fi
18023
18024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018026if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018027 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018028 shift
18029 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18030 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018032 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018033fi
18034
Martin v. Löwis11437992002-04-12 09:54:03 +000018035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018036cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037exec 5>>config.log
18038{
18039 echo
18040 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18041## Running $as_me. ##
18042_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018043 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018049
Matthias Kloseb9621712010-04-24 17:59:49 +000018050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051
18052# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018053for ac_config_target in $ac_config_targets
18054do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 case $ac_config_target in
18056 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18057 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18058 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018059 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18060 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018062 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018063 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018064 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018065 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066
Victor Stinnere0be4232011-10-25 13:06:09 +020018067 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018068 esac
18069done
18070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071
Martin v. Löwis11437992002-04-12 09:54:03 +000018072# If the user did not use the arguments to specify the items to instantiate,
18073# then the envvar interface is used. Set only those that are not.
18074# We use the long form for the default assignment because of an extremely
18075# bizarre bug on SunOS 4.1.3.
18076if $ac_need_defaults; then
18077 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18078 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18079fi
18080
Skip Montanaro6dead952003-09-25 14:50:04 +000018081# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018083# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084# Hook for its removal unless debugging.
18085# Note that there is a small window in which the directory will not be cleaned:
18086# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018087$debug ||
18088{
Victor Stinnere0be4232011-10-25 13:06:09 +020018089 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018090 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018091 : "${ac_tmp:=$tmp}"
18092 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018095}
Martin v. Löwis11437992002-04-12 09:54:03 +000018096# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018097
Martin v. Löwis11437992002-04-12 09:54:03 +000018098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018100 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018101} ||
18102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103 tmp=./conf$$-$RANDOM
18104 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018105} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018106ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018107
Matthias Kloseb9621712010-04-24 17:59:49 +000018108# Set up the scripts for CONFIG_FILES section.
18109# No need to generate them if there are no CONFIG_FILES.
18110# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
Matthias Kloseb9621712010-04-24 17:59:49 +000018113
18114ac_cr=`echo X | tr X '\015'`
18115# On cygwin, bash can eat \r inside `` if the user requested igncr.
18116# But we know of no other shell where ac_cr would be empty at this
18117# point, so we can use a bashism as a fallback.
18118if test "x$ac_cr" = x; then
18119 eval ac_cr=\$\'\\r\'
18120fi
18121ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18122if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018123 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018124else
18125 ac_cs_awk_cr=$ac_cr
18126fi
18127
Victor Stinnere0be4232011-10-25 13:06:09 +020018128echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018129_ACEOF
18130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131
Matthias Kloseb9621712010-04-24 17:59:49 +000018132{
18133 echo "cat >conf$$subs.awk <<_ACEOF" &&
18134 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18135 echo "_ACEOF"
18136} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018137 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18138ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139ac_delim='%!_!# '
18140for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018141 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018142 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143
Matthias Kloseb9621712010-04-24 17:59:49 +000018144 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18145 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146 break
18147 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018148 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149 else
18150 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152done
Matthias Kloseb9621712010-04-24 17:59:49 +000018153rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154
Matthias Kloseb9621712010-04-24 17:59:49 +000018155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018156cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018158sed -n '
18159h
18160s/^/S["/; s/!.*/"]=/
18161p
18162g
18163s/^[^!]*!//
18164:repl
18165t repl
18166s/'"$ac_delim"'$//
18167t delim
18168:nl
18169h
18170s/\(.\{148\}\)..*/\1/
18171t more1
18172s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18173p
18174n
18175b repl
18176:more1
18177s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18178p
18179g
18180s/.\{148\}//
18181t nl
18182:delim
18183h
18184s/\(.\{148\}\)..*/\1/
18185t more2
18186s/["\\]/\\&/g; s/^/"/; s/$/"/
18187p
18188b
18189:more2
18190s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18191p
18192g
18193s/.\{148\}//
18194t delim
18195' <conf$$subs.awk | sed '
18196/^[^""]/{
18197 N
18198 s/\n//
18199}
18200' >>$CONFIG_STATUS || ac_write_fail=1
18201rm -f conf$$subs.awk
18202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18203_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018204cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 for (key in S) S_is_set[key] = 1
18206 FS = ""
18207
18208}
18209{
18210 line = $ 0
18211 nfields = split(line, field, "@")
18212 substed = 0
18213 len = length(field[1])
18214 for (i = 2; i < nfields; i++) {
18215 key = field[i]
18216 keylen = length(key)
18217 if (S_is_set[key]) {
18218 value = S[key]
18219 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18220 len += length(value) + length(field[++i])
18221 substed = 1
18222 } else
18223 len += 1 + keylen
18224 }
18225
18226 print line
18227}
18228
18229_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18232if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18233 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18234else
18235 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018236fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018237 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018238_ACEOF
18239
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018240# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18241# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242# trailing colons and then remove the whole line if VPATH becomes empty
18243# (actually we leave an empty line to preserve line numbers).
18244if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018245 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18246h
18247s///
18248s/^/:/
18249s/[ ]*$/:/
18250s/:\$(srcdir):/:/g
18251s/:\${srcdir}:/:/g
18252s/:@srcdir@:/:/g
18253s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018255x
18256s/\(=[ ]*\).*/\1/
18257G
18258s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259s/^[^=]*=[ ]*$//
18260}'
18261fi
18262
Matthias Kloseb9621712010-04-24 17:59:49 +000018263cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018264fi # test -n "$CONFIG_FILES"
18265
Matthias Kloseb9621712010-04-24 17:59:49 +000018266# Set up the scripts for CONFIG_HEADERS section.
18267# No need to generate them if there are no CONFIG_HEADERS.
18268# This happens for instance with `./config.status Makefile'.
18269if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018270cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018271BEGIN {
18272_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273
Matthias Kloseb9621712010-04-24 17:59:49 +000018274# Transform confdefs.h into an awk script `defines.awk', embedded as
18275# here-document in config.status, that substitutes the proper values into
18276# config.h.in to produce config.h.
18277
18278# Create a delimiter string that does not exist in confdefs.h, to ease
18279# handling of long lines.
18280ac_delim='%!_!# '
18281for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018282 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18283 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018284 break
18285 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018286 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018287 else
18288 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18289 fi
18290done
18291
18292# For the awk script, D is an array of macro values keyed by name,
18293# likewise P contains macro parameters if any. Preserve backslash
18294# newline sequences.
18295
18296ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18297sed -n '
18298s/.\{148\}/&'"$ac_delim"'/g
18299t rset
18300:rset
18301s/^[ ]*#[ ]*define[ ][ ]*/ /
18302t def
18303d
18304:def
18305s/\\$//
18306t bsnl
18307s/["\\]/\\&/g
18308s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18309D["\1"]=" \3"/p
18310s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18311d
18312:bsnl
18313s/["\\]/\\&/g
18314s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18315D["\1"]=" \3\\\\\\n"\\/p
18316t cont
18317s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18318t cont
18319d
18320:cont
18321n
18322s/.\{148\}/&'"$ac_delim"'/g
18323t clear
18324:clear
18325s/\\$//
18326t bsnlc
18327s/["\\]/\\&/g; s/^/"/; s/$/"/p
18328d
18329:bsnlc
18330s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18331b cont
18332' <confdefs.h | sed '
18333s/'"$ac_delim"'/"\\\
18334"/g' >>$CONFIG_STATUS || ac_write_fail=1
18335
18336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18337 for (key in D) D_is_set[key] = 1
18338 FS = ""
18339}
18340/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18341 line = \$ 0
18342 split(line, arg, " ")
18343 if (arg[1] == "#") {
18344 defundef = arg[2]
18345 mac1 = arg[3]
18346 } else {
18347 defundef = substr(arg[1], 2)
18348 mac1 = arg[2]
18349 }
18350 split(mac1, mac2, "(") #)
18351 macro = mac2[1]
18352 prefix = substr(line, 1, index(line, defundef) - 1)
18353 if (D_is_set[macro]) {
18354 # Preserve the white space surrounding the "#".
18355 print prefix "define", macro P[macro] D[macro]
18356 next
18357 } else {
18358 # Replace #undef with comments. This is necessary, for example,
18359 # in the case of _POSIX_SOURCE, which is predefined and required
18360 # on some systems where configure will not decide to define it.
18361 if (defundef == "undef") {
18362 print "/*", prefix defundef, macro, "*/"
18363 next
18364 }
18365 }
18366}
18367{ print }
18368_ACAWK
18369_ACEOF
18370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018371 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018372fi # test -n "$CONFIG_HEADERS"
18373
18374
18375eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18376shift
18377for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378do
18379 case $ac_tag in
18380 :[FHLC]) ac_mode=$ac_tag; continue;;
18381 esac
18382 case $ac_mode$ac_tag in
18383 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018384 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 :[FH]-) ac_tag=-:-;;
18386 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18387 esac
18388 ac_save_IFS=$IFS
18389 IFS=:
18390 set x $ac_tag
18391 IFS=$ac_save_IFS
18392 shift
18393 ac_file=$1
18394 shift
18395
18396 case $ac_mode in
18397 :L) ac_source=$1;;
18398 :[FH])
18399 ac_file_inputs=
18400 for ac_f
18401 do
18402 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018403 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 *) # Look for the file first in the build tree, then in the source tree
18405 # (if the path is not absolute). The absolute path cannot be DOS-style,
18406 # because $ac_f cannot contain `:'.
18407 test -f "$ac_f" ||
18408 case $ac_f in
18409 [\\/$]*) false;;
18410 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18411 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018412 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018414 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18415 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 done
18417
18418 # Let's still pretend it is `configure' which instantiates (i.e., don't
18419 # use $as_me), people would be surprised to read:
18420 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 configure_input='Generated from '`
18422 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18423 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424 if test x"$ac_file" != x-; then
18425 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018426 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18427$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018429 # Neutralize special characters interpreted by sed in replacement strings.
18430 case $configure_input in #(
18431 *\&* | *\|* | *\\* )
18432 ac_sed_conf_input=`$as_echo "$configure_input" |
18433 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18434 *) ac_sed_conf_input=$configure_input;;
18435 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436
18437 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018438 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18439 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 esac
18441 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 esac
18443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018445$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018446 X"$ac_file" : 'X\(//\)[^/]' \| \
18447 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018449$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18451 s//\1/
18452 q
18453 }
18454 /^X\(\/\/\)[^/].*/{
18455 s//\1/
18456 q
18457 }
18458 /^X\(\/\/\)$/{
18459 s//\1/
18460 q
18461 }
18462 /^X\(\/\).*/{
18463 s//\1/
18464 q
18465 }
18466 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018467 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018468 ac_builddir=.
18469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470case "$ac_dir" in
18471.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18472*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018473 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018474 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018475 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 case $ac_top_builddir_sub in
18477 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18478 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18479 esac ;;
18480esac
18481ac_abs_top_builddir=$ac_pwd
18482ac_abs_builddir=$ac_pwd$ac_dir_suffix
18483# for backward compatibility:
18484ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018485
18486case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018488 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489 ac_top_srcdir=$ac_top_builddir_sub
18490 ac_abs_top_srcdir=$ac_pwd ;;
18491 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018492 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018493 ac_top_srcdir=$srcdir
18494 ac_abs_top_srcdir=$srcdir ;;
18495 *) # Relative name.
18496 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18497 ac_top_srcdir=$ac_top_build_prefix$srcdir
18498 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018499esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018501
Martin v. Löwis11437992002-04-12 09:54:03 +000018502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 case $ac_mode in
18504 :F)
18505 #
18506 # CONFIG_FILE
18507 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018508
18509 case $INSTALL in
18510 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018512 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018513 ac_MKDIR_P=$MKDIR_P
18514 case $MKDIR_P in
18515 [\\/$]* | ?:[\\/]* ) ;;
18516 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18517 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018518_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519
Matthias Kloseb9621712010-04-24 17:59:49 +000018520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521# If the template does not know about datarootdir, expand it.
18522# FIXME: This hack should be removed a few years after 2.60.
18523ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018524ac_sed_dataroot='
18525/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018526 p
18527 q
18528}
18529/@datadir@/p
18530/@docdir@/p
18531/@infodir@/p
18532/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018533/@mandir@/p'
18534case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535*datarootdir*) ac_datarootdir_seen=yes;;
18536*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18538$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541 ac_datarootdir_hack='
18542 s&@datadir@&$datadir&g
18543 s&@docdir@&$docdir&g
18544 s&@infodir@&$infodir&g
18545 s&@localedir@&$localedir&g
18546 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018547 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548esac
18549_ACEOF
18550
18551# Neutralize VPATH when `$srcdir' = `.'.
18552# Shell code in configure.ac might set extrasub.
18553# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18555ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018556$extrasub
18557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018559:t
18560/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018561s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018563s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564s&@srcdir@&$ac_srcdir&;t t
18565s&@abs_srcdir@&$ac_abs_srcdir&;t t
18566s&@top_srcdir@&$ac_top_srcdir&;t t
18567s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18568s&@builddir@&$ac_builddir&;t t
18569s&@abs_builddir@&$ac_abs_builddir&;t t
18570s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18571s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018572s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018574"
Victor Stinnere0be4232011-10-25 13:06:09 +020018575eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18576 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018579 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18580 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18581 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018583which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018584$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018585which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018586
Victor Stinnere0be4232011-10-25 13:06:09 +020018587 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018589 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18590 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018591 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018592 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593 ;;
18594 :H)
18595 #
18596 # CONFIG_HEADER
18597 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018598 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018599 {
18600 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018601 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18602 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018603 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018604 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018605 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18606$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018607 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018608 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018609 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018610 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 fi
18612 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018613 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018614 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018615 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619
18620 esac
18621
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018622
18623 case $ac_file$ac_mode in
18624 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18625
18626 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627done # for ac_tag
18628
Guido van Rossum627b2d71993-12-24 10:39:16 +000018629
Matthias Kloseb9621712010-04-24 17:59:49 +000018630as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018631_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018632ac_clean_files=$ac_clean_files_save
18633
Matthias Kloseb9621712010-04-24 17:59:49 +000018634test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018635 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018636
Martin v. Löwis11437992002-04-12 09:54:03 +000018637
18638# configure is writing to config.log, and then calls config.status.
18639# config.status does its own redirection, appending to config.log.
18640# Unfortunately, on DOS this fails, as config.log is still kept open
18641# by configure, so config.status won't be able to write to it; its
18642# output is simply discarded. So we exec the FD to /dev/null,
18643# effectively closing config.log, so it can be properly (re)opened and
18644# appended to by config.status. When coming back to configure, we
18645# need to make the FD available again.
18646if test "$no_create" != yes; then
18647 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018648 ac_config_status_args=
18649 test "$silent" = yes &&
18650 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018651 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018652 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 exec 5>>config.log
18654 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18655 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018656 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018657fi
18658if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18660$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018661fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018662
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018663
Christian Heimes75ed8902013-11-20 01:11:18 +010018664echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018665if test ! -f Modules/Setup.local
18666then
18667 echo "# Edit this file for local setup changes" >Modules/Setup.local
18668fi
18669
Christian Heimes75ed8902013-11-20 01:11:18 +010018670echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018671$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018672 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018673 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018674mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018675
18676if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18677 echo "" >&6
18678 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018679 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 +000018680 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018681 echo "" >&6
18682 echo "" >&6
18683fi
18684