blob: 4b98fc6914e208365ee2862dc24a791d06eb3136 [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"
Jack Jansene578a632001-08-15 01:27:14 +00009527 if test "$enable_framework"
9528 then
Jack Jansenda49e192005-01-07 13:08:22 +00009529 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009530 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009531 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009532 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009533 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009534 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009535 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009536 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9537 then
9538 LINKFORSHARED="-Wl,--export-dynamic"
9539 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009540 SunOS/5*) case $CC in
9541 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009542 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009543 then
9544 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009545 fi;;
9546 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009547 CYGWIN*)
9548 if test $enable_shared = "no"
9549 then
9550 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9551 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009552 QNX*)
9553 # -Wl,-E causes the symbols to be added to the dynamic
9554 # symbol table so that they can be found when a module
9555 # is loaded. -N 2048K causes the stack size to be set
9556 # to 2048 kilobytes so that the stack doesn't overflow
9557 # when running test_compile.py.
9558 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009559 VxWorks*)
9560 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009561 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9564$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565
Michael W. Hudson54241132001-12-07 15:38:26 +00009566
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009567
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9569$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009570if test ! "$LIBRARY" = "$LDLIBRARY"
9571then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009572 case $ac_sys_system in
9573 CYGWIN*)
9574 # Cygwin needs CCSHARED when building extension DLLs
9575 # but not when building the interpreter DLL.
9576 CFLAGSFORSHARED='';;
9577 *)
9578 CFLAGSFORSHARED='$(CCSHARED)'
9579 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9582$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009583
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009584# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9585# library (with --enable-shared).
9586# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009587# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9588# if it is not required, since it creates a dependency of the shared library
9589# to LIBS. This, in turn, means that applications linking the shared libpython
9590# don't need to link LIBS explicitly. The default should be only changed
9591# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009592
Matthias Kloseb9621712010-04-24 17:59:49 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9594$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009595case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009597 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9600$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009601
9602
Guido van Rossum627b2d71993-12-24 10:39:16 +00009603# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9605$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009606if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009607 $as_echo_n "(cached) " >&6
9608else
9609 ac_check_lib_save_LIBS=$LIBS
9610LIBS="-lsendfile $LIBS"
9611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9612/* end confdefs.h. */
9613
9614/* Override any GCC internal prototype to avoid an error.
9615 Use char because int might match the return type of a GCC
9616 builtin and then its argument prototype would still apply. */
9617#ifdef __cplusplus
9618extern "C"
9619#endif
9620char sendfile ();
9621int
9622main ()
9623{
9624return sendfile ();
9625 ;
9626 return 0;
9627}
9628_ACEOF
9629if ac_fn_c_try_link "$LINENO"; then :
9630 ac_cv_lib_sendfile_sendfile=yes
9631else
9632 ac_cv_lib_sendfile_sendfile=no
9633fi
9634rm -f core conftest.err conftest.$ac_objext \
9635 conftest$ac_exeext conftest.$ac_ext
9636LIBS=$ac_check_lib_save_LIBS
9637fi
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9639$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009641 cat >>confdefs.h <<_ACEOF
9642#define HAVE_LIBSENDFILE 1
9643_ACEOF
9644
9645 LIBS="-lsendfile $LIBS"
9646
9647fi
9648
Matthias Kloseb9621712010-04-24 17:59:49 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9650$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009651if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009653else
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009655LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659/* Override any GCC internal prototype to avoid an error.
9660 Use char because int might match the return type of a GCC
9661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009662#ifdef __cplusplus
9663extern "C"
9664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009665char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009666int
9667main ()
9668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ;
9671 return 0;
9672}
9673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009676else
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009679rm -f core conftest.err conftest.$ac_objext \
9680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9684$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 cat >>confdefs.h <<_ACEOF
9687#define HAVE_LIBDL 1
9688_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009689
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009690 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009691
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692fi
9693 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9695$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009696if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704/* Override any GCC internal prototype to avoid an error.
9705 Use char because int might match the return type of a GCC
9706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707#ifdef __cplusplus
9708extern "C"
9709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009710char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ;
9716 return 0;
9717}
9718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009724rm -f core conftest.err conftest.$ac_objext \
9725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9729$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 cat >>confdefs.h <<_ACEOF
9732#define HAVE_LIBDLD 1
9733_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009737fi
9738 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009739
Michael Felt0d3ccb42017-12-30 22:39:20 +01009740# checks for uuid.h location
9741for ac_header in uuid/uuid.h uuid.h
9742do :
9743 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9744ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9745if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9746 cat >>confdefs.h <<_ACEOF
9747#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9748_ACEOF
9749
9750fi
9751
9752done
9753
9754
Berker Peksag9a10ff42017-11-08 23:09:16 +03009755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9756$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9758/* end confdefs.h. */
9759#include <uuid/uuid.h>
9760int
9761main ()
9762{
9763
9764#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009765void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009766#endif
9767
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772if ac_fn_c_try_compile "$LINENO"; then :
9773
9774$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9775
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9777$as_echo "yes" >&6; }
9778else
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781
9782fi
9783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9784
Michael Felt0d3ccb42017-12-30 22:39:20 +01009785# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009786# FreeBSD and OpenBSD provides support as well
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9788$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9790/* end confdefs.h. */
9791#include <uuid.h>
9792int
9793main ()
9794{
9795
9796#ifndef uuid_create
9797void *x = uuid_create
9798#endif
9799
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804if ac_fn_c_try_compile "$LINENO"; then :
9805
9806$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9807
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9809$as_echo "yes" >&6; }
9810else
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
9813
9814fi
9815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9816
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009817# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9818# stream in big-endian byte-order
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9820$as_echo_n "checking for uuid_enc_be... " >&6; }
9821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9822/* end confdefs.h. */
9823#include <uuid.h>
9824int
9825main ()
9826{
9827
9828#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009829void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009830#endif
9831
9832 ;
9833 return 0;
9834}
9835_ACEOF
9836if ac_fn_c_try_compile "$LINENO"; then :
9837
9838$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9839
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9841$as_echo "yes" >&6; }
9842else
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9844$as_echo "no" >&6; }
9845
9846fi
9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9848
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009849# 'Real Time' functions on Solaris
9850# posix4 on Solaris 2.6
9851# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009853$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009854if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009856else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009857 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861/* Override any GCC internal prototype to avoid an error.
9862 Use char because int might match the return type of a GCC
9863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864#ifdef __cplusplus
9865extern "C"
9866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009867char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009868int
9869main ()
9870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ;
9873 return 0;
9874}
9875_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876for ac_lib in '' pthread rt posix4; do
9877 if test -z "$ac_lib"; then
9878 ac_res="none required"
9879 else
9880 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009881 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009886rm -f core conftest.err conftest.$ac_objext \
9887 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009888 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891done
Victor Stinnere0be4232011-10-25 13:06:09 +02009892if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894else
9895 ac_cv_search_sem_init=no
9896fi
9897rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009898LIBS=$ac_func_search_save_LIBS
9899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9901$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009903if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009905
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009906fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009907
Martin v. Löwis519adae2003-09-20 10:47:47 +00009908
Martin v. Löwis19d17342003-06-14 21:03:05 +00009909# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9911$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009912if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009914else
9915 ac_check_lib_save_LIBS=$LIBS
9916LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920/* Override any GCC internal prototype to avoid an error.
9921 Use char because int might match the return type of a GCC
9922 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923#ifdef __cplusplus
9924extern "C"
9925#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009926char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009927int
9928main ()
9929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931 ;
9932 return 0;
9933}
9934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009936 ac_cv_lib_intl_textdomain=yes
9937else
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009940rm -f core conftest.err conftest.$ac_objext \
9941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942LIBS=$ac_check_lib_save_LIBS
9943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9945$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947
Matthias Kloseb9621712010-04-24 17:59:49 +00009948$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949
Brett Cannonc6d936e2009-06-07 20:09:53 +00009950 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951fi
9952
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009953
9954# checks for system dependent C++ extensions support
9955case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9957$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009960
Georg Brandl59e87bd2011-02-15 19:48:59 +00009961 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009962int
9963main ()
9964{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009965loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 ;
9967 return 0;
9968}
Matthias Kloseb159a552010-04-25 21:00:44 +00009969
Martin v. Löwis11437992002-04-12 09:54:03 +00009970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009972
Matthias Kloseb159a552010-04-25 21:00:44 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009979else
Matthias Kloseb159a552010-04-25 21:00:44 +00009980
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009983
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009987 *) ;;
9988esac
9989
Christian Heimes985ecdc2013-11-20 11:46:18 +01009990# check for systems that require aligned memory access
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9992$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009993if ${ac_cv_aligned_required+:} false; then :
9994 $as_echo_n "(cached) " >&6
9995else
9996 if test "$cross_compiling" = yes; then :
9997 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009998else
9999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10000/* end confdefs.h. */
10001
10002int main()
10003{
10004 char s[16];
10005 int i, *p1, *p2;
10006 for (i=0; i < 16; i++)
10007 s[i] = i;
10008 p1 = (int*)(s+1);
10009 p2 = (int*)(s+2);
10010 if (*p1 == *p2)
10011 return 1;
10012 return 0;
10013}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010014_ACEOF
10015if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010016 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010017else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010018 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010019fi
10020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10021 conftest.$ac_objext conftest.beam conftest.$ac_ext
10022fi
10023
10024
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010025fi
10026
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10028$as_echo "$ac_cv_aligned_required" >&6; }
10029if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010030
10031$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10032
10033fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010034
10035# str, bytes and memoryview hash algorithm
10036
10037
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10039$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10040
10041# Check whether --with-hash_algorithm was given.
10042if test "${with_hash_algorithm+set}" = set; then :
10043 withval=$with_hash_algorithm;
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10045$as_echo "$withval" >&6; }
10046case "$withval" in
10047 siphash24)
10048 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10049
10050 ;;
10051 fnv)
10052 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10053
10054 ;;
10055 *)
10056 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10057 ;;
10058esac
10059
10060else
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10062$as_echo "default" >&6; }
10063fi
10064
10065
Charles-François Natalid30b0222014-05-08 23:08:51 +010010066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10067$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10068
10069# Check whether --with-address_sanitizer was given.
10070if test "${with_address_sanitizer+set}" = set; then :
10071 withval=$with_address_sanitizer;
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10073$as_echo "$withval" >&6; }
10074BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10075LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010076# ASan works by controlling memory allocation, our own malloc interferes.
10077with_pymalloc="no"
10078
10079else
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10086$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10087
10088# Check whether --with-memory_sanitizer was given.
10089if test "${with_memory_sanitizer+set}" = set; then :
10090 withval=$with_memory_sanitizer;
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10092$as_echo "$withval" >&6; }
10093BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10094LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10095# MSan works by controlling memory allocation, our own malloc interferes.
10096with_pymalloc="no"
10097
10098else
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
10101fi
10102
10103
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10105$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10106
10107# Check whether --with-undefined_behavior_sanitizer was given.
10108if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10109 withval=$with_undefined_behavior_sanitizer;
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10111$as_echo "$withval" >&6; }
10112BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10113LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010114
10115else
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
Guido van Rossum70c7f481998-03-26 18:44:10 +000010121# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10123$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010124if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010126else
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010128LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132/* Override any GCC internal prototype to avoid an error.
10133 Use char because int might match the return type of a GCC
10134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135#ifdef __cplusplus
10136extern "C"
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010139int
10140main ()
10141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ;
10144 return 0;
10145}
10146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152rm -f core conftest.err conftest.$ac_objext \
10153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010154LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10157$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010158if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010160fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010161 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10163$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010164if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010168LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175#ifdef __cplusplus
10176extern "C"
10177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010178char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010179int
10180main ()
10181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ;
10184 return 0;
10185}
10186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10197$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010198if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010199 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010200fi
10201 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10204$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010207if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10210$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010211LIBS="$withval $LIBS"
10212
10213else
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216fi
10217
Guido van Rossum7f43da71994-08-01 12:15:30 +000010218
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010219
10220
10221
10222
10223
10224
Victor Stinner23a683a2019-04-12 21:27:37 +020010225
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010226if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10227 if test -n "$ac_tool_prefix"; then
10228 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10229set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10231$as_echo_n "checking for $ac_word... " >&6; }
10232if ${ac_cv_path_PKG_CONFIG+:} false; then :
10233 $as_echo_n "(cached) " >&6
10234else
10235 case $PKG_CONFIG in
10236 [\\/]* | ?:[\\/]*)
10237 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10238 ;;
10239 *)
10240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10241for as_dir in $PATH
10242do
10243 IFS=$as_save_IFS
10244 test -z "$as_dir" && as_dir=.
10245 for ac_exec_ext in '' $ac_executable_extensions; do
10246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10247 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10249 break 2
10250 fi
10251done
10252 done
10253IFS=$as_save_IFS
10254
10255 ;;
10256esac
10257fi
10258PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10259if test -n "$PKG_CONFIG"; then
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10261$as_echo "$PKG_CONFIG" >&6; }
10262else
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268fi
10269if test -z "$ac_cv_path_PKG_CONFIG"; then
10270 ac_pt_PKG_CONFIG=$PKG_CONFIG
10271 # Extract the first word of "pkg-config", so it can be a program name with args.
10272set dummy pkg-config; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10276 $as_echo_n "(cached) " >&6
10277else
10278 case $ac_pt_PKG_CONFIG in
10279 [\\/]* | ?:[\\/]*)
10280 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10281 ;;
10282 *)
10283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286 IFS=$as_save_IFS
10287 test -z "$as_dir" && as_dir=.
10288 for ac_exec_ext in '' $ac_executable_extensions; do
10289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10290 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292 break 2
10293 fi
10294done
10295 done
10296IFS=$as_save_IFS
10297
10298 ;;
10299esac
10300fi
10301ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10302if test -n "$ac_pt_PKG_CONFIG"; then
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10304$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10305else
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310 if test "x$ac_pt_PKG_CONFIG" = x; then
10311 PKG_CONFIG=""
10312 else
10313 case $cross_compiling:$ac_tool_warned in
10314yes:)
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10317ac_tool_warned=yes ;;
10318esac
10319 PKG_CONFIG=$ac_pt_PKG_CONFIG
10320 fi
10321else
10322 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10323fi
10324
10325fi
10326if test -n "$PKG_CONFIG"; then
10327 _pkg_min_version=0.9.0
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10329$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10330 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10332$as_echo "yes" >&6; }
10333 else
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336 PKG_CONFIG=""
10337 fi
10338fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010339
10340# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10342$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010343
10344# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010345if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010346 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010347else
10348 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010349fi
10350
10351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10353$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010354
10355# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10357$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010358
10359# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010361 withval=$with_system_ffi;
10362fi
10363
10364
Zachary Waref40d4dd2016-09-17 01:25:24 -050010365if test "$ac_sys_system" = "Darwin"
10366then
10367 case "$with_system_ffi" in
10368 "")
10369 with_system_ffi="no"
10370 ;;
10371 yes|no)
10372 ;;
10373 *)
10374 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10375 ;;
10376 esac
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10378$as_echo "$with_system_ffi" >&6; }
10379else
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10381$as_echo "yes" >&6; }
10382 if test "$with_system_ffi" != ""
10383 then
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10385$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10386 fi
10387 with_system_ffi="yes"
10388fi
Zachary Ware935043d2016-09-09 17:01:21 -070010389
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010390if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010391 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10392else
10393 LIBFFI_INCLUDEDIR=""
10394fi
10395
10396
Stefan Krah60187b52012-03-23 19:06:27 +010010397# Check for use of the system libmpdec library
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10399$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10400
10401# Check whether --with-system_libmpdec was given.
10402if test "${with_system_libmpdec+set}" = set; then :
10403 withval=$with_system_libmpdec;
10404else
10405 with_system_libmpdec="no"
10406fi
10407
10408
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10410$as_echo "$with_system_libmpdec" >&6; }
10411
Benjamin Peterson076ed002010-10-31 17:11:02 +000010412# Check for support for loadable sqlite extensions
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10414$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10415# Check whether --enable-loadable-sqlite-extensions was given.
10416if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10417 enableval=$enable_loadable_sqlite_extensions;
10418else
10419 enable_loadable_sqlite_extensions="no"
10420fi
10421
10422
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10424$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10425
Ned Deilyd819b932013-09-06 01:07:05 -070010426# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10427
10428
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10430$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10431
10432# Check whether --with-tcltk-includes was given.
10433if test "${with_tcltk_includes+set}" = set; then :
10434 withval=$with_tcltk_includes;
10435else
10436 with_tcltk_includes="default"
10437fi
10438
10439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10440$as_echo "$with_tcltk_includes" >&6; }
10441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10442$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10443
10444# Check whether --with-tcltk-libs was given.
10445if test "${with_tcltk_libs+set}" = set; then :
10446 withval=$with_tcltk_libs;
10447else
10448 with_tcltk_libs="default"
10449fi
10450
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10452$as_echo "$with_tcltk_libs" >&6; }
10453if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10454then
10455 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10456 then
10457 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10458 fi
10459 TCLTK_INCLUDES=""
10460 TCLTK_LIBS=""
10461else
10462 TCLTK_INCLUDES="$with_tcltk_includes"
10463 TCLTK_LIBS="$with_tcltk_libs"
10464fi
10465
Matthias Klose55708cc2009-04-30 08:06:49 +000010466# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10468$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010469
10470# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010471if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010472 withval=$with_dbmliborder;
10473if test x$with_dbmliborder = xyes
10474then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010475as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010476else
10477 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10478 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10479 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010480 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010481 fi
10482 done
10483fi
10484fi
10485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10487$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489# Templates for things AC_DEFINEd more than once.
10490# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010491
10492
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010493if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010494then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010495 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010497
10498 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010499elif test "$ac_cv_kpthread" = "yes"
10500then
10501 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010502 if test "$ac_cv_cxx_thread" = "yes"; then
10503 CXX="$CXX -Kpthread"
10504 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010505 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010506elif test "$ac_cv_kthread" = "yes"
10507then
10508 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010509 if test "$ac_cv_cxx_thread" = "yes"; then
10510 CXX="$CXX -Kthread"
10511 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010512 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513elif test "$ac_cv_pthread" = "yes"
10514then
10515 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010516 if test "$ac_cv_cxx_thread" = "yes"; then
10517 CXX="$CXX -pthread"
10518 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010519 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010520else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010521 if test ! -z "$withval" -a -d "$withval"
10522 then LDFLAGS="$LDFLAGS -L$withval"
10523 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010524
10525 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010526 # define _POSIX_THREADS in unistd.h. Some apparently don't
10527 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10529$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010531/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010532
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010533#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010534#ifdef _POSIX_THREADS
10535yes
10536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
10538_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010541 unistd_defines_pthreads=yes
10542else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010543 unistd_defines_pthreads=no
10544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010545rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10548$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010549
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010551
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010552 # Just looking for pthread_create in libpthread is not enough:
10553 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10554 # So we really have to include pthread.h, and then link.
10555 _libs=$LIBS
10556 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10558$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010560/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010561
10562#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010563#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010564
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010565void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010566int
10567main ()
10568{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010569
10570pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ;
10572 return 0;
10573}
10574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010576
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10578$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010579 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010580
Guido van Rossum02a1c402000-02-25 19:26:31 +000010581else
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010583 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010585if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010586
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010587 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010588
Guido van Rossumad678af1998-10-02 14:42:15 +000010589else
Guido van Rossumad678af1998-10-02 14:42:15 +000010590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10592$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010593if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595else
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010597LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601/* Override any GCC internal prototype to avoid an error.
10602 Use char because int might match the return type of a GCC
10603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010604#ifdef __cplusplus
10605extern "C"
10606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010607char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010608int
10609main ()
10610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ;
10613 return 0;
10614}
10615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010618else
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010621rm -f core conftest.err conftest.$ac_objext \
10622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010623LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10626$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010627if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010628
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010629 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010630 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010631
Greg Steinadf63d62000-07-05 10:38:09 +000010632else
Greg Steinadf63d62000-07-05 10:38:09 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10635$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010636if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010638else
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010640LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644/* Override any GCC internal prototype to avoid an error.
10645 Use char because int might match the return type of a GCC
10646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010647#ifdef __cplusplus
10648extern "C"
10649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010650char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ;
10656 return 0;
10657}
10658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664rm -f core conftest.err conftest.$ac_objext \
10665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010666LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10669$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010670if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010672 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010673 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010674
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010675else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10678$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010679if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010681else
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010683LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687/* Override any GCC internal prototype to avoid an error.
10688 Use char because int might match the return type of a GCC
10689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690#ifdef __cplusplus
10691extern "C"
10692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010693char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010694int
10695main ()
10696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ;
10699 return 0;
10700}
10701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010704else
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010707rm -f core conftest.err conftest.$ac_objext \
10708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010709LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10712$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010713if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010714
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010715 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010716 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010717
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010718else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10721$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010722if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010724else
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010726LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730/* Override any GCC internal prototype to avoid an error.
10731 Use char because int might match the return type of a GCC
10732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010733#ifdef __cplusplus
10734extern "C"
10735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010736char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010737int
10738main ()
10739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750rm -f core conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010752LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10755$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010756if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010758 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010759 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010760
Guido van Rossumb93a8621998-05-07 13:27:32 +000010761else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010762
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010763 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10764
Guido van Rossum2d38f911996-06-26 19:47:01 +000010765fi
10766
Guido van Rossum627b2d71993-12-24 10:39:16 +000010767
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010768fi
10769
Guido van Rossum0be3e491997-05-22 20:33:33 +000010770fi
10771
Guido van Rossum49545951997-12-02 19:28:29 +000010772fi
10773
Guido van Rossumb93a8621998-05-07 13:27:32 +000010774fi
10775
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777rm -f core conftest.err conftest.$ac_objext \
10778 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10781$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010782if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784else
Martin v. Löwis11437992002-04-12 09:54:03 +000010785 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010786LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790/* Override any GCC internal prototype to avoid an error.
10791 Use char because int might match the return type of a GCC
10792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010793#ifdef __cplusplus
10794extern "C"
10795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010796char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010797int
10798main ()
10799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ;
10802 return 0;
10803}
10804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010810rm -f core conftest.err conftest.$ac_objext \
10811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010812LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10815$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010816if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010817
Martin v. Löwis130fb172001-07-19 11:00:41 +000010818 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010819
Guido van Rossum627b2d71993-12-24 10:39:16 +000010820fi
10821
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010822
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010824
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010825if test "$posix_threads" = "yes"; then
10826 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010829
10830 fi
10831
10832 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10833 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010834 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010836
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010837 ;;
10838 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010839$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010840
10841 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010842 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010844
10845 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846 esac
10847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10849$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010850 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010854 ac_cv_pthread_system_supported=no
10855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010858
10859 #include <stdio.h>
10860 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861 void *foo(void *parm) {
10862 return NULL;
10863 }
10864 main() {
10865 pthread_attr_t attr;
10866 pthread_t id;
10867 if (pthread_attr_init(&attr)) exit(-1);
10868 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10869 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10870 exit(0);
10871 }
10872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010873if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874 ac_cv_pthread_system_supported=yes
10875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010880fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882
Guido van Rossum627b2d71993-12-24 10:39:16 +000010883fi
10884
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10886$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010887 if test "$ac_cv_pthread_system_supported" = "yes"; then
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010890
10891 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 for ac_func in pthread_sigmask
10893do :
10894 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010895if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010897#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010898_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010899 case $ac_sys_system in
10900 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010903
10904 ;;
10905 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010906fi
10907done
10908
pdoxe14679c2017-10-05 00:01:56 -070010909 for ac_func in pthread_getcpuclockid
10910do :
10911 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10912if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10913 cat >>confdefs.h <<_ACEOF
10914#define HAVE_PTHREAD_GETCPUCLOCKID 1
10915_ACEOF
10916
10917fi
10918done
10919
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010920fi
10921
10922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10926$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010928if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10932$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933 ipv6=no
10934 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10936$as_echo "yes" >&6; }
10937 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938
10939 ipv6=yes
10940 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942else
Martin v. Löwis11437992002-04-12 09:54:03 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946 /* AF_INET6 available check */
10947#include <sys/types.h>
10948#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010949int
10950main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010952int domain = AF_INET6;
10953 ;
10954 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955}
Martin v. Löwis11437992002-04-12 09:54:03 +000010956_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010957if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10960$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963else
Matthias Kloseb159a552010-04-25 21:00:44 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010972if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10974$as_echo_n "checking if RFC2553 API is available... " >&6; }
10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010976/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010977
10978 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010979#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010980int
10981main ()
10982{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010983struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010984 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ;
10986 return 0;
10987}
Matthias Kloseb159a552010-04-25 21:00:44 +000010988
Martin v. Löwis11437992002-04-12 09:54:03 +000010989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010991
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010994 ipv6=yes
10995
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010996else
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011000 ipv6=no
11001
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011004fi
11005
11006if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011008
11009fi
11010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011fi
11012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011013
11014ipv6type=unknown
11015ipv6lib=none
11016ipv6trylibc=no
11017
11018if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11020$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011021 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11022 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023 case $i in
11024 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011026/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011027
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028#include <netinet/in.h>
11029#ifdef IPV6_INRIA_VERSION
11030yes
11031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011035 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011037rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038
11039 ;;
11040 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011043
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044#include <netinet/in.h>
11045#ifdef __KAME__
11046yes
11047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051 ipv6type=$i;
11052 ipv6lib=inet6
11053 ipv6libdir=/usr/local/v6/lib
11054 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011056rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057
11058 ;;
11059 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063#include <features.h>
11064#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11065yes
11066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011067_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070 ipv6type=$i;
11071 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011073rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074
11075 ;;
11076 linux-inet6)
11077 if test -d /usr/inet6; then
11078 ipv6type=$i
11079 ipv6lib=inet6
11080 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011081 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082 fi
11083 ;;
11084 solaris)
11085 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011086 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087 ipv6type=$i
11088 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089 fi
11090 fi
11091 ;;
11092 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096#include <sys/param.h>
11097#ifdef _TOSHIBA_INET6
11098yes
11099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103 ipv6type=$i;
11104 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011105 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108
11109 ;;
11110 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114#include </usr/local/v6/include/sys/v6config.h>
11115#ifdef __V6D__
11116yes
11117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011120 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121 ipv6type=$i;
11122 ipv6lib=v6;
11123 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011124 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011126rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127
11128 ;;
11129 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011131/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133#include <sys/param.h>
11134#ifdef _ZETA_MINAMI_INET6
11135yes
11136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140 ipv6type=$i;
11141 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011142 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011144rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145
11146 ;;
11147 esac
11148 if test "$ipv6type" != "unknown"; then
11149 break
11150 fi
11151 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11153$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154fi
11155
11156if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11157 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11158 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11159 echo "using lib$ipv6lib"
11160 else
11161 if test $ipv6trylibc = "yes"; then
11162 echo "using libc"
11163 else
11164 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11165 echo "You need to fetch lib$ipv6lib.a from appropriate"
11166 echo 'ipv6 kit and compile beforehand.'
11167 exit 1
11168 fi
11169 fi
11170fi
11171
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11173$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11175/* end confdefs.h. */
11176 /* CAN_RAW_FD_FRAMES available check */
11177#include <linux/can/raw.h>
11178int
11179main ()
11180{
11181int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186if ac_fn_c_try_compile "$LINENO"; then :
11187
11188
11189$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11190
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11192$as_echo "yes" >&6; }
11193
11194else
11195
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11197$as_echo "no" >&6; }
11198
11199fi
11200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11201
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011202# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11204$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011207if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208 withval=$with_doc_strings;
11209fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011210
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011211
11212if test -z "$with_doc_strings"
11213then with_doc_strings="yes"
11214fi
11215if test "$with_doc_strings" != "no"
11216then
11217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011219
11220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11222$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011223
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011224# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11226$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230 withval=$with_pymalloc;
11231fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011232
Neil Schemenauera35c6882001-02-27 04:45:05 +000011233
Neil Schemenauer16c22972002-03-22 15:34:49 +000011234if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011235then
11236 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011237fi
11238if test "$with_pymalloc" != "no"
11239then
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011242
11243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11245$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011246
Nick Coghlan6ea41862017-06-11 13:16:15 +100011247# Check for --with-c-locale-coercion
11248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11249$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11250
11251# Check whether --with-c-locale-coercion was given.
11252if test "${with_c_locale_coercion+set}" = set; then :
11253 withval=$with_c_locale_coercion;
11254fi
11255
11256
11257if test -z "$with_c_locale_coercion"
11258then
11259 with_c_locale_coercion="yes"
11260fi
11261if test "$with_c_locale_coercion" != "no"
11262then
11263
11264$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11265
11266fi
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11268$as_echo "$with_c_locale_coercion" >&6; }
11269
Benjamin Peterson05159c42009-12-03 03:01:27 +000011270# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11272$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011273
11274# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011275if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011276 withval=$with_valgrind;
11277else
11278 with_valgrind=no
11279fi
11280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11282$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011283if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 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 +020011285if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011288
11289else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011290 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011291
11292fi
11293
11294
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011295 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011296fi
11297
Łukasz Langaa785c872016-09-09 17:37:37 -070011298# Check for DTrace support
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11300$as_echo_n "checking for --with-dtrace... " >&6; }
11301
11302# Check whether --with-dtrace was given.
11303if test "${with_dtrace+set}" = set; then :
11304 withval=$with_dtrace;
11305else
11306 with_dtrace=no
11307fi
11308
11309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11310$as_echo "$with_dtrace" >&6; }
11311
11312
11313
11314
11315
11316DTRACE=
11317DFLAGS=
11318DTRACE_HEADERS=
11319DTRACE_OBJS=
11320
11321if test "$with_dtrace" = "yes"
11322then
11323 # Extract the first word of "dtrace", so it can be a program name with args.
11324set dummy dtrace; ac_word=$2
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11326$as_echo_n "checking for $ac_word... " >&6; }
11327if ${ac_cv_path_DTRACE+:} false; then :
11328 $as_echo_n "(cached) " >&6
11329else
11330 case $DTRACE in
11331 [\\/]* | ?:[\\/]*)
11332 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11333 ;;
11334 *)
11335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11336for as_dir in $PATH
11337do
11338 IFS=$as_save_IFS
11339 test -z "$as_dir" && as_dir=.
11340 for ac_exec_ext in '' $ac_executable_extensions; do
11341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11342 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11344 break 2
11345 fi
11346done
11347 done
11348IFS=$as_save_IFS
11349
11350 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11351 ;;
11352esac
11353fi
11354DTRACE=$ac_cv_path_DTRACE
11355if test -n "$DTRACE"; then
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11357$as_echo "$DTRACE" >&6; }
11358else
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
11361fi
11362
11363
11364 if test "$DTRACE" = "not found"; then
11365 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11366 fi
11367
11368$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11369
11370 DTRACE_HEADERS="Include/pydtrace_probes.h"
11371
11372 # On OS X, DTrace providers do not need to be explicitly compiled and
11373 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11374 # generation flag '-G'. We check for presence of this flag, rather than
11375 # hardcoding support by OS, in the interest of robustness.
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11377$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11378if ${ac_cv_dtrace_link+:} false; then :
11379 $as_echo_n "(cached) " >&6
11380else
11381 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011382 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011383 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11384 ac_cv_dtrace_link=yes
11385
11386fi
11387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11388$as_echo "$ac_cv_dtrace_link" >&6; }
11389 if test "$ac_cv_dtrace_link" = "yes"; then
11390 DTRACE_OBJS="Python/pydtrace.o"
11391 fi
11392fi
11393
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011394# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011395
Guido van Rossum98935bf2001-09-05 19:13:16 +000011396DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011397
Guido van Rossume97ee181999-12-20 21:27:22 +000011398# the dlopen() function means we might want to use dynload_shlib.o. some
11399# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011400for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011401do :
11402 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011403if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011406_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011407
Guido van Rossume97ee181999-12-20 21:27:22 +000011408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011409done
Guido van Rossume97ee181999-12-20 21:27:22 +000011410
Michael W. Hudson54241132001-12-07 15:38:26 +000011411
Guido van Rossume97ee181999-12-20 21:27:22 +000011412# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11413# loading of modules.
11414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11416$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011417if test -z "$DYNLOADFILE"
11418then
11419 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011420 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11421 if test "$ac_cv_func_dlopen" = yes
11422 then DYNLOADFILE="dynload_shlib.o"
11423 else DYNLOADFILE="dynload_aix.o"
11424 fi
11425 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011426 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011427 *)
11428 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11429 # out any dynamic loading
11430 if test "$ac_cv_func_dlopen" = yes
11431 then DYNLOADFILE="dynload_shlib.o"
11432 else DYNLOADFILE="dynload_stub.o"
11433 fi
11434 ;;
11435 esac
11436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11438$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011439if test "$DYNLOADFILE" != "dynload_stub.o"
11440then
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011443
11444fi
11445
Neil Schemenauer4e425612001-06-19 15:44:15 +000011446# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11447
Michael W. Hudson54241132001-12-07 15:38:26 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11450$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011451if test -z "$MACHDEP_OBJS"
11452then
Jack Jansene578a632001-08-15 01:27:14 +000011453 MACHDEP_OBJS=$extra_machdep_objs
11454else
11455 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011456fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011457if test -z "$MACHDEP_OBJS"; then
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11459$as_echo "none" >&6; }
11460else
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11462$as_echo "$MACHDEP_OBJS" >&6; }
11463fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011464
Guido van Rossum627b2d71993-12-24 10:39:16 +000011465# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011466for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011467 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11468 faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011469 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011470 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011471 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011472 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011473 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011474 if_nameindex \
Inada Naokibee31ce2019-05-30 16:35:41 +090011475 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011476 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011477 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011478 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011479 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11480 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011481 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011482 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011483 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011484 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11485 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011486 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011487 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011488 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011489 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011490 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011491do :
11492 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11493ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011494if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011497_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011499fi
11500done
11501
Michael W. Hudson54241132001-12-07 15:38:26 +000011502
Benjamin Peterson40caa052018-09-12 15:52:40 -070011503# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11504# links. Some libc implementations have a stub lchmod implementation that always
11505# returns an error.
11506if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011507 for ac_func in lchmod
11508do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011509 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11510if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011511 cat >>confdefs.h <<_ACEOF
11512#define HAVE_LCHMOD 1
11513_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011514
11515fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011516done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011517
11518fi
11519
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011520ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11521 #include <dirent.h>
11522"
11523if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11524
11525$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11526
11527fi
11528
11529
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011530# For some functions, having a definition is not sufficient, since
11531# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11533$as_echo_n "checking for chroot... " >&6; }
11534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011535/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011536#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011537int
11538main ()
11539{
11540void *x=chroot
11541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548
Matthias Kloseb159a552010-04-25 21:00:44 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011550$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011554
11555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11558$as_echo_n "checking for link... " >&6; }
11559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011560/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011561#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011562int
11563main ()
11564{
11565void *x=link
11566 ;
11567 return 0;
11568}
11569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573
Matthias Kloseb159a552010-04-25 21:00:44 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011575$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576else
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11578$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011579
11580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11583$as_echo_n "checking for symlink... " >&6; }
11584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011586#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587int
11588main ()
11589{
11590void *x=symlink
11591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598
Matthias Kloseb159a552010-04-25 21:00:44 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011601else
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011604
11605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11608$as_echo_n "checking for fchdir... " >&6; }
11609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011611#include <unistd.h>
11612int
11613main ()
11614{
11615void *x=fchdir
11616 ;
11617 return 0;
11618}
11619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011621
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011623
Matthias Kloseb159a552010-04-25 21:00:44 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011625$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011629
11630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11633$as_echo_n "checking for fsync... " >&6; }
11634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011636#include <unistd.h>
11637int
11638main ()
11639{
11640void *x=fsync
11641 ;
11642 return 0;
11643}
11644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648
Matthias Kloseb159a552010-04-25 21:00:44 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011650$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11653$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011654
11655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11658$as_echo_n "checking for fdatasync... " >&6; }
11659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011660/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011661#include <unistd.h>
11662int
11663main ()
11664{
11665void *x=fdatasync
11666 ;
11667 return 0;
11668}
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011673
Matthias Kloseb159a552010-04-25 21:00:44 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11678$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011679
11680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11683$as_echo_n "checking for epoll... " >&6; }
11684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011685/* end confdefs.h. */
11686#include <sys/epoll.h>
11687int
11688main ()
11689{
11690void *x=epoll_create
11691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011698
Matthias Kloseb159a552010-04-25 21:00:44 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011700$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11703$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011704
11705fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11708$as_echo_n "checking for epoll_create1... " >&6; }
11709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11710/* end confdefs.h. */
11711#include <sys/epoll.h>
11712int
11713main ()
11714{
11715void *x=epoll_create1
11716 ;
11717 return 0;
11718}
11719_ACEOF
11720if ac_fn_c_try_compile "$LINENO"; then :
11721
11722$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11723
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11725$as_echo "yes" >&6; }
11726else
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
11729
11730fi
11731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11733$as_echo_n "checking for kqueue... " >&6; }
11734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011735/* end confdefs.h. */
11736
11737#include <sys/types.h>
11738#include <sys/event.h>
11739
11740int
11741main ()
11742{
11743int x=kqueue()
11744 ;
11745 return 0;
11746}
11747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011748if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011751
Matthias Kloseb159a552010-04-25 21:00:44 +000011752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011753$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757
11758fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11761$as_echo_n "checking for prlimit... " >&6; }
11762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763/* end confdefs.h. */
11764
11765#include <sys/time.h>
11766#include <sys/resource.h>
11767
11768int
11769main ()
11770{
11771void *x=prlimit
11772 ;
11773 return 0;
11774}
11775_ACEOF
11776if ac_fn_c_try_compile "$LINENO"; then :
11777
11778$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11779
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11781$as_echo "yes" >&6; }
11782else
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11784$as_echo "no" >&6; }
11785
11786fi
11787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11788
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11790$as_echo_n "checking for memfd_create... " >&6; }
11791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11792/* end confdefs.h. */
11793
11794#ifdef HAVE_SYS_MMAN_H
11795#include <sys/mman.h>
11796#endif
11797#ifdef HAVE_SYS_MEMFD_H
11798#include <sys/memfd.h>
11799#endif
11800
11801int
11802main ()
11803{
11804void *x=memfd_create
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809if ac_fn_c_try_compile "$LINENO"; then :
11810
11811$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11812
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11814$as_echo "yes" >&6; }
11815else
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
11818
11819fi
11820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11821
Martin v. Löwisd5843682002-11-21 20:41:28 +000011822# On some systems (eg. FreeBSD 5), we would find a definition of the
11823# functions ctermid_r, setgroups in the library, but no prototype
11824# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11825# address to avoid compiler warnings and potential miscompilations
11826# because of the missing prototypes.
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11829$as_echo_n "checking for ctermid_r... " >&6; }
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011832
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833#include <stdio.h>
11834
Martin v. Löwisd5843682002-11-21 20:41:28 +000011835int
11836main ()
11837{
11838void* p = ctermid_r
11839 ;
11840 return 0;
11841}
11842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011846
Matthias Kloseb159a552010-04-25 21:00:44 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011848$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011852
11853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11857$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011859 $as_echo_n "(cached) " >&6
11860else
11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011862/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011863#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011864int
11865main ()
11866{
11867void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011868
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011874 ac_cv_flock_decl=yes
11875else
11876 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011877
11878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011880
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881fi
11882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11883$as_echo "$ac_cv_flock_decl" >&6; }
11884if test "x${ac_cv_flock_decl}" = xyes; then
11885 for ac_func in flock
11886do :
11887 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011888if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011889 cat >>confdefs.h <<_ACEOF
11890#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011891_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011892
Antoine Pitroua3000072010-09-07 14:52:42 +000011893else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011895$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011897 $as_echo_n "(cached) " >&6
11898else
11899 ac_check_lib_save_LIBS=$LIBS
11900LIBS="-lbsd $LIBS"
11901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903
11904/* Override any GCC internal prototype to avoid an error.
11905 Use char because int might match the return type of a GCC
11906 builtin and then its argument prototype would still apply. */
11907#ifdef __cplusplus
11908extern "C"
11909#endif
11910char flock ();
11911int
11912main ()
11913{
11914return flock ();
11915 ;
11916 return 0;
11917}
11918_ACEOF
11919if ac_fn_c_try_link "$LINENO"; then :
11920 ac_cv_lib_bsd_flock=yes
11921else
11922 ac_cv_lib_bsd_flock=no
11923fi
11924rm -f core conftest.err conftest.$ac_objext \
11925 conftest$ac_exeext conftest.$ac_ext
11926LIBS=$ac_check_lib_save_LIBS
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11929$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011931 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011932
11933
11934$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11935
11936
11937fi
11938
11939
11940fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011941done
11942
Antoine Pitroua3000072010-09-07 14:52:42 +000011943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11946$as_echo_n "checking for getpagesize... " >&6; }
11947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011950#include <unistd.h>
11951
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011952int
11953main ()
11954{
11955void* p = getpagesize
11956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011963
Matthias Kloseb159a552010-04-25 21:00:44 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011969
11970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972
Victor Stinner984890f2011-11-24 13:53:38 +010011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11974$as_echo_n "checking for broken unsetenv... " >&6; }
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976/* end confdefs.h. */
11977
11978#include <stdlib.h>
11979
11980int
11981main ()
11982{
11983int res = unsetenv("DUMMY")
11984 ;
11985 return 0;
11986}
11987_ACEOF
11988if ac_fn_c_try_compile "$LINENO"; then :
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991else
11992
11993$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11994
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11996$as_echo "yes" >&6; }
11997
11998fi
11999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12000
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012001for ac_prog in true
12002do
12003 # Extract the first word of "$ac_prog", so it can be a program name with args.
12004set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012009else
12010 if test -n "$TRUE"; then
12011 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12012else
12013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12014for as_dir in $PATH
12015do
12016 IFS=$as_save_IFS
12017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012020 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 $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 +000012022 break 2
12023 fi
12024done
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012027
12028fi
12029fi
12030TRUE=$ac_cv_prog_TRUE
12031if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12033$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012037fi
12038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012040 test -n "$TRUE" && break
12041done
12042test -n "$TRUE" || TRUE="/bin/true"
12043
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12046$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049else
12050 ac_check_lib_save_LIBS=$LIBS
12051LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055/* Override any GCC internal prototype to avoid an error.
12056 Use char because int might match the return type of a GCC
12057 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012058#ifdef __cplusplus
12059extern "C"
12060#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062int
12063main ()
12064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071 ac_cv_lib_c_inet_aton=yes
12072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012075rm -f core conftest.err conftest.$ac_objext \
12076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077LIBS=$ac_check_lib_save_LIBS
12078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12080$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012082 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12085$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088else
12089 ac_check_lib_save_LIBS=$LIBS
12090LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094/* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101int
12102main ()
12103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110 ac_cv_lib_resolv_inet_aton=yes
12111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116LIBS=$ac_check_lib_save_LIBS
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12119$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012121 cat >>confdefs.h <<_ACEOF
12122#define HAVE_LIBRESOLV 1
12123_ACEOF
12124
12125 LIBS="-lresolv $LIBS"
12126
12127fi
12128
12129
12130fi
12131
12132
Christian Heimesd0764e22007-12-04 15:00:33 +000012133# On Tru64, chflags seems to be present, but calling it will
12134# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12136$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012137if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012141 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012144/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012145
Christian Heimesd0764e22007-12-04 15:00:33 +000012146#include <sys/stat.h>
12147#include <unistd.h>
12148int main(int argc, char*argv[])
12149{
12150 if(chflags(argv[0], 0) != 0)
12151 return 1;
12152 return 0;
12153}
Ned Deily3eb67d52011-06-28 00:00:28 -070012154
Christian Heimesd0764e22007-12-04 15:00:33 +000012155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012156if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012163fi
12164
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12168$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012169if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012172 ac_cv_have_chflags="yes"
12173else
12174 ac_cv_have_chflags="no"
12175fi
12176
12177fi
12178if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012181
12182fi
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12185$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012186if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012190 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012193/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012194
Christian Heimesd0764e22007-12-04 15:00:33 +000012195#include <sys/stat.h>
12196#include <unistd.h>
12197int main(int argc, char*argv[])
12198{
12199 if(lchflags(argv[0], 0) != 0)
12200 return 1;
12201 return 0;
12202}
Ned Deily3eb67d52011-06-28 00:00:28 -070012203
Christian Heimesd0764e22007-12-04 15:00:33 +000012204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012206 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012212fi
12213
12214
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12217$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012218if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012221 ac_cv_have_lchflags="yes"
12222else
12223 ac_cv_have_lchflags="no"
12224fi
12225
12226fi
12227if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228
Matthias Kloseb9621712010-04-24 17:59:49 +000012229$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012230
12231fi
12232
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012233case $ac_sys_system/$ac_sys_release in
12234Darwin/*)
12235 _CUR_CFLAGS="${CFLAGS}"
12236 _CUR_LDFLAGS="${LDFLAGS}"
12237 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12238 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12239 ;;
12240esac
12241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12243$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012246else
12247 ac_check_lib_save_LIBS=$LIBS
12248LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012250/* end confdefs.h. */
12251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252/* Override any GCC internal prototype to avoid an error.
12253 Use char because int might match the return type of a GCC
12254 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012255#ifdef __cplusplus
12256extern "C"
12257#endif
12258char inflateCopy ();
12259int
12260main ()
12261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012268 ac_cv_lib_z_inflateCopy=yes
12269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core conftest.err conftest.$ac_objext \
12273 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274LIBS=$ac_check_lib_save_LIBS
12275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12277$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012281
12282fi
12283
12284
12285case $ac_sys_system/$ac_sys_release in
12286Darwin/*)
12287 CFLAGS="${_CUR_CFLAGS}"
12288 LDFLAGS="${_CUR_LDFLAGS}"
12289 ;;
12290esac
12291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12293$as_echo_n "checking for hstrerror... " >&6; }
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Martin v. Löwise9416172003-05-03 10:12:45 +000012297#include <netdb.h>
12298
Martin v. Löwise9416172003-05-03 10:12:45 +000012299int
12300main ()
12301{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012302void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012310
Matthias Kloseb159a552010-04-25 21:00:44 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
12317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318rm -f core conftest.err conftest.$ac_objext \
12319 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12322$as_echo_n "checking for inet_aton... " >&6; }
12323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012325
Martin v. Löwis86d66262006-02-17 08:40:11 +000012326#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012327#include <sys/socket.h>
12328#include <netinet/in.h>
12329#include <arpa/inet.h>
12330
Martin v. Löwise9416172003-05-03 10:12:45 +000012331int
12332main ()
12333{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012334void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012342
Matthias Kloseb159a552010-04-25 21:00:44 +000012343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012348
12349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012350rm -f core conftest.err conftest.$ac_objext \
12351 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12354$as_echo_n "checking for inet_pton... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012357
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012358#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012359#include <sys/socket.h>
12360#include <netinet/in.h>
12361#include <arpa/inet.h>
12362
Martin v. Löwise9416172003-05-03 10:12:45 +000012363int
12364main ()
12365{
12366void* p = inet_pton
12367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012374
Matthias Kloseb159a552010-04-25 21:00:44 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12379$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012380
12381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012383
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012384# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12386$as_echo_n "checking for setgroups... " >&6; }
12387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012389
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012390#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012391#ifdef HAVE_GRP_H
12392#include <grp.h>
12393#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012394
Martin v. Löwisd5843682002-11-21 20:41:28 +000012395int
12396main ()
12397{
12398void* p = setgroups
12399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012406
Matthias Kloseb159a552010-04-25 21:00:44 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012412
12413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012416# check for openpty and forkpty
12417
12418for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012419do :
12420 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12428$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012429if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012431else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012433LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437/* Override any GCC internal prototype to avoid an error.
12438 Use char because int might match the return type of a GCC
12439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440#ifdef __cplusplus
12441extern "C"
12442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012443char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012444int
12445main ()
12446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457rm -f core conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012459LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12462$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012465 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12468$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012471else
12472 ac_check_lib_save_LIBS=$LIBS
12473LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012475/* end confdefs.h. */
12476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477/* Override any GCC internal prototype to avoid an error.
12478 Use char because int might match the return type of a GCC
12479 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012480#ifdef __cplusplus
12481extern "C"
12482#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483char openpty ();
12484int
12485main ()
12486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012493 ac_cv_lib_bsd_openpty=yes
12494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497rm -f core conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012499LIBS=$ac_check_lib_save_LIBS
12500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12502$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505 LIBS="$LIBS -lbsd"
12506fi
12507
12508
12509fi
12510
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511
12512fi
12513done
12514
12515for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012516do :
12517 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12525$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012528else
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534/* Override any GCC internal prototype to avoid an error.
12535 Use char because int might match the return type of a GCC
12536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012537#ifdef __cplusplus
12538extern "C"
12539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012540char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012541int
12542main ()
12543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554rm -f core conftest.err conftest.$ac_objext \
12555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012556LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12559$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012560if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12565$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012568else
12569 ac_check_lib_save_LIBS=$LIBS
12570LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012572/* end confdefs.h. */
12573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574/* Override any GCC internal prototype to avoid an error.
12575 Use char because int might match the return type of a GCC
12576 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012577#ifdef __cplusplus
12578extern "C"
12579#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012580char forkpty ();
12581int
12582main ()
12583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012585 ;
12586 return 0;
12587}
12588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590 ac_cv_lib_bsd_forkpty=yes
12591else
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012594rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012596LIBS=$ac_check_lib_save_LIBS
12597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12599$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012600if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602 LIBS="$LIBS -lbsd"
12603fi
12604
12605
12606fi
12607
Fred Drake8cef4cf2000-06-28 16:40:38 +000012608
12609fi
12610done
12611
Jack Jansendd19cf82001-12-06 22:36:17 +000012612
Michael W. Hudson54241132001-12-07 15:38:26 +000012613# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012614for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012615do :
12616 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12617ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012618if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012620#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012621_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624done
12625
Michael W. Hudson54241132001-12-07 15:38:26 +000012626
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012627ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012628if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012630
Martin v. Löwis1142de32002-03-29 16:28:31 +000012631else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012633 *" dup2.$ac_objext "* ) ;;
12634 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636esac
12637
Martin v. Löwis1142de32002-03-29 16:28:31 +000012638fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012639
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012642 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12643
12644else
12645 case " $LIBOBJS " in
12646 *" strdup.$ac_objext "* ) ;;
12647 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12648 ;;
12649esac
12650
12651fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012652
12653
12654for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012655do :
12656 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012657if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012664int
12665main ()
12666{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012675
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012678
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012680done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012681
Jack Jansen150753c2003-03-29 22:07:47 +000012682for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012683do :
12684 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012685if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012691#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012692int
12693main ()
12694{
12695setpgrp(0,0);
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012703
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012706
12707fi
12708done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012709
Thomas Wouters3a584202000-08-05 23:28:51 +000012710for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012711do :
12712 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
12729
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730else
Skip Montanaro6dead952003-09-25 14:50:04 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Guido van Rossum627b2d71993-12-24 10:39:16 +000012735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012739done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740
Michael W. Hudson54241132001-12-07 15:38:26 +000012741
Gregory P. Smith387512c2018-12-30 15:42:32 -080012742# We search for both crypt and crypt_r as one or the other may be defined
12743# This gets us our -lcrypt in LIBS when required on the target platform.
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12745$as_echo_n "checking for library containing crypt... " >&6; }
12746if ${ac_cv_search_crypt+:} false; then :
12747 $as_echo_n "(cached) " >&6
12748else
12749 ac_func_search_save_LIBS=$LIBS
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752
12753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
12756#ifdef __cplusplus
12757extern "C"
12758#endif
12759char crypt ();
12760int
12761main ()
12762{
12763return crypt ();
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768for ac_lib in '' crypt; do
12769 if test -z "$ac_lib"; then
12770 ac_res="none required"
12771 else
12772 ac_res=-l$ac_lib
12773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12774 fi
12775 if ac_fn_c_try_link "$LINENO"; then :
12776 ac_cv_search_crypt=$ac_res
12777fi
12778rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext
12780 if ${ac_cv_search_crypt+:} false; then :
12781 break
12782fi
12783done
12784if ${ac_cv_search_crypt+:} false; then :
12785
12786else
12787 ac_cv_search_crypt=no
12788fi
12789rm conftest.$ac_ext
12790LIBS=$ac_func_search_save_LIBS
12791fi
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12793$as_echo "$ac_cv_search_crypt" >&6; }
12794ac_res=$ac_cv_search_crypt
12795if test "$ac_res" != no; then :
12796 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12797
12798fi
12799
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12801$as_echo_n "checking for library containing crypt_r... " >&6; }
12802if ${ac_cv_search_crypt_r+:} false; then :
12803 $as_echo_n "(cached) " >&6
12804else
12805 ac_func_search_save_LIBS=$LIBS
12806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807/* end confdefs.h. */
12808
12809/* Override any GCC internal prototype to avoid an error.
12810 Use char because int might match the return type of a GCC
12811 builtin and then its argument prototype would still apply. */
12812#ifdef __cplusplus
12813extern "C"
12814#endif
12815char crypt_r ();
12816int
12817main ()
12818{
12819return crypt_r ();
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824for ac_lib in '' crypt; do
12825 if test -z "$ac_lib"; then
12826 ac_res="none required"
12827 else
12828 ac_res=-l$ac_lib
12829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12830 fi
12831 if ac_fn_c_try_link "$LINENO"; then :
12832 ac_cv_search_crypt_r=$ac_res
12833fi
12834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext
12836 if ${ac_cv_search_crypt_r+:} false; then :
12837 break
12838fi
12839done
12840if ${ac_cv_search_crypt_r+:} false; then :
12841
12842else
12843 ac_cv_search_crypt_r=no
12844fi
12845rm conftest.$ac_ext
12846LIBS=$ac_func_search_save_LIBS
12847fi
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12849$as_echo "$ac_cv_search_crypt_r" >&6; }
12850ac_res=$ac_cv_search_crypt_r
12851if test "$ac_res" != no; then :
12852 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12853
12854fi
12855
12856
12857ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12858if test "x$ac_cv_func_crypt_r" = xyes; then :
12859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860/* end confdefs.h. */
12861
12862#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12863#include <crypt.h>
12864
12865int
12866main ()
12867{
12868
12869struct crypt_data d;
12870char *r = crypt_r("", "", &d);
12871
12872 ;
12873 return 0;
12874}
12875_ACEOF
12876if ac_fn_c_try_compile "$LINENO"; then :
12877
12878$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12879
12880fi
12881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12882
12883fi
12884
12885
Victor Stinnere0be4232011-10-25 13:06:09 +020012886for ac_func in clock_gettime
12887do :
12888 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12889if test "x$ac_cv_func_clock_gettime" = xyes; then :
12890 cat >>confdefs.h <<_ACEOF
12891#define HAVE_CLOCK_GETTIME 1
12892_ACEOF
12893
12894else
12895
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12897$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12898if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12899 $as_echo_n "(cached) " >&6
12900else
12901 ac_check_lib_save_LIBS=$LIBS
12902LIBS="-lrt $LIBS"
12903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12904/* end confdefs.h. */
12905
12906/* Override any GCC internal prototype to avoid an error.
12907 Use char because int might match the return type of a GCC
12908 builtin and then its argument prototype would still apply. */
12909#ifdef __cplusplus
12910extern "C"
12911#endif
12912char clock_gettime ();
12913int
12914main ()
12915{
12916return clock_gettime ();
12917 ;
12918 return 0;
12919}
12920_ACEOF
12921if ac_fn_c_try_link "$LINENO"; then :
12922 ac_cv_lib_rt_clock_gettime=yes
12923else
12924 ac_cv_lib_rt_clock_gettime=no
12925fi
12926rm -f core conftest.err conftest.$ac_objext \
12927 conftest$ac_exeext conftest.$ac_ext
12928LIBS=$ac_check_lib_save_LIBS
12929fi
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12931$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12932if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12933
Victor Stinner7efb8332014-08-29 15:41:08 +020012934 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12936
12937
12938$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12939
12940
12941fi
12942
12943
12944fi
12945done
12946
12947
12948for ac_func in clock_getres
12949do :
12950 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12951if test "x$ac_cv_func_clock_getres" = xyes; then :
12952 cat >>confdefs.h <<_ACEOF
12953#define HAVE_CLOCK_GETRES 1
12954_ACEOF
12955
12956else
12957
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12959$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12960if ${ac_cv_lib_rt_clock_getres+:} false; then :
12961 $as_echo_n "(cached) " >&6
12962else
12963 ac_check_lib_save_LIBS=$LIBS
12964LIBS="-lrt $LIBS"
12965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967
12968/* Override any GCC internal prototype to avoid an error.
12969 Use char because int might match the return type of a GCC
12970 builtin and then its argument prototype would still apply. */
12971#ifdef __cplusplus
12972extern "C"
12973#endif
12974char clock_getres ();
12975int
12976main ()
12977{
12978return clock_getres ();
12979 ;
12980 return 0;
12981}
12982_ACEOF
12983if ac_fn_c_try_link "$LINENO"; then :
12984 ac_cv_lib_rt_clock_getres=yes
12985else
12986 ac_cv_lib_rt_clock_getres=no
12987fi
12988rm -f core conftest.err conftest.$ac_objext \
12989 conftest$ac_exeext conftest.$ac_ext
12990LIBS=$ac_check_lib_save_LIBS
12991fi
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12993$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12994if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12995
12996 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12997
12998
12999fi
13000
13001
13002fi
13003done
13004
13005
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013006for ac_func in clock_settime
13007do :
13008 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13009if test "x$ac_cv_func_clock_settime" = xyes; then :
13010 cat >>confdefs.h <<_ACEOF
13011#define HAVE_CLOCK_SETTIME 1
13012_ACEOF
13013
13014else
13015
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13017$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13018if ${ac_cv_lib_rt_clock_settime+:} false; then :
13019 $as_echo_n "(cached) " >&6
13020else
13021 ac_check_lib_save_LIBS=$LIBS
13022LIBS="-lrt $LIBS"
13023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025
13026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
13029#ifdef __cplusplus
13030extern "C"
13031#endif
13032char clock_settime ();
13033int
13034main ()
13035{
13036return clock_settime ();
13037 ;
13038 return 0;
13039}
13040_ACEOF
13041if ac_fn_c_try_link "$LINENO"; then :
13042 ac_cv_lib_rt_clock_settime=yes
13043else
13044 ac_cv_lib_rt_clock_settime=no
13045fi
13046rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048LIBS=$ac_check_lib_save_LIBS
13049fi
13050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13051$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13052if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13053
13054 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13055
13056
13057fi
13058
13059
13060fi
13061done
13062
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13065$as_echo_n "checking for major... " >&6; }
13066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013067/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013068
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013069#if defined(MAJOR_IN_MKDEV)
13070#include <sys/mkdev.h>
13071#elif defined(MAJOR_IN_SYSMACROS)
13072#include <sys/sysmacros.h>
13073#else
13074#include <sys/types.h>
13075#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013076
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013077int
13078main ()
13079{
13080
13081 makedev(major(0),minor(0));
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013088
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13093$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094
13095else
Skip Montanaro6dead952003-09-25 14:50:04 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13098$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013099
13100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013103
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013104# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013105# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13107$as_echo_n "checking for getaddrinfo... " >&6; }
13108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013110
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013111#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013112#include <sys/socket.h>
13113#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013114#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013119getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 have_getaddrinfo=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13132$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133if test $have_getaddrinfo = yes
13134then
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13136$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013137 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139else
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013141
13142if test "${enable_ipv6+set}" = set; then
13143 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13144else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013146fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150
Stefan Krah19c21392012-11-22 23:47:32 +010013151#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152#include <sys/types.h>
13153#include <netdb.h>
13154#include <string.h>
13155#include <sys/socket.h>
13156#include <netinet/in.h>
13157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159{
13160 int passive, gaierr, inet4 = 0, inet6 = 0;
13161 struct addrinfo hints, *ai, *aitop;
13162 char straddr[INET6_ADDRSTRLEN], strport[16];
13163
13164 for (passive = 0; passive <= 1; passive++) {
13165 memset(&hints, 0, sizeof(hints));
13166 hints.ai_family = AF_UNSPEC;
13167 hints.ai_flags = passive ? AI_PASSIVE : 0;
13168 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013169 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13171 (void)gai_strerror(gaierr);
13172 goto bad;
13173 }
13174 for (ai = aitop; ai; ai = ai->ai_next) {
13175 if (ai->ai_addr == NULL ||
13176 ai->ai_addrlen == 0 ||
13177 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13178 straddr, sizeof(straddr), strport, sizeof(strport),
13179 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13180 goto bad;
13181 }
13182 switch (ai->ai_family) {
13183 case AF_INET:
13184 if (strcmp(strport, "54321") != 0) {
13185 goto bad;
13186 }
13187 if (passive) {
13188 if (strcmp(straddr, "0.0.0.0") != 0) {
13189 goto bad;
13190 }
13191 } else {
13192 if (strcmp(straddr, "127.0.0.1") != 0) {
13193 goto bad;
13194 }
13195 }
13196 inet4++;
13197 break;
13198 case AF_INET6:
13199 if (strcmp(strport, "54321") != 0) {
13200 goto bad;
13201 }
13202 if (passive) {
13203 if (strcmp(straddr, "::") != 0) {
13204 goto bad;
13205 }
13206 } else {
13207 if (strcmp(straddr, "::1") != 0) {
13208 goto bad;
13209 }
13210 }
13211 inet6++;
13212 break;
13213 case AF_UNSPEC:
13214 goto bad;
13215 break;
13216 default:
13217 /* another family support? */
13218 break;
13219 }
13220 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013221 freeaddrinfo(aitop);
13222 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223 }
13224
13225 if (!(inet4 == 0 || inet4 == 2))
13226 goto bad;
13227 if (!(inet6 == 0 || inet6 == 2))
13228 goto bad;
13229
13230 if (aitop)
13231 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233
13234 bad:
13235 if (aitop)
13236 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013237 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238}
13239
Martin v. Löwis11437992002-04-12 09:54:03 +000013240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13255$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13256
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013257if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013258then
13259 if test $ipv6 = yes
13260 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261 echo 'Fatal: You must get working getaddrinfo() function.'
13262 echo ' or you can specify "--disable-ipv6"'.
13263 exit 1
13264 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013265else
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013268
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013270
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013271for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013272do :
13273 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013276#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013277_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279fi
13280done
13281
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13285$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291#include <sys/types.h>
13292#include <sys/time.h>
13293#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295int
13296main ()
13297{
13298if ((struct tm *) 0)
13299return 0;
13300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13312$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013313if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316
13317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13320$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013321if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326#include <sys/types.h>
13327#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332struct tm tm;
13333 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340 ac_cv_struct_tm=time.h
13341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13347$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013348if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351
13352fi
13353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354ac_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 +000013355#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357"
Victor Stinnere0be4232011-10-25 13:06:09 +020013358if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
13360cat >>confdefs.h <<_ACEOF
13361#define HAVE_STRUCT_TM_TM_ZONE 1
13362_ACEOF
13363
13364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13373"
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378fi
13379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382_ACEOF
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13385$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392#if !HAVE_DECL_TZNAME
13393extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396int
13397main ()
13398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405 ac_cv_var_tzname=yes
13406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013409rm -f core conftest.err conftest.$ac_objext \
13410 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13413$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013414 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418 fi
13419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421ac_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 +020013422if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
13424cat >>confdefs.h <<_ACEOF
13425#define HAVE_STRUCT_STAT_ST_RDEV 1
13426_ACEOF
13427
13428
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431ac_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 +020013432if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013433
Martin v. Löwis11437992002-04-12 09:54:03 +000013434cat >>confdefs.h <<_ACEOF
13435#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13436_ACEOF
13437
13438
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013439fi
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441ac_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 +020013442if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_STAT_ST_FLAGS 1
13446_ACEOF
13447
13448
13449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_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 +020013452if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013453
13454cat >>confdefs.h <<_ACEOF
13455#define HAVE_STRUCT_STAT_ST_GEN 1
13456_ACEOF
13457
13458
13459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461ac_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 +020013462if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013463
13464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13466_ACEOF
13467
13468
13469fi
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471ac_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 +020013472if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13476_ACEOF
13477
13478
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013479fi
13480
Stefan Krah267b6392016-04-26 01:09:18 +020013481ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13482 #include <sys/types.h>
13483 #include <pwd.h>
13484
13485"
13486if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13487
13488cat >>confdefs.h <<_ACEOF
13489#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13490_ACEOF
13491
13492
13493fi
13494ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13495 #include <sys/types.h>
13496 #include <pwd.h>
13497
13498"
13499if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13500
13501cat >>confdefs.h <<_ACEOF
13502#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13503_ACEOF
13504
13505
13506fi
13507
Zachary Ware6a6967e2016-10-01 00:47:27 -050013508# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13509ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13510"
13511if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13512
13513cat >>confdefs.h <<_ACEOF
13514#define HAVE_SIGINFO_T_SI_BAND 1
13515_ACEOF
13516
13517
13518fi
13519
Michael W. Hudson54241132001-12-07 15:38:26 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13522$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525else
Matthias Kloseb159a552010-04-25 21:00:44 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013529#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013530int
13531main ()
13532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539 ac_cv_header_time_altzone=yes
13540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545fi
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13548$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552
13553fi
13554
Guido van Rossumda88dad1995-01-26 00:46:29 +000013555was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13557$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013559/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013560
13561#include <sys/types.h>
13562#include <sys/select.h>
13563#include <sys/time.h>
13564
Martin v. Löwis11437992002-04-12 09:54:03 +000013565int
13566main ()
13567{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568;
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575
Matthias Kloseb9621712010-04-24 17:59:49 +000013576$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013578 was_it_defined=yes
13579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13583$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13586$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013587if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013591/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013592#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013593int
13594main ()
13595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 ;
13598 return 0;
13599}
13600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602 ac_cv_struct_addrinfo=yes
13603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607fi
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13610$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614
13615fi
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13618$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013623/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624
13625# include <sys/types.h>
13626# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636 ac_cv_struct_sockaddr_storage=yes
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641fi
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13644$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013645if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013648
13649fi
13650
Christian Heimesdffa3942016-09-05 23:54:41 +020013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13652$as_echo_n "checking for sockaddr_alg... " >&6; }
13653if ${ac_cv_struct_sockaddr_alg+:} false; then :
13654 $as_echo_n "(cached) " >&6
13655else
13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657/* end confdefs.h. */
13658
13659# include <sys/types.h>
13660# include <sys/socket.h>
13661# include <linux/if_alg.h>
13662int
13663main ()
13664{
13665struct sockaddr_alg s
13666 ;
13667 return 0;
13668}
13669_ACEOF
13670if ac_fn_c_try_compile "$LINENO"; then :
13671 ac_cv_struct_sockaddr_alg=yes
13672else
13673 ac_cv_struct_sockaddr_alg=no
13674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676fi
13677
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13679$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13680if test $ac_cv_struct_sockaddr_alg = yes; then
13681
13682$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13683
13684fi
13685
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13689$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013690if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013696int
13697main ()
13698{
13699static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013700test_array [0] = 0;
13701return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
13703 ;
13704 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013705}
Martin v. Löwis11437992002-04-12 09:54:03 +000013706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013707if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013708 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13715$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
13719fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13722$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013723if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013725else
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013727/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728
Martin v. Löwis11437992002-04-12 09:54:03 +000013729int
13730main ()
13731{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013734 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013736 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 char const *const *pcpcc;
13739 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 /* NEC SVR4.0.2 mips cc rejects this. */
13741 struct point {int x, y;};
13742 static struct point const zero = {0,0};
13743 /* AIX XL C 1.02.0.0 rejects this.
13744 It does not let you subtract one const X* pointer from another in
13745 an arm of an if-expression whose if-part is not a constant
13746 expression */
13747 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 ++pcpcc;
13751 ppc = (char**) pcpcc;
13752 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013753 { /* SCO 3.2v4 cc rejects this sort of thing. */
13754 char tx;
13755 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 }
13761 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13762 int x[] = {25, 17};
13763 const int *foo = &x[0];
13764 ++foo;
13765 }
13766 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13767 typedef const int *iptr;
13768 iptr p = 0;
13769 ++p;
13770 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013771 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013773 struct s { int j; const int *ap[3]; } bx;
13774 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 }
13776 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13777 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013781#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013785}
Martin v. Löwis11437992002-04-12 09:54:03 +000013786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788 ac_cv_c_const=yes
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13795$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799
13800fi
13801
Michael W. Hudson54241132001-12-07 15:38:26 +000013802
Guido van Rossumda88dad1995-01-26 00:46:29 +000013803works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13805$as_echo_n "checking for working signed char... " >&6; }
13806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013807/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809int
13810main ()
13811{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ;
13814 return 0;
13815}
13816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013818 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013819else
Skip Montanaro6dead952003-09-25 14:50:04 +000013820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013823
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13827$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828
Guido van Rossumda88dad1995-01-26 00:46:29 +000013829have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13831$as_echo_n "checking for prototypes... " >&6; }
13832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013835int
13836main ()
13837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ;
13840 return 0;
13841}
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
Matthias Kloseb159a552010-04-25 21:00:44 +000013847 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13851$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852
Guido van Rossumda88dad1995-01-26 00:46:29 +000013853works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13855$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013857/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013858
13859#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013860int foo(int x, ...) {
13861 va_list va;
13862 va_start(va, x);
13863 va_arg(va, int);
13864 va_arg(va, char *);
13865 va_arg(va, double);
13866 return 0;
13867}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013868
Martin v. Löwis11437992002-04-12 09:54:03 +000013869int
13870main ()
13871{
Guido van Rossum90eea071996-08-30 20:58:57 +000013872return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 ;
13874 return 0;
13875}
13876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013882 works=yes
13883
Guido van Rossum627b2d71993-12-24 10:39:16 +000013884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13887$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888
Martin v. Löwisd6320502004-08-12 13:45:08 +000013889# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13891$as_echo_n "checking for socketpair... " >&6; }
13892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013893/* end confdefs.h. */
13894
13895#include <sys/types.h>
13896#include <sys/socket.h>
13897
13898int
13899main ()
13900{
13901void *x=socketpair
13902 ;
13903 return 0;
13904}
13905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013906if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013909
Matthias Kloseb159a552010-04-25 21:00:44 +000013910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013911$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13914$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013915
13916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013918
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13921$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013923/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924#include <sys/types.h>
13925#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013926int
13927main ()
13928{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929struct sockaddr x;
13930x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013935if ac_fn_c_try_compile "$LINENO"; then :
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13937$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940
13941else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13943$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013944
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013947
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013948# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013952if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13957$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958 OLD_CFLAGS=$CFLAGS
13959 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962
13963# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968
13969 char *name;
13970 struct hostent *he, *res;
13971 char buffer[2048];
13972 int buflen = 2048;
13973 int h_errnop;
13974
13975 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
13977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13989$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991else
Skip Montanaro6dead952003-09-25 14:50:04 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13994$as_echo "no" >&6; }
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13996$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002int
14003main ()
14004{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005
14006 char *name;
14007 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014008 char buffer[2048];
14009 int buflen = 2048;
14010 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011
Matthias Kloseb159a552010-04-25 21:00:44 +000014012 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014 ;
14015 return 0;
14016}
14017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Matthias Kloseb159a552010-04-25 21:00:44 +000014023$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14026$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028else
Skip Montanaro6dead952003-09-25 14:50:04 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14031$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14033$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14035/* end confdefs.h. */
14036
14037# include <netdb.h>
14038
14039int
14040main ()
14041{
14042
14043 char *name;
14044 struct hostent *he;
14045 struct hostent_data data;
14046
14047 (void) gethostbyname_r(name, he, &data);
14048
14049 ;
14050 return 0;
14051}
14052_ACEOF
14053if ac_fn_c_try_compile "$LINENO"; then :
14054
14055 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14056
14057
14058$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14059
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14061$as_echo "yes" >&6; }
14062
14063else
14064
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14066$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076 CFLAGS=$OLD_CFLAGS
14077
14078else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 for ac_func in gethostbyname
14081do :
14082 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014085#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014086_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014089done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092fi
14093
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
14095
14096
14097
14098
14099
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100# checks for system services
14101# (none yet)
14102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014104ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014106
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14109$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014114LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118/* Override any GCC internal prototype to avoid an error.
14119 Use char because int might match the return type of a GCC
14120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014121#ifdef __cplusplus
14122extern "C"
14123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014124char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014125int
14126main ()
14127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ;
14130 return 0;
14131}
14132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014138rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014140LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14143$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014144if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 cat >>confdefs.h <<_ACEOF
14146#define HAVE_LIBIEEE 1
14147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014149 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150
Guido van Rossum627b2d71993-12-24 10:39:16 +000014151fi
14152
Michael W. Hudson54241132001-12-07 15:38:26 +000014153
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014154fi
14155
Michael W. Hudson54241132001-12-07 15:38:26 +000014156
Guido van Rossum7f43da71994-08-01 12:15:30 +000014157# check for --with-libm=...
14158
Guido van Rossum563e7081996-09-10 18:20:48 +000014159case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014160Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014161*) LIBM=-lm
14162esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14164$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014169if test "$withval" = no
14170then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14172$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014173elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14176$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014177else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014178fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14181$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182fi
14183
Guido van Rossum7f43da71994-08-01 12:15:30 +000014184
14185# check for --with-libc=...
14186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14188$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014193if test "$withval" = no
14194then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14196$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014197elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14200$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014201else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014202fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014203else
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14205$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206fi
14207
Guido van Rossum7f43da71994-08-01 12:15:30 +000014208
Stefan Krah1919b7e2012-03-21 18:25:23 +010014209# **************************************
14210# * Check for gcc x64 inline assembler *
14211# **************************************
14212
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14214$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217
14218int
14219main ()
14220{
14221
14222 __asm__ __volatile__ ("movq %rcx, %rax");
14223
14224 ;
14225 return 0;
14226}
14227_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014228if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014229 have_gcc_asm_for_x64=yes
14230else
14231 have_gcc_asm_for_x64=no
14232fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014233rm -f core conftest.err conftest.$ac_objext \
14234 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14236$as_echo "$have_gcc_asm_for_x64" >&6; }
14237if test "$have_gcc_asm_for_x64" = yes
14238then
14239
14240$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14241
14242fi
14243
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014244# **************************************************
14245# * Check for various properties of floating point *
14246# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014247
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14249$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14250if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252else
14253
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254
14255ax_cv_c_float_words_bigendian=unknown
14256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257/* end confdefs.h. */
14258
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014259
14260double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14261
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014262
14263_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014264if ac_fn_c_try_compile "$LINENO"; then :
14265
14266
14267if grep noonsees conftest.$ac_objext >/dev/null ; then
14268 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014269fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270if grep seesnoon conftest.$ac_objext >/dev/null ; then
14271 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14272 ax_cv_c_float_words_bigendian=no
14273 else
14274 ax_cv_c_float_words_bigendian=unknown
14275 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276fi
14277
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014278
14279fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14283$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014285case $ax_cv_c_float_words_bigendian in
14286 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014288$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14289 ;;
14290 no)
14291 ;;
14292 *)
14293 as_fn_error $? "
14294
14295Unknown float word ordering. You need to manually preset
14296ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14297
14298 " "$LINENO" 5 ;;
14299esac
14300
14301
14302if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303then
14304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014307elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308then
14309
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014310$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14311
14312else
14313 # Some ARM platforms use a mixed-endian representation for doubles.
14314 # While Python doesn't currently have full support for these platforms
14315 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14316 # conversions work.
14317 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14318 # or little, then it must be this?
14319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014321
14322fi
14323
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014324# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014325# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014326# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014327# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014328# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014329# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014330
14331# This inline assembler syntax may also work for suncc and icc,
14332# so we try it on all platforms.
14333
Matthias Kloseb9621712010-04-24 17:59:49 +000014334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14335$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014337/* end confdefs.h. */
14338
14339int
14340main ()
14341{
14342
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014343 unsigned short cw;
14344 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14345 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014346
14347 ;
14348 return 0;
14349}
14350_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014351if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014352 have_gcc_asm_for_x87=yes
14353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014355fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014356rm -f core conftest.err conftest.$ac_objext \
14357 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14359$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014360if test "$have_gcc_asm_for_x87" = yes
14361then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014364
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14368$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14370/* end confdefs.h. */
14371
14372int
14373main ()
14374{
14375
14376 unsigned int fpcr;
14377 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14378 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14379
14380 ;
14381 return 0;
14382}
14383_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014384if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014385 have_gcc_asm_for_mc68881=yes
14386else
14387 have_gcc_asm_for_mc68881=no
14388fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014389rm -f core conftest.err conftest.$ac_objext \
14390 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14392$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14393if test "$have_gcc_asm_for_mc68881" = yes
14394then
14395
14396$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14397
14398fi
14399
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014400# Detect whether system arithmetic is subject to x87-style double
14401# rounding issues. The result of this test has little meaning on non
14402# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14403# mode is round-to-nearest and double rounding issues are present, and
14404# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14406$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014407# $BASECFLAGS may affect the result
14408ac_save_cc="$CC"
14409CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014410if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014411 ac_cv_x87_double_rounding=no
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014414/* end confdefs.h. */
14415
14416#include <stdlib.h>
14417#include <math.h>
14418int main() {
14419 volatile double x, y, z;
14420 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14421 x = 0.99999999999999989; /* 1-2**-53 */
14422 y = 1./x;
14423 if (y != 1.)
14424 exit(0);
14425 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14426 x = 1e16;
14427 y = 2.99999;
14428 z = x + y;
14429 if (z != 1e16+4.)
14430 exit(0);
14431 /* both tests show evidence of double rounding */
14432 exit(1);
14433}
14434
14435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014436if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014437 ac_cv_x87_double_rounding=no
14438else
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443fi
14444
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014445CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14447$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014448if test "$ac_cv_x87_double_rounding" = yes
14449then
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014452
14453fi
14454
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014455# ************************************
14456# * Check for mathematical functions *
14457# ************************************
14458
14459LIBS_SAVE=$LIBS
14460LIBS="$LIBS $LIBM"
14461
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014462for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14463do :
14464 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14465ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014467 cat >>confdefs.h <<_ACEOF
14468#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14469_ACEOF
14470
14471fi
14472done
14473
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014474for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014475do :
14476 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14477ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014478if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014479 cat >>confdefs.h <<_ACEOF
14480#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14481_ACEOF
14482
14483fi
14484done
14485
14486ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14487"
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014489 ac_have_decl=1
14490else
14491 ac_have_decl=0
14492fi
14493
14494cat >>confdefs.h <<_ACEOF
14495#define HAVE_DECL_ISINF $ac_have_decl
14496_ACEOF
14497ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14498"
Victor Stinnere0be4232011-10-25 13:06:09 +020014499if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_ISNAN $ac_have_decl
14507_ACEOF
14508ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14509"
Victor Stinnere0be4232011-10-25 13:06:09 +020014510if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_ISFINITE $ac_have_decl
14518_ACEOF
14519
14520
Mark Dickinsona614f042009-11-28 12:48:43 +000014521# For multiprocessing module, check that sem_open
14522# actually works. For FreeBSD versions <= 7.2,
14523# the kernel module that provides POSIX semaphores
14524# isn't loaded by default, so an attempt to call
14525# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14527$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014528if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014532 ac_cv_posix_semaphores_enabled=yes
14533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014535/* end confdefs.h. */
14536
14537#include <unistd.h>
14538#include <fcntl.h>
14539#include <stdio.h>
14540#include <semaphore.h>
14541#include <sys/stat.h>
14542
14543int main(void) {
14544 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14545 if (a == SEM_FAILED) {
14546 perror("sem_open");
14547 return 1;
14548 }
14549 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014550 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014551 return 0;
14552}
14553
14554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014555if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014556 ac_cv_posix_semaphores_enabled=yes
14557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014562fi
14563
14564
Mark Dickinsona614f042009-11-28 12:48:43 +000014565fi
14566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14568$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014569if test $ac_cv_posix_semaphores_enabled = no
14570then
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014573
14574fi
14575
Mark Dickinson10683072009-04-18 21:18:19 +000014576# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14578$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014579if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014581else
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014583 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014584else
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014586/* end confdefs.h. */
14587
14588#include <unistd.h>
14589#include <fcntl.h>
14590#include <stdio.h>
14591#include <semaphore.h>
14592#include <sys/stat.h>
14593
14594int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014595 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014596 int count;
14597 int res;
14598 if(a==SEM_FAILED){
14599 perror("sem_open");
14600 return 1;
14601
14602 }
14603 res = sem_getvalue(a, &count);
14604 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014605 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014606 return res==-1 ? 1 : 0;
14607}
14608
Mark Dickinson10683072009-04-18 21:18:19 +000014609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014610if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014611 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014612else
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014617fi
14618
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014620fi
14621
Matthias Kloseb9621712010-04-24 17:59:49 +000014622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14623$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014624if test $ac_cv_broken_sem_getvalue = yes
14625then
14626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014628
14629fi
14630
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014631ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14632"
14633if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14634 ac_have_decl=1
14635else
14636 ac_have_decl=0
14637fi
14638
14639cat >>confdefs.h <<_ACEOF
14640#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14641_ACEOF
14642ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14643"
14644if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14645 ac_have_decl=1
14646else
14647 ac_have_decl=0
14648fi
14649
14650cat >>confdefs.h <<_ACEOF
14651#define HAVE_DECL_RTLD_NOW $ac_have_decl
14652_ACEOF
14653ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14654"
14655if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14656 ac_have_decl=1
14657else
14658 ac_have_decl=0
14659fi
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14663_ACEOF
14664ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14665"
14666if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14667 ac_have_decl=1
14668else
14669 ac_have_decl=0
14670fi
14671
14672cat >>confdefs.h <<_ACEOF
14673#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14674_ACEOF
14675ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14676"
14677if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14678 ac_have_decl=1
14679else
14680 ac_have_decl=0
14681fi
14682
14683cat >>confdefs.h <<_ACEOF
14684#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14685_ACEOF
14686ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14687"
14688if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14689 ac_have_decl=1
14690else
14691 ac_have_decl=0
14692fi
14693
14694cat >>confdefs.h <<_ACEOF
14695#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14696_ACEOF
14697ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14698"
14699if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14700 ac_have_decl=1
14701else
14702 ac_have_decl=0
14703fi
14704
14705cat >>confdefs.h <<_ACEOF
14706#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14707_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014708ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14709"
14710if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14711 ac_have_decl=1
14712else
14713 ac_have_decl=0
14714fi
14715
14716cat >>confdefs.h <<_ACEOF
14717#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14718_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014719
14720
Mark Dickinsonbd792642009-03-18 20:06:12 +000014721# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14723$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014724# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014726 enableval=$enable_big_digits; case $enable_big_digits in
14727yes)
14728 enable_big_digits=30 ;;
14729no)
14730 enable_big_digits=15 ;;
1473115|30)
14732 ;;
14733*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014734 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 +000014735esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14737$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014738
14739cat >>confdefs.h <<_ACEOF
14740#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14741_ACEOF
14742
14743
14744else
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14746$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014747fi
14748
14749
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014751ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014753
14754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014757 wchar_h="yes"
14758
Guido van Rossumef2255b2000-03-10 22:30:29 +000014759else
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014761
14762fi
14763
Michael W. Hudson54241132001-12-07 15:38:26 +000014764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014766# determine wchar_t size
14767if test "$wchar_h" = yes
14768then
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14774$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014775if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014777else
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14779"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781else
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 if test "$ac_cv_type_wchar_t" = yes; then
14783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014785as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014786See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787 else
14788 ac_cv_sizeof_wchar_t=0
14789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14794$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795
14796
14797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014799#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014800_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014801
Michael W. Hudson54241132001-12-07 15:38:26 +000014802
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014803fi
14804
Matthias Kloseb9621712010-04-24 17:59:49 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14806$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014807have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014809/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014810
14811#include <tcl.h>
14812#if TCL_UTF_MAX != 6
14813# error "NOT UCS4_TCL"
14814#endif
14815int
14816main ()
14817{
14818
14819 ;
14820 return 0;
14821}
14822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014824
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014827
14828 have_ucs4_tcl=yes
14829
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14833$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014834
Skip Montanaro6dead952003-09-25 14:50:04 +000014835# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014836if test "$wchar_h" = yes
14837then
14838 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14840$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014841 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014843else
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014846 ac_cv_wchar_t_signed=yes
14847else
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014849/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014850
14851 #include <wchar.h>
14852 int main()
14853 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014854 /* Success: exit code 0 */
14855 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014856 }
14857
14858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014859if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014860 ac_cv_wchar_t_signed=yes
14861else
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014866fi
14867
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014868fi
14869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14871$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872fi
14873
Michael Osipov3738fad2018-08-24 18:17:19 +020014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14875$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014876# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014877if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014878 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014879then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014882
Michael Osipov3738fad2018-08-24 18:17:19 +020014883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14884$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014885else
Michael Osipov3738fad2018-08-24 18:17:19 +020014886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14887$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014888fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014889
14890# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14892$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014893if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 ac_cv_c_bigendian=unknown
14897 # See if we're dealing with a universal compiler.
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899/* end confdefs.h. */
14900#ifndef __APPLE_CC__
14901 not a universal capable compiler
14902 #endif
14903 typedef int dummy;
14904
Skip Montanaro6dead952003-09-25 14:50:04 +000014905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906if ac_fn_c_try_compile "$LINENO"; then :
14907
14908 # Check for potential -arch flags. It is not universal unless
14909 # there are at least two -arch flags with different values.
14910 ac_arch=
14911 ac_prev=
14912 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14913 if test -n "$ac_prev"; then
14914 case $ac_word in
14915 i?86 | x86_64 | ppc | ppc64)
14916 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14917 ac_arch=$ac_word
14918 else
14919 ac_cv_c_bigendian=universal
14920 break
14921 fi
14922 ;;
14923 esac
14924 ac_prev=
14925 elif test "x$ac_word" = "x-arch"; then
14926 ac_prev=arch
14927 fi
14928 done
14929fi
14930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14931 if test $ac_cv_c_bigendian = unknown; then
14932 # See if sys/param.h defines the BYTE_ORDER macro.
14933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937
Martin v. Löwis11437992002-04-12 09:54:03 +000014938int
14939main ()
14940{
Matthias Kloseb9621712010-04-24 17:59:49 +000014941#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14942 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14943 && LITTLE_ENDIAN)
14944 bogus endian macros
14945 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
14947 ;
14948 return 0;
14949}
14950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014951if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014952 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014955#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958int
14959main ()
14960{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014961#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 not big endian
14963 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014964
14965 ;
14966 return 0;
14967}
14968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014970 ac_cv_c_bigendian=yes
14971else
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014975fi
14976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14977 fi
14978 if test $ac_cv_c_bigendian = unknown; then
14979 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014982#include <limits.h>
14983
Martin v. Löwis11437992002-04-12 09:54:03 +000014984int
14985main ()
14986{
Matthias Kloseb9621712010-04-24 17:59:49 +000014987#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14988 bogus endian macros
14989 #endif
14990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ;
14992 return 0;
14993}
14994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014995if ac_fn_c_try_compile "$LINENO"; then :
14996 # It does; now see whether it defined to _BIG_ENDIAN or not.
14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14998/* end confdefs.h. */
14999#include <limits.h>
15000
15001int
15002main ()
15003{
15004#ifndef _BIG_ENDIAN
15005 not big endian
15006 #endif
15007
15008 ;
15009 return 0;
15010}
15011_ACEOF
15012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015014else
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15018fi
15019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15020 fi
15021 if test $ac_cv_c_bigendian = unknown; then
15022 # Compile a test program.
15023 if test "$cross_compiling" = yes; then :
15024 # Try to guess by grepping values from an object file.
15025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15026/* end confdefs.h. */
15027short int ascii_mm[] =
15028 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15029 short int ascii_ii[] =
15030 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15031 int use_ascii (int i) {
15032 return ascii_mm[i] + ascii_ii[i];
15033 }
15034 short int ebcdic_ii[] =
15035 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15036 short int ebcdic_mm[] =
15037 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15038 int use_ebcdic (int i) {
15039 return ebcdic_mm[i] + ebcdic_ii[i];
15040 }
15041 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042
Matthias Kloseb9621712010-04-24 17:59:49 +000015043int
15044main ()
15045{
15046return use_ascii (foo) == use_ebcdic (foo);
15047 ;
15048 return 0;
15049}
15050_ACEOF
15051if ac_fn_c_try_compile "$LINENO"; then :
15052 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15053 ac_cv_c_bigendian=yes
15054 fi
15055 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15056 if test "$ac_cv_c_bigendian" = unknown; then
15057 ac_cv_c_bigendian=no
15058 else
15059 # finding both strings is unlikely to happen, but who knows?
15060 ac_cv_c_bigendian=unknown
15061 fi
15062 fi
15063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015065else
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015067/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015069int
15070main ()
15071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 /* Are we little or big endian? From Harbison&Steele. */
15074 union
15075 {
15076 long int l;
15077 char c[sizeof (long int)];
15078 } u;
15079 u.l = 1;
15080 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081
15082 ;
15083 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084}
Martin v. Löwis11437992002-04-12 09:54:03 +000015085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015086if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015087 ac_cv_c_bigendian=no
15088else
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15098$as_echo "$ac_cv_c_bigendian" >&6; }
15099 case $ac_cv_c_bigendian in #(
15100 yes)
15101 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15102;; #(
15103 no)
15104 ;; #(
15105 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015108
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 ;; #(
15110 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015111 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015112 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015114
Michael W. Hudson54241132001-12-07 15:38:26 +000015115
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015116# ABI version string for Python extension modules. This appears between the
15117# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15118# from the following attributes which affect the ABI of this Python build (in
15119# this order):
15120#
15121# * The Python implementation (always 'cpython-' for us)
15122# * The major and minor version numbers
15123# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015124#
15125# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015126# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15127# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015128#
15129# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15130# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015131
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15133$as_echo_n "checking ABIFLAGS... " >&6; }
15134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15135$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15137$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015138SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15140$as_echo "$SOABI" >&6; }
15141
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015142# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15143if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015144 # Similar to SOABI but remove "d" flag from ABIFLAGS
15145
15146 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15147
15148cat >>confdefs.h <<_ACEOF
15149#define ALT_SOABI "${ALT_SOABI}"
15150_ACEOF
15151
15152fi
15153
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015154
15155case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015156 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015157 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15158 *)
15159 EXT_SUFFIX=${SHLIB_SUFFIX};;
15160esac
15161
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15163$as_echo_n "checking LDVERSION... " >&6; }
15164LDVERSION='$(VERSION)$(ABIFLAGS)'
15165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15166$as_echo "$LDVERSION" >&6; }
15167
E. M. Brayc994c8f2019-05-24 17:33:47 +020015168# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015169
E. M. Brayb1fc4172019-05-24 18:39:39 +020015170if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015171 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015172else
15173 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015174fi
15175
doko@python.org87421192013-01-26 11:39:31 +010015176
doko@ubuntu.com55532312016-06-14 08:55:19 +020015177if test x$PLATFORM_TRIPLET = x; then
15178 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15179else
15180 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15181fi
doko@python.org87421192013-01-26 11:39:31 +010015182
15183
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015184# Check whether right shifting a negative integer extends the sign bit
15185# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15187$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015188if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015190else
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015193 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015194else
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015196/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015197
15198int main()
15199{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015200 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015201}
15202
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015205 ac_cv_rshift_extends_sign=yes
15206else
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015211fi
15212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213fi
15214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15216$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015217if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015218then
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015221
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015222fi
15223
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015224# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15226$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015229else
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
Matthias Kloseb9621712010-04-24 17:59:49 +000015231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015232/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015233#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015234int
15235main ()
15236{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015237
15238 FILE *f = fopen("/dev/null", "r");
15239 flockfile(f);
15240 getc_unlocked(f);
15241 funlockfile(f);
15242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 ;
15244 return 0;
15245}
15246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015247if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015248 ac_cv_have_getc_unlocked=yes
15249else
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 ac_cv_have_getc_unlocked=no
15251fi
15252rm -f core conftest.err conftest.$ac_objext \
15253 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15257$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015258if test "$ac_cv_have_getc_unlocked" = yes
15259then
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015262
15263fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015264
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015265# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015266# save the value of LIBS so we don't actually link Python with readline
15267LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015268
Gregory P. Smith18820942008-09-07 06:24:49 +000015269# On some systems we need to link readline to a termcap compatible
15270# library. NOTE: Keep the precedence of listed libraries synchronised
15271# with setup.py.
15272py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15274$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015275for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015276 if test -z "$py_libtermcap"; then
15277 READLINE_LIBS="-lreadline"
15278 else
15279 READLINE_LIBS="-lreadline -l$py_libtermcap"
15280 fi
15281 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015283/* end confdefs.h. */
15284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285/* Override any GCC internal prototype to avoid an error.
15286 Use char because int might match the return type of a GCC
15287 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015288#ifdef __cplusplus
15289extern "C"
15290#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015291char readline ();
15292int
15293main ()
15294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015296 ;
15297 return 0;
15298}
15299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015300if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015301 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015303rm -f core conftest.err conftest.$ac_objext \
15304 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015305 if test $py_cv_lib_readline = yes; then
15306 break
15307 fi
15308done
15309# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15310#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015311if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15313$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015314else
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15316$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015319
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015320fi
15321
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015322# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015324/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015325#include <readline/readline.h>
15326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015327if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015328 have_readline=yes
15329else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015330 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015331
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015332fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015333rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015334if test $have_readline = yes
15335then
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015337/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015338#include <readline/readline.h>
15339
15340_ACEOF
15341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015345
15346fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015347rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015350/* end confdefs.h. */
15351#include <readline/readline.h>
15352
15353_ACEOF
15354if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015358
15359fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015360rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015361
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015362fi
15363
Martin v. Löwis0daad592001-09-30 21:09:59 +000015364# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15366$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015367if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015369else
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015371LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375/* Override any GCC internal prototype to avoid an error.
15376 Use char because int might match the return type of a GCC
15377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015378#ifdef __cplusplus
15379extern "C"
15380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015381char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015382int
15383main ()
15384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ;
15387 return 0;
15388}
15389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015392else
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015395rm -f core conftest.err conftest.$ac_objext \
15396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015397LIBS=$ac_check_lib_save_LIBS
15398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15400$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015401if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015404
Martin v. Löwis0daad592001-09-30 21:09:59 +000015405fi
15406
Michael W. Hudson54241132001-12-07 15:38:26 +000015407
Thomas Wouters89d996e2007-09-08 17:39:28 +000015408# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15410$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015411if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015413else
15414 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015415LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015417/* end confdefs.h. */
15418
15419/* Override any GCC internal prototype to avoid an error.
15420 Use char because int might match the return type of a GCC
15421 builtin and then its argument prototype would still apply. */
15422#ifdef __cplusplus
15423extern "C"
15424#endif
15425char rl_completion_display_matches_hook ();
15426int
15427main ()
15428{
15429return rl_completion_display_matches_hook ();
15430 ;
15431 return 0;
15432}
15433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015434if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015435 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15436else
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015439rm -f core conftest.err conftest.$ac_objext \
15440 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015441LIBS=$ac_check_lib_save_LIBS
15442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15444$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015445if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015448
15449fi
15450
15451
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015452# also in 4.0, but not in editline
15453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15454$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15455if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15456 $as_echo_n "(cached) " >&6
15457else
15458 ac_check_lib_save_LIBS=$LIBS
15459LIBS="-lreadline $READLINE_LIBS $LIBS"
15460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15461/* end confdefs.h. */
15462
15463/* Override any GCC internal prototype to avoid an error.
15464 Use char because int might match the return type of a GCC
15465 builtin and then its argument prototype would still apply. */
15466#ifdef __cplusplus
15467extern "C"
15468#endif
15469char rl_resize_terminal ();
15470int
15471main ()
15472{
15473return rl_resize_terminal ();
15474 ;
15475 return 0;
15476}
15477_ACEOF
15478if ac_fn_c_try_link "$LINENO"; then :
15479 ac_cv_lib_readline_rl_resize_terminal=yes
15480else
15481 ac_cv_lib_readline_rl_resize_terminal=no
15482fi
15483rm -f core conftest.err conftest.$ac_objext \
15484 conftest$ac_exeext conftest.$ac_ext
15485LIBS=$ac_check_lib_save_LIBS
15486fi
15487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15488$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15489if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15490
15491$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15492
15493fi
15494
15495
Martin v. Löwis0daad592001-09-30 21:09:59 +000015496# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15498$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015499if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015500 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015501else
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015503LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507/* Override any GCC internal prototype to avoid an error.
15508 Use char because int might match the return type of a GCC
15509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015510#ifdef __cplusplus
15511extern "C"
15512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015513char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015514int
15515main ()
15516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015517return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ;
15519 return 0;
15520}
15521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015524else
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015527rm -f core conftest.err conftest.$ac_objext \
15528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015529LIBS=$ac_check_lib_save_LIBS
15530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15532$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015533if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015536
Guido van Rossum353ae582001-07-10 16:45:32 +000015537fi
15538
Jack Jansendd19cf82001-12-06 22:36:17 +000015539
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015540# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015542/* end confdefs.h. */
15543#include <readline/readline.h>
15544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015545if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015546 have_readline=yes
15547else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015548 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015549
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015550fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015551rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015552if test $have_readline = yes
15553then
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015555/* end confdefs.h. */
15556#include <readline/readline.h>
15557
15558_ACEOF
15559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015563
15564fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015565rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015566
15567fi
15568
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15570$as_echo_n "checking for append_history in -lreadline... " >&6; }
15571if ${ac_cv_lib_readline_append_history+:} false; then :
15572 $as_echo_n "(cached) " >&6
15573else
15574 ac_check_lib_save_LIBS=$LIBS
15575LIBS="-lreadline $READLINE_LIBS $LIBS"
15576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15577/* end confdefs.h. */
15578
15579/* Override any GCC internal prototype to avoid an error.
15580 Use char because int might match the return type of a GCC
15581 builtin and then its argument prototype would still apply. */
15582#ifdef __cplusplus
15583extern "C"
15584#endif
15585char append_history ();
15586int
15587main ()
15588{
15589return append_history ();
15590 ;
15591 return 0;
15592}
15593_ACEOF
15594if ac_fn_c_try_link "$LINENO"; then :
15595 ac_cv_lib_readline_append_history=yes
15596else
15597 ac_cv_lib_readline_append_history=no
15598fi
15599rm -f core conftest.err conftest.$ac_objext \
15600 conftest$ac_exeext conftest.$ac_ext
15601LIBS=$ac_check_lib_save_LIBS
15602fi
15603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15604$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15605if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15606
15607$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15608
15609fi
15610
15611
Martin v. Löwis82bca632006-02-10 20:49:30 +000015612# End of readline checks: restore LIBS
15613LIBS=$LIBS_no_readline
15614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15616$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015619else
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015622 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015623else
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015625/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015626
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015627#include <stdlib.h>
15628#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015629int main()
15630{
15631 int val1 = nice(1);
15632 if (val1 != -1 && val1 == nice(2))
15633 exit(0);
15634 exit(1);
15635}
15636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015638if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015639 ac_cv_broken_nice=yes
15640else
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015645fi
15646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647fi
15648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15650$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015651if test "$ac_cv_broken_nice" = yes
15652then
Martin v. Löwis11437992002-04-12 09:54:03 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015655
15656fi
15657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15659$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015660if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015664 ac_cv_broken_poll=no
15665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015667/* end confdefs.h. */
15668
15669#include <poll.h>
15670
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015671int main()
15672{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015673 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015674 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015675
15676 close (42);
15677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015678 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015679 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015680 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015682 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015683 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015684 return 1;
15685}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686
15687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015688if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015689 ac_cv_broken_poll=yes
15690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015697fi
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15700$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015701if test "$ac_cv_broken_poll" = yes
15702then
15703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015705
15706fi
15707
Martin v. Löwis1d459062005-03-14 21:23:33 +000015708# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15710$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015711if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015713else
15714
Matthias Kloseb9621712010-04-24 17:59:49 +000015715if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015716 ac_cv_working_tzset=no
15717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015720
15721#include <stdlib.h>
15722#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015723#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015724
15725#if HAVE_TZNAME
15726extern char *tzname[];
15727#endif
15728
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015729int main()
15730{
Brett Cannon18367812003-09-19 00:59:16 +000015731 /* Note that we need to ensure that not only does tzset(3)
15732 do 'something' with localtime, but it works as documented
15733 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015734 This includes making sure that tzname is set properly if
15735 tm->tm_zone does not exist since it is the alternative way
15736 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015737
15738 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015739 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015740 */
15741
Martin v. Löwis1d459062005-03-14 21:23:33 +000015742 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015743 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15744
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015745 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015746 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015747 if (localtime(&groundhogday)->tm_hour != 0)
15748 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015749#if HAVE_TZNAME
15750 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15751 if (strcmp(tzname[0], "UTC") ||
15752 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15753 exit(1);
15754#endif
Brett Cannon18367812003-09-19 00:59:16 +000015755
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015756 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015757 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015758 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015759 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015760#if HAVE_TZNAME
15761 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15762 exit(1);
15763#endif
Brett Cannon18367812003-09-19 00:59:16 +000015764
15765 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15766 tzset();
15767 if (localtime(&groundhogday)->tm_hour != 11)
15768 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015769#if HAVE_TZNAME
15770 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15771 exit(1);
15772#endif
15773
15774#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015775 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15776 exit(1);
15777 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15778 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015779#endif
Brett Cannon18367812003-09-19 00:59:16 +000015780
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015781 exit(0);
15782}
15783
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015786 ac_cv_working_tzset=yes
15787else
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015792fi
15793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794fi
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15797$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798if test "$ac_cv_working_tzset" = yes
15799then
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015802
15803fi
15804
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015805# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15807$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015808if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015810else
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015812/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015813#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015814int
15815main ()
15816{
15817
15818struct stat st;
15819st.st_mtim.tv_nsec = 1;
15820
15821 ;
15822 return 0;
15823}
15824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015825if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015826 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15831fi
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15834$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015835if test "$ac_cv_stat_tv_nsec" = yes
15836then
15837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015839
15840fi
15841
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015842# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15844$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015845if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015849/* end confdefs.h. */
15850#include <sys/stat.h>
15851int
15852main ()
15853{
15854
15855struct stat st;
15856st.st_mtimespec.tv_nsec = 1;
15857
15858 ;
15859 return 0;
15860}
15861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015863 ac_cv_stat_tv_nsec2=yes
15864else
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15868fi
15869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15871$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015872if test "$ac_cv_stat_tv_nsec2" = yes
15873then
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015876
15877fi
15878
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015879# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015880ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015881if test "$cross_compiling" = no; then
15882 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15883fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015884
15885for ac_header in curses.h ncurses.h
15886do :
15887 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15888ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15889if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15890 cat >>confdefs.h <<_ACEOF
15891#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15892_ACEOF
15893
15894fi
15895
15896done
15897
15898
15899# On Solaris, term.h requires curses.h
15900for ac_header in term.h
15901do :
15902 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15903#ifdef HAVE_CURSES_H
15904#include <curses.h>
15905#endif
15906
15907"
15908if test "x$ac_cv_header_term_h" = xyes; then :
15909 cat >>confdefs.h <<_ACEOF
15910#define HAVE_TERM_H 1
15911_ACEOF
15912
15913fi
15914
15915done
15916
15917
Jack Jansen666b1e72001-10-31 12:11:48 +000015918# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15920$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015921if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015923else
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015925/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015926#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015927int
15928main ()
15929{
Jack Jansen666b1e72001-10-31 12:11:48 +000015930
15931 int rtn;
15932 rtn = mvwdelch(0,0,0);
15933
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 ;
15935 return 0;
15936}
15937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015938if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015939 ac_cv_mvwdelch_is_expression=yes
15940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15944fi
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15947$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015948
15949if test "$ac_cv_mvwdelch_is_expression" = yes
15950then
Martin v. Löwis11437992002-04-12 09:54:03 +000015951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015953
15954fi
15955
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015956# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15957# structs since version 5.7. If the macro is defined as zero before including
15958# [n]curses.h, ncurses will expose fields of the structs regardless of the
15959# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15961$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015962if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015964else
Matthias Kloseb9621712010-04-24 17:59:49 +000015965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015966/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015967
15968 #define NCURSES_OPAQUE 0
15969 #include <curses.h>
15970
Martin v. Löwis11437992002-04-12 09:54:03 +000015971int
15972main ()
15973{
Jack Jansen666b1e72001-10-31 12:11:48 +000015974
15975 WINDOW *w;
15976 w->_flags = 0;
15977
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 ;
15979 return 0;
15980}
15981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015982if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015983 ac_cv_window_has_flags=yes
15984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988fi
15989
Matthias Kloseb9621712010-04-24 17:59:49 +000015990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15991$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015992
Jack Jansen666b1e72001-10-31 12:11:48 +000015993
15994if test "$ac_cv_window_has_flags" = yes
15995then
Martin v. Löwis11437992002-04-12 09:54:03 +000015996
Matthias Kloseb9621712010-04-24 17:59:49 +000015997$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015998
15999fi
16000
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16002$as_echo_n "checking for is_pad... " >&6; }
16003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16004/* end confdefs.h. */
16005#include <curses.h>
16006int
16007main ()
16008{
16009
16010#ifndef is_pad
16011void *x=is_pad
16012#endif
16013
16014 ;
16015 return 0;
16016}
16017_ACEOF
16018if ac_fn_c_try_compile "$LINENO"; then :
16019
16020$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16021
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16023$as_echo "yes" >&6; }
16024else
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16026$as_echo "no" >&6; }
16027
16028fi
16029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16032$as_echo_n "checking for is_term_resized... " >&6; }
16033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016034/* end confdefs.h. */
16035#include <curses.h>
16036int
16037main ()
16038{
16039void *x=is_term_resized
16040 ;
16041 return 0;
16042}
16043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016047
Matthias Kloseb159a552010-04-25 21:00:44 +000016048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016049$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016050else
Matthias Kloseb9621712010-04-24 17:59:49 +000016051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16052$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016053
16054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16056
Matthias Kloseb9621712010-04-24 17:59:49 +000016057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16058$as_echo_n "checking for resize_term... " >&6; }
16059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016060/* end confdefs.h. */
16061#include <curses.h>
16062int
16063main ()
16064{
16065void *x=resize_term
16066 ;
16067 return 0;
16068}
16069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016070if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016073
Matthias Kloseb159a552010-04-25 21:00:44 +000016074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016075$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016076else
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016079
16080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16084$as_echo_n "checking for resizeterm... " >&6; }
16085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016086/* end confdefs.h. */
16087#include <curses.h>
16088int
16089main ()
16090{
16091void *x=resizeterm
16092 ;
16093 return 0;
16094}
16095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016096if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016099
Matthias Kloseb159a552010-04-25 21:00:44 +000016100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016102else
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16104$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016105
16106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016108
16109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16110$as_echo_n "checking for immedok... " >&6; }
16111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16112/* end confdefs.h. */
16113#include <curses.h>
16114int
16115main ()
16116{
16117
16118#ifndef immedok
16119void *x=immedok
16120#endif
16121
16122 ;
16123 return 0;
16124}
16125_ACEOF
16126if ac_fn_c_try_compile "$LINENO"; then :
16127
16128$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16129
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16131$as_echo "yes" >&6; }
16132else
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16134$as_echo "no" >&6; }
16135
16136fi
16137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16138
16139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16140$as_echo_n "checking for syncok... " >&6; }
16141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16142/* end confdefs.h. */
16143#include <curses.h>
16144int
16145main ()
16146{
16147
16148#ifndef syncok
16149void *x=syncok
16150#endif
16151
16152 ;
16153 return 0;
16154}
16155_ACEOF
16156if ac_fn_c_try_compile "$LINENO"; then :
16157
16158$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16159
16160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16161$as_echo "yes" >&6; }
16162else
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16164$as_echo "no" >&6; }
16165
16166fi
16167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16168
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16170$as_echo_n "checking for wchgat... " >&6; }
16171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172/* end confdefs.h. */
16173#include <curses.h>
16174int
16175main ()
16176{
16177
16178#ifndef wchgat
16179void *x=wchgat
16180#endif
16181
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186if ac_fn_c_try_compile "$LINENO"; then :
16187
16188$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16189
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16191$as_echo "yes" >&6; }
16192else
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16194$as_echo "no" >&6; }
16195
16196fi
16197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16198
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16200$as_echo_n "checking for filter... " >&6; }
16201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202/* end confdefs.h. */
16203#include <curses.h>
16204int
16205main ()
16206{
16207
16208#ifndef filter
16209void *x=filter
16210#endif
16211
16212 ;
16213 return 0;
16214}
16215_ACEOF
16216if ac_fn_c_try_compile "$LINENO"; then :
16217
16218$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16219
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16221$as_echo "yes" >&6; }
16222else
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16224$as_echo "no" >&6; }
16225
16226fi
16227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228
16229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16230$as_echo_n "checking for has_key... " >&6; }
16231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h. */
16233#include <curses.h>
16234int
16235main ()
16236{
16237
16238#ifndef has_key
16239void *x=has_key
16240#endif
16241
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246if ac_fn_c_try_compile "$LINENO"; then :
16247
16248$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16249
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16251$as_echo "yes" >&6; }
16252else
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16254$as_echo "no" >&6; }
16255
16256fi
16257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16258
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16260$as_echo_n "checking for typeahead... " >&6; }
16261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16262/* end confdefs.h. */
16263#include <curses.h>
16264int
16265main ()
16266{
16267
16268#ifndef typeahead
16269void *x=typeahead
16270#endif
16271
16272 ;
16273 return 0;
16274}
16275_ACEOF
16276if ac_fn_c_try_compile "$LINENO"; then :
16277
16278$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16279
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16281$as_echo "yes" >&6; }
16282else
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16284$as_echo "no" >&6; }
16285
16286fi
16287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16288
16289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16290$as_echo_n "checking for use_env... " >&6; }
16291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16292/* end confdefs.h. */
16293#include <curses.h>
16294int
16295main ()
16296{
16297
16298#ifndef use_env
16299void *x=use_env
16300#endif
16301
16302 ;
16303 return 0;
16304}
16305_ACEOF
16306if ac_fn_c_try_compile "$LINENO"; then :
16307
16308$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16309
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16311$as_echo "yes" >&6; }
16312else
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16314$as_echo "no" >&6; }
16315
16316fi
16317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016318# last curses configure check
16319CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16322$as_echo "$as_me: checking for device files" >&6;}
16323
16324if test "x$cross_compiling" = xyes; then
16325 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16327$as_echo_n "checking for /dev/ptmx... " >&6; }
16328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16329$as_echo "not set" >&6; }
16330 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16331 fi
16332 if test "${ac_cv_file__dev_ptc+set}" != set; then
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16334$as_echo_n "checking for /dev/ptc... " >&6; }
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16336$as_echo "not set" >&6; }
16337 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16338 fi
16339fi
16340
Matthias Kloseb9621712010-04-24 17:59:49 +000016341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16342$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016343if ${ac_cv_file__dev_ptmx+:} false; then :
16344 $as_echo_n "(cached) " >&6
16345else
16346 test "$cross_compiling" = yes &&
16347 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16348if test -r "/dev/ptmx"; then
16349 ac_cv_file__dev_ptmx=yes
16350else
16351 ac_cv_file__dev_ptmx=no
16352fi
16353fi
16354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16355$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16356if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016357
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016358fi
16359
16360if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016363
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16366$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016367if ${ac_cv_file__dev_ptc+:} false; then :
16368 $as_echo_n "(cached) " >&6
16369else
16370 test "$cross_compiling" = yes &&
16371 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16372if test -r "/dev/ptc"; then
16373 ac_cv_file__dev_ptc=yes
16374else
16375 ac_cv_file__dev_ptc=no
16376fi
16377fi
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16379$as_echo "$ac_cv_file__dev_ptc" >&6; }
16380if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016381
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016382fi
16383
16384if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016385
Matthias Kloseb9621712010-04-24 17:59:49 +000016386$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016387
Neal Norwitz865400f2003-03-21 01:42:58 +000016388fi
16389
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016390if test $ac_sys_system = Darwin
16391then
16392 LIBS="$LIBS -framework CoreFoundation"
16393fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016394
Matthias Kloseb9621712010-04-24 17:59:49 +000016395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16396$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016397if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016398 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016399else
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016401 ac_cv_have_size_t_format="cross -- assuming yes"
16402
Thomas Wouters477c8d52006-05-27 19:21:47 +000016403else
Matthias Kloseb9621712010-04-24 17:59:49 +000016404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016405/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016406
Thomas Wouters477c8d52006-05-27 19:21:47 +000016407#include <stdio.h>
16408#include <stddef.h>
16409#include <string.h>
16410
Christian Heimes2c181612007-12-17 20:04:13 +000016411#ifdef HAVE_SYS_TYPES_H
16412#include <sys/types.h>
16413#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016414
16415#ifdef HAVE_SSIZE_T
16416typedef ssize_t Py_ssize_t;
16417#elif SIZEOF_VOID_P == SIZEOF_LONG
16418typedef long Py_ssize_t;
16419#else
16420typedef int Py_ssize_t;
16421#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016422
Christian Heimes2c181612007-12-17 20:04:13 +000016423int main()
16424{
16425 char buffer[256];
16426
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16428 return 1;
16429
Thomas Wouters89f507f2006-12-13 04:49:30 +000016430 if (strcmp(buffer, "123"))
16431 return 1;
16432
16433 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16434 return 1;
16435
16436 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016437 return 1;
16438
16439 return 0;
16440}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016441
Thomas Wouters477c8d52006-05-27 19:21:47 +000016442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016443if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016444 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016445else
Matthias Kloseb9621712010-04-24 17:59:49 +000016446 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016450fi
16451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16454$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016455if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016456
Matthias Kloseb9621712010-04-24 17:59:49 +000016457$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016458
16459fi
16460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016462#ifdef HAVE_SYS_TYPES_H
16463#include <sys/types.h>
16464#endif
16465#ifdef HAVE_SYS_SOCKET_H
16466#include <sys/socket.h>
16467#endif
16468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469"
Victor Stinnere0be4232011-10-25 13:06:09 +020016470if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016471
Martin v. Löwis11437992002-04-12 09:54:03 +000016472else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016475
16476fi
16477
Michael W. Hudson54241132001-12-07 15:38:26 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16480$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016481if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016483else
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016485 ac_cv_broken_mbstowcs=no
16486else
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016488/* end confdefs.h. */
16489
Stefan Krah19c21392012-11-22 23:47:32 +010016490#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016491#include<stdlib.h>
16492int main() {
16493 size_t len = -1;
16494 const char *str = "text";
16495 len = mbstowcs(NULL, str, 0);
16496 return (len != 4);
16497}
16498
16499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016500if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016501 ac_cv_broken_mbstowcs=no
16502else
Matthias Kloseb9621712010-04-24 17:59:49 +000016503 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016507fi
16508
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016509fi
16510
Matthias Kloseb9621712010-04-24 17:59:49 +000016511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16512$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016513if test "$ac_cv_broken_mbstowcs" = yes
16514then
16515
Matthias Kloseb9621712010-04-24 17:59:49 +000016516$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016517
16518fi
16519
Antoine Pitroub52ec782009-01-25 16:34:23 +000016520# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16522$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016523
16524# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016525if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016526 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016527if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016528then
16529
Matthias Kloseb9621712010-04-24 17:59:49 +000016530$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016531
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16533$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016534fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016535if test "$withval" = no
16536then
16537
16538$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16539
Matthias Kloseb9621712010-04-24 17:59:49 +000016540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16541$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016542fi
16543
Antoine Pitrou042b1282010-08-13 21:15:58 +000016544else
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16546$as_echo "no value specified" >&6; }
16547fi
16548
Antoine Pitroub52ec782009-01-25 16:34:23 +000016549
Matthias Kloseb17289e2012-03-15 19:51:34 +010016550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16551$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16552if ${ac_cv_computed_gotos+:} false; then :
16553 $as_echo_n "(cached) " >&6
16554else
16555 if test "$cross_compiling" = yes; then :
16556 if test "${with_computed_gotos+set}" = set; then
16557 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16558 else
16559 ac_cv_computed_gotos=no
16560 fi
16561else
16562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563/* end confdefs.h. */
16564
16565int main(int argc, char **argv)
16566{
16567 static void *targets[1] = { &&LABEL1 };
16568 goto LABEL2;
16569LABEL1:
16570 return 0;
16571LABEL2:
16572 goto *targets[0];
16573 return 1;
16574}
16575
16576_ACEOF
16577if ac_fn_c_try_run "$LINENO"; then :
16578 ac_cv_computed_gotos=yes
16579else
16580 ac_cv_computed_gotos=no
16581fi
16582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16583 conftest.$ac_objext conftest.beam conftest.$ac_ext
16584fi
16585
16586fi
16587
16588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16589$as_echo "$ac_cv_computed_gotos" >&6; }
16590case "$ac_cv_computed_gotos" in yes*)
16591
16592$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16593
16594esac
16595
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016596case $ac_sys_system in
16597AIX*)
16598
16599$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16600 ;;
16601esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016602
Michael W. Hudson54241132001-12-07 15:38:26 +000016603
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016604
16605
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016606for h in `(cd $srcdir;echo Python/thread_*.h)`
16607do
16608 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16609done
16610
Michael W. Hudson54241132001-12-07 15:38:26 +000016611
Victor Stinner21a74a92019-04-11 22:28:12 +020016612SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16614$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016615for dir in $SRCDIRS; do
16616 if test ! -d $dir; then
16617 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016618 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016619done
Matthias Kloseb9621712010-04-24 17:59:49 +000016620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16621$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016622
Stefan Krah1919b7e2012-03-21 18:25:23 +010016623# Availability of -O2:
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16625$as_echo_n "checking for -O2... " >&6; }
16626saved_cflags="$CFLAGS"
16627CFLAGS="-O2"
16628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629/* end confdefs.h. */
16630
16631int
16632main ()
16633{
16634
16635
16636 ;
16637 return 0;
16638}
16639_ACEOF
16640if ac_fn_c_try_compile "$LINENO"; then :
16641 have_O2=yes
16642else
16643 have_O2=no
16644fi
16645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16647$as_echo "$have_O2" >&6; }
16648CFLAGS="$saved_cflags"
16649
16650# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16651# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16653$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16654saved_cflags="$CFLAGS"
16655CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16656if test "$have_O2" = no; then
16657 CFLAGS=""
16658fi
16659if test "$cross_compiling" = yes; then :
16660 have_glibc_memmove_bug=undefined
16661else
16662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16663/* end confdefs.h. */
16664
16665#include <stdio.h>
16666#include <stdlib.h>
16667#include <string.h>
16668void foo(void *p, void *q) { memmove(p, q, 19); }
16669int main() {
16670 char a[32] = "123456789000000000";
16671 foo(&a[9], a);
16672 if (strcmp(a, "123456789123456789000000000") != 0)
16673 return 1;
16674 foo(a, &a[9]);
16675 if (strcmp(a, "123456789000000000") != 0)
16676 return 1;
16677 return 0;
16678}
16679
16680_ACEOF
16681if ac_fn_c_try_run "$LINENO"; then :
16682 have_glibc_memmove_bug=no
16683else
16684 have_glibc_memmove_bug=yes
16685fi
16686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16687 conftest.$ac_objext conftest.beam conftest.$ac_ext
16688fi
16689
16690CFLAGS="$saved_cflags"
16691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16692$as_echo "$have_glibc_memmove_bug" >&6; }
16693if test "$have_glibc_memmove_bug" = yes; then
16694
16695$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16696
16697fi
16698
16699if test "$have_gcc_asm_for_x87" = yes; then
16700 # Some versions of gcc miscompile inline asm:
16701 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16702 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16703 case $CC in
16704 *gcc*)
16705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16706$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16707 saved_cflags="$CFLAGS"
16708 CFLAGS="-O2"
16709 if test "$cross_compiling" = yes; then :
16710 have_ipa_pure_const_bug=undefined
16711else
16712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16713/* end confdefs.h. */
16714
16715 __attribute__((noinline)) int
16716 foo(int *p) {
16717 int r;
16718 asm ( "movl \$6, (%1)\n\t"
16719 "xorl %0, %0\n\t"
16720 : "=r" (r) : "r" (p) : "memory"
16721 );
16722 return r;
16723 }
16724 int main() {
16725 int p = 8;
16726 if ((foo(&p) ? : p) != 6)
16727 return 1;
16728 return 0;
16729 }
16730
16731_ACEOF
16732if ac_fn_c_try_run "$LINENO"; then :
16733 have_ipa_pure_const_bug=no
16734else
16735 have_ipa_pure_const_bug=yes
16736fi
16737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16738 conftest.$ac_objext conftest.beam conftest.$ac_ext
16739fi
16740
16741 CFLAGS="$saved_cflags"
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16743$as_echo "$have_ipa_pure_const_bug" >&6; }
16744 if test "$have_ipa_pure_const_bug" = yes; then
16745
16746$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16747
16748 fi
16749 ;;
16750 esac
16751fi
16752
Victor Stinner4f5366e2015-01-09 02:13:19 +010016753# Check for stdatomic.h
16754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16755$as_echo_n "checking for stdatomic.h... " >&6; }
16756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757/* end confdefs.h. */
16758
16759
16760 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016761 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016762 int main() {
16763 int loaded_value = atomic_load(&value);
16764 return 0;
16765 }
16766
16767
16768_ACEOF
16769if ac_fn_c_try_link "$LINENO"; then :
16770 have_stdatomic_h=yes
16771else
16772 have_stdatomic_h=no
16773fi
16774rm -f core conftest.err conftest.$ac_objext \
16775 conftest$ac_exeext conftest.$ac_ext
16776
16777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16778$as_echo "$have_stdatomic_h" >&6; }
16779
16780if test "$have_stdatomic_h" = yes; then
16781
16782$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16783
16784fi
16785
16786# Check for GCC >= 4.7 __atomic builtins
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16788$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16790/* end confdefs.h. */
16791
16792
16793 volatile int val = 1;
16794 int main() {
16795 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16796 return 0;
16797 }
16798
16799
16800_ACEOF
16801if ac_fn_c_try_link "$LINENO"; then :
16802 have_builtin_atomic=yes
16803else
16804 have_builtin_atomic=no
16805fi
16806rm -f core conftest.err conftest.$ac_objext \
16807 conftest$ac_exeext conftest.$ac_ext
16808
16809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16810$as_echo "$have_builtin_atomic" >&6; }
16811
16812if test "$have_builtin_atomic" = yes; then
16813
16814$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16815
16816fi
16817
Ned Deily322f5ba2013-11-21 23:01:59 -080016818# ensurepip option
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16820$as_echo_n "checking for ensurepip... " >&6; }
16821
16822# Check whether --with-ensurepip was given.
16823if test "${with_ensurepip+set}" = set; then :
16824 withval=$with_ensurepip;
16825else
16826 with_ensurepip=upgrade
16827fi
16828
16829case $with_ensurepip in #(
16830 yes|upgrade) :
16831 ENSUREPIP=upgrade ;; #(
16832 install) :
16833 ENSUREPIP=install ;; #(
16834 no) :
16835 ENSUREPIP=no ;; #(
16836 *) :
16837 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16838esac
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16840$as_echo "$ENSUREPIP" >&6; }
16841
16842
Victor Stinner35a97c02015-03-08 02:59:09 +010016843# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16845$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16847/* end confdefs.h. */
16848
16849
16850 #include <dirent.h>
16851
16852 int main() {
16853 struct dirent entry;
16854 return entry.d_type == DT_UNKNOWN;
16855 }
16856
16857
16858_ACEOF
16859if ac_fn_c_try_link "$LINENO"; then :
16860 have_dirent_d_type=yes
16861else
16862 have_dirent_d_type=no
16863fi
16864rm -f core conftest.err conftest.$ac_objext \
16865 conftest$ac_exeext conftest.$ac_ext
16866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16867$as_echo "$have_dirent_d_type" >&6; }
16868
16869if test "$have_dirent_d_type" = yes; then
16870
16871$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16872
16873fi
16874
Victor Stinner9eb57c52015-03-19 22:21:49 +010016875# check if the Linux getrandom() syscall is available
16876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16877$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879/* end confdefs.h. */
16880
16881
Victor Stinner1b80b242016-04-12 22:34:58 +020016882 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016883 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016884 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016885
16886 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016887 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016888 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016889 const int flags = GRND_NONBLOCK;
16890 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016891 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016892 return 0;
16893 }
16894
16895
16896_ACEOF
16897if ac_fn_c_try_link "$LINENO"; then :
16898 have_getrandom_syscall=yes
16899else
16900 have_getrandom_syscall=no
16901fi
16902rm -f core conftest.err conftest.$ac_objext \
16903 conftest$ac_exeext conftest.$ac_ext
16904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16905$as_echo "$have_getrandom_syscall" >&6; }
16906
16907if test "$have_getrandom_syscall" = yes; then
16908
16909$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16910
16911fi
16912
Victor Stinner3abf44e2015-09-18 15:38:37 +020016913# check if the getrandom() function is available
16914# the test was written for the Solaris function of <sys/random.h>
16915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16916$as_echo_n "checking for the getrandom() function... " >&6; }
16917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16918/* end confdefs.h. */
16919
16920
16921 #include <sys/random.h>
16922
16923 int main() {
16924 char buffer[1];
16925 const size_t buflen = sizeof(buffer);
16926 const int flags = 0;
16927 /* ignore the result, Python checks for ENOSYS at runtime */
16928 (void)getrandom(buffer, buflen, flags);
16929 return 0;
16930 }
16931
16932
16933_ACEOF
16934if ac_fn_c_try_link "$LINENO"; then :
16935 have_getrandom=yes
16936else
16937 have_getrandom=no
16938fi
16939rm -f core conftest.err conftest.$ac_objext \
16940 conftest$ac_exeext conftest.$ac_ext
16941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16942$as_echo "$have_getrandom" >&6; }
16943
16944if test "$have_getrandom" = yes; then
16945
16946$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16947
16948fi
16949
Neil Schemenauer5741c452019-02-08 10:48:46 -080016950# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16951# shm_* may only be available if linking against librt
16952save_LIBS="$LIBS"
16953save_includes_default="$ac_includes_default"
16954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16955$as_echo_n "checking for library containing shm_open... " >&6; }
16956if ${ac_cv_search_shm_open+:} false; then :
16957 $as_echo_n "(cached) " >&6
16958else
16959 ac_func_search_save_LIBS=$LIBS
16960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16961/* end confdefs.h. */
16962
16963/* Override any GCC internal prototype to avoid an error.
16964 Use char because int might match the return type of a GCC
16965 builtin and then its argument prototype would still apply. */
16966#ifdef __cplusplus
16967extern "C"
16968#endif
16969char shm_open ();
16970int
16971main ()
16972{
16973return shm_open ();
16974 ;
16975 return 0;
16976}
16977_ACEOF
16978for ac_lib in '' rt; do
16979 if test -z "$ac_lib"; then
16980 ac_res="none required"
16981 else
16982 ac_res=-l$ac_lib
16983 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16984 fi
16985 if ac_fn_c_try_link "$LINENO"; then :
16986 ac_cv_search_shm_open=$ac_res
16987fi
16988rm -f core conftest.err conftest.$ac_objext \
16989 conftest$ac_exeext
16990 if ${ac_cv_search_shm_open+:} false; then :
16991 break
16992fi
16993done
16994if ${ac_cv_search_shm_open+:} false; then :
16995
16996else
16997 ac_cv_search_shm_open=no
16998fi
16999rm conftest.$ac_ext
17000LIBS=$ac_func_search_save_LIBS
17001fi
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17003$as_echo "$ac_cv_search_shm_open" >&6; }
17004ac_res=$ac_cv_search_shm_open
17005if test "$ac_res" != no; then :
17006 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17007
17008fi
17009
17010if test "$ac_cv_search_shm_open" = "-lrt"; then
17011
17012$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17013
17014fi
17015for ac_header in sys/mman.h
17016do :
17017 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17018if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17019 cat >>confdefs.h <<_ACEOF
17020#define HAVE_SYS_MMAN_H 1
17021_ACEOF
17022
17023fi
17024
17025done
17026
17027# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17028ac_includes_default="\
17029${ac_includes_default}
17030#ifndef __cplusplus
17031# ifdef HAVE_SYS_MMAN_H
17032# include <sys/mman.h>
17033# endif
17034#endif
17035"
17036for ac_func in shm_open shm_unlink
17037do :
17038 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17039ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17040if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17041 cat >>confdefs.h <<_ACEOF
17042#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17043_ACEOF
17044
17045fi
17046done
17047
17048# we don't want to link with librt always, restore LIBS
17049LIBS="$save_LIBS"
17050ac_includes_default="$save_includes_default"
17051
Christian Heimesff5be6e2018-01-20 13:19:21 +010017052# Check for usable OpenSSL
17053
17054 found=false
17055
17056# Check whether --with-openssl was given.
17057if test "${with_openssl+set}" = set; then :
17058 withval=$with_openssl;
17059 case "$withval" in
17060 "" | y | ye | yes | n | no)
17061 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17062 ;;
17063 *) ssldirs="$withval"
17064 ;;
17065 esac
17066
17067else
17068
17069 # if pkg-config is installed and openssl has installed a .pc file,
17070 # then use that information and don't search ssldirs
17071 if test -n "$ac_tool_prefix"; then
17072 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17073set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17075$as_echo_n "checking for $ac_word... " >&6; }
17076if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17077 $as_echo_n "(cached) " >&6
17078else
17079 if test -n "$PKG_CONFIG"; then
17080 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17081else
17082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17083for as_dir in $PATH
17084do
17085 IFS=$as_save_IFS
17086 test -z "$as_dir" && as_dir=.
17087 for ac_exec_ext in '' $ac_executable_extensions; do
17088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17089 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17091 break 2
17092 fi
17093done
17094 done
17095IFS=$as_save_IFS
17096
17097fi
17098fi
17099PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17100if test -n "$PKG_CONFIG"; then
17101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17102$as_echo "$PKG_CONFIG" >&6; }
17103else
17104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17105$as_echo "no" >&6; }
17106fi
17107
17108
17109fi
17110if test -z "$ac_cv_prog_PKG_CONFIG"; then
17111 ac_ct_PKG_CONFIG=$PKG_CONFIG
17112 # Extract the first word of "pkg-config", so it can be a program name with args.
17113set dummy pkg-config; ac_word=$2
17114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17115$as_echo_n "checking for $ac_word... " >&6; }
17116if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17117 $as_echo_n "(cached) " >&6
17118else
17119 if test -n "$ac_ct_PKG_CONFIG"; then
17120 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17121else
17122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17123for as_dir in $PATH
17124do
17125 IFS=$as_save_IFS
17126 test -z "$as_dir" && as_dir=.
17127 for ac_exec_ext in '' $ac_executable_extensions; do
17128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17129 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17131 break 2
17132 fi
17133done
17134 done
17135IFS=$as_save_IFS
17136
17137fi
17138fi
17139ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17140if test -n "$ac_ct_PKG_CONFIG"; then
17141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17142$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17143else
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17145$as_echo "no" >&6; }
17146fi
17147
17148 if test "x$ac_ct_PKG_CONFIG" = x; then
17149 PKG_CONFIG=""
17150 else
17151 case $cross_compiling:$ac_tool_warned in
17152yes:)
17153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17155ac_tool_warned=yes ;;
17156esac
17157 PKG_CONFIG=$ac_ct_PKG_CONFIG
17158 fi
17159else
17160 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17161fi
17162
17163 if test x"$PKG_CONFIG" != x""; then
17164 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17165 if test $? = 0; then
17166 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17167 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17168 found=true
17169 fi
17170 fi
17171
17172 # no such luck; use some default ssldirs
17173 if ! $found; then
17174 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17175 fi
17176
17177
17178fi
17179
17180
17181
17182 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17183 # an 'openssl' subdirectory
17184
17185 if ! $found; then
17186 OPENSSL_INCLUDES=
17187 for ssldir in $ssldirs; do
17188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17189$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17190 if test -f "$ssldir/include/openssl/ssl.h"; then
17191 OPENSSL_INCLUDES="-I$ssldir/include"
17192 OPENSSL_LDFLAGS="-L$ssldir/lib"
17193 OPENSSL_LIBS="-lssl -lcrypto"
17194 found=true
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17196$as_echo "yes" >&6; }
17197 break
17198 else
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17200$as_echo "no" >&6; }
17201 fi
17202 done
17203
17204 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17205 # it will just work!
17206 fi
17207
17208 # try the preprocessor and linker with our new flags,
17209 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17210
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17212$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17213 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17214 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17215
17216 save_LIBS="$LIBS"
17217 save_LDFLAGS="$LDFLAGS"
17218 save_CPPFLAGS="$CPPFLAGS"
17219 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17220 LIBS="$OPENSSL_LIBS $LIBS"
17221 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17223/* end confdefs.h. */
17224#include <openssl/ssl.h>
17225int
17226main ()
17227{
17228SSL_new(NULL)
17229 ;
17230 return 0;
17231}
17232_ACEOF
17233if ac_fn_c_try_link "$LINENO"; then :
17234
17235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17236$as_echo "yes" >&6; }
17237 have_openssl=yes
17238
17239else
17240
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17242$as_echo "no" >&6; }
17243 have_openssl=no
17244
17245fi
17246rm -f core conftest.err conftest.$ac_objext \
17247 conftest$ac_exeext conftest.$ac_ext
17248 CPPFLAGS="$save_CPPFLAGS"
17249 LDFLAGS="$save_LDFLAGS"
17250 LIBS="$save_LIBS"
17251
17252
17253
17254
17255
17256
17257if test "$have_openssl" = yes; then
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17259$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17260
17261 save_LIBS="$LIBS"
17262 save_LDFLAGS="$LDFLAGS"
17263 save_CPPFLAGS="$CPPFLAGS"
17264 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17265 LIBS="$OPENSSL_LIBS $LIBS"
17266 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17267
17268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17269/* end confdefs.h. */
17270
17271 #include <openssl/x509_vfy.h>
17272
17273int
17274main ()
17275{
17276
17277 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17278 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17279 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17280 X509_VERIFY_PARAM_set_hostflags(p, 0);
17281
17282 ;
17283 return 0;
17284}
17285
17286_ACEOF
17287if ac_fn_c_try_link "$LINENO"; then :
17288
17289 ac_cv_has_x509_verify_param_set1_host=yes
17290
17291else
17292
17293 ac_cv_has_x509_verify_param_set1_host=no
17294
17295fi
17296rm -f core conftest.err conftest.$ac_objext \
17297 conftest$ac_exeext conftest.$ac_ext
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17299$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17300 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17301
17302$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17303
17304 fi
17305
17306 CPPFLAGS="$save_CPPFLAGS"
17307 LDFLAGS="$save_LDFLAGS"
17308 LIBS="$save_LIBS"
17309fi
17310
Christian Heimes892d66e2018-01-29 14:10:18 +010017311# ssl module default cipher suite string
17312
17313
17314
17315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17316$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17317
17318# Check whether --with-ssl-default-suites was given.
17319if test "${with_ssl_default_suites+set}" = set; then :
17320 withval=$with_ssl_default_suites;
17321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17322$as_echo "$withval" >&6; }
17323case "$withval" in
17324 python)
17325 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17326
17327 ;;
17328 openssl)
17329 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17330
17331 ;;
17332 *)
17333 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17334
17335 cat >>confdefs.h <<_ACEOF
17336#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17337_ACEOF
17338
17339 ;;
17340esac
17341
17342else
17343
17344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17345$as_echo "python" >&6; }
17346$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17347
17348
17349fi
17350
17351
17352
Guido van Rossum627b2d71993-12-24 10:39:16 +000017353# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017354ac_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 +000017355
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017356ac_config_files="$ac_config_files Modules/ld_so_aix"
17357
Martin v. Löwis11437992002-04-12 09:54:03 +000017358cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017359# This file is a shell script that caches the results of configure
17360# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017361# scripts and configure runs, see configure's option --config-cache.
17362# It is not useful on other systems. If it contains results you don't
17363# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017364#
Martin v. Löwis11437992002-04-12 09:54:03 +000017365# config.status only pays attention to the cache file if you give it
17366# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017367#
Skip Montanaro6dead952003-09-25 14:50:04 +000017368# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017369# loading this file, other *unset* `ac_cv_foo' will be assigned the
17370# following values.
17371
17372_ACEOF
17373
Guido van Rossumf78abae1997-01-21 22:02:36 +000017374# The following way of writing the cache mishandles newlines in values,
17375# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017377# Ultrix sh set writes to stderr and can't be redirected directly,
17378# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379(
17380 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17381 eval ac_val=\$$ac_var
17382 case $ac_val in #(
17383 *${as_nl}*)
17384 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017385 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17386$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 esac
17388 case $ac_var in #(
17389 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017390 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17391 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 esac ;;
17393 esac
17394 done
17395
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17398 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017399 # `set' does not quote correctly, so add quotes: double-quote
17400 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017402 "s/'/'\\\\''/g;
17403 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017405 *)
17406 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 esac |
17410 sort
17411) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17417 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17419 :end' >>confcache
17420if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17421 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017422 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17424$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017425 if test ! -f "$cache_file" || test -h "$cache_file"; then
17426 cat confcache >"$cache_file"
17427 else
17428 case $cache_file in #(
17429 */* | ?:*)
17430 mv -f confcache "$cache_file"$$ &&
17431 mv -f "$cache_file"$$ "$cache_file" ;; #(
17432 *)
17433 mv -f confcache "$cache_file" ;;
17434 esac
17435 fi
17436 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017437 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017438 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17439$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017440 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017441fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017442rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017444test "x$prefix" = xNONE && prefix=$ac_default_prefix
17445# Let make expand exec_prefix.
17446test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017447
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017448DEFS=-DHAVE_CONFIG_H
17449
Skip Montanaro6dead952003-09-25 14:50:04 +000017450ac_libobjs=
17451ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017452U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017453for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17454 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017456 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17458 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17460 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017461done
17462LIBOBJS=$ac_libobjs
17463
17464LTLIBOBJS=$ac_ltlibobjs
17465
17466
Martin v. Löwis11437992002-04-12 09:54:03 +000017467
Matthias Kloseb9621712010-04-24 17:59:49 +000017468
Victor Stinnere0be4232011-10-25 13:06:09 +020017469: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017470ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017471ac_clean_files_save=$ac_clean_files
17472ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017473{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17474$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17475as_write_fail=0
17476cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017477#! $SHELL
17478# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017479# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017480# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017481# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017482
Martin v. Löwis11437992002-04-12 09:54:03 +000017483debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017484ac_cs_recheck=false
17485ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017486
Matthias Kloseb9621712010-04-24 17:59:49 +000017487SHELL=\${CONFIG_SHELL-$SHELL}
17488export SHELL
17489_ASEOF
17490cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17491## -------------------- ##
17492## M4sh Initialization. ##
17493## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495# Be more Bourne compatible
17496DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017497if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 emulate sh
17499 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017501 # is contrary to our usage. Disable this feature.
17502 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017504else
Matthias Kloseb9621712010-04-24 17:59:49 +000017505 case `(set -o) 2>/dev/null` in #(
17506 *posix*) :
17507 set -o posix ;; #(
17508 *) :
17509 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017511fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017512
17513
Matthias Kloseb9621712010-04-24 17:59:49 +000017514as_nl='
17515'
17516export as_nl
17517# Printing a long string crashes Solaris 7 /usr/bin/printf.
17518as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17519as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17520as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17521# Prefer a ksh shell builtin over an external printf program on Solaris,
17522# but without wasting forks for bash or zsh.
17523if test -z "$BASH_VERSION$ZSH_VERSION" \
17524 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17525 as_echo='print -r --'
17526 as_echo_n='print -rn --'
17527elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17528 as_echo='printf %s\n'
17529 as_echo_n='printf %s'
17530else
17531 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17532 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17533 as_echo_n='/usr/ucb/echo -n'
17534 else
17535 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17536 as_echo_n_body='eval
17537 arg=$1;
17538 case $arg in #(
17539 *"$as_nl"*)
17540 expr "X$arg" : "X\\(.*\\)$as_nl";
17541 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17542 esac;
17543 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17544 '
17545 export as_echo_n_body
17546 as_echo_n='sh -c $as_echo_n_body as_echo'
17547 fi
17548 export as_echo_body
17549 as_echo='sh -c $as_echo_body as_echo'
17550fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017551
17552# The user is always right.
17553if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 PATH_SEPARATOR=:
17555 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17556 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17557 PATH_SEPARATOR=';'
17558 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561
17562# IFS
17563# We need space, tab and new line, in precisely that order. Quoting is
17564# there to prevent editors from complaining about space-tab.
17565# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17566# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567IFS=" "" $as_nl"
17568
17569# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017570as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017571case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572 *[\\/]* ) as_myself=$0 ;;
17573 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017574for as_dir in $PATH
17575do
17576 IFS=$as_save_IFS
17577 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17579 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 ;;
17583esac
17584# We did not find ourselves, most probably we were run as `sh COMMAND'
17585# in which case we are not to be found in the path.
17586if test "x$as_myself" = x; then
17587 as_myself=$0
17588fi
17589if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017590 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17591 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592fi
17593
Matthias Kloseb9621712010-04-24 17:59:49 +000017594# Unset variables that we do not need and which cause bugs (e.g. in
17595# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17596# suppresses any "Segmentation fault" message there. '((' could
17597# trigger a bug in pdksh 5.2.14.
17598for as_var in BASH_ENV ENV MAIL MAILPATH
17599do eval test x\${$as_var+set} = xset \
17600 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601done
17602PS1='$ '
17603PS2='> '
17604PS4='+ '
17605
17606# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017607LC_ALL=C
17608export LC_ALL
17609LANGUAGE=C
17610export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611
Matthias Kloseb9621712010-04-24 17:59:49 +000017612# CDPATH.
17613(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17614
17615
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017616# as_fn_error STATUS ERROR [LINENO LOG_FD]
17617# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017618# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17619# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017620# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017621as_fn_error ()
17622{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017623 as_status=$1; test $as_status -eq 0 && as_status=1
17624 if test "$4"; then
17625 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17626 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017628 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017629 as_fn_exit $as_status
17630} # as_fn_error
17631
17632
17633# as_fn_set_status STATUS
17634# -----------------------
17635# Set $? to STATUS, without forking.
17636as_fn_set_status ()
17637{
17638 return $1
17639} # as_fn_set_status
17640
17641# as_fn_exit STATUS
17642# -----------------
17643# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17644as_fn_exit ()
17645{
17646 set +e
17647 as_fn_set_status $1
17648 exit $1
17649} # as_fn_exit
17650
17651# as_fn_unset VAR
17652# ---------------
17653# Portably unset VAR.
17654as_fn_unset ()
17655{
17656 { eval $1=; unset $1;}
17657}
17658as_unset=as_fn_unset
17659# as_fn_append VAR VALUE
17660# ----------------------
17661# Append the text in VALUE to the end of the definition contained in VAR. Take
17662# advantage of any shell optimizations that allow amortized linear growth over
17663# repeated appends, instead of the typical quadratic growth present in naive
17664# implementations.
17665if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17666 eval 'as_fn_append ()
17667 {
17668 eval $1+=\$2
17669 }'
17670else
17671 as_fn_append ()
17672 {
17673 eval $1=\$$1\$2
17674 }
17675fi # as_fn_append
17676
17677# as_fn_arith ARG...
17678# ------------------
17679# Perform arithmetic evaluation on the ARGs, and store the result in the
17680# global $as_val. Take advantage of shells that can avoid forks. The arguments
17681# must be portable across $(()) and expr.
17682if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17683 eval 'as_fn_arith ()
17684 {
17685 as_val=$(( $* ))
17686 }'
17687else
17688 as_fn_arith ()
17689 {
17690 as_val=`expr "$@" || test $? -eq 1`
17691 }
17692fi # as_fn_arith
17693
17694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695if expr a : '\(a\)' >/dev/null 2>&1 &&
17696 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17697 as_expr=expr
17698else
17699 as_expr=false
17700fi
17701
17702if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17703 as_basename=basename
17704else
17705 as_basename=false
17706fi
17707
Matthias Kloseb9621712010-04-24 17:59:49 +000017708if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17709 as_dirname=dirname
17710else
17711 as_dirname=false
17712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714as_me=`$as_basename -- "$0" ||
17715$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17716 X"$0" : 'X\(//\)$' \| \
17717 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017718$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 sed '/^.*\/\([^/][^/]*\)\/*$/{
17720 s//\1/
17721 q
17722 }
17723 /^X\/\(\/\/\)$/{
17724 s//\1/
17725 q
17726 }
17727 /^X\/\(\/\).*/{
17728 s//\1/
17729 q
17730 }
17731 s/.*/./; q'`
17732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733# Avoid depending upon Character Ranges.
17734as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17735as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17736as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17737as_cr_digits='0123456789'
17738as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739
17740ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017741case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017743 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 xy) ECHO_C='\c';;
17746 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17747 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748 esac;;
17749*)
17750 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017752
Martin v. Löwis11437992002-04-12 09:54:03 +000017753rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754if test -d conf$$.dir; then
17755 rm -f conf$$.dir/conf$$.file
17756else
17757 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017760if (echo >conf$$.file) 2>/dev/null; then
17761 if ln -s conf$$.file conf$$ 2>/dev/null; then
17762 as_ln_s='ln -s'
17763 # ... but there are two gotchas:
17764 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17765 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017766 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017768 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017769 elif ln conf$$.file conf$$ 2>/dev/null; then
17770 as_ln_s=ln
17771 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017772 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017774else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017775 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17778rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017779
Matthias Kloseb9621712010-04-24 17:59:49 +000017780
17781# as_fn_mkdir_p
17782# -------------
17783# Create "$as_dir" as a directory, including parents if necessary.
17784as_fn_mkdir_p ()
17785{
17786
17787 case $as_dir in #(
17788 -*) as_dir=./$as_dir;;
17789 esac
17790 test -d "$as_dir" || eval $as_mkdir_p || {
17791 as_dirs=
17792 while :; do
17793 case $as_dir in #(
17794 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17795 *) as_qdir=$as_dir;;
17796 esac
17797 as_dirs="'$as_qdir' $as_dirs"
17798 as_dir=`$as_dirname -- "$as_dir" ||
17799$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17800 X"$as_dir" : 'X\(//\)[^/]' \| \
17801 X"$as_dir" : 'X\(//\)$' \| \
17802 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17803$as_echo X"$as_dir" |
17804 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17805 s//\1/
17806 q
17807 }
17808 /^X\(\/\/\)[^/].*/{
17809 s//\1/
17810 q
17811 }
17812 /^X\(\/\/\)$/{
17813 s//\1/
17814 q
17815 }
17816 /^X\(\/\).*/{
17817 s//\1/
17818 q
17819 }
17820 s/.*/./; q'`
17821 test -d "$as_dir" && break
17822 done
17823 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017824 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017825
17826
17827} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017828if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017829 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017830else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017832 as_mkdir_p=false
17833fi
17834
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017835
17836# as_fn_executable_p FILE
17837# -----------------------
17838# Test if FILE is an executable regular file.
17839as_fn_executable_p ()
17840{
17841 test -f "$1" && test -x "$1"
17842} # as_fn_executable_p
17843as_test_x='test -x'
17844as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017845
17846# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017847as_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 +000017848
17849# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017850as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017851
17852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017854## ----------------------------------- ##
17855## Main body of $CONFIG_STATUS script. ##
17856## ----------------------------------- ##
17857_ASEOF
17858test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017859
Matthias Kloseb9621712010-04-24 17:59:49 +000017860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17861# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017862# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863# values after options handling.
17864ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017865This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017866generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868 CONFIG_FILES = $CONFIG_FILES
17869 CONFIG_HEADERS = $CONFIG_HEADERS
17870 CONFIG_LINKS = $CONFIG_LINKS
17871 CONFIG_COMMANDS = $CONFIG_COMMANDS
17872 $ $0 $@
17873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874on `(hostname || uname -n) 2>/dev/null | sed 1q`
17875"
17876
Martin v. Löwis11437992002-04-12 09:54:03 +000017877_ACEOF
17878
Matthias Kloseb9621712010-04-24 17:59:49 +000017879case $ac_config_files in *"
17880"*) set x $ac_config_files; shift; ac_config_files=$*;;
17881esac
17882
17883case $ac_config_headers in *"
17884"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17885esac
17886
17887
17888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017889# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017890config_files="$ac_config_files"
17891config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Matthias Kloseb9621712010-04-24 17:59:49 +000017895cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017896ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017897\`$as_me' instantiates files and other configuration actions
17898from templates according to the current configuration. Unless the files
17899and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017902
17903 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 --config print configuration, then exit
17906 -q, --quiet, --silent
17907 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 -d, --debug don't remove temporary files
17909 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017910 --file=FILE[:TEMPLATE]
17911 instantiate the configuration file FILE
17912 --header=FILE[:TEMPLATE]
17913 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
17915Configuration files:
17916$config_files
17917
17918Configuration headers:
17919$config_headers
17920
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017921Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17925ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017926ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017927python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017928configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017929 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017931Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017932This config.status script is free software; the Free Software Foundation
17933gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934
17935ac_pwd='$ac_pwd'
17936srcdir='$srcdir'
17937INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017938MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017939test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017940_ACEOF
17941
Matthias Kloseb9621712010-04-24 17:59:49 +000017942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17943# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017944ac_need_defaults=:
17945while test $# != 0
17946do
17947 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017948 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17950 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017951 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017952 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017953 --*=)
17954 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17955 ac_optarg=
17956 ac_shift=:
17957 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017959 ac_option=$1
17960 ac_optarg=$2
17961 ac_shift=shift
17962 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 esac
17964
Skip Montanaro6dead952003-09-25 14:50:04 +000017965 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017967 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17968 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017970 $as_echo "$ac_cs_version"; exit ;;
17971 --config | --confi | --conf | --con | --co | --c )
17972 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 debug=: ;;
17975 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017976 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017977 case $ac_optarg in
17978 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017979 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017980 esac
17981 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 ac_need_defaults=false;;
17983 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017984 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017985 case $ac_optarg in
17986 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17987 esac
17988 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017989 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 --he | --h)
17991 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017992 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017993Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017995 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017996 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17997 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17998 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017999
18000 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018001 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018002Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018003
Matthias Kloseb9621712010-04-24 17:59:49 +000018004 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018006
18007 esac
18008 shift
18009done
18010
Skip Montanaro6dead952003-09-25 14:50:04 +000018011ac_configure_extra_args=
18012
18013if $ac_cs_silent; then
18014 exec 6>/dev/null
18015 ac_configure_extra_args="$ac_configure_extra_args --silent"
18016fi
18017
18018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018020if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018021 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018022 shift
18023 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18024 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018026 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018027fi
18028
Martin v. Löwis11437992002-04-12 09:54:03 +000018029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031exec 5>>config.log
18032{
18033 echo
18034 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18035## Running $as_me. ##
18036_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018037 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018041cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018043
Matthias Kloseb9621712010-04-24 17:59:49 +000018044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045
18046# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018047for ac_config_target in $ac_config_targets
18048do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049 case $ac_config_target in
18050 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18051 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18052 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018053 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18054 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018056 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018057 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018058 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018059 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060
Victor Stinnere0be4232011-10-25 13:06:09 +020018061 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 esac
18063done
18064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065
Martin v. Löwis11437992002-04-12 09:54:03 +000018066# If the user did not use the arguments to specify the items to instantiate,
18067# then the envvar interface is used. Set only those that are not.
18068# We use the long form for the default assignment because of an extremely
18069# bizarre bug on SunOS 4.1.3.
18070if $ac_need_defaults; then
18071 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18072 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18073fi
18074
Skip Montanaro6dead952003-09-25 14:50:04 +000018075# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018077# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078# Hook for its removal unless debugging.
18079# Note that there is a small window in which the directory will not be cleaned:
18080# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018081$debug ||
18082{
Victor Stinnere0be4232011-10-25 13:06:09 +020018083 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018085 : "${ac_tmp:=$tmp}"
18086 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018088 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018089}
Martin v. Löwis11437992002-04-12 09:54:03 +000018090# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018091
Martin v. Löwis11437992002-04-12 09:54:03 +000018092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018094 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018095} ||
18096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097 tmp=./conf$$-$RANDOM
18098 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018099} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018100ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018101
Matthias Kloseb9621712010-04-24 17:59:49 +000018102# Set up the scripts for CONFIG_FILES section.
18103# No need to generate them if there are no CONFIG_FILES.
18104# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018106
Matthias Kloseb9621712010-04-24 17:59:49 +000018107
18108ac_cr=`echo X | tr X '\015'`
18109# On cygwin, bash can eat \r inside `` if the user requested igncr.
18110# But we know of no other shell where ac_cr would be empty at this
18111# point, so we can use a bashism as a fallback.
18112if test "x$ac_cr" = x; then
18113 eval ac_cr=\$\'\\r\'
18114fi
18115ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18116if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018117 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018118else
18119 ac_cs_awk_cr=$ac_cr
18120fi
18121
Victor Stinnere0be4232011-10-25 13:06:09 +020018122echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018123_ACEOF
18124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125
Matthias Kloseb9621712010-04-24 17:59:49 +000018126{
18127 echo "cat >conf$$subs.awk <<_ACEOF" &&
18128 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18129 echo "_ACEOF"
18130} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018131 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18132ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133ac_delim='%!_!# '
18134for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018135 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018136 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18139 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140 break
18141 elif $ac_last_try; then
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 else
18144 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018145 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146done
Matthias Kloseb9621712010-04-24 17:59:49 +000018147rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148
Matthias Kloseb9621712010-04-24 17:59:49 +000018149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018150cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018152sed -n '
18153h
18154s/^/S["/; s/!.*/"]=/
18155p
18156g
18157s/^[^!]*!//
18158:repl
18159t repl
18160s/'"$ac_delim"'$//
18161t delim
18162:nl
18163h
18164s/\(.\{148\}\)..*/\1/
18165t more1
18166s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18167p
18168n
18169b repl
18170:more1
18171s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18172p
18173g
18174s/.\{148\}//
18175t nl
18176:delim
18177h
18178s/\(.\{148\}\)..*/\1/
18179t more2
18180s/["\\]/\\&/g; s/^/"/; s/$/"/
18181p
18182b
18183:more2
18184s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18185p
18186g
18187s/.\{148\}//
18188t delim
18189' <conf$$subs.awk | sed '
18190/^[^""]/{
18191 N
18192 s/\n//
18193}
18194' >>$CONFIG_STATUS || ac_write_fail=1
18195rm -f conf$$subs.awk
18196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18197_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018198cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018199 for (key in S) S_is_set[key] = 1
18200 FS = ""
18201
18202}
18203{
18204 line = $ 0
18205 nfields = split(line, field, "@")
18206 substed = 0
18207 len = length(field[1])
18208 for (i = 2; i < nfields; i++) {
18209 key = field[i]
18210 keylen = length(key)
18211 if (S_is_set[key]) {
18212 value = S[key]
18213 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18214 len += length(value) + length(field[++i])
18215 substed = 1
18216 } else
18217 len += 1 + keylen
18218 }
18219
18220 print line
18221}
18222
18223_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18226if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18227 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18228else
18229 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018230fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018231 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018232_ACEOF
18233
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018234# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18235# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236# trailing colons and then remove the whole line if VPATH becomes empty
18237# (actually we leave an empty line to preserve line numbers).
18238if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018239 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18240h
18241s///
18242s/^/:/
18243s/[ ]*$/:/
18244s/:\$(srcdir):/:/g
18245s/:\${srcdir}:/:/g
18246s/:@srcdir@:/:/g
18247s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018249x
18250s/\(=[ ]*\).*/\1/
18251G
18252s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253s/^[^=]*=[ ]*$//
18254}'
18255fi
18256
Matthias Kloseb9621712010-04-24 17:59:49 +000018257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018258fi # test -n "$CONFIG_FILES"
18259
Matthias Kloseb9621712010-04-24 17:59:49 +000018260# Set up the scripts for CONFIG_HEADERS section.
18261# No need to generate them if there are no CONFIG_HEADERS.
18262# This happens for instance with `./config.status Makefile'.
18263if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018264cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018265BEGIN {
18266_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018267
Matthias Kloseb9621712010-04-24 17:59:49 +000018268# Transform confdefs.h into an awk script `defines.awk', embedded as
18269# here-document in config.status, that substitutes the proper values into
18270# config.h.in to produce config.h.
18271
18272# Create a delimiter string that does not exist in confdefs.h, to ease
18273# handling of long lines.
18274ac_delim='%!_!# '
18275for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018276 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18277 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018278 break
18279 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018280 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 else
18282 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18283 fi
18284done
18285
18286# For the awk script, D is an array of macro values keyed by name,
18287# likewise P contains macro parameters if any. Preserve backslash
18288# newline sequences.
18289
18290ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18291sed -n '
18292s/.\{148\}/&'"$ac_delim"'/g
18293t rset
18294:rset
18295s/^[ ]*#[ ]*define[ ][ ]*/ /
18296t def
18297d
18298:def
18299s/\\$//
18300t bsnl
18301s/["\\]/\\&/g
18302s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18303D["\1"]=" \3"/p
18304s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18305d
18306:bsnl
18307s/["\\]/\\&/g
18308s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18309D["\1"]=" \3\\\\\\n"\\/p
18310t cont
18311s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18312t cont
18313d
18314:cont
18315n
18316s/.\{148\}/&'"$ac_delim"'/g
18317t clear
18318:clear
18319s/\\$//
18320t bsnlc
18321s/["\\]/\\&/g; s/^/"/; s/$/"/p
18322d
18323:bsnlc
18324s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18325b cont
18326' <confdefs.h | sed '
18327s/'"$ac_delim"'/"\\\
18328"/g' >>$CONFIG_STATUS || ac_write_fail=1
18329
18330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18331 for (key in D) D_is_set[key] = 1
18332 FS = ""
18333}
18334/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18335 line = \$ 0
18336 split(line, arg, " ")
18337 if (arg[1] == "#") {
18338 defundef = arg[2]
18339 mac1 = arg[3]
18340 } else {
18341 defundef = substr(arg[1], 2)
18342 mac1 = arg[2]
18343 }
18344 split(mac1, mac2, "(") #)
18345 macro = mac2[1]
18346 prefix = substr(line, 1, index(line, defundef) - 1)
18347 if (D_is_set[macro]) {
18348 # Preserve the white space surrounding the "#".
18349 print prefix "define", macro P[macro] D[macro]
18350 next
18351 } else {
18352 # Replace #undef with comments. This is necessary, for example,
18353 # in the case of _POSIX_SOURCE, which is predefined and required
18354 # on some systems where configure will not decide to define it.
18355 if (defundef == "undef") {
18356 print "/*", prefix defundef, macro, "*/"
18357 next
18358 }
18359 }
18360}
18361{ print }
18362_ACAWK
18363_ACEOF
18364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018365 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018366fi # test -n "$CONFIG_HEADERS"
18367
18368
18369eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18370shift
18371for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372do
18373 case $ac_tag in
18374 :[FHLC]) ac_mode=$ac_tag; continue;;
18375 esac
18376 case $ac_mode$ac_tag in
18377 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018378 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379 :[FH]-) ac_tag=-:-;;
18380 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18381 esac
18382 ac_save_IFS=$IFS
18383 IFS=:
18384 set x $ac_tag
18385 IFS=$ac_save_IFS
18386 shift
18387 ac_file=$1
18388 shift
18389
18390 case $ac_mode in
18391 :L) ac_source=$1;;
18392 :[FH])
18393 ac_file_inputs=
18394 for ac_f
18395 do
18396 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018397 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398 *) # Look for the file first in the build tree, then in the source tree
18399 # (if the path is not absolute). The absolute path cannot be DOS-style,
18400 # because $ac_f cannot contain `:'.
18401 test -f "$ac_f" ||
18402 case $ac_f in
18403 [\\/$]*) false;;
18404 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18405 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018406 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018408 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18409 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 done
18411
18412 # Let's still pretend it is `configure' which instantiates (i.e., don't
18413 # use $as_me), people would be surprised to read:
18414 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018415 configure_input='Generated from '`
18416 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18417 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 if test x"$ac_file" != x-; then
18419 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018420 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18421$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018423 # Neutralize special characters interpreted by sed in replacement strings.
18424 case $configure_input in #(
18425 *\&* | *\|* | *\\* )
18426 ac_sed_conf_input=`$as_echo "$configure_input" |
18427 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18428 *) ac_sed_conf_input=$configure_input;;
18429 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430
18431 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018432 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18433 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 esac
18435 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 esac
18437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018439$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018440 X"$ac_file" : 'X\(//\)[^/]' \| \
18441 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018443$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18445 s//\1/
18446 q
18447 }
18448 /^X\(\/\/\)[^/].*/{
18449 s//\1/
18450 q
18451 }
18452 /^X\(\/\/\)$/{
18453 s//\1/
18454 q
18455 }
18456 /^X\(\/\).*/{
18457 s//\1/
18458 q
18459 }
18460 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018461 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 ac_builddir=.
18463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464case "$ac_dir" in
18465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18466*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 case $ac_top_builddir_sub in
18471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18473 esac ;;
18474esac
18475ac_abs_top_builddir=$ac_pwd
18476ac_abs_builddir=$ac_pwd$ac_dir_suffix
18477# for backward compatibility:
18478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018479
18480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483 ac_top_srcdir=$ac_top_builddir_sub
18484 ac_abs_top_srcdir=$ac_pwd ;;
18485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487 ac_top_srcdir=$srcdir
18488 ac_abs_top_srcdir=$srcdir ;;
18489 *) # Relative name.
18490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18491 ac_top_srcdir=$ac_top_build_prefix$srcdir
18492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018495
Martin v. Löwis11437992002-04-12 09:54:03 +000018496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 case $ac_mode in
18498 :F)
18499 #
18500 # CONFIG_FILE
18501 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018502
18503 case $INSTALL in
18504 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018507 ac_MKDIR_P=$MKDIR_P
18508 case $MKDIR_P in
18509 [\\/$]* | ?:[\\/]* ) ;;
18510 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18511 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018512_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513
Matthias Kloseb9621712010-04-24 17:59:49 +000018514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515# If the template does not know about datarootdir, expand it.
18516# FIXME: This hack should be removed a few years after 2.60.
18517ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018518ac_sed_dataroot='
18519/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 p
18521 q
18522}
18523/@datadir@/p
18524/@docdir@/p
18525/@infodir@/p
18526/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018527/@mandir@/p'
18528case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529*datarootdir*) ac_datarootdir_seen=yes;;
18530*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18532$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535 ac_datarootdir_hack='
18536 s&@datadir@&$datadir&g
18537 s&@docdir@&$docdir&g
18538 s&@infodir@&$infodir&g
18539 s&@localedir@&$localedir&g
18540 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018541 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542esac
18543_ACEOF
18544
18545# Neutralize VPATH when `$srcdir' = `.'.
18546# Shell code in configure.ac might set extrasub.
18547# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18549ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018550$extrasub
18551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018553:t
18554/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018555s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018557s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018558s&@srcdir@&$ac_srcdir&;t t
18559s&@abs_srcdir@&$ac_abs_srcdir&;t t
18560s&@top_srcdir@&$ac_top_srcdir&;t t
18561s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18562s&@builddir@&$ac_builddir&;t t
18563s&@abs_builddir@&$ac_abs_builddir&;t t
18564s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18565s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018566s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018567$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018568"
Victor Stinnere0be4232011-10-25 13:06:09 +020018569eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18570 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018572test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018573 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18574 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18575 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018577which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018578$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018579which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018580
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018583 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18584 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018586 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587 ;;
18588 :H)
18589 #
18590 # CONFIG_HEADER
18591 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018593 {
18594 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018595 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18596 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018597 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018598 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018599 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18600$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018601 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018602 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018603 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018604 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 fi
18606 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018607 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018608 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018609 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018610 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613
18614 esac
18615
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018616
18617 case $ac_file$ac_mode in
18618 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18619
18620 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621done # for ac_tag
18622
Guido van Rossum627b2d71993-12-24 10:39:16 +000018623
Matthias Kloseb9621712010-04-24 17:59:49 +000018624as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018625_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018626ac_clean_files=$ac_clean_files_save
18627
Matthias Kloseb9621712010-04-24 17:59:49 +000018628test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018629 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018630
Martin v. Löwis11437992002-04-12 09:54:03 +000018631
18632# configure is writing to config.log, and then calls config.status.
18633# config.status does its own redirection, appending to config.log.
18634# Unfortunately, on DOS this fails, as config.log is still kept open
18635# by configure, so config.status won't be able to write to it; its
18636# output is simply discarded. So we exec the FD to /dev/null,
18637# effectively closing config.log, so it can be properly (re)opened and
18638# appended to by config.status. When coming back to configure, we
18639# need to make the FD available again.
18640if test "$no_create" != yes; then
18641 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018642 ac_config_status_args=
18643 test "$silent" = yes &&
18644 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018646 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 exec 5>>config.log
18648 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18649 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018650 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018651fi
18652if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18654$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018655fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018656
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018657
Christian Heimes75ed8902013-11-20 01:11:18 +010018658echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018659if test ! -f Modules/Setup.local
18660then
18661 echo "# Edit this file for local setup changes" >Modules/Setup.local
18662fi
18663
Christian Heimes75ed8902013-11-20 01:11:18 +010018664echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018665$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018666 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018667 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018668mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018669
18670if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18671 echo "" >&6
18672 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018673 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 +000018674 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018675 echo "" >&6
18676 echo "" >&6
18677fi
18678