blob: e6e4007351591a4d9123ff71230c0a1a889f0bac [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
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 \
Victor Stinner21a74a92019-04-11 22:28:12 +02001289 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
Ned Deily5489bda2018-01-31 17:44:09 -05001402\`configure' configures python 3.8 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
Ned Deily5489bda2018-01-31 17:44:09 -05001468 short | recursive ) echo "Configuration of python 3.8:";;
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
Ned Deily5489bda2018-01-31 17:44:09 -05001634python configure 3.8
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
Ned Deily5489bda2018-01-31 17:44:09 -05002343It was created by python $as_me 3.8, 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
Ned Deily5489bda2018-01-31 17:44:09 -05002963VERSION=3.8
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
Guido van Rossum91922671997-10-09 20:24:13 +00003295
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003296
3297if test "$cross_compiling" = yes; then
3298 case "$host" in
3299 *-*-linux*)
3300 case "$host_cpu" in
3301 arm*)
3302 _host_cpu=arm
3303 ;;
3304 *)
3305 _host_cpu=$host_cpu
3306 esac
3307 ;;
3308 *-*-cygwin*)
3309 _host_cpu=
3310 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003311 *-*-vxworks*)
3312 _host_cpu=$host_cpu
3313 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 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 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3376 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3377 # identifies itself as Darwin/7.*
3378 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # disables platform specific features beyond repair.
3380 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # has no effect, don't bother defining them
3382 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003383 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003384 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3387 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3388 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003389 AIX/4)
3390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 AIX/5)
3392 if test `uname -r` -eq 1; then
3393 define_xopen_source=no
3394 fi
3395 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003396 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3397 # defining NI_NUMERICHOST.
3398 QNX/6.3.2)
3399 define_xopen_source=no
3400 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003401 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3402 # in network headers still using system V types.
3403 VxWorks/*)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460# If the user switches compilers, we can't believe the cache
3461if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3462then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003463 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003464(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003465fi
3466
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003467# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3468# when the compiler supports them, but we don't always want -O2, and
3469# we set -g later.
3470if test -z "$CFLAGS"; then
3471 CFLAGS=
3472fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473
3474if test "$ac_sys_system" = "Darwin"
3475then
3476 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003477 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 # information
3479 if test -z "${CC}"
3480 then
3481 found_gcc=
3482 found_clang=
3483 as_save_IFS=$IFS; IFS=:
3484 for as_dir in $PATH
3485 do
3486 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 fi
3491 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003492 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003493 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003494 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003495 fi
3496 fi
3497 done
3498 IFS=$as_save_IFS
3499
3500 if test -n "$found_gcc" -a -n "$found_clang"
3501 then
3502 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3503 then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3505$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3506 CC="$found_clang"
3507 CXX="$found_clang++"
3508 fi
3509
3510
3511 elif test -z "$found_gcc" -a -n "$found_clang"
3512 then
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3514$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3515 CC="$found_clang"
3516 CXX="$found_clang++"
3517
3518 elif test -z "$found_gcc" -a -z "$found_clang"
3519 then
3520 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3521 if test -n "${found_clang}"
3522 then
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3524$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3525 CC="${found_clang}"
3526 CXX="`/usr/bin/xcrun -find clang++`"
3527
3528 # else: use default behaviour
3529 fi
3530 fi
3531 fi
3532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003533ac_ext=c
3534ac_cpp='$CPP $CPPFLAGS'
3535ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3536ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3537ac_compiler_gnu=$ac_cv_c_compiler_gnu
3538if test -n "$ac_tool_prefix"; then
3539 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3540set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3542$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003543if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003545else
3546 if test -n "$CC"; then
3547 ac_cv_prog_CC="$CC" # Let the user override the test.
3548else
Martin v. Löwis11437992002-04-12 09:54:03 +00003549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3550for as_dir in $PATH
3551do
3552 IFS=$as_save_IFS
3553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $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 +00003558 break 2
3559 fi
3560done
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003563
Jack Jansendd19cf82001-12-06 22:36:17 +00003564fi
3565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003566CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003567if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3569$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003570else
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3572$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573fi
3574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576fi
3577if test -z "$ac_cv_prog_CC"; then
3578 ac_ct_CC=$CC
3579 # Extract the first word of "gcc", so it can be a program name with args.
3580set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003585else
3586 if test -n "$ac_ct_CC"; then
3587 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
3604fi
3605fi
3606ac_ct_CC=$ac_cv_prog_ac_ct_CC
3607if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3609$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 if test "x$ac_ct_CC" = x; then
3616 CC=""
3617 else
3618 case $cross_compiling:$ac_tool_warned in
3619yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622ac_tool_warned=yes ;;
3623esac
3624 CC=$ac_ct_CC
3625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003628fi
3629
Jack Jansendd19cf82001-12-06 22:36:17 +00003630if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 if test -n "$ac_tool_prefix"; then
3632 # 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 +00003633set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003636if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003638else
3639 if test -n "$CC"; then
3640 ac_cv_prog_CC="$CC" # Let the user override the test.
3641else
Martin v. Löwis11437992002-04-12 09:54:03 +00003642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $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 +00003651 break 2
3652 fi
3653done
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003656
3657fi
3658fi
3659CC=$ac_cv_prog_CC
3660if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3662$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671if test -z "$CC"; then
3672 # Extract the first word of "cc", so it can be a program name with args.
3673set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003682 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3691 ac_prog_rejected=yes
3692 continue
3693 fi
3694 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $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 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702if test $ac_prog_rejected = yes; then
3703 # We found a bogon in the path, so make sure we never use it.
3704 set dummy $ac_cv_prog_CC
3705 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 # We chose a different compiler from the bogus one.
3708 # However, it has the same basename, so the bogon will be chosen
3709 # first if we set CC to just the basename; use the full file name.
3710 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003711 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712 fi
3713fi
3714fi
3715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003716CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727if test -z "$CC"; then
3728 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 do
3731 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $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 +00003750 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752done
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
3756fi
3757fi
3758CC=$ac_cv_prog_CC
3759if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3761$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 test -n "$CC" && break
3769 done
3770fi
3771if test -z "$CC"; then
3772 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003774do
3775 # Extract the first word of "$ac_prog", so it can be a program name with args.
3776set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003779if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
3782 if test -n "$ac_ct_CC"; then
3783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3784else
3785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786for as_dir in $PATH
3787do
3788 IFS=$as_save_IFS
3789 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $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 +00003794 break 2
3795 fi
3796done
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801fi
3802ac_ct_CC=$ac_cv_prog_ac_ct_CC
3803if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3805$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 test -n "$ac_ct_CC" && break
3813done
Michael W. Hudson54241132001-12-07 15:38:26 +00003814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 if test "x$ac_ct_CC" = x; then
3816 CC=""
3817 else
3818 case $cross_compiling:$ac_tool_warned in
3819yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822ac_tool_warned=yes ;;
3823esac
3824 CC=$ac_ct_CC
3825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
3827
3828fi
3829
3830
Matthias Kloseb9621712010-04-24 17:59:49 +00003831test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003833as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003834See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003837$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3838set X $ac_compile
3839ac_compiler=$2
3840for ac_option in --version -v -V -qversion; do
3841 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842case "(($ac_try" in
3843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3844 *) ac_try_echo=$ac_try;;
3845esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3847$as_echo "$ac_try_echo"; } >&5
3848 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 if test -s conftest.err; then
3851 sed '10a\
3852... rest of stderr output deleted ...
3853 10q' conftest.err >conftest.er1
3854 cat conftest.er1 >&5
3855 fi
3856 rm -f conftest.er1 conftest.err
3857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3858 test $ac_status = 0; }
3859done
Martin v. Löwis11437992002-04-12 09:54:03 +00003860
Matthias Kloseb9621712010-04-24 17:59:49 +00003861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864int
3865main ()
3866{
3867
3868 ;
3869 return 0;
3870}
3871_ACEOF
3872ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003873ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003874# Try to create an executable without -o first, disregard a.out.
3875# It will help us diagnose broken compilers, and finding out an intuition
3876# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3878$as_echo_n "checking whether the C compiler works... " >&6; }
3879ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3880
3881# The possible output files:
3882ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_rmfiles=
3885for ac_file in $ac_files
3886do
3887 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3890 esac
3891done
3892rm -f $ac_rmfiles
3893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3906# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3907# in a Makefile. We should not override ac_cv_exeext if it was cached,
3908# so that the user can short-circuit this test for compilers unknown to
3909# Autoconf.
3910for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003911do
3912 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003915 ;;
3916 [ab].out )
3917 # We found the default executable, but exeext='' is most
3918 # certainly right.
3919 break;;
3920 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 then :; else
3923 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3924 fi
3925 # We set ac_cv_exeext here because the later test for it is not
3926 # safe: cross compilers may not add the suffix if given an `-o'
3927 # argument, so we may need to know it at that point already.
3928 # Even if this section looks crufty: it has the advantage of
3929 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003930 break;;
3931 * )
3932 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 esac
3934done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935test "$ac_cv_exeext" = no && ac_cv_exeext=
3936
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_file=''
3939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test -z "$ac_file"; then :
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942$as_echo "no" >&6; }
3943$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003944sed 's/^/| /' conftest.$ac_ext >&5
3945
Matthias Kloseb9621712010-04-24 17:59:49 +00003946{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003948as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003949See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003950else
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3952$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3955$as_echo_n "checking for C compiler default output file name... " >&6; }
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3957$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3963$as_echo_n "checking for suffix of executables... " >&6; }
3964if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3976# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3977# work properly (i.e., refer to `conftest.exe'), while it won't with
3978# `rm'.
3979for ac_file in conftest.exe conftest conftest.*; do
3980 test -f "$ac_file" || continue
3981 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984 break;;
3985 * ) break;;
3986 esac
3987done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988else
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003992See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994rm -f conftest conftest$ac_cv_exeext
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3996$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
3998rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003999EXEEXT=$ac_cv_exeext
4000ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003#include <stdio.h>
4004int
4005main ()
4006{
4007FILE *f = fopen ("conftest.out", "w");
4008 return ferror (f) || fclose (f) != 0;
4009
4010 ;
4011 return 0;
4012}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004014ac_clean_files="$ac_clean_files conftest.out"
4015# Check that the compiler produces executables we can run. If not, either
4016# the compiler is broken, or we cross compile.
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4018$as_echo_n "checking whether we are cross compiling... " >&6; }
4019if test "$cross_compiling" != yes; then
4020 { { ac_try="$ac_link"
4021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_link") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }
4031 if { ac_try='./conftest$ac_cv_exeext'
4032 { { case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
4036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
4038 (eval "$ac_try") 2>&5
4039 ac_status=$?
4040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; }; then
4042 cross_compiling=no
4043 else
4044 if test "$cross_compiling" = maybe; then
4045 cross_compiling=yes
4046 else
4047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004049as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004050If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 fi
4053 fi
4054fi
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4056$as_echo "$cross_compiling" >&6; }
4057
4058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4059ac_clean_files=$ac_clean_files_save
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4061$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004062if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo_n "(cached) " >&6
4064else
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066/* end confdefs.h. */
4067
4068int
4069main ()
4070{
4071
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004077if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 for ac_file in conftest.o conftest.obj conftest.*; do
4089 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4093 break;;
4094 esac
4095done
4096else
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004098sed 's/^/| /' conftest.$ac_ext >&5
4099
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004102as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004103See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4108$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004109OBJEXT=$ac_cv_objext
4110ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4112$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004115else
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004118
Martin v. Löwis11437992002-04-12 09:54:03 +00004119int
4120main ()
4121{
4122#ifndef __GNUC__
4123 choke me
4124#endif
4125
4126 ;
4127 return 0;
4128}
4129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_compiler_gnu=yes
4132else
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004136ac_cv_c_compiler_gnu=$ac_compiler_gnu
4137
4138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4140$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4141if test $ac_compiler_gnu = yes; then
4142 GCC=yes
4143else
4144 GCC=
4145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004146ac_test_CFLAGS=${CFLAGS+set}
4147ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4149$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153 ac_save_c_werror_flag=$ac_c_werror_flag
4154 ac_c_werror_flag=yes
4155 ac_cv_prog_cc_g=no
4156 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004169 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 CFLAGS=""
4172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173/* end confdefs.h. */
4174
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004183if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184
Matthias Kloseb9621712010-04-24 17:59:49 +00004185else
4186 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189/* end confdefs.h. */
4190
4191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207 ac_c_werror_flag=$ac_save_c_werror_flag
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4210$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004211if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213elif test $ac_cv_prog_cc_g = yes; then
4214 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004215 CFLAGS="-g -O2"
4216 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004217 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 fi
4219else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004220 if test "$GCC" = yes; then
4221 CFLAGS="-O2"
4222 else
4223 CFLAGS=
4224 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4227$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004228if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004230else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004232ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* end confdefs.h. */
4235#include <stdarg.h>
4236#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004237struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4239struct buf { int x; };
4240FILE * (*rcsopen) (struct buf *, struct stat *, int);
4241static char *e (p, i)
4242 char **p;
4243 int i;
4244{
4245 return p[i];
4246}
4247static char *f (char * (*g) (char **, int), char **p, ...)
4248{
4249 char *s;
4250 va_list v;
4251 va_start (v,p);
4252 s = g (p, va_arg (v,int));
4253 va_end (v);
4254 return s;
4255}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256
4257/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4258 function prototypes and stuff, but not '\xHH' hex character constants.
4259 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004261 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4262 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004264int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4267 inside strings and character constants. */
4268#define FOO(x) 'x'
4269int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4270
Skip Montanaro6dead952003-09-25 14:50:04 +00004271int test (int i, double x);
4272struct s1 {int (*f) (int a);};
4273struct s2 {int (*f) (double a);};
4274int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4275int argc;
4276char **argv;
4277int
4278main ()
4279{
4280return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4281 ;
4282 return 0;
4283}
4284_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4286 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004287do
4288 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext
4293 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296CC=$ac_save_CC
4297
4298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299# AC_CACHE_VAL
4300case "x$ac_cv_prog_cc_c89" in
4301 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4303$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4306$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4310$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004311esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004313
Matthias Kloseb9621712010-04-24 17:59:49 +00004314fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316ac_ext=c
4317ac_cpp='$CPP $CPPFLAGS'
4318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4320ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004322ac_ext=c
4323ac_cpp='$CPP $CPPFLAGS'
4324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326ac_compiler_gnu=$ac_cv_c_compiler_gnu
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4328$as_echo_n "checking how to run the C preprocessor... " >&6; }
4329# On Suns, sometimes $CPP names a directory.
4330if test -n "$CPP" && test -d "$CPP"; then
4331 CPP=
4332fi
4333if test -z "$CPP"; then
4334 if ${ac_cv_prog_CPP+:} false; then :
4335 $as_echo_n "(cached) " >&6
4336else
4337 # Double quotes because CPP needs to be expanded
4338 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4339 do
4340 ac_preproc_ok=false
4341for ac_c_preproc_warn_flag in '' yes
4342do
4343 # Use a header file that comes with gcc, so configuring glibc
4344 # with a fresh cross-compiler works.
4345 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4346 # <limits.h> exists even on freestanding compilers.
4347 # On the NeXT, cc -E runs the code through the compiler's parser,
4348 # not just through cpp. "Syntax error" is here to catch this case.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350/* end confdefs.h. */
4351#ifdef __STDC__
4352# include <limits.h>
4353#else
4354# include <assert.h>
4355#endif
4356 Syntax error
4357_ACEOF
4358if ac_fn_c_try_cpp "$LINENO"; then :
4359
4360else
4361 # Broken: fails on valid input.
4362continue
4363fi
4364rm -f conftest.err conftest.i conftest.$ac_ext
4365
4366 # OK, works on sane cases. Now check whether nonexistent headers
4367 # can be detected and how.
4368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369/* end confdefs.h. */
4370#include <ac_nonexistent.h>
4371_ACEOF
4372if ac_fn_c_try_cpp "$LINENO"; then :
4373 # Broken: success on invalid input.
4374continue
4375else
4376 # Passes both tests.
4377ac_preproc_ok=:
4378break
4379fi
4380rm -f conftest.err conftest.i conftest.$ac_ext
4381
4382done
4383# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4384rm -f conftest.i conftest.err conftest.$ac_ext
4385if $ac_preproc_ok; then :
4386 break
4387fi
4388
4389 done
4390 ac_cv_prog_CPP=$CPP
4391
4392fi
4393 CPP=$ac_cv_prog_CPP
4394else
4395 ac_cv_prog_CPP=$CPP
4396fi
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4398$as_echo "$CPP" >&6; }
4399ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445
4446else
4447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4449as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4450See \`config.log' for more details" "$LINENO" 5; }
4451fi
4452
4453ac_ext=c
4454ac_cpp='$CPP $CPPFLAGS'
4455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4460$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4461if ${ac_cv_path_GREP+:} false; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 if test -z "$GREP"; then
4465 ac_path_GREP_found=false
4466 # Loop through the user's path and test for each of PROGNAME-LIST
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
4472 for ac_prog in grep ggrep; do
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4475 as_fn_executable_p "$ac_path_GREP" || continue
4476# Check for GNU ac_path_GREP and select it if it is found.
4477 # Check for GNU $ac_path_GREP
4478case `"$ac_path_GREP" --version 2>&1` in
4479*GNU*)
4480 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4481*)
4482 ac_count=0
4483 $as_echo_n 0123456789 >"conftest.in"
4484 while :
4485 do
4486 cat "conftest.in" "conftest.in" >"conftest.tmp"
4487 mv "conftest.tmp" "conftest.in"
4488 cp "conftest.in" "conftest.nl"
4489 $as_echo 'GREP' >> "conftest.nl"
4490 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4491 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4492 as_fn_arith $ac_count + 1 && ac_count=$as_val
4493 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4494 # Best one so far, save it but keep looking for a better one
4495 ac_cv_path_GREP="$ac_path_GREP"
4496 ac_path_GREP_max=$ac_count
4497 fi
4498 # 10*(2^10) chars as input seems more than enough
4499 test $ac_count -gt 10 && break
4500 done
4501 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4502esac
4503
4504 $ac_path_GREP_found && break 3
4505 done
4506 done
4507 done
4508IFS=$as_save_IFS
4509 if test -z "$ac_cv_path_GREP"; then
4510 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4511 fi
4512else
4513 ac_cv_path_GREP=$GREP
4514fi
4515
4516fi
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4518$as_echo "$ac_cv_path_GREP" >&6; }
4519 GREP="$ac_cv_path_GREP"
4520
4521
Łukasz Langaa785c872016-09-09 17:37:37 -07004522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4523$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4524if ${ac_cv_path_SED+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4528 for ac_i in 1 2 3 4 5 6 7; do
4529 ac_script="$ac_script$as_nl$ac_script"
4530 done
4531 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4532 { ac_script=; unset ac_script;}
4533 if test -z "$SED"; then
4534 ac_path_SED_found=false
4535 # Loop through the user's path and test for each of PROGNAME-LIST
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in $PATH
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
4541 for ac_prog in sed gsed; do
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4544 as_fn_executable_p "$ac_path_SED" || continue
4545# Check for GNU ac_path_SED and select it if it is found.
4546 # Check for GNU $ac_path_SED
4547case `"$ac_path_SED" --version 2>&1` in
4548*GNU*)
4549 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4550*)
4551 ac_count=0
4552 $as_echo_n 0123456789 >"conftest.in"
4553 while :
4554 do
4555 cat "conftest.in" "conftest.in" >"conftest.tmp"
4556 mv "conftest.tmp" "conftest.in"
4557 cp "conftest.in" "conftest.nl"
4558 $as_echo '' >> "conftest.nl"
4559 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4560 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4561 as_fn_arith $ac_count + 1 && ac_count=$as_val
4562 if test $ac_count -gt ${ac_path_SED_max-0}; then
4563 # Best one so far, save it but keep looking for a better one
4564 ac_cv_path_SED="$ac_path_SED"
4565 ac_path_SED_max=$ac_count
4566 fi
4567 # 10*(2^10) chars as input seems more than enough
4568 test $ac_count -gt 10 && break
4569 done
4570 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4571esac
4572
4573 $ac_path_SED_found && break 3
4574 done
4575 done
4576 done
4577IFS=$as_save_IFS
4578 if test -z "$ac_cv_path_SED"; then
4579 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4580 fi
4581else
4582 ac_cv_path_SED=$SED
4583fi
4584
4585fi
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4587$as_echo "$ac_cv_path_SED" >&6; }
4588 SED="$ac_cv_path_SED"
4589 rm -f conftest.sed
4590
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004591
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
4593
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4595$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004597# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004598if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
4601 case $withval in
4602 no) with_cxx_main=no
4603 MAINCC='$(CC)';;
4604 yes) with_cxx_main=yes
4605 MAINCC='$(CXX)';;
4606 *) with_cxx_main=yes
4607 MAINCC=$withval
4608 if test -z "$CXX"
4609 then
4610 CXX=$withval
4611 fi;;
4612 esac
4613else
4614
4615 with_cxx_main=no
4616 MAINCC='$(CC)'
4617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004618fi
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4621$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004622
4623preset_cxx="$CXX"
4624if test -z "$CXX"
4625then
4626 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 gcc) if test -n "$ac_tool_prefix"; then
4628 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4629set dummy ${ac_tool_prefix}g++; ac_word=$2
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4631$as_echo_n "checking for $ac_word... " >&6; }
4632if ${ac_cv_path_CXX+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 case $CXX in
4636 [\\/]* | ?:[\\/]*)
4637 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4638 ;;
4639 *)
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641for as_dir in notfound
4642do
4643 IFS=$as_save_IFS
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004647 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649 break 2
4650 fi
4651done
4652 done
4653IFS=$as_save_IFS
4654
4655 ;;
4656esac
4657fi
4658CXX=$ac_cv_path_CXX
4659if test -n "$CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4661$as_echo "$CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667
4668fi
4669if test -z "$ac_cv_path_CXX"; then
4670 ac_pt_CXX=$CXX
4671 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675if ${ac_cv_path_ac_pt_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677else
4678 case $ac_pt_CXX in
4679 [\\/]* | ?:[\\/]*)
4680 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4681 ;;
4682 *)
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in notfound
4685do
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698 ;;
4699esac
4700fi
4701ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4702if test -n "$ac_pt_CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4704$as_echo "$ac_pt_CXX" >&6; }
4705else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710 if test "x$ac_pt_CXX" = x; then
4711 CXX="g++"
4712 else
4713 case $cross_compiling:$ac_tool_warned in
4714yes:)
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4717ac_tool_warned=yes ;;
4718esac
4719 CXX=$ac_pt_CXX
4720 fi
4721else
4722 CXX="$ac_cv_path_CXX"
4723fi
4724 ;;
4725 cc) if test -n "$ac_tool_prefix"; then
4726 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4727set dummy ${ac_tool_prefix}c++; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004730if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732else
4733 case $CXX in
4734 [\\/]* | ?:[\\/]*)
4735 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4736 ;;
4737 *)
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in notfound
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747 break 2
4748 fi
4749done
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004751IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 ;;
4754esac
4755fi
4756CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004757if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4759$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765
4766fi
4767if test -z "$ac_cv_path_CXX"; then
4768 ac_pt_CXX=$CXX
4769 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778 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 +00004779 ;;
4780 *)
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in notfound
4783do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 break 2
4791 fi
4792done
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004794IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ;;
4797esac
4798fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4800if test -n "$ac_pt_CXX"; then
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4802$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803else
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 if test "x$ac_pt_CXX" = x; then
4809 CXX="c++"
4810 else
4811 case $cross_compiling:$ac_tool_warned in
4812yes:)
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4815ac_tool_warned=yes ;;
4816esac
4817 CXX=$ac_pt_CXX
4818 fi
4819else
4820 CXX="$ac_cv_path_CXX"
4821fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 clang|*/clang) if test -n "$ac_tool_prefix"; then
4824 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4825set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if ${ac_cv_path_CXX+:} false; then :
4829 $as_echo_n "(cached) " >&6
4830else
4831 case $CXX in
4832 [\\/]* | ?:[\\/]*)
4833 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4834 ;;
4835 *)
4836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in notfound
4838do
4839 IFS=$as_save_IFS
4840 test -z "$as_dir" && as_dir=.
4841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845 break 2
4846 fi
4847done
4848 done
4849IFS=$as_save_IFS
4850
Ned Deilycbfb9a52012-06-23 16:02:19 -07004851 ;;
4852esac
4853fi
4854CXX=$ac_cv_path_CXX
4855if test -n "$CXX"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4857$as_echo "$CXX" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863
4864fi
4865if test -z "$ac_cv_path_CXX"; then
4866 ac_pt_CXX=$CXX
4867 # Extract the first word of "clang++", so it can be a program name with args.
4868set dummy clang++; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_ac_pt_CXX+:} false; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 case $ac_pt_CXX in
4875 [\\/]* | ?:[\\/]*)
4876 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4877 ;;
4878 *)
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in notfound
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
4894 ;;
4895esac
4896fi
4897ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4898if test -n "$ac_pt_CXX"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4900$as_echo "$ac_pt_CXX" >&6; }
4901else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906 if test "x$ac_pt_CXX" = x; then
4907 CXX="clang++"
4908 else
4909 case $cross_compiling:$ac_tool_warned in
4910yes:)
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4913ac_tool_warned=yes ;;
4914esac
4915 CXX=$ac_pt_CXX
4916 fi
4917else
4918 CXX="$ac_cv_path_CXX"
4919fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004920 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004921 icc|*/icc) if test -n "$ac_tool_prefix"; then
4922 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4923set dummy ${ac_tool_prefix}icpc; ac_word=$2
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925$as_echo_n "checking for $ac_word... " >&6; }
4926if ${ac_cv_path_CXX+:} false; then :
4927 $as_echo_n "(cached) " >&6
4928else
4929 case $CXX in
4930 [\\/]* | ?:[\\/]*)
4931 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4932 ;;
4933 *)
4934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935for as_dir in notfound
4936do
4937 IFS=$as_save_IFS
4938 test -z "$as_dir" && as_dir=.
4939 for ac_exec_ext in '' $ac_executable_extensions; do
4940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943 break 2
4944 fi
4945done
4946 done
4947IFS=$as_save_IFS
4948
4949 ;;
4950esac
4951fi
4952CXX=$ac_cv_path_CXX
4953if test -n "$CXX"; then
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4955$as_echo "$CXX" >&6; }
4956else
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958$as_echo "no" >&6; }
4959fi
4960
4961
4962fi
4963if test -z "$ac_cv_path_CXX"; then
4964 ac_pt_CXX=$CXX
4965 # Extract the first word of "icpc", so it can be a program name with args.
4966set dummy icpc; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_ac_pt_CXX+:} false; then :
4970 $as_echo_n "(cached) " >&6
4971else
4972 case $ac_pt_CXX in
4973 [\\/]* | ?:[\\/]*)
4974 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4975 ;;
4976 *)
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in notfound
4979do
4980 IFS=$as_save_IFS
4981 test -z "$as_dir" && as_dir=.
4982 for ac_exec_ext in '' $ac_executable_extensions; do
4983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 break 2
4987 fi
4988done
4989 done
4990IFS=$as_save_IFS
4991
4992 ;;
4993esac
4994fi
4995ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4996if test -n "$ac_pt_CXX"; then
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4998$as_echo "$ac_pt_CXX" >&6; }
4999else
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004 if test "x$ac_pt_CXX" = x; then
5005 CXX="icpc"
5006 else
5007 case $cross_compiling:$ac_tool_warned in
5008yes:)
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5011ac_tool_warned=yes ;;
5012esac
5013 CXX=$ac_pt_CXX
5014 fi
5015else
5016 CXX="$ac_cv_path_CXX"
5017fi
5018 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005019 esac
5020 if test "$CXX" = "notfound"
5021 then
5022 CXX=""
5023 fi
5024fi
5025if test -z "$CXX"
5026then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005027 if test -n "$ac_tool_prefix"; then
5028 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5029 do
5030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005034if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005036else
5037 if test -n "$CXX"; then
5038 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5039else
5040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005047 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049 break 2
5050 fi
5051done
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055fi
5056fi
5057CXX=$ac_cv_prog_CXX
5058if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5060$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005061else
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064fi
5065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 test -n "$CXX" && break
5068 done
5069fi
5070if test -z "$CXX"; then
5071 ac_ct_CXX=$CXX
5072 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
5078if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5079 $as_echo_n "(cached) " >&6
5080else
5081 if test -n "$ac_ct_CXX"; then
5082 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 ac_cv_prog_ac_ct_CXX="$ac_prog"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 done
5097IFS=$as_save_IFS
5098
5099fi
5100fi
5101ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5102if test -n "$ac_ct_CXX"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5104$as_echo "$ac_ct_CXX" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110
5111 test -n "$ac_ct_CXX" && break
5112done
5113
5114 if test "x$ac_ct_CXX" = x; then
5115 CXX="notfound"
5116 else
5117 case $cross_compiling:$ac_tool_warned in
5118yes:)
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5121ac_tool_warned=yes ;;
5122esac
5123 CXX=$ac_ct_CXX
5124 fi
5125fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126
5127 if test "$CXX" = "notfound"
5128 then
5129 CXX=""
5130 fi
5131fi
5132if test "$preset_cxx" != "$CXX"
5133then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005134 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135
5136 By default, distutils will build C++ extension modules with \"$CXX\".
5137 If this is not intended, then set CXX on the configure command line.
5138 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140
5141 By default, distutils will build C++ extension modules with \"$CXX\".
5142 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005143 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144fi
5145
5146
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5148
5149
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5151$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5152cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef bfin
5154#undef cris
5155#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005157#undef hppa
5158#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005160#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005161#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005162#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005164#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005165 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005166#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005167# if defined(__x86_64__) && defined(__LP64__)
5168 x86_64-linux-gnu
5169# elif defined(__x86_64__) && defined(__ILP32__)
5170 x86_64-linux-gnux32
5171# elif defined(__i386__)
5172 i386-linux-gnu
5173# elif defined(__aarch64__) && defined(__AARCH64EL__)
5174# if defined(__ILP32__)
5175 aarch64_ilp32-linux-gnu
5176# else
5177 aarch64-linux-gnu
5178# endif
5179# elif defined(__aarch64__) && defined(__AARCH64EB__)
5180# if defined(__ILP32__)
5181 aarch64_be_ilp32-linux-gnu
5182# else
5183 aarch64_be-linux-gnu
5184# endif
5185# elif defined(__alpha__)
5186 alpha-linux-gnu
5187# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5188# if defined(__ARMEL__)
5189 arm-linux-gnueabihf
5190# else
5191 armeb-linux-gnueabihf
5192# endif
5193# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5194# if defined(__ARMEL__)
5195 arm-linux-gnueabi
5196# else
5197 armeb-linux-gnueabi
5198# endif
5199# elif defined(__hppa__)
5200 hppa-linux-gnu
5201# elif defined(__ia64__)
5202 ia64-linux-gnu
5203# elif defined(__m68k__) && !defined(__mcoldfire__)
5204 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005205# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5206# if _MIPS_SIM == _ABIO32
5207 mipsisa32r6el-linux-gnu
5208# elif _MIPS_SIM == _ABIN32
5209 mipsisa64r6el-linux-gnuabin32
5210# elif _MIPS_SIM == _ABI64
5211 mipsisa64r6el-linux-gnuabi64
5212# else
5213# error unknown platform triplet
5214# endif
5215# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5216# if _MIPS_SIM == _ABIO32
5217 mipsisa32r6-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mipsisa64r6-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mipsisa64r6-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005225# elif defined(__mips_hard_float) && defined(_MIPSEL)
5226# if _MIPS_SIM == _ABIO32
5227 mipsel-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64el-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64el-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__mips_hard_float)
5236# if _MIPS_SIM == _ABIO32
5237 mips-linux-gnu
5238# elif _MIPS_SIM == _ABIN32
5239 mips64-linux-gnuabin32
5240# elif _MIPS_SIM == _ABI64
5241 mips64-linux-gnuabi64
5242# else
5243# error unknown platform triplet
5244# endif
5245# elif defined(__or1k__)
5246 or1k-linux-gnu
5247# elif defined(__powerpc__) && defined(__SPE__)
5248 powerpc-linux-gnuspe
5249# elif defined(__powerpc64__)
5250# if defined(__LITTLE_ENDIAN__)
5251 powerpc64le-linux-gnu
5252# else
5253 powerpc64-linux-gnu
5254# endif
5255# elif defined(__powerpc__)
5256 powerpc-linux-gnu
5257# elif defined(__s390x__)
5258 s390x-linux-gnu
5259# elif defined(__s390__)
5260 s390-linux-gnu
5261# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5262 sh4-linux-gnu
5263# elif defined(__sparc__) && defined(__arch64__)
5264 sparc64-linux-gnu
5265# elif defined(__sparc__)
5266 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005267# elif defined(__riscv)
5268# if __riscv_xlen == 32
5269 riscv32-linux-gnu
5270# elif __riscv_xlen == 64
5271 riscv64-linux-gnu
5272# else
5273# error unknown platform triplet
5274# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005275# else
5276# error unknown platform triplet
5277# endif
5278#elif defined(__FreeBSD_kernel__)
5279# if defined(__LP64__)
5280 x86_64-kfreebsd-gnu
5281# elif defined(__i386__)
5282 i386-kfreebsd-gnu
5283# else
5284# error unknown platform triplet
5285# endif
5286#elif defined(__gnu_hurd__)
5287 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005288#elif defined(__APPLE__)
5289 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005290#elif defined(__VXWORKS__)
5291 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292#else
5293# error unknown platform triplet
5294#endif
5295
5296EOF
5297
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005298if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5301$as_echo "$PLATFORM_TRIPLET" >&6; }
5302else
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5304$as_echo "none" >&6; }
5305fi
5306rm -f conftest.c conftest.out
5307
5308if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5309 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5310 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5311 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005312elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5313 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315
doko@ubuntu.com55532312016-06-14 08:55:19 +02005316if test x$MULTIARCH != x; then
5317 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5318fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319
5320
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5322$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5323save_LDFLAGS="$LDFLAGS"
5324LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005325
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327/* end confdefs.h. */
5328
5329int
5330main ()
5331{
5332
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337if ac_fn_c_try_link "$LINENO"; then :
5338 NO_AS_NEEDED="-Wl,--no-as-needed"
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5340$as_echo "yes" >&6; }
5341else
5342 NO_AS_NEEDED=""
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346rm -f core conftest.err conftest.$ac_objext \
5347 conftest$ac_exeext conftest.$ac_ext
5348LDFLAGS="$save_LDFLAGS"
5349
5350
5351
5352# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5355$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005356if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005358else
5359 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5360 then ac_cv_path_EGREP="$GREP -E"
5361 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 # Loop through the user's path and test for each of PROGNAME-LIST
5365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5367do
5368 IFS=$as_save_IFS
5369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 for ac_prog in egrep; do
5371 for ac_exec_ext in '' $ac_executable_extensions; do
5372 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005373 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005374# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 # Check for GNU $ac_path_EGREP
5376case `"$ac_path_EGREP" --version 2>&1` in
5377*GNU*)
5378 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5379*)
5380 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 while :
5383 do
5384 cat "conftest.in" "conftest.in" >"conftest.tmp"
5385 mv "conftest.tmp" "conftest.in"
5386 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5392 # Best one so far, save it but keep looking for a better one
5393 ac_cv_path_EGREP="$ac_path_EGREP"
5394 ac_path_EGREP_max=$ac_count
5395 fi
5396 # 10*(2^10) chars as input seems more than enough
5397 test $ac_count -gt 10 && break
5398 done
5399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5400esac
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $ac_path_EGREP_found && break 3
5403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005408 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 +00005409 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410else
5411 ac_cv_path_EGREP=$EGREP
5412fi
5413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 fi
5415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5417$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005419
5420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5422$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005423if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo_n "(cached) " >&6
5425else
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005427/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005428#include <stdlib.h>
5429#include <stdarg.h>
5430#include <string.h>
5431#include <float.h>
5432
5433int
5434main ()
5435{
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_compile "$LINENO"; then :
5442 ac_cv_header_stdc=yes
5443else
5444 ac_cv_header_stdc=no
5445fi
5446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447
5448if test $ac_cv_header_stdc = yes; then
5449 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5451/* end confdefs.h. */
5452#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458else
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005461rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462
Matthias Kloseb9621712010-04-24 17:59:49 +00005463fi
5464
5465if test $ac_cv_header_stdc = yes; then
5466 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469#include <stdlib.h>
5470
5471_ACEOF
5472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5473 $EGREP "free" >/dev/null 2>&1; then :
5474
5475else
5476 ac_cv_header_stdc=no
5477fi
5478rm -f conftest*
5479
5480fi
5481
5482if test $ac_cv_header_stdc = yes; then
5483 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5484 if test "$cross_compiling" = yes; then :
5485 :
5486else
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <ctype.h>
5490#include <stdlib.h>
5491#if ((' ' & 0x0FF) == 0x020)
5492# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5493# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5494#else
5495# define ISLOWER(c) \
5496 (('a' <= (c) && (c) <= 'i') \
5497 || ('j' <= (c) && (c) <= 'r') \
5498 || ('s' <= (c) && (c) <= 'z'))
5499# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5500#endif
5501
5502#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5503int
5504main ()
5505{
5506 int i;
5507 for (i = 0; i < 256; i++)
5508 if (XOR (islower (i), ISLOWER (i))
5509 || toupper (i) != TOUPPER (i))
5510 return 2;
5511 return 0;
5512}
5513_ACEOF
5514if ac_fn_c_try_run "$LINENO"; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5520 conftest.$ac_objext conftest.beam conftest.$ac_ext
5521fi
5522
5523fi
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5526$as_echo "$ac_cv_header_stdc" >&6; }
5527if test $ac_cv_header_stdc = yes; then
5528
5529$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5530
5531fi
5532
5533# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5535 inttypes.h stdint.h unistd.h
5536do :
5537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5539"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005540if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005541 cat >>confdefs.h <<_ACEOF
5542#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5543_ACEOF
5544
5545fi
5546
5547done
5548
5549
5550
5551 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 +02005552if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 MINIX=yes
5554else
5555 MINIX=
5556fi
5557
5558
5559 if test "$MINIX" = yes; then
5560
5561$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5562
5563
5564$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5565
5566
5567$as_echo "#define _MINIX 1" >>confdefs.h
5568
5569 fi
5570
5571
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5573$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005574if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 $as_echo_n "(cached) " >&6
5576else
5577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5578/* end confdefs.h. */
5579
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005580# define __EXTENSIONS__ 1
5581 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005582int
5583main ()
5584{
5585
5586 ;
5587 return 0;
5588}
5589_ACEOF
5590if ac_fn_c_try_compile "$LINENO"; then :
5591 ac_cv_safe_to_define___extensions__=yes
5592else
5593 ac_cv_safe_to_define___extensions__=no
5594fi
5595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5596fi
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5598$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5599 test $ac_cv_safe_to_define___extensions__ = yes &&
5600 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5601
5602 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5603
5604 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5605
5606 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5607
5608 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5609
5610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5613$as_echo_n "checking for the Android API level... " >&6; }
5614cat >> conftest.c <<EOF
5615#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005616android_api = __ANDROID_API__
5617arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618#else
5619#error not Android
5620#endif
5621EOF
5622
5623if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5625 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5627$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005628 if test -z "$ANDROID_API_LEVEL"; then
5629 echo 'Fatal: you must define __ANDROID_API__'
5630 exit 1
5631 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632
5633cat >>confdefs.h <<_ACEOF
5634#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5635_ACEOF
5636
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5639$as_echo_n "checking for the Android arm ABI... " >&6; }
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5641$as_echo "$_arm_arch" >&6; }
5642 if test "$_arm_arch" = 7; then
5643 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5644 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5645 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646else
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5648$as_echo "not Android" >&6; }
5649fi
5650rm -f conftest.c conftest.out
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652# Check for unsupported systems
5653case $ac_sys_system/$ac_sys_release in
5654atheos*|Linux*/1*)
5655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5656 echo See README for details.
5657 exit 1;;
5658esac
5659
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 withval=$with_suffix;
5667 case $withval in
5668 no) EXEEXT=;;
5669 yes) EXEEXT=.exe;;
5670 *) EXEEXT=$withval;;
5671 esac
5672fi
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Test whether we're running on a non-case-sensitive system, in which
5678# case we give a warning if no ext is given
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682if test ! -d CaseSensitiveTestDir; then
5683mkdir CaseSensitiveTestDir
5684fi
5685
5686if test -d casesensitivetestdir
5687then
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=.exe
5691else
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 BUILDEXEEXT=$EXEEXT
5695fi
5696rmdir CaseSensitiveTestDir
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698case $ac_sys_system in
5699hp*|HP*)
5700 case $CC in
5701 cc|*/cc) CC="$CC -Ae";;
5702 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703esac
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5707$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test -z "$LIBRARY"
5709then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005710 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5713$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# LDLIBRARY is the name of the library to link against (as opposed to the
5716# name of the library into which to insert object files). BLDLIBRARY is also
5717# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5718# is blank as the main program is not linked directly against LDLIBRARY.
5719# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5720# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5721# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5722# DLLLIBRARY is the shared (i.e., DLL) library.
5723#
5724# RUNSHARED is used to run shared python without installed libraries
5725#
5726# INSTSONAME is the name of the shared library that will be use to install
5727# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005728#
5729# LDVERSION is the shared library version number, normally the Python version
5730# with the ABI build flags appended.
5731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733
5734
5735
5736
5737
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739LDLIBRARY="$LIBRARY"
5740BLDLIBRARY='$(LDLIBRARY)'
5741INSTSONAME='$(LDLIBRARY)'
5742DLLLIBRARY=''
5743LDLIBRARYDIR=''
5744RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005745LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# LINKCC is the command that links the python executable -- default is $(CC).
5748# If CXX is set, and if it is needed to link a main function that was
5749# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5750# python might then depend on the C++ runtime
5751# This is altered for AIX in order to build the export list before
5752# linking.
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5755$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756if test -z "$LINKCC"
5757then
5758 LINKCC='$(PURIFY) $(MAINCC)'
5759 case $ac_sys_system in
5760 AIX*)
5761 exp_extra="\"\""
5762 if test $ac_sys_release -ge 5 -o \
5763 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5764 exp_extra="."
5765 fi
5766 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 QNX*)
5768 # qcc must be used because the other compilers do not
5769 # support -N.
5770 LINKCC=qcc;;
5771 esac
5772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5774$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
5776# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5777# make sure we default having it set to "no": this is used by
5778# distutils.unixccompiler to know if it should add --enable-new-dtags
5779# to linker command lines, and failing to detect GNU ld simply results
5780# in the same bahaviour as before.
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5783$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784ac_prog=ld
5785if test "$GCC" = yes; then
5786 ac_prog=`$CC -print-prog-name=ld`
5787fi
5788case `"$ac_prog" -V 2>&1 < /dev/null` in
5789 *GNU*)
5790 GNULD=yes;;
5791 *)
5792 GNULD=no;;
5793esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5795$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5798$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 enableval=$enable_shared;
5802fi
5803
5804
5805if test -z "$enable_shared"
5806then
5807 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005808 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 enable_shared="yes";;
5810 *)
5811 enable_shared="no";;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5815$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5818$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005820if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enableval=$enable_profiling;
5822fi
5823
5824if test "x$enable_profiling" = xyes; then
5825 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005826 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828/* end confdefs.h. */
5829int main() { return 0; }
5830_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831if ac_fn_c_try_link "$LINENO"; then :
5832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836rm -f core conftest.err conftest.$ac_objext \
5837 conftest$ac_exeext conftest.$ac_ext
5838 CC="$ac_save_cc"
5839else
5840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5843$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845if test "x$enable_profiling" = xyes; then
5846 BASECFLAGS="-pg $BASECFLAGS"
5847 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
5849
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5851$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
5853# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5854# library that we build, but we do not want to link against it (we
5855# will find it with a -framework option). For this reason there is an
5856# extra variable BLDLIBRARY against which Python and the extension
5857# modules are linked, BLDLIBRARY. This is normally the same as
5858# LDLIBRARY, but empty for MacOSX framework builds.
5859if test "$enable_framework"
5860then
5861 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005862 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 BLDLIBRARY=''
5864else
5865 BLDLIBRARY='$(LDLIBRARY)'
5866fi
5867
5868# Other platforms follow
5869if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005870 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
Matthias Kloseb9621712010-04-24 17:59:49 +00005872$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
5874 case $ac_sys_system in
5875 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).dll.a'
5877 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ;;
5879 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005880 LDLIBRARY='libpython$(LDVERSION).so'
5881 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005882 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005884 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005885 then
5886 PY3LIBRARY=libpython3.so
5887 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005889 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).so'
5891 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005894 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005895 then
5896 PY3LIBRARY=libpython3.so
5897 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
5899 hp*|HP*)
5900 case `uname -m` in
5901 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).dylib'
5913 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005916 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005919 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
5921 esac
5922else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005923 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 case $ac_sys_system in
5925 CYGWIN*)
5926 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 esac
5930fi
5931
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005932if test "$cross_compiling" = yes; then
5933 RUNSHARED=
5934fi
5935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5937$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005940if test -n "$ac_tool_prefix"; then
5941 for ac_prog in ar aal
5942 do
5943 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005947if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
5950 if test -n "$AR"; then
5951 ac_cv_prog_AR="$AR" # Let the user override the test.
5952else
5953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956 IFS=$as_save_IFS
5957 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005960 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 break 2
5963 fi
5964done
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966IFS=$as_save_IFS
5967
5968fi
5969fi
5970AR=$ac_cv_prog_AR
5971if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5973$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974else
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
5978
5979
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005980 test -n "$AR" && break
5981 done
5982fi
5983if test -z "$AR"; then
5984 ac_ct_AR=$AR
5985 for ac_prog in ar aal
5986do
5987 # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_prog_ac_ct_AR+:} false; then :
5992 $as_echo_n "(cached) " >&6
5993else
5994 if test -n "$ac_ct_AR"; then
5995 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5996else
5997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000 IFS=$as_save_IFS
6001 test -z "$as_dir" && as_dir=.
6002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004 ac_cv_prog_ac_ct_AR="$ac_prog"
6005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006 break 2
6007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006009 done
6010IFS=$as_save_IFS
6011
6012fi
6013fi
6014ac_ct_AR=$ac_cv_prog_ac_ct_AR
6015if test -n "$ac_ct_AR"; then
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6017$as_echo "$ac_ct_AR" >&6; }
6018else
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024 test -n "$ac_ct_AR" && break
6025done
6026
6027 if test "x$ac_ct_AR" = x; then
6028 AR="ar"
6029 else
6030 case $cross_compiling:$ac_tool_warned in
6031yes:)
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6034ac_tool_warned=yes ;;
6035esac
6036 AR=$ac_ct_AR
6037 fi
6038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039
6040
6041# tweak ARFLAGS only if the user didn't set it on the command line
6042
6043if test -z "$ARFLAGS"
6044then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006045 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047
doko@ubuntu.com58844492012-06-30 18:25:32 +02006048if test -n "$ac_tool_prefix"; then
6049 for ac_prog in readelf
6050 do
6051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_READELF+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057else
6058 if test -n "$READELF"; then
6059 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6060else
6061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006068 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
6072done
6073 done
6074IFS=$as_save_IFS
6075
6076fi
6077fi
6078READELF=$ac_cv_prog_READELF
6079if test -n "$READELF"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6081$as_echo "$READELF" >&6; }
6082else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088 test -n "$READELF" && break
6089 done
6090fi
6091if test -z "$READELF"; then
6092 ac_ct_READELF=$READELF
6093 for ac_prog in readelf
6094do
6095 # Extract the first word of "$ac_prog", so it can be a program name with args.
6096set dummy $ac_prog; ac_word=$2
6097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6098$as_echo_n "checking for $ac_word... " >&6; }
6099if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6100 $as_echo_n "(cached) " >&6
6101else
6102 if test -n "$ac_ct_READELF"; then
6103 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6104else
6105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108 IFS=$as_save_IFS
6109 test -z "$as_dir" && as_dir=.
6110 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006112 ac_cv_prog_ac_ct_READELF="$ac_prog"
6113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114 break 2
6115 fi
6116done
6117 done
6118IFS=$as_save_IFS
6119
6120fi
6121fi
6122ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6123if test -n "$ac_ct_READELF"; then
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6125$as_echo "$ac_ct_READELF" >&6; }
6126else
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }
6129fi
6130
6131
6132 test -n "$ac_ct_READELF" && break
6133done
6134
6135 if test "x$ac_ct_READELF" = x; then
6136 READELF=":"
6137 else
6138 case $cross_compiling:$ac_tool_warned in
6139yes:)
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6142ac_tool_warned=yes ;;
6143esac
6144 READELF=$ac_ct_READELF
6145 fi
6146fi
6147
6148if test "$cross_compiling" = yes; then
6149 case "$READELF" in
6150 readelf|:)
6151 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6152 ;;
6153 esac
6154fi
6155
6156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006159hp*|HP*)
6160 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 if test -z "$INSTALL"
6162 then
6163 INSTALL="${srcdir}/install-sh -c"
6164 fi
6165esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166# Find a good install program. We prefer a C program (faster),
6167# so one script is as good as another. But avoid the broken or
6168# incompatible versions:
6169# SysV /etc/install, /usr/sbin/install
6170# SunOS /usr/etc/install
6171# IRIX /sbin/install
6172# AIX /bin/install
6173# AmigaOS /C/install, which installs bootblocks on floppy discs
6174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6177# OS/2's system install, which has a completely different semantic
6178# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006179# Reject install programs that cannot install multiple files.
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6181$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006183if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185else
6186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6187for as_dir in $PATH
6188do
6189 IFS=$as_save_IFS
6190 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 # Account for people who put trailing slashes in PATH elements.
6192case $as_dir/ in #((
6193 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006195 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 /usr/ucb/* ) ;;
6197 *)
6198 # OSF1 and SCO ODT 3.0 have their own names for install.
6199 # Don't use installbsd from OSF since it installs stuff as root
6200 # by default.
6201 for ac_prog in ginstall scoinst install; do
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 if test $ac_prog = install &&
6205 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6206 # AIX install. It has an incompatible calling convention.
6207 :
6208 elif test $ac_prog = install &&
6209 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6210 # program-specific install script used by HP pwplus--don't use.
6211 :
6212 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 rm -rf conftest.one conftest.two conftest.dir
6214 echo one > conftest.one
6215 echo two > conftest.two
6216 mkdir conftest.dir
6217 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6218 test -s conftest.one && test -s conftest.two &&
6219 test -s conftest.dir/conftest.one &&
6220 test -s conftest.dir/conftest.two
6221 then
6222 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6223 break 3
6224 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 fi
6226 fi
6227 done
6228 done
6229 ;;
6230esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006231
6232 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233IFS=$as_save_IFS
6234
Matthias Kloseb9621712010-04-24 17:59:49 +00006235rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236
6237fi
6238 if test "${ac_cv_path_install+set}" = set; then
6239 INSTALL=$ac_cv_path_install
6240 else
6241 # As a last resort, use the slow shell script. Don't cache a
6242 # value for INSTALL within a source directory, because that will
6243 # break other packages using the cache if that directory is
6244 # removed, or if the value is a relative name.
6245 INSTALL=$ac_install_sh
6246 fi
6247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6249$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250
6251# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6252# It thinks the first close brace ends the variable substitution.
6253test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6254
6255test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6256
6257test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6258
Matthias Klose93a0ef12012-03-15 18:08:34 +01006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6260$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6261if test -z "$MKDIR_P"; then
6262 if ${ac_cv_path_mkdir+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264else
6265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6267do
6268 IFS=$as_save_IFS
6269 test -z "$as_dir" && as_dir=.
6270 for ac_prog in mkdir gmkdir; do
6271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006272 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006273 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6274 'mkdir (GNU coreutils) '* | \
6275 'mkdir (coreutils) '* | \
6276 'mkdir (fileutils) '4.1*)
6277 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6278 break 3;;
6279 esac
6280 done
6281 done
6282 done
6283IFS=$as_save_IFS
6284
6285fi
6286
6287 test -d ./--version && rmdir ./--version
6288 if test "${ac_cv_path_mkdir+set}" = set; then
6289 MKDIR_P="$ac_cv_path_mkdir -p"
6290 else
6291 # As a last resort, use the slow shell script. Don't cache a
6292 # value for MKDIR_P within a source directory, because that will
6293 # break other packages using the cache if that directory is
6294 # removed, or if the value is a relative name.
6295 MKDIR_P="$ac_install_sh -d"
6296 fi
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6299$as_echo "$MKDIR_P" >&6; }
6300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301
6302# Not every filesystem supports hard links
6303
6304if test -z "$LN" ; then
6305 case $ac_sys_system in
6306 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307 *) LN=ln;;
6308 esac
6309fi
6310
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006311# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006312
6313ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6317$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318
6319# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006320if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 withval=$with_pydebug;
6322if test "$withval" != no
6323then
6324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6328$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006330 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006331else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333fi
6334else
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337fi
6338
6339
Victor Stinnerf4e47032019-04-25 00:56:28 +02006340# Check for --with-trace-refs
6341# --with-trace-refs
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6343$as_echo_n "checking for --with-trace-refs... " >&6; }
6344
6345# Check whether --with-trace-refs was given.
6346if test "${with_trace_refs+set}" = set; then :
6347 withval=$with_trace_refs;
6348else
6349 with_trace_refs=no
6350fi
6351
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6353$as_echo "$with_trace_refs" >&6; }
6354
6355if test "$with_trace_refs" = "yes"
6356then
6357
6358$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6359
6360fi
6361
6362# Check for --with-assertions.
6363# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006364assertions='false'
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6366$as_echo_n "checking for --with-assertions... " >&6; }
6367
6368# Check whether --with-assertions was given.
6369if test "${with_assertions+set}" = set; then :
6370 withval=$with_assertions;
6371if test "$withval" != no
6372then
6373 assertions='true'
6374fi
6375fi
6376
6377if test "$assertions" = 'true'; then
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; }
6380elif test "$Py_DEBUG" = 'true'; then
6381 assertions='true'
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6383$as_echo "implied by --with-pydebug" >&6; }
6384else
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389# Enable optimization flags
6390
6391
6392Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6394$as_echo_n "checking for --enable-optimizations... " >&6; }
6395# Check whether --enable-optimizations was given.
6396if test "${enable_optimizations+set}" = set; then :
6397 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006398if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006399then
6400 Py_OPT='true'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; };
6403else
6404 Py_OPT='false'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; };
6407fi
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006414 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6415 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006416 # 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 +00006417 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006418 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006419 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006420 DEF_MAKE_RULE="build_all"
6421else
6422 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006423 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424 DEF_MAKE_RULE="all"
6425fi
6426
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006427# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6428# normal names in the default $PATH (ie: Ubuntu). They exist under the
6429# non-suffixed name in their versioned llvm directory.
6430
6431llvm_bin_dir=''
6432llvm_path="${PATH}"
6433if test "${CC}" = "clang"
6434then
6435 clang_bin=`which clang`
6436 # Some systems install clang elsewhere as a symlink to the real path
6437 # which is where the related llvm tools are located.
6438 if test -L "${clang_bin}"
6439 then
6440 clang_dir=`dirname "${clang_bin}"`
6441 clang_bin=`readlink "${clang_bin}"`
6442 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6443 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6444 fi
6445fi
6446
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6449$as_echo_n "checking for --with-lto... " >&6; }
6450
6451# Check whether --with-lto was given.
6452if test "${with_lto+set}" = set; then :
6453 withval=$with_lto;
6454if test "$withval" != no
6455then
6456 Py_LTO='true'
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6458$as_echo "yes" >&6; };
6459else
6460 Py_LTO='false'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; };
6463fi
6464else
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469if test "$Py_LTO" = 'true' ; then
6470 case $CC in
6471 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006472
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006474$as_echo_n "checking target system type... " >&6; }
6475if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006476 $as_echo_n "(cached) " >&6
6477else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006478 if test "x$target_alias" = x; then
6479 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006480else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006481 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6482 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6483fi
6484
6485fi
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6487$as_echo "$ac_cv_target" >&6; }
6488case $ac_cv_target in
6489*-*-*) ;;
6490*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6491esac
6492target=$ac_cv_target
6493ac_save_IFS=$IFS; IFS='-'
6494set x $ac_cv_target
6495shift
6496target_cpu=$1
6497target_vendor=$2
6498shift; shift
6499# Remember, the first character of IFS is used to create $*,
6500# except with old shells:
6501target_os=$*
6502IFS=$ac_save_IFS
6503case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6504
6505
6506# The aliases save the names the user supplied, while $host etc.
6507# will get canonicalized.
6508test -n "$target_alias" &&
6509 test "$program_prefix$program_suffix$program_transform_name" = \
6510 NONENONEs,x,x, &&
6511 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006512# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6513set dummy $target_alias-llvm-ar; ac_word=$2
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515$as_echo_n "checking for $ac_word... " >&6; }
6516if ${ac_cv_path_LLVM_AR+:} false; then :
6517 $as_echo_n "(cached) " >&6
6518else
6519 case $LLVM_AR in
6520 [\\/]* | ?:[\\/]*)
6521 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6522 ;;
6523 *)
6524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525for as_dir in ${llvm_path}
6526do
6527 IFS=$as_save_IFS
6528 test -z "$as_dir" && as_dir=.
6529 for ac_exec_ext in '' $ac_executable_extensions; do
6530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533 break 2
6534 fi
6535done
6536 done
6537IFS=$as_save_IFS
6538
6539 ;;
6540esac
6541fi
6542LLVM_AR=$ac_cv_path_LLVM_AR
6543if test -n "$LLVM_AR"; then
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6545$as_echo "$LLVM_AR" >&6; }
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551
6552if test -z "$ac_cv_path_LLVM_AR"; then
6553 if test "$build" = "$target"; then
6554 ac_pt_LLVM_AR=$LLVM_AR
6555 # Extract the first word of "llvm-ar", so it can be a program name with args.
6556set dummy llvm-ar; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6560 $as_echo_n "(cached) " >&6
6561else
6562 case $ac_pt_LLVM_AR in
6563 [\\/]* | ?:[\\/]*)
6564 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6565 ;;
6566 *)
6567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in ${llvm_path}
6569do
6570 IFS=$as_save_IFS
6571 test -z "$as_dir" && as_dir=.
6572 for ac_exec_ext in '' $ac_executable_extensions; do
6573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576 break 2
6577 fi
6578done
6579 done
6580IFS=$as_save_IFS
6581
6582 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6583 ;;
6584esac
6585fi
6586ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6587if test -n "$ac_pt_LLVM_AR"; then
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6589$as_echo "$ac_pt_LLVM_AR" >&6; }
6590else
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595 LLVM_AR=$ac_pt_LLVM_AR
6596 else
6597 LLVM_AR="''"
6598 fi
6599else
6600 LLVM_AR="$ac_cv_path_LLVM_AR"
6601fi
6602
6603
6604 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6605 then
6606 LLVM_AR_FOUND="found"
6607 else
6608 LLVM_AR_FOUND="not-found"
6609 fi
6610 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6611 then
6612 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6613 if test -n "${found_llvm_ar}"
6614 then
6615 LLVM_AR='/usr/bin/xcrun llvm-ar'
6616 LLVM_AR_FOUND=found
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6618$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6619 fi
6620 fi
6621 if test $LLVM_AR_FOUND = not-found
6622 then
6623 LLVM_PROFR_ERR=yes
6624 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6625 else
6626 LLVM_AR_ERR=no
6627 fi
6628 AR="${LLVM_AR}"
6629 case $ac_sys_system in
6630 Darwin*)
6631 # Any changes made here should be reflected in the GCC+Darwin case below
6632 LTOFLAGS="-flto -Wl,-export_dynamic"
6633 ;;
6634 *)
6635 LTOFLAGS="-flto"
6636 ;;
6637 esac
6638 ;;
6639 *gcc*)
6640 case $ac_sys_system in
6641 Darwin*)
6642 LTOFLAGS="-flto -Wl,-export_dynamic"
6643 ;;
6644 *)
6645 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6646 ;;
6647 esac
6648 ;;
6649 esac
6650
6651 if test "$ac_cv_prog_cc_g" = "yes"
6652 then
6653 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6654 # to get debug symbols.
6655 LTOFLAGS="$LTOFLAGS -g"
6656 fi
6657
stratakisf92c7aa2018-12-04 15:54:01 +01006658 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006659 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006660fi
6661
6662# Enable PGO flags.
6663
6664
6665
6666
6667
6668
Gregory P. Smith799520c2016-09-07 16:10:00 -07006669# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6670set dummy $target_alias-llvm-profdata; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6674 $as_echo_n "(cached) " >&6
6675else
6676 case $LLVM_PROFDATA in
6677 [\\/]* | ?:[\\/]*)
6678 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6679 ;;
6680 *)
6681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683do
6684 IFS=$as_save_IFS
6685 test -z "$as_dir" && as_dir=.
6686 for ac_exec_ext in '' $ac_executable_extensions; do
6687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690 break 2
6691 fi
6692done
6693 done
6694IFS=$as_save_IFS
6695
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696 ;;
6697esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006698fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006699LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6700if test -n "$LLVM_PROFDATA"; then
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6702$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703else
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6710 if test "$build" = "$target"; then
6711 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6712 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6713set dummy llvm-profdata; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718else
6719 case $ac_pt_LLVM_PROFDATA in
6720 [\\/]* | ?:[\\/]*)
6721 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6722 ;;
6723 *)
6724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in ${llvm_path}
6726do
6727 IFS=$as_save_IFS
6728 test -z "$as_dir" && as_dir=.
6729 for ac_exec_ext in '' $ac_executable_extensions; do
6730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733 break 2
6734 fi
6735done
6736 done
6737IFS=$as_save_IFS
6738
6739 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6740 ;;
6741esac
6742fi
6743ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6744if test -n "$ac_pt_LLVM_PROFDATA"; then
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6746$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6747else
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6753 else
6754 LLVM_PROFDATA="''"
6755 fi
6756else
6757 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6758fi
6759
6760
6761if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6762then
6763 LLVM_PROF_FOUND="found"
6764else
6765 LLVM_PROF_FOUND="not-found"
6766fi
6767if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6768then
6769 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6770 if test -n "${found_llvm_profdata}"
6771 then
6772 # llvm-profdata isn't directly in $PATH in some cases.
6773 # https://apple.stackexchange.com/questions/197053/
6774 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6775 LLVM_PROF_FOUND=found
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6777$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6778 fi
6779fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780LLVM_PROF_ERR=no
6781case $CC in
6782 *clang*)
6783 # Any changes made here should be reflected in the GCC+Darwin case below
6784 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6785 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006786 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6788 if test $LLVM_PROF_FOUND = not-found
6789 then
6790 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 if test "${REQUIRE_PGO}" = "yes"
6792 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006793 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 -07006794 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 fi
6796 ;;
6797 *gcc*)
6798 case $ac_sys_system in
6799 Darwin*)
6800 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 then
6806 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 if test "${REQUIRE_PGO}" = "yes"
6808 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006809 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 -07006810 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 fi
6812 ;;
6813 *)
6814 PGO_PROF_GEN_FLAG="-fprofile-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6816 LLVM_PROF_MERGER="true"
6817 LLVM_PROF_FILE=""
6818 ;;
6819 esac
6820 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006821 *icc*)
6822 PGO_PROF_GEN_FLAG="-prof-gen"
6823 PGO_PROF_USE_FLAG="-prof-use"
6824 LLVM_PROF_MERGER="true"
6825 LLVM_PROF_FILE=""
6826 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827esac
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6830# merged with this chunk of code?
6831
6832# Optimizer/debugger flags
6833# ------------------------
6834# (The following bit of code is complicated enough - please keep things
6835# indented properly. Just pretend you're editing Python code. ;-)
6836
6837# There are two parallel sets of case statements below, one that checks to
6838# see if OPT was set and one that does BASECFLAGS setting based upon
6839# compiler and platform. BASECFLAGS tweaks need to be made even if the
6840# user set OPT.
6841
Victor Stinner23a683a2019-04-12 21:27:37 +02006842case $CC in
6843 *clang*)
6844 cc_is_clang=1
6845 ;;
6846 *)
6847 if $CC --version 2>&1 | grep -q clang
6848 then
6849 cc_is_clang=1
6850 else
6851 cc_is_clang=
6852 fi
6853esac
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855# tweak OPT based on compiler and platform, only if the user didn't set
6856# it on the command line
6857
Victor Stinner9ed34a82017-05-02 22:35:58 +02006858
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006859if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860then
6861 case $GCC in
6862 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6864 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6865 WRAP="-fwrapv"
6866 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006867
Victor Stinner35f3d242017-04-21 12:35:24 +02006868 if test -n "${cc_is_clang}"
6869 then
6870 # Clang also needs -fwrapv
6871 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006872 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6873 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006874 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006875 fi
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 case $ac_cv_prog_cc_g in
6878 yes)
6879 if test "$Py_DEBUG" = 'true' ; then
6880 # Optimization messes up debuggers, so turn it off for
6881 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 else
Victor Stinner28205b22017-04-21 11:24:34 +02006885 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 else
Victor Stinner28205b22017-04-21 11:24:34 +02006888 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 fi
6890 ;;
6891 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006892 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 ;;
6894 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896 case $ac_sys_system in
6897 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6898 ;;
6899 esac
6900 ;;
6901
6902 *)
6903 OPT="-O"
6904 ;;
6905 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
6907
Victor Stinner23a683a2019-04-12 21:27:37 +02006908if test -n "${cc_is_clang}"
6909then
6910 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6911 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6912 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6913 # instruction which can lead to segmentation fault. Instruct clang that
6914 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6915 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6916 # on 16 bytes.
6917 #
Victor Stinnera304b132019-04-13 00:51:07 +02006918 # Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
Victor Stinner23a683a2019-04-12 21:27:37 +02006919 # since third party C extensions can have the same issue.
Victor Stinnera304b132019-04-13 00:51:07 +02006920 #
6921 # Check if -fmax-type-align flag is supported (it's not supported by old
6922 # clang versions):
6923 if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
6924 CFLAGS="$CFLAGS -fmax-type-align=8"
6925 fi
Victor Stinner23a683a2019-04-12 21:27:37 +02006926fi
6927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928
6929
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006930
stratakiscf10a752018-12-19 18:19:01 +01006931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932# The -arch flags for universal builds on OSX
6933UNIVERSAL_ARCH_FLAGS=
6934
6935
6936# tweak BASECFLAGS based on compiler and platform
6937case $GCC in
6938yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006939 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006940
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6942$as_echo_n "checking for -Wextra... " >&6; }
6943 ac_save_cc="$CC"
6944 CC="$CC -Wextra -Werror"
6945 if ${ac_cv_extra_warnings+:} false; then :
6946 $as_echo_n "(cached) " >&6
6947else
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949/* end confdefs.h. */
6950
6951
6952int
6953main ()
6954{
6955
6956 ;
6957 return 0;
6958}
6959
6960_ACEOF
6961if ac_fn_c_try_compile "$LINENO"; then :
6962
6963 ac_cv_extra_warnings=yes
6964
6965else
6966
6967 ac_cv_extra_warnings=no
6968
6969fi
6970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971fi
6972
6973 CC="$ac_save_cc"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6975$as_echo "$ac_cv_extra_warnings" >&6; }
6976
6977 if test $ac_cv_extra_warnings = yes
6978 then
6979 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6980 fi
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982 # Python doesn't violate C99 aliasing rules, but older versions of
6983 # GCC produce warnings for legal Python code. Enable
6984 # -fno-strict-aliasing on versions of GCC that support but produce
6985 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6987$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988 ac_save_cc="$CC"
6989 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006991 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998int
6999main ()
7000{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007001
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002 ;
7003 return 0;
7004}
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007008
7009 CC="$ac_save_cc -fstrict-aliasing"
7010 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012/* end confdefs.h. */
7013
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015int
7016main ()
7017{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007018double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 ;
7020 return 0;
7021}
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=no
7027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028else
Matthias Kloseb159a552010-04-25 21:00:44 +00007029
7030 ac_cv_no_strict_aliasing=yes
7031
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007032fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035else
Matthias Kloseb159a552010-04-25 21:00:44 +00007036
7037 ac_cv_no_strict_aliasing=no
7038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007041fi
7042
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7046$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007047 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 then
7049 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7050 fi
7051
Zachary Ware5af85642015-12-21 12:09:17 -06007052 # ICC doesn't recognize the option, but only emits a warning
7053 ## XXX does it emit an unused result warning and can it be disabled?
7054 case "$CC" in
7055 *icc*)
7056 ac_cv_disable_unused_result_warning=no
7057 ;;
7058 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7060$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7061 ac_save_cc="$CC"
7062 CC="$CC -Wunused-result -Werror"
7063 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007064 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 $as_echo_n "(cached) " >&6
7066else
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h. */
7069
7070
7071int
7072main ()
7073{
7074
7075 ;
7076 return 0;
7077}
7078
7079_ACEOF
7080if ac_fn_c_try_compile "$LINENO"; then :
7081
7082 ac_cv_disable_unused_result_warning=yes
7083
7084else
7085
7086 ac_cv_disable_unused_result_warning=no
7087
7088fi
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090fi
7091
7092 CFLAGS="$save_CFLAGS"
7093 CC="$ac_save_cc"
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7095$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007096 ;;
7097 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007098
7099 if test $ac_cv_disable_unused_result_warning = yes
7100 then
7101 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007102 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7103 fi
7104
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7106$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7107 ac_save_cc="$CC"
7108 CC="$CC -Wunused-parameter -Werror"
7109 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111else
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113/* end confdefs.h. */
7114
7115
7116int
7117main ()
7118{
7119
7120 ;
7121 return 0;
7122}
7123
7124_ACEOF
7125if ac_fn_c_try_compile "$LINENO"; then :
7126
7127 ac_cv_disable_unused_parameter_warning=yes
7128
7129else
7130
7131 ac_cv_disable_unused_parameter_warning=no
7132
7133fi
7134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135fi
7136
7137 CC="$ac_save_cc"
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7139$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7140
7141 if test $ac_cv_disable_unused_parameter_warning = yes
7142 then
7143 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7144 fi
7145
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7147$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7148 ac_save_cc="$CC"
7149 CC="$CC -Wmissing-field-initializers -Werror"
7150 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152else
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154/* end confdefs.h. */
7155
7156
7157int
7158main ()
7159{
7160
7161 ;
7162 return 0;
7163}
7164
7165_ACEOF
7166if ac_fn_c_try_compile "$LINENO"; then :
7167
7168 ac_cv_disable_missing_field_initializers=yes
7169
7170else
7171
7172 ac_cv_disable_missing_field_initializers=no
7173
7174fi
7175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176fi
7177
7178 CC="$ac_save_cc"
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7180$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7181
7182 if test $ac_cv_disable_missing_field_initializers = yes
7183 then
7184 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007185 fi
7186
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7188$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7189 ac_save_cc="$CC"
7190 CC="$CC -Wsign-compare"
7191 save_CFLAGS="$CFLAGS"
7192 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7193 $as_echo_n "(cached) " >&6
7194else
7195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196/* end confdefs.h. */
7197
7198
7199int
7200main ()
7201{
7202
7203 ;
7204 return 0;
7205}
7206
7207_ACEOF
7208if ac_fn_c_try_compile "$LINENO"; then :
7209
7210 ac_cv_enable_sign_compare_warning=yes
7211
7212else
7213
7214 ac_cv_enable_sign_compare_warning=no
7215
7216fi
7217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7218fi
7219
7220 CFLAGS="$save_CFLAGS"
7221 CC="$ac_save_cc"
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7223$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7224
7225 if test $ac_cv_enable_sign_compare_warning = yes
7226 then
7227 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7228 fi
7229
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7231$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7232 ac_save_cc="$CC"
7233 CC="$CC -Wunreachable-code"
7234 save_CFLAGS="$CFLAGS"
7235 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237else
7238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7239/* end confdefs.h. */
7240
7241
7242int
7243main ()
7244{
7245
7246 ;
7247 return 0;
7248}
7249
7250_ACEOF
7251if ac_fn_c_try_compile "$LINENO"; then :
7252
7253 ac_cv_enable_unreachable_code_warning=yes
7254
7255else
7256
7257 ac_cv_enable_unreachable_code_warning=no
7258
7259fi
7260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261fi
7262
7263 CFLAGS="$save_CFLAGS"
7264 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007265
7266 # Don't enable unreachable code warning in debug mode, since it usually
7267 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007268 # Issue #24324: Unfortunately, the unreachable code warning does not work
7269 # correctly on gcc and has been silently removed from the compiler.
7270 # It is supported on clang but on OS X systems gcc may be an alias
7271 # for clang. Try to determine if the compiler is not really gcc and,
7272 # if so, only then enable the warning.
7273 if test $ac_cv_enable_unreachable_code_warning = yes && \
7274 test "$Py_DEBUG" != "true" && \
7275 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 then
7277 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007278 else
7279 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007280 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7282$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007283
INADA Naokie3364842018-06-05 20:40:53 +09007284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7285$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7286 ac_save_cc="$CC"
7287 CC="$CC -Werror -Wstrict-prototypes"
7288 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7289 $as_echo_n "(cached) " >&6
7290else
7291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7292/* end confdefs.h. */
7293
7294
7295int
7296main ()
7297{
7298
7299 ;
7300 return 0;
7301}
7302
7303_ACEOF
7304if ac_fn_c_try_compile "$LINENO"; then :
7305
7306 ac_cv_enable_strict_prototypes_warning=yes
7307
7308else
7309
7310 ac_cv_enable_strict_prototypes_warning=no
7311
7312fi
7313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7314fi
7315
7316 CC="$ac_save_cc"
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7318$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7319
7320 if test $ac_cv_enable_strict_prototypes_warning = yes
7321 then
7322 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7323 fi
7324
Victor Stinner193ee0a2017-02-06 14:24:00 +01007325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7326$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7327 ac_save_cc="$CC"
7328 CC="$CC -Werror=implicit-function-declaration"
7329 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7330 $as_echo_n "(cached) " >&6
7331else
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7333/* end confdefs.h. */
7334
7335
7336int
7337main ()
7338{
7339
7340 ;
7341 return 0;
7342}
7343
7344_ACEOF
7345if ac_fn_c_try_compile "$LINENO"; then :
7346
7347 ac_cv_enable_implicit_function_declaration_error=yes
7348
7349else
7350
7351 ac_cv_enable_implicit_function_declaration_error=no
7352
7353fi
7354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7355fi
7356
7357 CC="$ac_save_cc"
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7359$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7360
7361 if test $ac_cv_enable_implicit_function_declaration_error = yes
7362 then
7363 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7364 fi
7365
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7367 # support. Without this, treatment of subnormals doesn't follow
7368 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007369 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370 alpha*)
7371 BASECFLAGS="$BASECFLAGS -mieee"
7372 ;;
7373 esac
7374
7375 case $ac_sys_system in
7376 SCO_SV*)
7377 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7378 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 Darwin*)
7381 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7382 # used to be here, but non-Apple gcc doesn't accept them.
7383 if test "${CC}" = gcc
7384 then
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 case "${UNIVERSALSDK}" in
7388 */MacOSX10.4u.sdk)
7389 # Build using 10.4 SDK, force usage of gcc when the
7390 # compiler is gcc, otherwise the user will get very
7391 # confusing error messages when building on OSX 10.6
7392 CC=gcc-4.0
7393 CPP=cpp-4.0
7394 ;;
7395 esac
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007397$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007398 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 if test "${enable_universalsdk}"
7401 then
7402 case "$UNIVERSAL_ARCHS" in
7403 32-bit)
7404 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7405 LIPO_32BIT_FLAGS=""
7406 ARCH_RUN_32BIT=""
7407 ;;
7408 64-bit)
7409 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7410 LIPO_32BIT_FLAGS=""
7411 ARCH_RUN_32BIT="true"
7412 ;;
7413 all)
7414 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7415 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7416 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7417 ;;
7418 intel)
7419 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7420 LIPO_32BIT_FLAGS="-extract i386"
7421 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7422 ;;
7423 intel-32)
7424 UNIVERSAL_ARCH_FLAGS="-arch i386"
7425 LIPO_32BIT_FLAGS=""
7426 ARCH_RUN_32BIT=""
7427 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007428 intel-64)
7429 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7430 LIPO_32BIT_FLAGS=""
7431 ARCH_RUN_32BIT="true"
7432 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 3-way)
7434 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7435 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7436 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7437 ;;
7438 *)
7439 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7440 ;;
7441 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 if test "${UNIVERSALSDK}" != "/"
7444 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007445 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7446 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007448 else
7449 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7450 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 fi
7452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 # Calculate an appropriate deployment target for this build:
7455 # The deployment target value is used explicitly to enable certain
7456 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007457 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007458 # component of the string returned by distutils.get_platform().
7459 #
7460 # Use the value from:
7461 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7462 # 2. the operating system version of the build machine if >= 10.6
7463 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7464 # below to pick either 10.3, 10.4, or 10.5 as the target.
7465 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466
Ned Deily87adb6e2013-10-18 21:09:56 -07007467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7468$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007469 cur_target_major=`sw_vers -productVersion | \
7470 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7471 cur_target_minor=`sw_vers -productVersion | \
7472 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7473 cur_target="${cur_target_major}.${cur_target_minor}"
7474 if test ${cur_target_major} -eq 10 && \
7475 test ${cur_target_minor} -ge 3 && \
7476 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 then
Ned Deily36820b62014-06-25 13:44:22 -07007478 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007479 cur_target=10.3
7480 if test ${enable_universalsdk}
7481 then
7482 case "$UNIVERSAL_ARCHS" in
7483 all|3-way|intel|64-bit)
7484 # These configurations were first supported in 10.5
7485 cur_target='10.5'
7486 ;;
7487 esac
7488 else
7489 if test `/usr/bin/arch` = "i386"
7490 then
7491 # 10.4 was the first release to support Intel archs
7492 cur_target="10.4"
7493 fi
7494 fi
7495 fi
7496 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007497
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7499 # environment with a value that is the same as what we'll use
7500 # in the Makefile to ensure that we'll get the same compiler
7501 # environment during configure and build time.
7502 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7503 export MACOSX_DEPLOYMENT_TARGET
7504 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7506$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007507
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 # end of Darwin* tests
7509 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510 esac
7511 ;;
7512
7513*)
7514 case $ac_sys_system in
7515 OpenUNIX*|UnixWare*)
7516 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7517 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518 SCO_SV*)
7519 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7520 ;;
7521 esac
7522 ;;
7523esac
7524
Zachary Ware5af85642015-12-21 12:09:17 -06007525# ICC needs -fp-model strict or floats behave badly
7526case "$CC" in
7527*icc*)
7528 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7529 ;;
7530esac
7531
T. Woutersddbfa2c2017-05-23 01:30:49 +02007532if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533 :
7534else
7535 OPT="-DNDEBUG $OPT"
7536fi
7537
7538if test "$ac_arch_flags"
7539then
7540 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7541fi
7542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543# On some compilers, pthreads are available without further options
7544# (e.g. MacOS X). On some of these systems, the compiler will not
7545# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7546# So we have to see first whether pthreads are available without
7547# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7549$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007550if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552else
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554 ac_cv_pthread_is_default=no
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557/* end confdefs.h. */
7558
Stefan Krah7dba5942012-11-22 22:49:11 +01007559#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560#include <pthread.h>
7561
7562void* routine(void* p){return NULL;}
7563
7564int main(){
7565 pthread_t p;
7566 if(pthread_create(&p,NULL,routine,NULL)!=0)
7567 return 1;
7568 (void)pthread_detach(p);
7569 return 0;
7570}
7571
7572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007573if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574
7575 ac_cv_pthread_is_default=yes
7576 ac_cv_kthread=no
7577 ac_cv_pthread=no
7578
7579else
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584fi
7585
7586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587fi
7588
Matthias Kloseb9621712010-04-24 17:59:49 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7590$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591
7592
7593if test $ac_cv_pthread_is_default = yes
7594then
7595 ac_cv_kpthread=no
7596else
7597# -Kpthread, if available, provides the right #defines
7598# and linker options to make pthread_create available
7599# Some compilers won't report that they do not support -Kpthread,
7600# so we need to run a program to see whether it really made the
7601# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7603$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606else
7607 ac_save_cc="$CC"
7608CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007609if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 ac_cv_kpthread=no
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613/* end confdefs.h. */
7614
Stefan Krah7dba5942012-11-22 22:49:11 +01007615#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616#include <pthread.h>
7617
7618void* routine(void* p){return NULL;}
7619
7620int main(){
7621 pthread_t p;
7622 if(pthread_create(&p,NULL,routine,NULL)!=0)
7623 return 1;
7624 (void)pthread_detach(p);
7625 return 0;
7626}
7627
7628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630 ac_cv_kpthread=yes
7631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638CC="$ac_save_cc"
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7642$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
7644
7645if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7646then
7647# -Kthread, if available, provides the right #defines
7648# and linker options to make pthread_create available
7649# Some compilers won't report that they do not support -Kthread,
7650# so we need to run a program to see whether it really made the
7651# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7653$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656else
7657 ac_save_cc="$CC"
7658CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 ac_cv_kthread=no
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663/* end confdefs.h. */
7664
Stefan Krah7dba5942012-11-22 22:49:11 +01007665#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666#include <pthread.h>
7667
7668void* routine(void* p){return NULL;}
7669
7670int main(){
7671 pthread_t p;
7672 if(pthread_create(&p,NULL,routine,NULL)!=0)
7673 return 1;
7674 (void)pthread_detach(p);
7675 return 0;
7676}
7677
7678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007679if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680 ac_cv_kthread=yes
7681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688CC="$ac_save_cc"
7689fi
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7692$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
7695if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7696then
7697# -pthread, if available, provides the right #defines
7698# and linker options to make pthread_create available
7699# Some compilers won't report that they do not support -pthread,
7700# so we need to run a program to see whether it really made the
7701# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7703$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007704if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
7707 ac_save_cc="$CC"
7708CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 ac_cv_pthread=no
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713/* end confdefs.h. */
7714
Stefan Krah7dba5942012-11-22 22:49:11 +01007715#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716#include <pthread.h>
7717
7718void* routine(void* p){return NULL;}
7719
7720int main(){
7721 pthread_t p;
7722 if(pthread_create(&p,NULL,routine,NULL)!=0)
7723 return 1;
7724 (void)pthread_detach(p);
7725 return 0;
7726}
7727
7728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730 ac_cv_pthread=yes
7731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738CC="$ac_save_cc"
7739fi
7740
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7742$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
7744
7745# If we have set a CC compiler flag for thread support then
7746# check if it works for CXX, too.
7747ac_cv_cxx_thread=no
7748if test ! -z "$CXX"
7749then
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7751$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752ac_save_cxx="$CXX"
7753
7754if test "$ac_cv_kpthread" = "yes"
7755then
7756 CXX="$CXX -Kpthread"
7757 ac_cv_cxx_thread=yes
7758elif test "$ac_cv_kthread" = "yes"
7759then
7760 CXX="$CXX -Kthread"
7761 ac_cv_cxx_thread=yes
7762elif test "$ac_cv_pthread" = "yes"
7763then
7764 CXX="$CXX -pthread"
7765 ac_cv_cxx_thread=yes
7766fi
7767
7768if test $ac_cv_cxx_thread = yes
7769then
7770 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7771 $CXX -c conftest.$ac_ext 2>&5
7772 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7773 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7774 then
7775 ac_cv_cxx_thread=yes
7776 else
7777 ac_cv_cxx_thread=no
7778 fi
7779 rm -fr conftest*
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7782$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784CXX="$ac_save_cxx"
7785
7786
7787# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7789$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794/* end confdefs.h. */
7795#include <stdlib.h>
7796#include <stdarg.h>
7797#include <string.h>
7798#include <float.h>
7799
7800int
7801main ()
7802{
7803
7804 ;
7805 return 0;
7806}
7807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007808if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809 ac_cv_header_stdc=yes
7810else
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7814
7815if test $ac_cv_header_stdc = yes; then
7816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818/* end confdefs.h. */
7819#include <string.h>
7820
7821_ACEOF
7822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 $EGREP "memchr" >/dev/null 2>&1; then :
7824
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825else
7826 ac_cv_header_stdc=no
7827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007828rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829
7830fi
7831
7832if test $ac_cv_header_stdc = yes; then
7833 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835/* end confdefs.h. */
7836#include <stdlib.h>
7837
7838_ACEOF
7839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 $EGREP "free" >/dev/null 2>&1; then :
7841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842else
7843 ac_cv_header_stdc=no
7844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007845rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846
7847fi
7848
7849if test $ac_cv_header_stdc = yes; then
7850 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852 :
7853else
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855/* end confdefs.h. */
7856#include <ctype.h>
7857#include <stdlib.h>
7858#if ((' ' & 0x0FF) == 0x020)
7859# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7860# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7861#else
7862# define ISLOWER(c) \
7863 (('a' <= (c) && (c) <= 'i') \
7864 || ('j' <= (c) && (c) <= 'r') \
7865 || ('s' <= (c) && (c) <= 'z'))
7866# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7867#endif
7868
7869#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7870int
7871main ()
7872{
7873 int i;
7874 for (i = 0; i < 256; i++)
7875 if (XOR (islower (i), ISLOWER (i))
7876 || toupper (i) != TOUPPER (i))
7877 return 2;
7878 return 0;
7879}
7880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if ac_fn_c_try_run "$LINENO"; then :
7882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888fi
7889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890fi
7891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7893$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894if test $ac_cv_header_stdc = yes; then
7895
Matthias Kloseb9621712010-04-24 17:59:49 +00007896$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897
7898fi
7899
stratakise768c862018-01-23 16:11:24 +01007900for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007901fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007902ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007903sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007904utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007905poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007906sys/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 +01007907sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007908sys/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 +01007909sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007910sys/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 -07007911libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007912linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007913sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007914do :
7915 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7916ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007917if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007919#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
7921
7922fi
7923
Guido van Rossum627b2d71993-12-24 10:39:16 +00007924done
7925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007927for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7930$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007931if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936#include <sys/types.h>
7937#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
7942if ((DIR *) 0)
7943return 0;
7944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955eval ac_res=\$$as_ac_Header
7956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7957$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007960#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007961_ACEOF
7962
7963ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007964fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966done
7967# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7968if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7970$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007971if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973else
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978/* Override any GCC internal prototype to avoid an error.
7979 Use char because int might match the return type of a GCC
7980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981#ifdef __cplusplus
7982extern "C"
7983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007984char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007985int
7986main ()
7987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ;
7990 return 0;
7991}
7992_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993for ac_lib in '' dir; do
7994 if test -z "$ac_lib"; then
7995 ac_res="none required"
7996 else
7997 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007998 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008005 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008done
Victor Stinnere0be4232011-10-25 13:06:09 +02008009if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011else
8012 ac_cv_search_opendir=no
8013fi
8014rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008015LIBS=$ac_func_search_save_LIBS
8016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8018$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008020if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Michael W. Hudson54241132001-12-07 15:38:26 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8027$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008030else
8031 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008038#ifdef __cplusplus
8039extern "C"
8040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008041char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
8049_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050for ac_lib in '' x; do
8051 if test -z "$ac_lib"; then
8052 ac_res="none required"
8053 else
8054 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060rm -f core conftest.err conftest.$ac_objext \
8061 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008062 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065done
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068else
8069 ac_cv_search_opendir=no
8070fi
8071rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008072LIBS=$ac_func_search_save_LIBS
8073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8075$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008077if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080fi
8081
8082fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008083
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8085$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008091#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008092int
8093main ()
8094{
8095return makedev(0, 0);
8096 ;
8097 return 0;
8098}
8099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008101 ac_cv_header_sys_types_h_makedev=yes
8102else
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105rm -f core conftest.err conftest.$ac_objext \
8106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107
8108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8110$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111
8112if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008113ac_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 +02008114if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008117
8118fi
8119
8120
8121
8122 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 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 +02008124if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008127
8128fi
8129
8130
8131 fi
8132fi
8133
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008135# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8136# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8137SAVE_CFLAGS=$CFLAGS
8138CFLAGS="-std=c99 $CFLAGS"
8139for ac_header in bluetooth/bluetooth.h
8140do :
8141 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8142if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8143 cat >>confdefs.h <<_ACEOF
8144#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8145_ACEOF
8146
8147fi
8148
8149done
8150
8151CFLAGS=$SAVE_CFLAGS
8152
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008153# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8154for ac_header in net/if.h
8155do :
8156 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8157#ifdef STDC_HEADERS
8158# include <stdlib.h>
8159# include <stddef.h>
8160#else
8161# ifdef HAVE_STDLIB_H
8162# include <stdlib.h>
8163# endif
8164#endif
8165#ifdef HAVE_SYS_SOCKET_H
8166# include <sys/socket.h>
8167#endif
8168
8169"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008171 cat >>confdefs.h <<_ACEOF
8172#define HAVE_NET_IF_H 1
8173_ACEOF
8174
8175fi
8176
8177done
8178
8179
Martin v. Löwis11017b12006-01-14 18:12:57 +00008180# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008181for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008182do :
8183 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 +00008184#ifdef HAVE_ASM_TYPES_H
8185#include <asm/types.h>
8186#endif
8187#ifdef HAVE_SYS_SOCKET_H
8188#include <sys/socket.h>
8189#endif
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191"
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008194#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008195_ACEOF
8196
8197fi
8198
8199done
8200
8201
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008202# On Linux, qrtr.h requires asm/types.h
8203for ac_header in linux/qrtr.h
8204do :
8205 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8206#ifdef HAVE_ASM_TYPES_H
8207#include <asm/types.h>
8208#endif
8209#ifdef HAVE_SYS_SOCKET_H
8210#include <sys/socket.h>
8211#endif
8212
8213"
8214if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8215 cat >>confdefs.h <<_ACEOF
8216#define HAVE_LINUX_QRTR_H 1
8217_ACEOF
8218
8219fi
8220
8221done
8222
8223
caaveryeffc12f2017-09-06 18:18:10 -04008224for ac_header in linux/vm_sockets.h
8225do :
8226 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8227#ifdef HAVE_SYS_SOCKET_H
8228#include <sys/socket.h>
8229#endif
8230
8231"
8232if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8233 cat >>confdefs.h <<_ACEOF
8234#define HAVE_LINUX_VM_SOCKETS_H 1
8235_ACEOF
8236
8237fi
8238
8239done
8240
8241
Charles-François Natali47413c12011-10-06 19:47:44 +02008242# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008243for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008244do :
8245 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8246ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8247#ifdef HAVE_SYS_SOCKET_H
8248#include <sys/socket.h>
8249#endif
8250
8251"
8252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8253 cat >>confdefs.h <<_ACEOF
8254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8255_ACEOF
8256
8257fi
8258
8259done
8260
8261
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008263was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8265$as_echo_n "checking for clock_t in time.h... " >&6; }
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008268#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
8270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008273 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008274else
Martin v. Löwis11437992002-04-12 09:54:03 +00008275
8276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008279
Guido van Rossum627b2d71993-12-24 10:39:16 +00008280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008281rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8284$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8287$as_echo_n "checking for makedev... " >&6; }
8288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008290
Jesus Cea740f53a2010-04-28 11:35:30 +00008291#if defined(MAJOR_IN_MKDEV)
8292#include <sys/mkdev.h>
8293#elif defined(MAJOR_IN_SYSMACROS)
8294#include <sys/sysmacros.h>
8295#else
8296#include <sys/types.h>
8297#endif
8298
Neal Norwitz11690112002-07-30 01:08:28 +00008299int
8300main ()
8301{
Jesus Cea740f53a2010-04-28 11:35:30 +00008302
8303 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008304 ;
8305 return 0;
8306}
Matthias Kloseb159a552010-04-25 21:00:44 +00008307
Neal Norwitz11690112002-07-30 01:08:28 +00008308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008309if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008310 ac_cv_has_makedev=yes
8311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314rm -f core conftest.err conftest.$ac_objext \
8315 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8317$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008318if test "$ac_cv_has_makedev" = "yes"; then
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008321
8322fi
8323
Christian Heimes985ecdc2013-11-20 11:46:18 +01008324# byte swapping
8325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8326$as_echo_n "checking for le64toh... " >&6; }
8327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8328/* end confdefs.h. */
8329
8330#ifdef HAVE_ENDIAN_H
8331#include <endian.h>
8332#elif defined(HAVE_SYS_ENDIAN_H)
8333#include <sys/endian.h>
8334#endif
8335
8336int
8337main ()
8338{
8339
8340 le64toh(1)
8341 ;
8342 return 0;
8343}
8344
8345_ACEOF
8346if ac_fn_c_try_link "$LINENO"; then :
8347 ac_cv_has_le64toh=yes
8348else
8349 ac_cv_has_le64toh=no
8350fi
8351rm -f core conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8354$as_echo "$ac_cv_has_le64toh" >&6; }
8355if test "$ac_cv_has_le64toh" = "yes"; then
8356
8357$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8358
8359fi
8360
Martin v. Löwis399a6892002-10-04 10:22:02 +00008361use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008362# Don't use largefile support for GNU/Hurd
8363case $ac_sys_system in GNU*)
8364 use_lfs=no
8365esac
8366
Martin v. Löwis399a6892002-10-04 10:22:02 +00008367if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008368# Two defines needed to enable largefile support on various platforms
8369# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008370case $ac_sys_system/$ac_sys_release in
8371AIX*)
8372
8373$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8374
8375 ;;
8376esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
8380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008382
Martin v. Löwis399a6892002-10-04 10:22:02 +00008383fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008384
Guido van Rossum84e7b241996-08-19 21:59:00 +00008385# Add some code to confdefs.h so that the test for off_t works on SCO
8386cat >> confdefs.h <<\EOF
8387#if defined(SCO_DS)
8388#undef _OFF_T
8389#endif
8390EOF
8391
Guido van Rossumef2255b2000-03-10 22:30:29 +00008392# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008393ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398cat >>confdefs.h <<_ACEOF
8399#define mode_t int
8400_ACEOF
8401
8402fi
8403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008405if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008406
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008407else
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
8409cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
8412
8413fi
8414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418else
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
8420cat >>confdefs.h <<_ACEOF
8421#define pid_t int
8422_ACEOF
8423
8424fi
8425
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008428#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008429_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008430
Matthias Kloseb9621712010-04-24 17:59:49 +00008431ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434else
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008438_ACEOF
8439
8440fi
8441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8443$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008450
8451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454 ac_cv_type_uid_t=yes
8455else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456 ac_cv_type_uid_t=no
8457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008458rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8462$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008463if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467
Matthias Kloseb9621712010-04-24 17:59:49 +00008468$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469
8470fi
8471
Mark Dickinson983bc162012-12-02 12:11:38 +00008472
Matthias Kloseb9621712010-04-24 17:59:49 +00008473ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008477
8478fi
8479
Stefan Krah1919b7e2012-03-21 18:25:23 +01008480ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8481if test "x$ac_cv_type___uint128_t" = xyes; then :
8482
8483$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8484
8485fi
8486
Jack Jansendd19cf82001-12-06 22:36:17 +00008487
Michael W. Hudson54241132001-12-07 15:38:26 +00008488# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008489# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8495$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_int" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_int=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8514$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008519#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8528$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_long" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_long=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8547$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008552#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008554
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8561$as_echo_n "checking size of long long... " >&6; }
8562if ${ac_cv_sizeof_long_long+:} false; then :
8563 $as_echo_n "(cached) " >&6
8564else
8565 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8566
8567else
8568 if test "$ac_cv_type_long_long" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8571as_fn_error 77 "cannot compute sizeof (long long)
8572See \`config.log' for more details" "$LINENO" 5; }
8573 else
8574 ac_cv_sizeof_long_long=0
8575 fi
8576fi
8577
8578fi
8579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8580$as_echo "$ac_cv_sizeof_long_long" >&6; }
8581
8582
8583
8584cat >>confdefs.h <<_ACEOF
8585#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8586_ACEOF
8587
8588
8589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8594$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_void_p" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_void_p=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8613$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008618#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008620
8621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8627$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_short" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_short=0
8641 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8646$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008651#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008652_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008653
8654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8660$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_float" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 else
8673 ac_cv_sizeof_float=0
8674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8679$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680
8681
8682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008684#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008686
8687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8693$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 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 +00008698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699else
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 if test "$ac_cv_type_double" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008703as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008704See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 else
8706 ac_cv_sizeof_double=0
8707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8712$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713
8714
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008717#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008719
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8726$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 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 +00008731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if test "$ac_cv_type_fpos_t" = yes; then
8734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008736as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738 else
8739 ac_cv_sizeof_fpos_t=0
8740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8745$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746
8747
8748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008750#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008752
Michael W. Hudson54241132001-12-07 15:38:26 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8759$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 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 +00008764
Martin v. Löwis18e16552006-02-15 17:27:45 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if test "$ac_cv_type_size_t" = yes; then
8767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008769as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 else
8772 ac_cv_sizeof_size_t=0
8773 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775
Martin v. Löwis18e16552006-02-15 17:27:45 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8778$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779
8780
8781
Martin v. Löwis18e16552006-02-15 17:27:45 +00008782cat >>confdefs.h <<_ACEOF
8783#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8784_ACEOF
8785
8786
Christian Heimes400adb02008-02-01 08:12:03 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8792$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 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 +00008797
Christian Heimes400adb02008-02-01 08:12:03 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$ac_cv_type_pid_t" = yes; then
8800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008802as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008803See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008804 else
8805 ac_cv_sizeof_pid_t=0
8806 fi
8807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808
Christian Heimes400adb02008-02-01 08:12:03 +00008809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8811$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008812
8813
8814
8815cat >>confdefs.h <<_ACEOF
8816#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8817_ACEOF
8818
8819
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
8824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8825$as_echo_n "checking size of uintptr_t... " >&6; }
8826if ${ac_cv_sizeof_uintptr_t+:} false; then :
8827 $as_echo_n "(cached) " >&6
8828else
8829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8830
8831else
8832 if test "$ac_cv_type_uintptr_t" = yes; then
8833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8835as_fn_error 77 "cannot compute sizeof (uintptr_t)
8836See \`config.log' for more details" "$LINENO" 5; }
8837 else
8838 ac_cv_sizeof_uintptr_t=0
8839 fi
8840fi
8841
8842fi
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8844$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8845
8846
8847
8848cat >>confdefs.h <<_ACEOF
8849#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8850_ACEOF
8851
8852
Michael W. Hudson54241132001-12-07 15:38:26 +00008853
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008854
Eitan Adler3055c942018-05-15 22:58:09 -07008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8856$as_echo_n "checking for long double... " >&6; }
8857if ${ac_cv_type_long_double+:} false; then :
8858 $as_echo_n "(cached) " >&6
8859else
8860 if test "$GCC" = yes; then
8861 ac_cv_type_long_double=yes
8862 else
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864/* end confdefs.h. */
8865/* The Stardent Vistra knows sizeof (long double), but does
8866 not support it. */
8867 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008868int
8869main ()
8870{
Eitan Adler3055c942018-05-15 22:58:09 -07008871static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8872 sizeof (double) <= sizeof (long double))];
8873test_array [0] = 0;
8874return test_array [0];
8875
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008876 ;
8877 return 0;
8878}
8879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008880if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008881 ac_cv_type_long_double=yes
8882else
8883 ac_cv_type_long_double=no
8884fi
8885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8886 fi
8887fi
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8889$as_echo "$ac_cv_type_long_double" >&6; }
8890 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008893
Eitan Adler3055c942018-05-15 22:58:09 -07008894 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008896# The cast to long int works around a bug in the HP C Compiler
8897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8901$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 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 +00008906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 if test "$ac_cv_type_long_double" = yes; then
8909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008911as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008912See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008913 else
8914 ac_cv_sizeof_long_double=0
8915 fi
8916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8920$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008921
8922
8923
8924cat >>confdefs.h <<_ACEOF
8925#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8926_ACEOF
8927
8928
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930# The cast to long int works around a bug in the HP C Compiler
8931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8935$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008936if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 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 +00008940
Thomas Woutersb2137042007-02-01 18:02:27 +00008941else
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 if test "$ac_cv_type__Bool" = yes; then
8943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008945as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008946See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 else
8948 ac_cv_sizeof__Bool=0
8949 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951
Thomas Woutersb2137042007-02-01 18:02:27 +00008952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8954$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955
8956
8957
Thomas Woutersb2137042007-02-01 18:02:27 +00008958cat >>confdefs.h <<_ACEOF
8959#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8960_ACEOF
8961
8962
Thomas Woutersb2137042007-02-01 18:02:27 +00008963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964# The cast to long int works around a bug in the HP C Compiler
8965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8969$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008970if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972else
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974#ifdef HAVE_SYS_TYPES_H
8975#include <sys/types.h>
8976#endif
8977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 if test "$ac_cv_type_off_t" = yes; then
8982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008984as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008985See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986 else
8987 ac_cv_sizeof_off_t=0
8988 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8993$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995
8996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000
Michael W. Hudson54241132001-12-07 15:38:26 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9004$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009005if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009006 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9011$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009012else
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009015fi
9016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017# The cast to long int works around a bug in the HP C Compiler
9018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9020# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9022$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009023if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027#ifdef HAVE_SYS_TYPES_H
9028#include <sys/types.h>
9029#endif
9030#ifdef HAVE_TIME_H
9031#include <time.h>
9032#endif
9033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 if test "$ac_cv_type_time_t" = yes; then
9038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009040as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009041See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042 else
9043 ac_cv_sizeof_time_t=0
9044 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9049$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009051
9052
Martin v. Löwis11437992002-04-12 09:54:03 +00009053cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009054#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
9058
Trent Mick635f6fb2000-08-23 21:33:05 +00009059# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009060ac_save_cc="$CC"
9061if test "$ac_cv_kpthread" = "yes"
9062then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009063elif test "$ac_cv_kthread" = "yes"
9064then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009065elif test "$ac_cv_pthread" = "yes"
9066then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009067fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9070$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009071have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009073/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009074
9075 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Guido van Rossum12580492000-09-24 16:47:19 +00009079pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ;
9081 return 0;
9082}
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009085if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009086 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9090$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009091if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9097$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009098if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009100else
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102#ifdef HAVE_PTHREAD_H
9103#include <pthread.h>
9104#endif
9105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 if test "$ac_cv_type_pthread_t" = yes; then
9110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009112as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009113See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009114 else
9115 ac_cv_sizeof_pthread_t=0
9116 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009118
Trent Mick635f6fb2000-08-23 21:33:05 +00009119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9121$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123
9124
Martin v. Löwis11437992002-04-12 09:54:03 +00009125cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009126#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009129
Trent Mick635f6fb2000-08-23 21:33:05 +00009130fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009131
9132# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9133# This checking will be unnecessary after removing deprecated TLS API.
9134# The cast to long int works around a bug in the HP C Compiler
9135# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9136# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9137# This bug is HP SR number 8606223364.
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9139$as_echo_n "checking size of pthread_key_t... " >&6; }
9140if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9141 $as_echo_n "(cached) " >&6
9142else
9143 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9144"; then :
9145
9146else
9147 if test "$ac_cv_type_pthread_key_t" = yes; then
9148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9150as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9151See \`config.log' for more details" "$LINENO" 5; }
9152 else
9153 ac_cv_sizeof_pthread_key_t=0
9154 fi
9155fi
9156
9157fi
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9159$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9160
9161
9162
9163cat >>confdefs.h <<_ACEOF
9164#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9165_ACEOF
9166
9167
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9169$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9170if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9172/* end confdefs.h. */
9173#include <pthread.h>
9174int
9175main ()
9176{
9177pthread_key_t k; k * 1;
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182if ac_fn_c_try_compile "$LINENO"; then :
9183 ac_pthread_key_t_is_arithmetic_type=yes
9184else
9185 ac_pthread_key_t_is_arithmetic_type=no
9186
9187fi
9188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9190$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9191 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9192
9193$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9194
9195 fi
9196else
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
9199fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009200CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009201
Michael W. Hudson54241132001-12-07 15:38:26 +00009202
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009204 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009205 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9206 ;;
9207 Darwin/*)
9208 OTHER_LIBTOOL_OPT=""
9209 ;;
9210esac
9211
9212
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009213
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009214case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009216 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9217 if test "${enable_universalsdk}"; then
9218 :
9219 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009220 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009221 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009223 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009224 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009225 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009226 if test ${gcc_version} '<' 4.0
9227 then
9228 LIBTOOL_CRUFT="-lcc_dynamic"
9229 else
9230 LIBTOOL_CRUFT=""
9231 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009233 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234else
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009237
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238 #include <unistd.h>
9239 int main(int argc, char*argv[])
9240 {
9241 if (sizeof(long) == 4) {
9242 return 0;
9243 } else {
9244 return 1;
9245 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009246 }
9247
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250 ac_osx_32bit=yes
9251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009256fi
9257
9258
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009259 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009260 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261 i386)
9262 MACOSX_DEFAULT_ARCH="i386"
9263 ;;
9264 ppc)
9265 MACOSX_DEFAULT_ARCH="ppc"
9266 ;;
9267 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009268 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 ;;
9270 esac
9271 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009272 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009273 i386)
9274 MACOSX_DEFAULT_ARCH="x86_64"
9275 ;;
9276 ppc)
9277 MACOSX_DEFAULT_ARCH="ppc64"
9278 ;;
9279 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009280 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281 ;;
9282 esac
9283
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009284 fi
9285
9286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9291$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009292if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009294 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009296 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
9301$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009302 if test $enable_shared = "yes"
9303 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009304 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 +00009305 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306else
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309fi
9310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9312$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009313case $ac_sys_system/$ac_sys_release in
9314 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9319$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320 ;;
9321 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009324 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009325esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009326
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328
Michael W. Hudson54241132001-12-07 15:38:26 +00009329
9330
9331
9332
Benjamin Peterson99f03762010-04-11 22:15:28 +00009333
Thomas Wouters477c8d52006-05-27 19:21:47 +00009334
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009335# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9336# -- usually .so, .sl on HP-UX, .dll on Cygwin
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9338$as_echo_n "checking the extension of shared libraries... " >&6; }
9339if test -z "$SHLIB_SUFFIX"; then
9340 case $ac_sys_system in
9341 hp*|HP*)
9342 case `uname -m` in
9343 ia64) SHLIB_SUFFIX=.so;;
9344 *) SHLIB_SUFFIX=.sl;;
9345 esac
9346 ;;
9347 CYGWIN*) SHLIB_SUFFIX=.dll;;
9348 *) SHLIB_SUFFIX=.so;;
9349 esac
9350fi
9351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9352$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009355# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356# (Shared libraries in this instance are shared modules to be loaded into
9357# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9359$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360if test -z "$LDSHARED"
9361then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009362 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009363 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009364 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009365 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009366 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 if test "$GCC" = "yes" ; then
9369 LDSHARED='$(CC) -shared'
9370 LDCXXSHARED='$(CXX) -shared'
9371 else
9372 LDSHARED='$(CC) -G'
9373 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009374 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009375 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376 if test "$GCC" = "yes" ; then
9377 LDSHARED='$(CC) -shared'
9378 LDCXXSHARED='$(CXX) -shared'
9379 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009380 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009381 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009382 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009383 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009384 LDSHARED='$(CC) -bundle'
9385 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009386 if test "$enable_framework" ; then
9387 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009388 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9389 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 else
9392 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009394 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009395 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009396 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009397 LDSHARED='$(CC) -bundle'
9398 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009399 if test "$enable_framework" ; then
9400 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009401 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9402 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009403 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009404 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009405 # No framework, use the Python app as bundle-loader
9406 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009407 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009408 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009409 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009410 Darwin/*)
9411 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9412 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009413
Ned Deily36820b62014-06-25 13:44:22 -07009414 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9415 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9416 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9417 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9418 if test ${dep_target_major} -eq 10 && \
9419 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009420 then
Ned Deily36820b62014-06-25 13:44:22 -07009421 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009422 LDSHARED='$(CC) -bundle'
9423 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009424 if test "$enable_framework" ; then
9425 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009426 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9427 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009428 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009429 else
9430 # No framework, use the Python app as bundle-loader
9431 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9432 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009434 fi
Ned Deily36820b62014-06-25 13:44:22 -07009435 else
9436 # building for OS X 10.3 and later
9437 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9438 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9439 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009440 fi
9441 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009442 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443 LDSHARED='$(CC) -shared'
9444 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009445 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009446 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009447 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009448 LDSHARED='$(CC) -shared'
9449 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009450 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009451 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009452 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009453 OpenBSD*)
9454 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9455 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009456 LDSHARED='$(CC) -shared $(CCSHARED)'
9457 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009458 else
9459 case `uname -r` in
9460 [01].* | 2.[0-7] | 2.[0-7].*)
9461 LDSHARED="ld -Bshareable ${LDFLAGS}"
9462 ;;
9463 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009464 LDSHARED='$(CC) -shared $(CCSHARED)'
9465 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009466 ;;
9467 esac
9468 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009470 LDSHARED='$(CC) -shared'
9471 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009472 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009473 if test "$GCC" = "yes" ; then
9474 LDSHARED='$(CC) -shared'
9475 LDCXXSHARED='$(CXX) -shared'
9476 else
9477 LDSHARED='$(CC) -G'
9478 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009479 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009480 SCO_SV*)
9481 LDSHARED='$(CC) -Wl,-G,-Bexport'
9482 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9483 CYGWIN*)
9484 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9485 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486 *) LDSHARED="ld";;
9487 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9490$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009491LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009492BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009494# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9496$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009497if test -z "$CCSHARED"
9498then
Guido van Rossum07397971997-04-29 21:49:50 +00009499 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009500 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009501 then CCSHARED="-fPIC";
9502 elif test `uname -p` = sparc;
9503 then CCSHARED="-xcode=pic32";
9504 else CCSHARED="-Kpic";
9505 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009506 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009507 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009508 else CCSHARED="+z";
9509 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009510 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009511 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009512 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009513 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009514 if test "$GCC" = "yes"
9515 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009516 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009517 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009518 SCO_SV*)
9519 if test "$GCC" = "yes"
9520 then CCSHARED="-fPIC"
9521 else CCSHARED="-Kpic -belf"
9522 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009523 VxWorks*)
9524 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9528$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009530# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9532$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533if test -z "$LINKFORSHARED"
9534then
Guido van Rossum07397971997-04-29 21:49:50 +00009535 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009536 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009537 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009538 LINKFORSHARED="-Wl,-E -Wl,+s";;
9539# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009540 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009541 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009542 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009544 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00009545 if test "$enable_framework"
9546 then
Jack Jansenda49e192005-01-07 13:08:22 +00009547 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009548 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009549 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009550 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009551 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009552 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009553 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009554 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9555 then
9556 LINKFORSHARED="-Wl,--export-dynamic"
9557 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009558 SunOS/5*) case $CC in
9559 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009560 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009561 then
9562 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009563 fi;;
9564 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009565 CYGWIN*)
9566 if test $enable_shared = "no"
9567 then
9568 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9569 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009570 QNX*)
9571 # -Wl,-E causes the symbols to be added to the dynamic
9572 # symbol table so that they can be found when a module
9573 # is loaded. -N 2048K causes the stack size to be set
9574 # to 2048 kilobytes so that the stack doesn't overflow
9575 # when running test_compile.py.
9576 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009577 VxWorks*)
9578 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009579 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9582$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583
Michael W. Hudson54241132001-12-07 15:38:26 +00009584
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009585
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9587$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009588if test ! "$LIBRARY" = "$LDLIBRARY"
9589then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009590 case $ac_sys_system in
9591 CYGWIN*)
9592 # Cygwin needs CCSHARED when building extension DLLs
9593 # but not when building the interpreter DLL.
9594 CFLAGSFORSHARED='';;
9595 *)
9596 CFLAGSFORSHARED='$(CCSHARED)'
9597 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9600$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009601
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009602# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9603# library (with --enable-shared).
9604# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009605# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9606# if it is not required, since it creates a dependency of the shared library
9607# to LIBS. This, in turn, means that applications linking the shared libpython
9608# don't need to link LIBS explicitly. The default should be only changed
9609# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009610
Matthias Kloseb9621712010-04-24 17:59:49 +00009611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9612$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009613case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009614 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009615 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9618$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009619
9620
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9623$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009624if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009625 $as_echo_n "(cached) " >&6
9626else
9627 ac_check_lib_save_LIBS=$LIBS
9628LIBS="-lsendfile $LIBS"
9629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9630/* end confdefs.h. */
9631
9632/* Override any GCC internal prototype to avoid an error.
9633 Use char because int might match the return type of a GCC
9634 builtin and then its argument prototype would still apply. */
9635#ifdef __cplusplus
9636extern "C"
9637#endif
9638char sendfile ();
9639int
9640main ()
9641{
9642return sendfile ();
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647if ac_fn_c_try_link "$LINENO"; then :
9648 ac_cv_lib_sendfile_sendfile=yes
9649else
9650 ac_cv_lib_sendfile_sendfile=no
9651fi
9652rm -f core conftest.err conftest.$ac_objext \
9653 conftest$ac_exeext conftest.$ac_ext
9654LIBS=$ac_check_lib_save_LIBS
9655fi
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9657$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009658if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009659 cat >>confdefs.h <<_ACEOF
9660#define HAVE_LIBSENDFILE 1
9661_ACEOF
9662
9663 LIBS="-lsendfile $LIBS"
9664
9665fi
9666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9668$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009669if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009671else
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009673LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009677/* Override any GCC internal prototype to avoid an error.
9678 Use char because int might match the return type of a GCC
9679 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009680#ifdef __cplusplus
9681extern "C"
9682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009683char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
9686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ;
9689 return 0;
9690}
9691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009694else
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697rm -f core conftest.err conftest.$ac_objext \
9698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009699LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9702$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009703if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 cat >>confdefs.h <<_ACEOF
9705#define HAVE_LIBDL 1
9706_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009708 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710fi
9711 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9713$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009718LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722/* Override any GCC internal prototype to avoid an error.
9723 Use char because int might match the return type of a GCC
9724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725#ifdef __cplusplus
9726extern "C"
9727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009728char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729int
9730main ()
9731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009739else
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742rm -f core conftest.err conftest.$ac_objext \
9743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9747$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009748if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 cat >>confdefs.h <<_ACEOF
9750#define HAVE_LIBDLD 1
9751_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009753 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755fi
9756 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009757
Michael Felt0d3ccb42017-12-30 22:39:20 +01009758# checks for uuid.h location
9759for ac_header in uuid/uuid.h uuid.h
9760do :
9761 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9762ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9763if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9764 cat >>confdefs.h <<_ACEOF
9765#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9766_ACEOF
9767
9768fi
9769
9770done
9771
9772
Berker Peksag9a10ff42017-11-08 23:09:16 +03009773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9774$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776/* end confdefs.h. */
9777#include <uuid/uuid.h>
9778int
9779main ()
9780{
9781
9782#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009783void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009784#endif
9785
9786 ;
9787 return 0;
9788}
9789_ACEOF
9790if ac_fn_c_try_compile "$LINENO"; then :
9791
9792$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9793
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795$as_echo "yes" >&6; }
9796else
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
9799
9800fi
9801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9802
Michael Felt0d3ccb42017-12-30 22:39:20 +01009803# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009804# FreeBSD and OpenBSD provides support as well
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9806$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808/* end confdefs.h. */
9809#include <uuid.h>
9810int
9811main ()
9812{
9813
9814#ifndef uuid_create
9815void *x = uuid_create
9816#endif
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822if ac_fn_c_try_compile "$LINENO"; then :
9823
9824$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9825
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9827$as_echo "yes" >&6; }
9828else
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831
9832fi
9833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9834
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009835# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9836# stream in big-endian byte-order
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9838$as_echo_n "checking for uuid_enc_be... " >&6; }
9839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840/* end confdefs.h. */
9841#include <uuid.h>
9842int
9843main ()
9844{
9845
9846#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009847void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009848#endif
9849
9850 ;
9851 return 0;
9852}
9853_ACEOF
9854if ac_fn_c_try_compile "$LINENO"; then :
9855
9856$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9857
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9859$as_echo "yes" >&6; }
9860else
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
9863
9864fi
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009867# 'Real Time' functions on Solaris
9868# posix4 on Solaris 2.6
9869# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009871$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009872if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009874else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894for ac_lib in '' pthread rt posix4; do
9895 if test -z "$ac_lib"; then
9896 ac_res="none required"
9897 else
9898 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904rm -f core conftest.err conftest.$ac_objext \
9905 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009906 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909done
Victor Stinnere0be4232011-10-25 13:06:09 +02009910if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912else
9913 ac_cv_search_sem_init=no
9914fi
9915rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009916LIBS=$ac_func_search_save_LIBS
9917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9919$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009923
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009924fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009925
Martin v. Löwis519adae2003-09-20 10:47:47 +00009926
Martin v. Löwis19d17342003-06-14 21:03:05 +00009927# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9929$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009930if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009932else
9933 ac_check_lib_save_LIBS=$LIBS
9934LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938/* Override any GCC internal prototype to avoid an error.
9939 Use char because int might match the return type of a GCC
9940 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941#ifdef __cplusplus
9942extern "C"
9943#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009944char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945int
9946main ()
9947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949 ;
9950 return 0;
9951}
9952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009954 ac_cv_lib_intl_textdomain=yes
9955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958rm -f core conftest.err conftest.$ac_objext \
9959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960LIBS=$ac_check_lib_save_LIBS
9961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9963$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009964if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009967
Brett Cannonc6d936e2009-06-07 20:09:53 +00009968 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969fi
9970
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009971
9972# checks for system dependent C++ extensions support
9973case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9975$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009977/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009978
Georg Brandl59e87bd2011-02-15 19:48:59 +00009979 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009980int
9981main ()
9982{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009983loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 ;
9985 return 0;
9986}
Matthias Kloseb159a552010-04-25 21:00:44 +00009987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009989if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009990
Matthias Kloseb159a552010-04-25 21:00:44 +00009991
Matthias Kloseb9621712010-04-24 17:59:49 +00009992$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Matthias Kloseb159a552010-04-25 21:00:44 +00009994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009995$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009996
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009997else
Matthias Kloseb159a552010-04-25 21:00:44 +00009998
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010000$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010001
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010003rm -f core conftest.err conftest.$ac_objext \
10004 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010005 *) ;;
10006esac
10007
Christian Heimes985ecdc2013-11-20 11:46:18 +010010008# check for systems that require aligned memory access
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10010$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010011if ${ac_cv_aligned_required+:} false; then :
10012 $as_echo_n "(cached) " >&6
10013else
10014 if test "$cross_compiling" = yes; then :
10015 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010016else
10017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10018/* end confdefs.h. */
10019
10020int main()
10021{
10022 char s[16];
10023 int i, *p1, *p2;
10024 for (i=0; i < 16; i++)
10025 s[i] = i;
10026 p1 = (int*)(s+1);
10027 p2 = (int*)(s+2);
10028 if (*p1 == *p2)
10029 return 1;
10030 return 0;
10031}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010032_ACEOF
10033if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010034 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010035else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010036 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010037fi
10038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10039 conftest.$ac_objext conftest.beam conftest.$ac_ext
10040fi
10041
10042
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010043fi
10044
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10046$as_echo "$ac_cv_aligned_required" >&6; }
10047if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010048
10049$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10050
10051fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010052
10053# str, bytes and memoryview hash algorithm
10054
10055
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10057$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10058
10059# Check whether --with-hash_algorithm was given.
10060if test "${with_hash_algorithm+set}" = set; then :
10061 withval=$with_hash_algorithm;
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10063$as_echo "$withval" >&6; }
10064case "$withval" in
10065 siphash24)
10066 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10067
10068 ;;
10069 fnv)
10070 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10071
10072 ;;
10073 *)
10074 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10075 ;;
10076esac
10077
10078else
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10080$as_echo "default" >&6; }
10081fi
10082
10083
Charles-François Natalid30b0222014-05-08 23:08:51 +010010084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10085$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10086
10087# Check whether --with-address_sanitizer was given.
10088if test "${with_address_sanitizer+set}" = set; then :
10089 withval=$with_address_sanitizer;
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10091$as_echo "$withval" >&6; }
10092BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10093LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010094# ASan works by controlling memory allocation, our own malloc interferes.
10095with_pymalloc="no"
10096
10097else
10098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
10100fi
10101
10102
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10104$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10105
10106# Check whether --with-memory_sanitizer was given.
10107if test "${with_memory_sanitizer+set}" = set; then :
10108 withval=$with_memory_sanitizer;
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10110$as_echo "$withval" >&6; }
10111BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10112LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10113# MSan works by controlling memory allocation, our own malloc interferes.
10114with_pymalloc="no"
10115
10116else
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10123$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10124
10125# Check whether --with-undefined_behavior_sanitizer was given.
10126if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10127 withval=$with_undefined_behavior_sanitizer;
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10129$as_echo "$withval" >&6; }
10130BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10131LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010132
10133else
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
Guido van Rossum70c7f481998-03-26 18:44:10 +000010139# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10141$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010142if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010144else
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010146LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150/* Override any GCC internal prototype to avoid an error.
10151 Use char because int might match the return type of a GCC
10152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153#ifdef __cplusplus
10154extern "C"
10155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010156char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010157int
10158main ()
10159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ;
10162 return 0;
10163}
10164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010167else
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010170rm -f core conftest.err conftest.$ac_objext \
10171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010172LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10175$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010176if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010177 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010178fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010179 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10181$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010182if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010184else
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010186LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190/* Override any GCC internal prototype to avoid an error.
10191 Use char because int might match the return type of a GCC
10192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193#ifdef __cplusplus
10194extern "C"
10195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010196char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010197int
10198main ()
10199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ;
10202 return 0;
10203}
10204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210rm -f core conftest.err conftest.$ac_objext \
10211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010212LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10215$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010216if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010217 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010218fi
10219 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10222$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010225if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10228$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010229LIBS="$withval $LIBS"
10230
10231else
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10233$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234fi
10235
Guido van Rossum7f43da71994-08-01 12:15:30 +000010236
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010237
10238
10239
10240
10241
10242
Victor Stinner23a683a2019-04-12 21:27:37 +020010243
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010244if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10245 if test -n "$ac_tool_prefix"; then
10246 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10247set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if ${ac_cv_path_PKG_CONFIG+:} false; then :
10251 $as_echo_n "(cached) " >&6
10252else
10253 case $PKG_CONFIG in
10254 [\\/]* | ?:[\\/]*)
10255 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10256 ;;
10257 *)
10258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261 IFS=$as_save_IFS
10262 test -z "$as_dir" && as_dir=.
10263 for ac_exec_ext in '' $ac_executable_extensions; do
10264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10265 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267 break 2
10268 fi
10269done
10270 done
10271IFS=$as_save_IFS
10272
10273 ;;
10274esac
10275fi
10276PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10277if test -n "$PKG_CONFIG"; then
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10279$as_echo "$PKG_CONFIG" >&6; }
10280else
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286fi
10287if test -z "$ac_cv_path_PKG_CONFIG"; then
10288 ac_pt_PKG_CONFIG=$PKG_CONFIG
10289 # Extract the first word of "pkg-config", so it can be a program name with args.
10290set dummy pkg-config; ac_word=$2
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10292$as_echo_n "checking for $ac_word... " >&6; }
10293if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10294 $as_echo_n "(cached) " >&6
10295else
10296 case $ac_pt_PKG_CONFIG in
10297 [\\/]* | ?:[\\/]*)
10298 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10299 ;;
10300 *)
10301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10302for as_dir in $PATH
10303do
10304 IFS=$as_save_IFS
10305 test -z "$as_dir" && as_dir=.
10306 for ac_exec_ext in '' $ac_executable_extensions; do
10307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10308 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10310 break 2
10311 fi
10312done
10313 done
10314IFS=$as_save_IFS
10315
10316 ;;
10317esac
10318fi
10319ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10320if test -n "$ac_pt_PKG_CONFIG"; then
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10322$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10323else
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10325$as_echo "no" >&6; }
10326fi
10327
10328 if test "x$ac_pt_PKG_CONFIG" = x; then
10329 PKG_CONFIG=""
10330 else
10331 case $cross_compiling:$ac_tool_warned in
10332yes:)
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10334$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10335ac_tool_warned=yes ;;
10336esac
10337 PKG_CONFIG=$ac_pt_PKG_CONFIG
10338 fi
10339else
10340 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10341fi
10342
10343fi
10344if test -n "$PKG_CONFIG"; then
10345 _pkg_min_version=0.9.0
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10347$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10348 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10350$as_echo "yes" >&6; }
10351 else
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354 PKG_CONFIG=""
10355 fi
10356fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010357
10358# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10360$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010361
10362# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010363if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010364 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010365else
10366 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010367fi
10368
10369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10371$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010372
10373# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10375$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010376
10377# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010379 withval=$with_system_ffi;
10380fi
10381
10382
Zachary Waref40d4dd2016-09-17 01:25:24 -050010383if test "$ac_sys_system" = "Darwin"
10384then
10385 case "$with_system_ffi" in
10386 "")
10387 with_system_ffi="no"
10388 ;;
10389 yes|no)
10390 ;;
10391 *)
10392 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10393 ;;
10394 esac
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10396$as_echo "$with_system_ffi" >&6; }
10397else
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10399$as_echo "yes" >&6; }
10400 if test "$with_system_ffi" != ""
10401 then
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10403$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10404 fi
10405 with_system_ffi="yes"
10406fi
Zachary Ware935043d2016-09-09 17:01:21 -070010407
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010408if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010409 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10410else
10411 LIBFFI_INCLUDEDIR=""
10412fi
10413
10414
Stefan Krah60187b52012-03-23 19:06:27 +010010415# Check for use of the system libmpdec library
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10417$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10418
10419# Check whether --with-system_libmpdec was given.
10420if test "${with_system_libmpdec+set}" = set; then :
10421 withval=$with_system_libmpdec;
10422else
10423 with_system_libmpdec="no"
10424fi
10425
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10428$as_echo "$with_system_libmpdec" >&6; }
10429
Benjamin Peterson076ed002010-10-31 17:11:02 +000010430# Check for support for loadable sqlite extensions
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10432$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10433# Check whether --enable-loadable-sqlite-extensions was given.
10434if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10435 enableval=$enable_loadable_sqlite_extensions;
10436else
10437 enable_loadable_sqlite_extensions="no"
10438fi
10439
10440
10441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10442$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10443
Ned Deilyd819b932013-09-06 01:07:05 -070010444# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10445
10446
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10448$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10449
10450# Check whether --with-tcltk-includes was given.
10451if test "${with_tcltk_includes+set}" = set; then :
10452 withval=$with_tcltk_includes;
10453else
10454 with_tcltk_includes="default"
10455fi
10456
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10458$as_echo "$with_tcltk_includes" >&6; }
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10460$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10461
10462# Check whether --with-tcltk-libs was given.
10463if test "${with_tcltk_libs+set}" = set; then :
10464 withval=$with_tcltk_libs;
10465else
10466 with_tcltk_libs="default"
10467fi
10468
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10470$as_echo "$with_tcltk_libs" >&6; }
10471if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10472then
10473 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10474 then
10475 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10476 fi
10477 TCLTK_INCLUDES=""
10478 TCLTK_LIBS=""
10479else
10480 TCLTK_INCLUDES="$with_tcltk_includes"
10481 TCLTK_LIBS="$with_tcltk_libs"
10482fi
10483
Matthias Klose55708cc2009-04-30 08:06:49 +000010484# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10486$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010487
10488# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010490 withval=$with_dbmliborder;
10491if test x$with_dbmliborder = xyes
10492then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010493as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010494else
10495 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10496 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10497 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010498 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010499 fi
10500 done
10501fi
10502fi
10503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10505$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010506
Martin v. Löwis11437992002-04-12 09:54:03 +000010507# Templates for things AC_DEFINEd more than once.
10508# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010509
10510
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010511if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010512then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010513 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010515
10516 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010517elif test "$ac_cv_kpthread" = "yes"
10518then
10519 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010520 if test "$ac_cv_cxx_thread" = "yes"; then
10521 CXX="$CXX -Kpthread"
10522 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010524elif test "$ac_cv_kthread" = "yes"
10525then
10526 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010527 if test "$ac_cv_cxx_thread" = "yes"; then
10528 CXX="$CXX -Kthread"
10529 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010530 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531elif test "$ac_cv_pthread" = "yes"
10532then
10533 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010534 if test "$ac_cv_cxx_thread" = "yes"; then
10535 CXX="$CXX -pthread"
10536 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010539 if test ! -z "$withval" -a -d "$withval"
10540 then LDFLAGS="$LDFLAGS -L$withval"
10541 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010542
10543 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010544 # define _POSIX_THREADS in unistd.h. Some apparently don't
10545 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10547$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010550
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010551#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010552#ifdef _POSIX_THREADS
10553yes
10554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010555
10556_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559 unistd_defines_pthreads=yes
10560else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561 unistd_defines_pthreads=no
10562fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010563rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10566$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010567
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010569
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010570 # Just looking for pthread_create in libpthread is not enough:
10571 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10572 # So we really have to include pthread.h, and then link.
10573 _libs=$LIBS
10574 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10576$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010578/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010579
10580#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010581#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010582
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010583void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010584int
10585main ()
10586{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587
10588pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ;
10590 return 0;
10591}
10592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10596$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010597 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010598
Guido van Rossum02a1c402000-02-25 19:26:31 +000010599else
Martin v. Löwis11437992002-04-12 09:54:03 +000010600
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010601 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010603if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010604
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010605 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010606
Guido van Rossumad678af1998-10-02 14:42:15 +000010607else
Guido van Rossumad678af1998-10-02 14:42:15 +000010608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10610$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010611if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613else
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010615LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619/* Override any GCC internal prototype to avoid an error.
10620 Use char because int might match the return type of a GCC
10621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010622#ifdef __cplusplus
10623extern "C"
10624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010625char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010626int
10627main ()
10628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639rm -f core conftest.err conftest.$ac_objext \
10640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010641LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10644$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010645if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010646
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010647 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010648 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010649
Greg Steinadf63d62000-07-05 10:38:09 +000010650else
Greg Steinadf63d62000-07-05 10:38:09 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10653$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010654if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010658LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662/* Override any GCC internal prototype to avoid an error.
10663 Use char because int might match the return type of a GCC
10664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665#ifdef __cplusplus
10666extern "C"
10667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010668char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010669int
10670main ()
10671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010679else
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10687$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010688if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010690 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010691 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010692
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010693else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10696$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010699else
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010701LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705/* Override any GCC internal prototype to avoid an error.
10706 Use char because int might match the return type of a GCC
10707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708#ifdef __cplusplus
10709extern "C"
10710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010711char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010712int
10713main ()
10714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 ;
10717 return 0;
10718}
10719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010725rm -f core conftest.err conftest.$ac_objext \
10726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010727LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10730$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010731if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010733 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010734 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010735
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010736else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10739$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010740if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010742else
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010744LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748/* Override any GCC internal prototype to avoid an error.
10749 Use char because int might match the return type of a GCC
10750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010754char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010755int
10756main ()
10757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010770LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10773$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010774if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010776 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010777 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010778
Guido van Rossumb93a8621998-05-07 13:27:32 +000010779else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010780
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010781 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10782
Guido van Rossum2d38f911996-06-26 19:47:01 +000010783fi
10784
Guido van Rossum627b2d71993-12-24 10:39:16 +000010785
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010786fi
10787
Guido van Rossum0be3e491997-05-22 20:33:33 +000010788fi
10789
Guido van Rossum49545951997-12-02 19:28:29 +000010790fi
10791
Guido van Rossumb93a8621998-05-07 13:27:32 +000010792fi
10793
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010795rm -f core conftest.err conftest.$ac_objext \
10796 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10799$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010800if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010802else
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010804LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808/* Override any GCC internal prototype to avoid an error.
10809 Use char because int might match the return type of a GCC
10810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010811#ifdef __cplusplus
10812extern "C"
10813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010814char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010815int
10816main ()
10817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ;
10820 return 0;
10821}
10822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010828rm -f core conftest.err conftest.$ac_objext \
10829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10833$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010834if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010835
Martin v. Löwis130fb172001-07-19 11:00:41 +000010836 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010837
Guido van Rossum627b2d71993-12-24 10:39:16 +000010838fi
10839
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010840
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010842
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843if test "$posix_threads" = "yes"; then
10844 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847
10848 fi
10849
10850 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10851 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010852 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010853$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010854
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010855 ;;
10856 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858
10859 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010860 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010862
10863 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864 esac
10865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10867$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010868 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 ac_cv_pthread_system_supported=no
10873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010876
10877 #include <stdio.h>
10878 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010879 void *foo(void *parm) {
10880 return NULL;
10881 }
10882 main() {
10883 pthread_attr_t attr;
10884 pthread_t id;
10885 if (pthread_attr_init(&attr)) exit(-1);
10886 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10887 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10888 exit(0);
10889 }
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010892 ac_cv_pthread_system_supported=yes
10893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010898fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900
Guido van Rossum627b2d71993-12-24 10:39:16 +000010901fi
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10904$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010905 if test "$ac_cv_pthread_system_supported" = "yes"; then
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908
10909 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 for ac_func in pthread_sigmask
10911do :
10912 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010913if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010916_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010917 case $ac_sys_system in
10918 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010921
10922 ;;
10923 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924fi
10925done
10926
pdoxe14679c2017-10-05 00:01:56 -070010927 for ac_func in pthread_getcpuclockid
10928do :
10929 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10930if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10931 cat >>confdefs.h <<_ACEOF
10932#define HAVE_PTHREAD_GETCPUCLOCKID 1
10933_ACEOF
10934
10935fi
10936done
10937
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010938fi
10939
10940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10944$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951 ipv6=no
10952 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10954$as_echo "yes" >&6; }
10955 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956
10957 ipv6=yes
10958 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960else
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964 /* AF_INET6 available check */
10965#include <sys/types.h>
10966#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010967int
10968main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010970int domain = AF_INET6;
10971 ;
10972 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973}
Martin v. Löwis11437992002-04-12 09:54:03 +000010974_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010975if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10978$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981else
Matthias Kloseb159a552010-04-25 21:00:44 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010990if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10992$as_echo_n "checking if RFC2553 API is available... " >&6; }
10993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010994/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
10996 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010997#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010998int
10999main ()
11000{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011002 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 ;
11004 return 0;
11005}
Matthias Kloseb159a552010-04-25 21:00:44 +000011006
Martin v. Löwis11437992002-04-12 09:54:03 +000011007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011008if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011009
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011012 ipv6=yes
11013
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011014else
Matthias Kloseb159a552010-04-25 21:00:44 +000011015
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 ipv6=no
11019
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011022fi
11023
11024if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011026
11027fi
11028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029fi
11030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031
11032ipv6type=unknown
11033ipv6lib=none
11034ipv6trylibc=no
11035
11036if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11038$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011039 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11040 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041 case $i in
11042 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011044/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046#include <netinet/in.h>
11047#ifdef IPV6_INRIA_VERSION
11048yes
11049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011053 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011055rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056
11057 ;;
11058 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062#include <netinet/in.h>
11063#ifdef __KAME__
11064yes
11065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069 ipv6type=$i;
11070 ipv6lib=inet6
11071 ipv6libdir=/usr/local/v6/lib
11072 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011074rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075
11076 ;;
11077 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011080
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081#include <features.h>
11082#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11083yes
11084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011085_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011088 ipv6type=$i;
11089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011091rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092
11093 ;;
11094 linux-inet6)
11095 if test -d /usr/inet6; then
11096 ipv6type=$i
11097 ipv6lib=inet6
11098 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011099 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011100 fi
11101 ;;
11102 solaris)
11103 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011104 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 ipv6type=$i
11106 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107 fi
11108 fi
11109 ;;
11110 toshiba)
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 <sys/param.h>
11115#ifdef _TOSHIBA_INET6
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=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011123 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011125rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126
11127 ;;
11128 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132#include </usr/local/v6/include/sys/v6config.h>
11133#ifdef __V6D__
11134yes
11135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011136_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139 ipv6type=$i;
11140 ipv6lib=v6;
11141 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011142 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
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 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011150
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151#include <sys/param.h>
11152#ifdef _ZETA_MINAMI_INET6
11153yes
11154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011155_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011158 ipv6type=$i;
11159 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011160 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163
11164 ;;
11165 esac
11166 if test "$ipv6type" != "unknown"; then
11167 break
11168 fi
11169 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11171$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172fi
11173
11174if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11175 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11176 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11177 echo "using lib$ipv6lib"
11178 else
11179 if test $ipv6trylibc = "yes"; then
11180 echo "using libc"
11181 else
11182 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11183 echo "You need to fetch lib$ipv6lib.a from appropriate"
11184 echo 'ipv6 kit and compile beforehand.'
11185 exit 1
11186 fi
11187 fi
11188fi
11189
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11191$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11193/* end confdefs.h. */
11194 /* CAN_RAW_FD_FRAMES available check */
11195#include <linux/can/raw.h>
11196int
11197main ()
11198{
11199int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11200 ;
11201 return 0;
11202}
11203_ACEOF
11204if ac_fn_c_try_compile "$LINENO"; then :
11205
11206
11207$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11208
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11210$as_echo "yes" >&6; }
11211
11212else
11213
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11215$as_echo "no" >&6; }
11216
11217fi
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011220# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11222$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011225if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226 withval=$with_doc_strings;
11227fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011228
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011229
11230if test -z "$with_doc_strings"
11231then with_doc_strings="yes"
11232fi
11233if test "$with_doc_strings" != "no"
11234then
11235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011237
11238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11240$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011241
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011242# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11244$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011247if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248 withval=$with_pymalloc;
11249fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011250
Neil Schemenauera35c6882001-02-27 04:45:05 +000011251
Neil Schemenauer16c22972002-03-22 15:34:49 +000011252if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011253then
11254 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011255fi
11256if test "$with_pymalloc" != "no"
11257then
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011260
11261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11263$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011264
Nick Coghlan6ea41862017-06-11 13:16:15 +100011265# Check for --with-c-locale-coercion
11266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11267$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11268
11269# Check whether --with-c-locale-coercion was given.
11270if test "${with_c_locale_coercion+set}" = set; then :
11271 withval=$with_c_locale_coercion;
11272fi
11273
11274
11275if test -z "$with_c_locale_coercion"
11276then
11277 with_c_locale_coercion="yes"
11278fi
11279if test "$with_c_locale_coercion" != "no"
11280then
11281
11282$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11283
11284fi
11285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11286$as_echo "$with_c_locale_coercion" >&6; }
11287
Benjamin Peterson05159c42009-12-03 03:01:27 +000011288# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11290$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011291
11292# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011294 withval=$with_valgrind;
11295else
11296 with_valgrind=no
11297fi
11298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11300$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011301if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 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 +020011303if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011306
11307else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011308 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011309
11310fi
11311
11312
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011313 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011314fi
11315
Łukasz Langaa785c872016-09-09 17:37:37 -070011316# Check for DTrace support
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11318$as_echo_n "checking for --with-dtrace... " >&6; }
11319
11320# Check whether --with-dtrace was given.
11321if test "${with_dtrace+set}" = set; then :
11322 withval=$with_dtrace;
11323else
11324 with_dtrace=no
11325fi
11326
11327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11328$as_echo "$with_dtrace" >&6; }
11329
11330
11331
11332
11333
11334DTRACE=
11335DFLAGS=
11336DTRACE_HEADERS=
11337DTRACE_OBJS=
11338
11339if test "$with_dtrace" = "yes"
11340then
11341 # Extract the first word of "dtrace", so it can be a program name with args.
11342set dummy dtrace; ac_word=$2
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11344$as_echo_n "checking for $ac_word... " >&6; }
11345if ${ac_cv_path_DTRACE+:} false; then :
11346 $as_echo_n "(cached) " >&6
11347else
11348 case $DTRACE in
11349 [\\/]* | ?:[\\/]*)
11350 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11351 ;;
11352 *)
11353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11354for as_dir in $PATH
11355do
11356 IFS=$as_save_IFS
11357 test -z "$as_dir" && as_dir=.
11358 for ac_exec_ext in '' $ac_executable_extensions; do
11359 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11360 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11362 break 2
11363 fi
11364done
11365 done
11366IFS=$as_save_IFS
11367
11368 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11369 ;;
11370esac
11371fi
11372DTRACE=$ac_cv_path_DTRACE
11373if test -n "$DTRACE"; then
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11375$as_echo "$DTRACE" >&6; }
11376else
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382 if test "$DTRACE" = "not found"; then
11383 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11384 fi
11385
11386$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11387
11388 DTRACE_HEADERS="Include/pydtrace_probes.h"
11389
11390 # On OS X, DTrace providers do not need to be explicitly compiled and
11391 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11392 # generation flag '-G'. We check for presence of this flag, rather than
11393 # hardcoding support by OS, in the interest of robustness.
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11395$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11396if ${ac_cv_dtrace_link+:} false; then :
11397 $as_echo_n "(cached) " >&6
11398else
11399 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011400 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011401 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11402 ac_cv_dtrace_link=yes
11403
11404fi
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11406$as_echo "$ac_cv_dtrace_link" >&6; }
11407 if test "$ac_cv_dtrace_link" = "yes"; then
11408 DTRACE_OBJS="Python/pydtrace.o"
11409 fi
11410fi
11411
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011412# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011413
Guido van Rossum98935bf2001-09-05 19:13:16 +000011414DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011415
Guido van Rossume97ee181999-12-20 21:27:22 +000011416# the dlopen() function means we might want to use dynload_shlib.o. some
11417# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011418for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011419do :
11420 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011421if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011424_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011425
Guido van Rossume97ee181999-12-20 21:27:22 +000011426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011427done
Guido van Rossume97ee181999-12-20 21:27:22 +000011428
Michael W. Hudson54241132001-12-07 15:38:26 +000011429
Guido van Rossume97ee181999-12-20 21:27:22 +000011430# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11431# loading of modules.
11432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11434$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011435if test -z "$DYNLOADFILE"
11436then
11437 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011438 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11439 if test "$ac_cv_func_dlopen" = yes
11440 then DYNLOADFILE="dynload_shlib.o"
11441 else DYNLOADFILE="dynload_aix.o"
11442 fi
11443 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011444 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011445 *)
11446 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11447 # out any dynamic loading
11448 if test "$ac_cv_func_dlopen" = yes
11449 then DYNLOADFILE="dynload_shlib.o"
11450 else DYNLOADFILE="dynload_stub.o"
11451 fi
11452 ;;
11453 esac
11454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11456$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011457if test "$DYNLOADFILE" != "dynload_stub.o"
11458then
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011461
11462fi
11463
Neil Schemenauer4e425612001-06-19 15:44:15 +000011464# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11465
Michael W. Hudson54241132001-12-07 15:38:26 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11468$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011469if test -z "$MACHDEP_OBJS"
11470then
Jack Jansene578a632001-08-15 01:27:14 +000011471 MACHDEP_OBJS=$extra_machdep_objs
11472else
11473 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011474fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011475if test -z "$MACHDEP_OBJS"; then
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11477$as_echo "none" >&6; }
11478else
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11480$as_echo "$MACHDEP_OBJS" >&6; }
11481fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011482
Guido van Rossum627b2d71993-12-24 10:39:16 +000011483# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011484for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011485 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011486 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011487 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011488 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011489 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011490 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011491 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011492 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011493 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011494 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011495 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011496 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11497 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011498 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011499 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011500 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011501 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11502 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011503 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011504 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011505 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011506 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011507 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011508do :
11509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11510ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011511if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011513#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011514_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011516fi
11517done
11518
Michael W. Hudson54241132001-12-07 15:38:26 +000011519
Benjamin Peterson40caa052018-09-12 15:52:40 -070011520# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11521# links. Some libc implementations have a stub lchmod implementation that always
11522# returns an error.
11523if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011524 for ac_func in lchmod
11525do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011526 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11527if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011528 cat >>confdefs.h <<_ACEOF
11529#define HAVE_LCHMOD 1
11530_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011531
11532fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011533done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011534
11535fi
11536
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011537ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11538 #include <dirent.h>
11539"
11540if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11541
11542$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11543
11544fi
11545
11546
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011547# For some functions, having a definition is not sufficient, since
11548# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11550$as_echo_n "checking for chroot... " >&6; }
11551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011554int
11555main ()
11556{
11557void *x=chroot
11558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011565
Matthias Kloseb159a552010-04-25 21:00:44 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571
11572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11575$as_echo_n "checking for link... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011578#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011579int
11580main ()
11581{
11582void *x=link
11583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590
Matthias Kloseb159a552010-04-25 21:00:44 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593else
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596
11597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11600$as_echo_n "checking for symlink... " >&6; }
11601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011603#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011604int
11605main ()
11606{
11607void *x=symlink
11608 ;
11609 return 0;
11610}
11611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011615
Matthias Kloseb159a552010-04-25 21:00:44 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011621
11622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11625$as_echo_n "checking for fchdir... " >&6; }
11626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011627/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011628#include <unistd.h>
11629int
11630main ()
11631{
11632void *x=fchdir
11633 ;
11634 return 0;
11635}
11636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011638
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011640
Matthias Kloseb159a552010-04-25 21:00:44 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11645$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646
11647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11650$as_echo_n "checking for fsync... " >&6; }
11651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011652/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011653#include <unistd.h>
11654int
11655main ()
11656{
11657void *x=fsync
11658 ;
11659 return 0;
11660}
11661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665
Matthias Kloseb159a552010-04-25 21:00:44 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668else
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671
11672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11675$as_echo_n "checking for fdatasync... " >&6; }
11676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011677/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011678#include <unistd.h>
11679int
11680main ()
11681{
11682void *x=fdatasync
11683 ;
11684 return 0;
11685}
11686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011690
Matthias Kloseb159a552010-04-25 21:00:44 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11695$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011696
11697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11700$as_echo_n "checking for epoll... " >&6; }
11701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011702/* end confdefs.h. */
11703#include <sys/epoll.h>
11704int
11705main ()
11706{
11707void *x=epoll_create
11708 ;
11709 return 0;
11710}
11711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011715
Matthias Kloseb159a552010-04-25 21:00:44 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11720$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011721
11722fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11725$as_echo_n "checking for epoll_create1... " >&6; }
11726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11727/* end confdefs.h. */
11728#include <sys/epoll.h>
11729int
11730main ()
11731{
11732void *x=epoll_create1
11733 ;
11734 return 0;
11735}
11736_ACEOF
11737if ac_fn_c_try_compile "$LINENO"; then :
11738
11739$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11740
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11742$as_echo "yes" >&6; }
11743else
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
11746
11747fi
11748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11750$as_echo_n "checking for kqueue... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011752/* end confdefs.h. */
11753
11754#include <sys/types.h>
11755#include <sys/event.h>
11756
11757int
11758main ()
11759{
11760int x=kqueue()
11761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011768
Matthias Kloseb159a552010-04-25 21:00:44 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011774
11775fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11778$as_echo_n "checking for prlimit... " >&6; }
11779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11780/* end confdefs.h. */
11781
11782#include <sys/time.h>
11783#include <sys/resource.h>
11784
11785int
11786main ()
11787{
11788void *x=prlimit
11789 ;
11790 return 0;
11791}
11792_ACEOF
11793if ac_fn_c_try_compile "$LINENO"; then :
11794
11795$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11796
11797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11798$as_echo "yes" >&6; }
11799else
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801$as_echo "no" >&6; }
11802
11803fi
11804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11805
Martin v. Löwisd5843682002-11-21 20:41:28 +000011806# On some systems (eg. FreeBSD 5), we would find a definition of the
11807# functions ctermid_r, setgroups in the library, but no prototype
11808# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11809# address to avoid compiler warnings and potential miscompilations
11810# because of the missing prototypes.
11811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11813$as_echo_n "checking for ctermid_r... " >&6; }
11814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011815/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011816
Martin v. Löwisd5843682002-11-21 20:41:28 +000011817#include <stdio.h>
11818
Martin v. Löwisd5843682002-11-21 20:41:28 +000011819int
11820main ()
11821{
11822void* p = ctermid_r
11823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011830
Matthias Kloseb159a552010-04-25 21:00:44 +000011831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011836
11837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11841$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011842if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011843 $as_echo_n "(cached) " >&6
11844else
11845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011846/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011847#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011848int
11849main ()
11850{
11851void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011852
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011853 ;
11854 return 0;
11855}
11856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011857if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011858 ac_cv_flock_decl=yes
11859else
11860 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011861
11862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011864
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011865fi
11866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11867$as_echo "$ac_cv_flock_decl" >&6; }
11868if test "x${ac_cv_flock_decl}" = xyes; then
11869 for ac_func in flock
11870do :
11871 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011872if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011873 cat >>confdefs.h <<_ACEOF
11874#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011875_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011876
Antoine Pitroua3000072010-09-07 14:52:42 +000011877else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011879$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011881 $as_echo_n "(cached) " >&6
11882else
11883 ac_check_lib_save_LIBS=$LIBS
11884LIBS="-lbsd $LIBS"
11885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886/* end confdefs.h. */
11887
11888/* Override any GCC internal prototype to avoid an error.
11889 Use char because int might match the return type of a GCC
11890 builtin and then its argument prototype would still apply. */
11891#ifdef __cplusplus
11892extern "C"
11893#endif
11894char flock ();
11895int
11896main ()
11897{
11898return flock ();
11899 ;
11900 return 0;
11901}
11902_ACEOF
11903if ac_fn_c_try_link "$LINENO"; then :
11904 ac_cv_lib_bsd_flock=yes
11905else
11906 ac_cv_lib_bsd_flock=no
11907fi
11908rm -f core conftest.err conftest.$ac_objext \
11909 conftest$ac_exeext conftest.$ac_ext
11910LIBS=$ac_check_lib_save_LIBS
11911fi
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11913$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011915 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011916
11917
11918$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11919
11920
11921fi
11922
11923
11924fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011925done
11926
Antoine Pitroua3000072010-09-07 14:52:42 +000011927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11930$as_echo_n "checking for getpagesize... " >&6; }
11931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011932/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011933
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011934#include <unistd.h>
11935
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011936int
11937main ()
11938{
11939void* p = getpagesize
11940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011947
Matthias Kloseb159a552010-04-25 21:00:44 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11952$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011953
11954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956
Victor Stinner984890f2011-11-24 13:53:38 +010011957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11958$as_echo_n "checking for broken unsetenv... " >&6; }
11959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11960/* end confdefs.h. */
11961
11962#include <stdlib.h>
11963
11964int
11965main ()
11966{
11967int res = unsetenv("DUMMY")
11968 ;
11969 return 0;
11970}
11971_ACEOF
11972if ac_fn_c_try_compile "$LINENO"; then :
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
11975else
11976
11977$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11978
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11980$as_echo "yes" >&6; }
11981
11982fi
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011985for ac_prog in true
11986do
11987 # Extract the first word of "$ac_prog", so it can be a program name with args.
11988set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11990$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011991if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011993else
11994 if test -n "$TRUE"; then
11995 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11996else
11997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11998for as_dir in $PATH
11999do
12000 IFS=$as_save_IFS
12001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012004 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $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 +000012006 break 2
12007 fi
12008done
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012011
12012fi
12013fi
12014TRUE=$ac_cv_prog_TRUE
12015if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12017$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012021fi
12022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012024 test -n "$TRUE" && break
12025done
12026test -n "$TRUE" || TRUE="/bin/true"
12027
12028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12030$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012031if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012033else
12034 ac_check_lib_save_LIBS=$LIBS
12035LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039/* Override any GCC internal prototype to avoid an error.
12040 Use char because int might match the return type of a GCC
12041 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042#ifdef __cplusplus
12043extern "C"
12044#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012045char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012046int
12047main ()
12048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012055 ac_cv_lib_c_inet_aton=yes
12056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012059rm -f core conftest.err conftest.$ac_objext \
12060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061LIBS=$ac_check_lib_save_LIBS
12062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12064$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012065if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012066 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12069$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072else
12073 ac_check_lib_save_LIBS=$LIBS
12074LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078/* Override any GCC internal prototype to avoid an error.
12079 Use char because int might match the return type of a GCC
12080 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081#ifdef __cplusplus
12082extern "C"
12083#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012084char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085int
12086main ()
12087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012089 ;
12090 return 0;
12091}
12092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094 ac_cv_lib_resolv_inet_aton=yes
12095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098rm -f core conftest.err conftest.$ac_objext \
12099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100LIBS=$ac_check_lib_save_LIBS
12101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12103$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 cat >>confdefs.h <<_ACEOF
12106#define HAVE_LIBRESOLV 1
12107_ACEOF
12108
12109 LIBS="-lresolv $LIBS"
12110
12111fi
12112
12113
12114fi
12115
12116
Christian Heimesd0764e22007-12-04 15:00:33 +000012117# On Tru64, chflags seems to be present, but calling it will
12118# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12120$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012121if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012125 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012128/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012129
Christian Heimesd0764e22007-12-04 15:00:33 +000012130#include <sys/stat.h>
12131#include <unistd.h>
12132int main(int argc, char*argv[])
12133{
12134 if(chflags(argv[0], 0) != 0)
12135 return 1;
12136 return 0;
12137}
Ned Deily3eb67d52011-06-28 00:00:28 -070012138
Christian Heimesd0764e22007-12-04 15:00:33 +000012139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012141 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012147fi
12148
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12152$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012153if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012156 ac_cv_have_chflags="yes"
12157else
12158 ac_cv_have_chflags="no"
12159fi
12160
12161fi
12162if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012163
Matthias Kloseb9621712010-04-24 17:59:49 +000012164$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165
12166fi
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12169$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012170if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012174 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012177/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012178
Christian Heimesd0764e22007-12-04 15:00:33 +000012179#include <sys/stat.h>
12180#include <unistd.h>
12181int main(int argc, char*argv[])
12182{
12183 if(lchflags(argv[0], 0) != 0)
12184 return 1;
12185 return 0;
12186}
Ned Deily3eb67d52011-06-28 00:00:28 -070012187
Christian Heimesd0764e22007-12-04 15:00:33 +000012188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012189if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012190 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012196fi
12197
12198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12201$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012202if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012204if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012205 ac_cv_have_lchflags="yes"
12206else
12207 ac_cv_have_lchflags="no"
12208fi
12209
12210fi
12211if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012214
12215fi
12216
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012217case $ac_sys_system/$ac_sys_release in
12218Darwin/*)
12219 _CUR_CFLAGS="${CFLAGS}"
12220 _CUR_LDFLAGS="${LDFLAGS}"
12221 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12222 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12223 ;;
12224esac
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12227$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012228if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012230else
12231 ac_check_lib_save_LIBS=$LIBS
12232LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012234/* end confdefs.h. */
12235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236/* Override any GCC internal prototype to avoid an error.
12237 Use char because int might match the return type of a GCC
12238 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012239#ifdef __cplusplus
12240extern "C"
12241#endif
12242char inflateCopy ();
12243int
12244main ()
12245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012247 ;
12248 return 0;
12249}
12250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012252 ac_cv_lib_z_inflateCopy=yes
12253else
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012256rm -f core conftest.err conftest.$ac_objext \
12257 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012258LIBS=$ac_check_lib_save_LIBS
12259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12261$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012262if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012265
12266fi
12267
12268
12269case $ac_sys_system/$ac_sys_release in
12270Darwin/*)
12271 CFLAGS="${_CUR_CFLAGS}"
12272 LDFLAGS="${_CUR_LDFLAGS}"
12273 ;;
12274esac
12275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12277$as_echo_n "checking for hstrerror... " >&6; }
12278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012280
Martin v. Löwise9416172003-05-03 10:12:45 +000012281#include <netdb.h>
12282
Martin v. Löwise9416172003-05-03 10:12:45 +000012283int
12284main ()
12285{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012286void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012292
Matthias Kloseb9621712010-04-24 17:59:49 +000012293$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012294
Matthias Kloseb159a552010-04-25 21:00:44 +000012295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012296$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012300
12301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302rm -f core conftest.err conftest.$ac_objext \
12303 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12306$as_echo_n "checking for inet_aton... " >&6; }
12307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012309
Martin v. Löwis86d66262006-02-17 08:40:11 +000012310#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012311#include <sys/socket.h>
12312#include <netinet/in.h>
12313#include <arpa/inet.h>
12314
Martin v. Löwise9416172003-05-03 10:12:45 +000012315int
12316main ()
12317{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012318void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012326
Matthias Kloseb159a552010-04-25 21:00:44 +000012327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012329else
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12331$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
12333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core conftest.err conftest.$ac_objext \
12335 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12338$as_echo_n "checking for inet_pton... " >&6; }
12339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012340/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012341
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012342#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012343#include <sys/socket.h>
12344#include <netinet/in.h>
12345#include <arpa/inet.h>
12346
Martin v. Löwise9416172003-05-03 10:12:45 +000012347int
12348main ()
12349{
12350void* p = inet_pton
12351 ;
12352 return 0;
12353}
12354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012358
Matthias Kloseb159a552010-04-25 21:00:44 +000012359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12363$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
12365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012367
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012368# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12370$as_echo_n "checking for setgroups... " >&6; }
12371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012372/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012373
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012374#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012375#ifdef HAVE_GRP_H
12376#include <grp.h>
12377#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012378
Martin v. Löwisd5843682002-11-21 20:41:28 +000012379int
12380main ()
12381{
12382void* p = setgroups
12383 ;
12384 return 0;
12385}
12386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012390
Matthias Kloseb159a552010-04-25 21:00:44 +000012391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012392$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012396
12397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012399
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012400# check for openpty and forkpty
12401
12402for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012403do :
12404 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012405if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012408_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012410else
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12412$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012413if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012415else
Martin v. Löwis11437992002-04-12 09:54:03 +000012416 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012417LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421/* Override any GCC internal prototype to avoid an error.
12422 Use char because int might match the return type of a GCC
12423 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012424#ifdef __cplusplus
12425extern "C"
12426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012427char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012441rm -f core conftest.err conftest.$ac_objext \
12442 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012443LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12446$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012447if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12452$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012453if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012455else
12456 ac_check_lib_save_LIBS=$LIBS
12457LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012459/* end confdefs.h. */
12460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461/* Override any GCC internal prototype to avoid an error.
12462 Use char because int might match the return type of a GCC
12463 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012464#ifdef __cplusplus
12465extern "C"
12466#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012467char openpty ();
12468int
12469main ()
12470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012477 ac_cv_lib_bsd_openpty=yes
12478else
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481rm -f core conftest.err conftest.$ac_objext \
12482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483LIBS=$ac_check_lib_save_LIBS
12484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12486$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012487if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012489 LIBS="$LIBS -lbsd"
12490fi
12491
12492
12493fi
12494
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495
12496fi
12497done
12498
12499for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012500do :
12501 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012502if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012504#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012505_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012506
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12509$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012512else
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012514LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518/* Override any GCC internal prototype to avoid an error.
12519 Use char because int might match the return type of a GCC
12520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012521#ifdef __cplusplus
12522extern "C"
12523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012524char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012525int
12526main ()
12527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ;
12530 return 0;
12531}
12532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538rm -f core conftest.err conftest.$ac_objext \
12539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012540LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12543$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012544if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12549$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012550if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012552else
12553 ac_check_lib_save_LIBS=$LIBS
12554LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012556/* end confdefs.h. */
12557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558/* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012561#ifdef __cplusplus
12562extern "C"
12563#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012564char forkpty ();
12565int
12566main ()
12567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012569 ;
12570 return 0;
12571}
12572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012574 ac_cv_lib_bsd_forkpty=yes
12575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012580LIBS=$ac_check_lib_save_LIBS
12581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12583$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012584if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012586 LIBS="$LIBS -lbsd"
12587fi
12588
12589
12590fi
12591
Fred Drake8cef4cf2000-06-28 16:40:38 +000012592
12593fi
12594done
12595
Jack Jansendd19cf82001-12-06 22:36:17 +000012596
Michael W. Hudson54241132001-12-07 15:38:26 +000012597# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012598for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012599do :
12600 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12601ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012602if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012603 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012605_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012608done
12609
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012611ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012612if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012613 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012614
Martin v. Löwis1142de32002-03-29 16:28:31 +000012615else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012617 *" dup2.$ac_objext "* ) ;;
12618 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012620esac
12621
Martin v. Löwis1142de32002-03-29 16:28:31 +000012622fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012623
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012624ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012625if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012626 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12627
12628else
12629 case " $LIBOBJS " in
12630 *" strdup.$ac_objext "* ) ;;
12631 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12632 ;;
12633esac
12634
12635fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012636
12637
12638for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012639do :
12640 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012648int
12649main ()
12650{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 ;
12653 return 0;
12654}
12655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012659
Guido van Rossum627b2d71993-12-24 10:39:16 +000012660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012662
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012664done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012665
Jack Jansen150753c2003-03-29 22:07:47 +000012666for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012667do :
12668 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012669if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012675#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012676int
12677main ()
12678{
12679setpgrp(0,0);
12680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012687
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012690
12691fi
12692done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012693
Thomas Wouters3a584202000-08-05 23:28:51 +000012694for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012695do :
12696 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012699#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ;
12709 return 0;
12710}
12711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012712if ac_fn_c_try_compile "$LINENO"; then :
12713
Guido van Rossum627b2d71993-12-24 10:39:16 +000012714else
Skip Montanaro6dead952003-09-25 14:50:04 +000012715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012723done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724
Michael W. Hudson54241132001-12-07 15:38:26 +000012725
Gregory P. Smith387512c2018-12-30 15:42:32 -080012726# We search for both crypt and crypt_r as one or the other may be defined
12727# This gets us our -lcrypt in LIBS when required on the target platform.
12728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12729$as_echo_n "checking for library containing crypt... " >&6; }
12730if ${ac_cv_search_crypt+:} false; then :
12731 $as_echo_n "(cached) " >&6
12732else
12733 ac_func_search_save_LIBS=$LIBS
12734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12735/* end confdefs.h. */
12736
12737/* Override any GCC internal prototype to avoid an error.
12738 Use char because int might match the return type of a GCC
12739 builtin and then its argument prototype would still apply. */
12740#ifdef __cplusplus
12741extern "C"
12742#endif
12743char crypt ();
12744int
12745main ()
12746{
12747return crypt ();
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752for ac_lib in '' crypt; do
12753 if test -z "$ac_lib"; then
12754 ac_res="none required"
12755 else
12756 ac_res=-l$ac_lib
12757 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12758 fi
12759 if ac_fn_c_try_link "$LINENO"; then :
12760 ac_cv_search_crypt=$ac_res
12761fi
12762rm -f core conftest.err conftest.$ac_objext \
12763 conftest$ac_exeext
12764 if ${ac_cv_search_crypt+:} false; then :
12765 break
12766fi
12767done
12768if ${ac_cv_search_crypt+:} false; then :
12769
12770else
12771 ac_cv_search_crypt=no
12772fi
12773rm conftest.$ac_ext
12774LIBS=$ac_func_search_save_LIBS
12775fi
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12777$as_echo "$ac_cv_search_crypt" >&6; }
12778ac_res=$ac_cv_search_crypt
12779if test "$ac_res" != no; then :
12780 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12781
12782fi
12783
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12785$as_echo_n "checking for library containing crypt_r... " >&6; }
12786if ${ac_cv_search_crypt_r+:} false; then :
12787 $as_echo_n "(cached) " >&6
12788else
12789 ac_func_search_save_LIBS=$LIBS
12790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12791/* end confdefs.h. */
12792
12793/* Override any GCC internal prototype to avoid an error.
12794 Use char because int might match the return type of a GCC
12795 builtin and then its argument prototype would still apply. */
12796#ifdef __cplusplus
12797extern "C"
12798#endif
12799char crypt_r ();
12800int
12801main ()
12802{
12803return crypt_r ();
12804 ;
12805 return 0;
12806}
12807_ACEOF
12808for ac_lib in '' crypt; do
12809 if test -z "$ac_lib"; then
12810 ac_res="none required"
12811 else
12812 ac_res=-l$ac_lib
12813 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12814 fi
12815 if ac_fn_c_try_link "$LINENO"; then :
12816 ac_cv_search_crypt_r=$ac_res
12817fi
12818rm -f core conftest.err conftest.$ac_objext \
12819 conftest$ac_exeext
12820 if ${ac_cv_search_crypt_r+:} false; then :
12821 break
12822fi
12823done
12824if ${ac_cv_search_crypt_r+:} false; then :
12825
12826else
12827 ac_cv_search_crypt_r=no
12828fi
12829rm conftest.$ac_ext
12830LIBS=$ac_func_search_save_LIBS
12831fi
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12833$as_echo "$ac_cv_search_crypt_r" >&6; }
12834ac_res=$ac_cv_search_crypt_r
12835if test "$ac_res" != no; then :
12836 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12837
12838fi
12839
12840
12841ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12842if test "x$ac_cv_func_crypt_r" = xyes; then :
12843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12844/* end confdefs.h. */
12845
12846#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12847#include <crypt.h>
12848
12849int
12850main ()
12851{
12852
12853struct crypt_data d;
12854char *r = crypt_r("", "", &d);
12855
12856 ;
12857 return 0;
12858}
12859_ACEOF
12860if ac_fn_c_try_compile "$LINENO"; then :
12861
12862$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12863
12864fi
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12866
12867fi
12868
12869
Victor Stinnere0be4232011-10-25 13:06:09 +020012870for ac_func in clock_gettime
12871do :
12872 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12873if test "x$ac_cv_func_clock_gettime" = xyes; then :
12874 cat >>confdefs.h <<_ACEOF
12875#define HAVE_CLOCK_GETTIME 1
12876_ACEOF
12877
12878else
12879
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12881$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12882if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12883 $as_echo_n "(cached) " >&6
12884else
12885 ac_check_lib_save_LIBS=$LIBS
12886LIBS="-lrt $LIBS"
12887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888/* end confdefs.h. */
12889
12890/* Override any GCC internal prototype to avoid an error.
12891 Use char because int might match the return type of a GCC
12892 builtin and then its argument prototype would still apply. */
12893#ifdef __cplusplus
12894extern "C"
12895#endif
12896char clock_gettime ();
12897int
12898main ()
12899{
12900return clock_gettime ();
12901 ;
12902 return 0;
12903}
12904_ACEOF
12905if ac_fn_c_try_link "$LINENO"; then :
12906 ac_cv_lib_rt_clock_gettime=yes
12907else
12908 ac_cv_lib_rt_clock_gettime=no
12909fi
12910rm -f core conftest.err conftest.$ac_objext \
12911 conftest$ac_exeext conftest.$ac_ext
12912LIBS=$ac_check_lib_save_LIBS
12913fi
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12915$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12916if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12917
Victor Stinner7efb8332014-08-29 15:41:08 +020012918 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012919 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12920
12921
12922$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12923
12924
12925fi
12926
12927
12928fi
12929done
12930
12931
12932for ac_func in clock_getres
12933do :
12934 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12935if test "x$ac_cv_func_clock_getres" = xyes; then :
12936 cat >>confdefs.h <<_ACEOF
12937#define HAVE_CLOCK_GETRES 1
12938_ACEOF
12939
12940else
12941
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12943$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12944if ${ac_cv_lib_rt_clock_getres+:} false; then :
12945 $as_echo_n "(cached) " >&6
12946else
12947 ac_check_lib_save_LIBS=$LIBS
12948LIBS="-lrt $LIBS"
12949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12950/* end confdefs.h. */
12951
12952/* Override any GCC internal prototype to avoid an error.
12953 Use char because int might match the return type of a GCC
12954 builtin and then its argument prototype would still apply. */
12955#ifdef __cplusplus
12956extern "C"
12957#endif
12958char clock_getres ();
12959int
12960main ()
12961{
12962return clock_getres ();
12963 ;
12964 return 0;
12965}
12966_ACEOF
12967if ac_fn_c_try_link "$LINENO"; then :
12968 ac_cv_lib_rt_clock_getres=yes
12969else
12970 ac_cv_lib_rt_clock_getres=no
12971fi
12972rm -f core conftest.err conftest.$ac_objext \
12973 conftest$ac_exeext conftest.$ac_ext
12974LIBS=$ac_check_lib_save_LIBS
12975fi
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12977$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12978if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12979
12980 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12981
12982
12983fi
12984
12985
12986fi
12987done
12988
12989
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012990for ac_func in clock_settime
12991do :
12992 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12993if test "x$ac_cv_func_clock_settime" = xyes; then :
12994 cat >>confdefs.h <<_ACEOF
12995#define HAVE_CLOCK_SETTIME 1
12996_ACEOF
12997
12998else
12999
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13001$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13002if ${ac_cv_lib_rt_clock_settime+:} false; then :
13003 $as_echo_n "(cached) " >&6
13004else
13005 ac_check_lib_save_LIBS=$LIBS
13006LIBS="-lrt $LIBS"
13007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13008/* end confdefs.h. */
13009
13010/* Override any GCC internal prototype to avoid an error.
13011 Use char because int might match the return type of a GCC
13012 builtin and then its argument prototype would still apply. */
13013#ifdef __cplusplus
13014extern "C"
13015#endif
13016char clock_settime ();
13017int
13018main ()
13019{
13020return clock_settime ();
13021 ;
13022 return 0;
13023}
13024_ACEOF
13025if ac_fn_c_try_link "$LINENO"; then :
13026 ac_cv_lib_rt_clock_settime=yes
13027else
13028 ac_cv_lib_rt_clock_settime=no
13029fi
13030rm -f core conftest.err conftest.$ac_objext \
13031 conftest$ac_exeext conftest.$ac_ext
13032LIBS=$ac_check_lib_save_LIBS
13033fi
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13035$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13036if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13037
13038 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13039
13040
13041fi
13042
13043
13044fi
13045done
13046
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13049$as_echo_n "checking for major... " >&6; }
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013052
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013053#if defined(MAJOR_IN_MKDEV)
13054#include <sys/mkdev.h>
13055#elif defined(MAJOR_IN_SYSMACROS)
13056#include <sys/sysmacros.h>
13057#else
13058#include <sys/types.h>
13059#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013060
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013061int
13062main ()
13063{
13064
13065 makedev(major(0),minor(0));
13066
13067 ;
13068 return 0;
13069}
13070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013072
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13077$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013078
13079else
Skip Montanaro6dead952003-09-25 14:50:04 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13082$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013083
13084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013087
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013088# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013089# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13091$as_echo_n "checking for getaddrinfo... " >&6; }
13092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013093/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013094
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013095#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013096#include <sys/socket.h>
13097#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013098#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100int
13101main ()
13102{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013103getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 ;
13105 return 0;
13106}
13107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109 have_getaddrinfo=yes
13110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013113rm -f core conftest.err conftest.$ac_objext \
13114 conftest$ac_exeext conftest.$ac_ext
13115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13116$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117if test $have_getaddrinfo = yes
13118then
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13120$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013121 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013125
13126if test "${enable_ipv6+set}" = set; then
13127 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13128else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013130fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013134
Stefan Krah19c21392012-11-22 23:47:32 +010013135#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136#include <sys/types.h>
13137#include <netdb.h>
13138#include <string.h>
13139#include <sys/socket.h>
13140#include <netinet/in.h>
13141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013143{
13144 int passive, gaierr, inet4 = 0, inet6 = 0;
13145 struct addrinfo hints, *ai, *aitop;
13146 char straddr[INET6_ADDRSTRLEN], strport[16];
13147
13148 for (passive = 0; passive <= 1; passive++) {
13149 memset(&hints, 0, sizeof(hints));
13150 hints.ai_family = AF_UNSPEC;
13151 hints.ai_flags = passive ? AI_PASSIVE : 0;
13152 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013153 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13155 (void)gai_strerror(gaierr);
13156 goto bad;
13157 }
13158 for (ai = aitop; ai; ai = ai->ai_next) {
13159 if (ai->ai_addr == NULL ||
13160 ai->ai_addrlen == 0 ||
13161 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13162 straddr, sizeof(straddr), strport, sizeof(strport),
13163 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13164 goto bad;
13165 }
13166 switch (ai->ai_family) {
13167 case AF_INET:
13168 if (strcmp(strport, "54321") != 0) {
13169 goto bad;
13170 }
13171 if (passive) {
13172 if (strcmp(straddr, "0.0.0.0") != 0) {
13173 goto bad;
13174 }
13175 } else {
13176 if (strcmp(straddr, "127.0.0.1") != 0) {
13177 goto bad;
13178 }
13179 }
13180 inet4++;
13181 break;
13182 case AF_INET6:
13183 if (strcmp(strport, "54321") != 0) {
13184 goto bad;
13185 }
13186 if (passive) {
13187 if (strcmp(straddr, "::") != 0) {
13188 goto bad;
13189 }
13190 } else {
13191 if (strcmp(straddr, "::1") != 0) {
13192 goto bad;
13193 }
13194 }
13195 inet6++;
13196 break;
13197 case AF_UNSPEC:
13198 goto bad;
13199 break;
13200 default:
13201 /* another family support? */
13202 break;
13203 }
13204 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013205 freeaddrinfo(aitop);
13206 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207 }
13208
13209 if (!(inet4 == 0 || inet4 == 2))
13210 goto bad;
13211 if (!(inet6 == 0 || inet6 == 2))
13212 goto bad;
13213
13214 if (aitop)
13215 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013216 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217
13218 bad:
13219 if (aitop)
13220 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222}
13223
Martin v. Löwis11437992002-04-12 09:54:03 +000013224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013226 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013234fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013237
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13239$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13240
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013241if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242then
13243 if test $ipv6 = yes
13244 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245 echo 'Fatal: You must get working getaddrinfo() function.'
13246 echo ' or you can specify "--disable-ipv6"'.
13247 exit 1
13248 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013249else
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013252
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013254
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013255for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013256do :
13257 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013261_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263fi
13264done
13265
Michael W. Hudson54241132001-12-07 15:38:26 +000013266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13269$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013270if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272else
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275#include <sys/types.h>
13276#include <sys/time.h>
13277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Martin v. Löwis11437992002-04-12 09:54:03 +000013279int
13280main ()
13281{
13282if ((struct tm *) 0)
13283return 0;
13284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13296$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013297if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300
13301fi
13302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13304$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013305if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310#include <sys/types.h>
13311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Martin v. Löwis11437992002-04-12 09:54:03 +000013313int
13314main ()
13315{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316struct tm tm;
13317 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 ;
13320 return 0;
13321}
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324 ac_cv_struct_tm=time.h
13325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13331$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013332if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335
13336fi
13337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338ac_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 +000013339#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341"
Victor Stinnere0be4232011-10-25 13:06:09 +020013342if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
13344cat >>confdefs.h <<_ACEOF
13345#define HAVE_STRUCT_TM_TM_ZONE 1
13346_ACEOF
13347
13348
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354
13355else
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13357"
Victor Stinnere0be4232011-10-25 13:06:09 +020013358if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362fi
13363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366_ACEOF
13367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13369$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013370if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013375#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376#if !HAVE_DECL_TZNAME
13377extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Martin v. Löwis11437992002-04-12 09:54:03 +000013380int
13381main ()
13382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ;
13385 return 0;
13386}
13387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389 ac_cv_var_tzname=yes
13390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013393rm -f core conftest.err conftest.$ac_objext \
13394 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13397$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013398 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013401
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402 fi
13403fi
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405ac_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 +020013406if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
13408cat >>confdefs.h <<_ACEOF
13409#define HAVE_STRUCT_STAT_ST_RDEV 1
13410_ACEOF
13411
13412
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013413fi
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415ac_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 +020013416if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418cat >>confdefs.h <<_ACEOF
13419#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13420_ACEOF
13421
13422
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425ac_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 +020013426if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013427
13428cat >>confdefs.h <<_ACEOF
13429#define HAVE_STRUCT_STAT_ST_FLAGS 1
13430_ACEOF
13431
13432
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435ac_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 +020013436if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013437
13438cat >>confdefs.h <<_ACEOF
13439#define HAVE_STRUCT_STAT_ST_GEN 1
13440_ACEOF
13441
13442
13443fi
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445ac_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 +020013446if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013447
13448cat >>confdefs.h <<_ACEOF
13449#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13450_ACEOF
13451
13452
13453fi
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455ac_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 +020013456if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458cat >>confdefs.h <<_ACEOF
13459#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13460_ACEOF
13461
13462
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013463fi
13464
Stefan Krah267b6392016-04-26 01:09:18 +020013465ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13466 #include <sys/types.h>
13467 #include <pwd.h>
13468
13469"
13470if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13471
13472cat >>confdefs.h <<_ACEOF
13473#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13474_ACEOF
13475
13476
13477fi
13478ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13479 #include <sys/types.h>
13480 #include <pwd.h>
13481
13482"
13483if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13484
13485cat >>confdefs.h <<_ACEOF
13486#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13487_ACEOF
13488
13489
13490fi
13491
Zachary Ware6a6967e2016-10-01 00:47:27 -050013492# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13493ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13494"
13495if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13496
13497cat >>confdefs.h <<_ACEOF
13498#define HAVE_SIGINFO_T_SI_BAND 1
13499_ACEOF
13500
13501
13502fi
13503
Michael W. Hudson54241132001-12-07 15:38:26 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13506$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509else
Matthias Kloseb159a552010-04-25 21:00:44 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013513#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013514int
13515main ()
13516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 ;
13519 return 0;
13520}
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523 ac_cv_header_time_altzone=yes
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529fi
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13532$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536
13537fi
13538
Guido van Rossumda88dad1995-01-26 00:46:29 +000013539was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13541$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013544
13545#include <sys/types.h>
13546#include <sys/select.h>
13547#include <sys/time.h>
13548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549int
13550main ()
13551{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552;
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ;
13554 return 0;
13555}
13556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013562 was_it_defined=yes
13563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13567$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13570$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013571if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013575/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013576#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013577int
13578main ()
13579{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013580struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586 ac_cv_struct_addrinfo=yes
13587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591fi
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13594$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013598
13599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13602$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013603if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013607/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608
13609# include <sys/types.h>
13610# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013611int
13612main ()
13613{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 ;
13616 return 0;
13617}
13618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620 ac_cv_struct_sockaddr_storage=yes
13621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13625fi
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13628$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632
13633fi
13634
Christian Heimesdffa3942016-09-05 23:54:41 +020013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13636$as_echo_n "checking for sockaddr_alg... " >&6; }
13637if ${ac_cv_struct_sockaddr_alg+:} false; then :
13638 $as_echo_n "(cached) " >&6
13639else
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
13642
13643# include <sys/types.h>
13644# include <sys/socket.h>
13645# include <linux/if_alg.h>
13646int
13647main ()
13648{
13649struct sockaddr_alg s
13650 ;
13651 return 0;
13652}
13653_ACEOF
13654if ac_fn_c_try_compile "$LINENO"; then :
13655 ac_cv_struct_sockaddr_alg=yes
13656else
13657 ac_cv_struct_sockaddr_alg=no
13658fi
13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660fi
13661
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13663$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13664if test $ac_cv_struct_sockaddr_alg = yes; then
13665
13666$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13667
13668fi
13669
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13673$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013674if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013679$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013680int
13681main ()
13682{
13683static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013684test_array [0] = 0;
13685return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013686
13687 ;
13688 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013689}
Martin v. Löwis11437992002-04-12 09:54:03 +000013690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013691if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013692 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13699$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013700if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702
13703fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13706$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013707if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013711/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712
Martin v. Löwis11437992002-04-12 09:54:03 +000013713int
13714main ()
13715{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013716
Martin v. Löwis11437992002-04-12 09:54:03 +000013717#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013718 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013720 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722 char const *const *pcpcc;
13723 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 /* NEC SVR4.0.2 mips cc rejects this. */
13725 struct point {int x, y;};
13726 static struct point const zero = {0,0};
13727 /* AIX XL C 1.02.0.0 rejects this.
13728 It does not let you subtract one const X* pointer from another in
13729 an arm of an if-expression whose if-part is not a constant
13730 expression */
13731 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013732 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734 ++pcpcc;
13735 ppc = (char**) pcpcc;
13736 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013737 { /* SCO 3.2v4 cc rejects this sort of thing. */
13738 char tx;
13739 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 }
13745 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13746 int x[] = {25, 17};
13747 const int *foo = &x[0];
13748 ++foo;
13749 }
13750 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13751 typedef const int *iptr;
13752 iptr p = 0;
13753 ++p;
13754 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013755 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013757 struct s { int j; const int *ap[3]; } bx;
13758 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 }
13760 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13761 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013765#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013766
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 ;
13768 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013769}
Martin v. Löwis11437992002-04-12 09:54:03 +000013770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013771if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772 ac_cv_c_const=yes
13773else
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13779$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783
13784fi
13785
Michael W. Hudson54241132001-12-07 15:38:26 +000013786
Guido van Rossumda88dad1995-01-26 00:46:29 +000013787works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13789$as_echo_n "checking for working signed char... " >&6; }
13790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013791/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013792
Martin v. Löwis11437992002-04-12 09:54:03 +000013793int
13794main ()
13795{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 ;
13798 return 0;
13799}
13800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013802 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013803else
Skip Montanaro6dead952003-09-25 14:50:04 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013806
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013807
Guido van Rossum7f43da71994-08-01 12:15:30 +000013808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13811$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812
Guido van Rossumda88dad1995-01-26 00:46:29 +000013813have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13815$as_echo_n "checking for prototypes... " >&6; }
13816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013818int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013819int
13820main ()
13821{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;
13824 return 0;
13825}
13826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013827if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
Matthias Kloseb159a552010-04-25 21:00:44 +000013831 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13835$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013836
Guido van Rossumda88dad1995-01-26 00:46:29 +000013837works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13839$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842
13843#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013844int foo(int x, ...) {
13845 va_list va;
13846 va_start(va, x);
13847 va_arg(va, int);
13848 va_arg(va, char *);
13849 va_arg(va, double);
13850 return 0;
13851}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853int
13854main ()
13855{
Guido van Rossum90eea071996-08-30 20:58:57 +000013856return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 ;
13858 return 0;
13859}
13860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013866 works=yes
13867
Guido van Rossum627b2d71993-12-24 10:39:16 +000013868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13871$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872
Martin v. Löwisd6320502004-08-12 13:45:08 +000013873# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13875$as_echo_n "checking for socketpair... " >&6; }
13876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013877/* end confdefs.h. */
13878
13879#include <sys/types.h>
13880#include <sys/socket.h>
13881
13882int
13883main ()
13884{
13885void *x=socketpair
13886 ;
13887 return 0;
13888}
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013891
Matthias Kloseb9621712010-04-24 17:59:49 +000013892$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013893
Matthias Kloseb159a552010-04-25 21:00:44 +000013894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013896else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13898$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013899
13900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013902
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013903# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13905$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013907/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013908#include <sys/types.h>
13909#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013910int
13911main ()
13912{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913struct sockaddr x;
13914x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 ;
13916 return 0;
13917}
13918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if ac_fn_c_try_compile "$LINENO"; then :
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13921$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
Matthias Kloseb9621712010-04-24 17:59:49 +000013923$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924
13925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13927$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013928
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
13934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013936if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13941$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013942 OLD_CFLAGS=$CFLAGS
13943 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013945/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013946
13947# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949int
13950main ()
13951{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013952
13953 char *name;
13954 struct hostent *he, *res;
13955 char buffer[2048];
13956 int buflen = 2048;
13957 int h_errnop;
13958
13959 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
13961 ;
13962 return 0;
13963}
13964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013968
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
Matthias Kloseb9621712010-04-24 17:59:49 +000013970$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13973$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975else
Skip Montanaro6dead952003-09-25 14:50:04 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13978$as_echo "no" >&6; }
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13980$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013982/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013983
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986int
13987main ()
13988{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989
13990 char *name;
13991 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013992 char buffer[2048];
13993 int buflen = 2048;
13994 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013995
Matthias Kloseb159a552010-04-25 21:00:44 +000013996 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
13998 ;
13999 return 0;
14000}
14001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Matthias Kloseb159a552010-04-25 21:00:44 +000014007$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14010$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012else
Skip Montanaro6dead952003-09-25 14:50:04 +000014013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14015$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14017$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019/* end confdefs.h. */
14020
14021# include <netdb.h>
14022
14023int
14024main ()
14025{
14026
14027 char *name;
14028 struct hostent *he;
14029 struct hostent_data data;
14030
14031 (void) gethostbyname_r(name, he, &data);
14032
14033 ;
14034 return 0;
14035}
14036_ACEOF
14037if ac_fn_c_try_compile "$LINENO"; then :
14038
14039 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14040
14041
14042$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14043
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14045$as_echo "yes" >&6; }
14046
14047else
14048
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14050$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060 CFLAGS=$OLD_CFLAGS
14061
14062else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 for ac_func in gethostbyname
14065do :
14066 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014067if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014069#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014070_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014073done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074
Michael W. Hudson54241132001-12-07 15:38:26 +000014075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076fi
14077
Michael W. Hudson54241132001-12-07 15:38:26 +000014078
14079
14080
14081
14082
14083
Guido van Rossum627b2d71993-12-24 10:39:16 +000014084# checks for system services
14085# (none yet)
14086
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014087# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014088ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014089if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014090
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14093$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014094if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014096else
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014098LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102/* Override any GCC internal prototype to avoid an error.
14103 Use char because int might match the return type of a GCC
14104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014105#ifdef __cplusplus
14106extern "C"
14107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014108char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014109int
14110main ()
14111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ;
14114 return 0;
14115}
14116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014119else
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014122rm -f core conftest.err conftest.$ac_objext \
14123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014124LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14127$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014128if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 cat >>confdefs.h <<_ACEOF
14130#define HAVE_LIBIEEE 1
14131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014132
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014133 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014134
Guido van Rossum627b2d71993-12-24 10:39:16 +000014135fi
14136
Michael W. Hudson54241132001-12-07 15:38:26 +000014137
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014138fi
14139
Michael W. Hudson54241132001-12-07 15:38:26 +000014140
Guido van Rossum7f43da71994-08-01 12:15:30 +000014141# check for --with-libm=...
14142
Guido van Rossum563e7081996-09-10 18:20:48 +000014143case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014144Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014145*) LIBM=-lm
14146esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14148$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014153if test "$withval" = no
14154then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14156$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014157elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014158then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14160$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014161else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14165$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166fi
14167
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168
14169# check for --with-libc=...
14170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14172$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014177if test "$withval" = no
14178then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14180$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014181elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014182then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14184$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014185else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014186fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14189$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190fi
14191
Guido van Rossum7f43da71994-08-01 12:15:30 +000014192
Stefan Krah1919b7e2012-03-21 18:25:23 +010014193# **************************************
14194# * Check for gcc x64 inline assembler *
14195# **************************************
14196
14197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14198$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14200/* end confdefs.h. */
14201
14202int
14203main ()
14204{
14205
14206 __asm__ __volatile__ ("movq %rcx, %rax");
14207
14208 ;
14209 return 0;
14210}
14211_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014212if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014213 have_gcc_asm_for_x64=yes
14214else
14215 have_gcc_asm_for_x64=no
14216fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014217rm -f core conftest.err conftest.$ac_objext \
14218 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14220$as_echo "$have_gcc_asm_for_x64" >&6; }
14221if test "$have_gcc_asm_for_x64" = yes
14222then
14223
14224$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14225
14226fi
14227
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014228# **************************************************
14229# * Check for various properties of floating point *
14230# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014231
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14233$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14234if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014236else
14237
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014238
14239ax_cv_c_float_words_bigendian=unknown
14240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241/* end confdefs.h. */
14242
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014243
14244double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14245
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014246
14247_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014248if ac_fn_c_try_compile "$LINENO"; then :
14249
14250
14251if grep noonsees conftest.$ac_objext >/dev/null ; then
14252 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014253fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254if grep seesnoon conftest.$ac_objext >/dev/null ; then
14255 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14256 ax_cv_c_float_words_bigendian=no
14257 else
14258 ax_cv_c_float_words_bigendian=unknown
14259 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260fi
14261
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014262
14263fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14267$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014269case $ax_cv_c_float_words_bigendian in
14270 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014272$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14273 ;;
14274 no)
14275 ;;
14276 *)
14277 as_fn_error $? "
14278
14279Unknown float word ordering. You need to manually preset
14280ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14281
14282 " "$LINENO" 5 ;;
14283esac
14284
14285
14286if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287then
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014290
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014291elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014292then
14293
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014294$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14295
14296else
14297 # Some ARM platforms use a mixed-endian representation for doubles.
14298 # While Python doesn't currently have full support for these platforms
14299 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14300 # conversions work.
14301 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14302 # or little, then it must be this?
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014305
14306fi
14307
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014308# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014309# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014310# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014311# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014312# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014313# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014314
14315# This inline assembler syntax may also work for suncc and icc,
14316# so we try it on all platforms.
14317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14319$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014321/* end confdefs.h. */
14322
14323int
14324main ()
14325{
14326
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014327 unsigned short cw;
14328 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14329 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014330
14331 ;
14332 return 0;
14333}
14334_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014335if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336 have_gcc_asm_for_x87=yes
14337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014339fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014340rm -f core conftest.err conftest.$ac_objext \
14341 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14343$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014344if test "$have_gcc_asm_for_x87" = yes
14345then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014348
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14352$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14354/* end confdefs.h. */
14355
14356int
14357main ()
14358{
14359
14360 unsigned int fpcr;
14361 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14362 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14363
14364 ;
14365 return 0;
14366}
14367_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014368if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014369 have_gcc_asm_for_mc68881=yes
14370else
14371 have_gcc_asm_for_mc68881=no
14372fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014373rm -f core conftest.err conftest.$ac_objext \
14374 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14376$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14377if test "$have_gcc_asm_for_mc68881" = yes
14378then
14379
14380$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14381
14382fi
14383
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014384# Detect whether system arithmetic is subject to x87-style double
14385# rounding issues. The result of this test has little meaning on non
14386# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14387# mode is round-to-nearest and double rounding issues are present, and
14388# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14390$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014391# $BASECFLAGS may affect the result
14392ac_save_cc="$CC"
14393CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014394if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014395 ac_cv_x87_double_rounding=no
14396else
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014398/* end confdefs.h. */
14399
14400#include <stdlib.h>
14401#include <math.h>
14402int main() {
14403 volatile double x, y, z;
14404 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14405 x = 0.99999999999999989; /* 1-2**-53 */
14406 y = 1./x;
14407 if (y != 1.)
14408 exit(0);
14409 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14410 x = 1e16;
14411 y = 2.99999;
14412 z = x + y;
14413 if (z != 1e16+4.)
14414 exit(0);
14415 /* both tests show evidence of double rounding */
14416 exit(1);
14417}
14418
14419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014420if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014421 ac_cv_x87_double_rounding=no
14422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14426 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014427fi
14428
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014429CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14431$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014432if test "$ac_cv_x87_double_rounding" = yes
14433then
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014436
14437fi
14438
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014439# ************************************
14440# * Check for mathematical functions *
14441# ************************************
14442
14443LIBS_SAVE=$LIBS
14444LIBS="$LIBS $LIBM"
14445
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014446for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14447do :
14448 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14449ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014450if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014451 cat >>confdefs.h <<_ACEOF
14452#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14453_ACEOF
14454
14455fi
14456done
14457
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014458for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014459do :
14460 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14461ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014462if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014463 cat >>confdefs.h <<_ACEOF
14464#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14465_ACEOF
14466
14467fi
14468done
14469
14470ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14471"
Victor Stinnere0be4232011-10-25 13:06:09 +020014472if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014473 ac_have_decl=1
14474else
14475 ac_have_decl=0
14476fi
14477
14478cat >>confdefs.h <<_ACEOF
14479#define HAVE_DECL_ISINF $ac_have_decl
14480_ACEOF
14481ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14482"
Victor Stinnere0be4232011-10-25 13:06:09 +020014483if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484 ac_have_decl=1
14485else
14486 ac_have_decl=0
14487fi
14488
14489cat >>confdefs.h <<_ACEOF
14490#define HAVE_DECL_ISNAN $ac_have_decl
14491_ACEOF
14492ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14493"
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_ISFINITE $ac_have_decl
14502_ACEOF
14503
14504
Mark Dickinsona614f042009-11-28 12:48:43 +000014505# For multiprocessing module, check that sem_open
14506# actually works. For FreeBSD versions <= 7.2,
14507# the kernel module that provides POSIX semaphores
14508# isn't loaded by default, so an attempt to call
14509# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14511$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014512if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014516 ac_cv_posix_semaphores_enabled=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014519/* end confdefs.h. */
14520
14521#include <unistd.h>
14522#include <fcntl.h>
14523#include <stdio.h>
14524#include <semaphore.h>
14525#include <sys/stat.h>
14526
14527int main(void) {
14528 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14529 if (a == SEM_FAILED) {
14530 perror("sem_open");
14531 return 1;
14532 }
14533 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014534 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014535 return 0;
14536}
14537
14538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014539if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014540 ac_cv_posix_semaphores_enabled=yes
14541else
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014546fi
14547
14548
Mark Dickinsona614f042009-11-28 12:48:43 +000014549fi
14550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14552$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014553if test $ac_cv_posix_semaphores_enabled = no
14554then
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014557
14558fi
14559
Mark Dickinson10683072009-04-18 21:18:19 +000014560# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14562$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014563if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014565else
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014567 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014568else
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014570/* end confdefs.h. */
14571
14572#include <unistd.h>
14573#include <fcntl.h>
14574#include <stdio.h>
14575#include <semaphore.h>
14576#include <sys/stat.h>
14577
14578int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014579 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014580 int count;
14581 int res;
14582 if(a==SEM_FAILED){
14583 perror("sem_open");
14584 return 1;
14585
14586 }
14587 res = sem_getvalue(a, &count);
14588 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014589 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014590 return res==-1 ? 1 : 0;
14591}
14592
Mark Dickinson10683072009-04-18 21:18:19 +000014593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014594if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014595 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014596else
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014601fi
14602
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014603
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014604fi
14605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14607$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014608if test $ac_cv_broken_sem_getvalue = yes
14609then
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014612
14613fi
14614
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014615ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14616"
14617if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14618 ac_have_decl=1
14619else
14620 ac_have_decl=0
14621fi
14622
14623cat >>confdefs.h <<_ACEOF
14624#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14625_ACEOF
14626ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14627"
14628if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14629 ac_have_decl=1
14630else
14631 ac_have_decl=0
14632fi
14633
14634cat >>confdefs.h <<_ACEOF
14635#define HAVE_DECL_RTLD_NOW $ac_have_decl
14636_ACEOF
14637ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14638"
14639if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14640 ac_have_decl=1
14641else
14642 ac_have_decl=0
14643fi
14644
14645cat >>confdefs.h <<_ACEOF
14646#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14647_ACEOF
14648ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14649"
14650if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14651 ac_have_decl=1
14652else
14653 ac_have_decl=0
14654fi
14655
14656cat >>confdefs.h <<_ACEOF
14657#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14658_ACEOF
14659ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14660"
14661if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14662 ac_have_decl=1
14663else
14664 ac_have_decl=0
14665fi
14666
14667cat >>confdefs.h <<_ACEOF
14668#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14669_ACEOF
14670ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14680_ACEOF
14681ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14691_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014692ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14693"
14694if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14695 ac_have_decl=1
14696else
14697 ac_have_decl=0
14698fi
14699
14700cat >>confdefs.h <<_ACEOF
14701#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14702_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014703
14704
Mark Dickinsonbd792642009-03-18 20:06:12 +000014705# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14707$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014708# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014709if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014710 enableval=$enable_big_digits; case $enable_big_digits in
14711yes)
14712 enable_big_digits=30 ;;
14713no)
14714 enable_big_digits=15 ;;
1471515|30)
14716 ;;
14717*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014718 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 +000014719esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14721$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014722
14723cat >>confdefs.h <<_ACEOF
14724#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14725_ACEOF
14726
14727
14728else
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14730$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014731fi
14732
14733
Guido van Rossumef2255b2000-03-10 22:30:29 +000014734# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014735ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014736if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014737
14738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014741 wchar_h="yes"
14742
Guido van Rossumef2255b2000-03-10 22:30:29 +000014743else
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014745
14746fi
14747
Michael W. Hudson54241132001-12-07 15:38:26 +000014748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014750# determine wchar_t size
14751if test "$wchar_h" = yes
14752then
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14758$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014759if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14763"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765else
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 if test "$ac_cv_type_wchar_t" = yes; then
14767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014769as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771 else
14772 ac_cv_sizeof_wchar_t=0
14773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14778$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779
14780
14781
Martin v. Löwis11437992002-04-12 09:54:03 +000014782cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014783#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014784_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014785
Michael W. Hudson54241132001-12-07 15:38:26 +000014786
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014787fi
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14790$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014791have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014794
14795#include <tcl.h>
14796#if TCL_UTF_MAX != 6
14797# error "NOT UCS4_TCL"
14798#endif
14799int
14800main ()
14801{
14802
14803 ;
14804 return 0;
14805}
14806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014808
14809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014811
14812 have_ucs4_tcl=yes
14813
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14817$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014818
Skip Montanaro6dead952003-09-25 14:50:04 +000014819# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014820if test "$wchar_h" = yes
14821then
14822 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14824$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014825 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014827else
14828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014830 ac_cv_wchar_t_signed=yes
14831else
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014833/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014834
14835 #include <wchar.h>
14836 int main()
14837 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014838 /* Success: exit code 0 */
14839 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014840 }
14841
14842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014843if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014844 ac_cv_wchar_t_signed=yes
14845else
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014850fi
14851
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014852fi
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14855$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856fi
14857
Michael Osipov3738fad2018-08-24 18:17:19 +020014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14859$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014860# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014861if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014862 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014863then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014866
Michael Osipov3738fad2018-08-24 18:17:19 +020014867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14868$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014869else
Michael Osipov3738fad2018-08-24 18:17:19 +020014870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014872fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014873
14874# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14876$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014877if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014879else
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 ac_cv_c_bigendian=unknown
14881 # See if we're dealing with a universal compiler.
14882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14883/* end confdefs.h. */
14884#ifndef __APPLE_CC__
14885 not a universal capable compiler
14886 #endif
14887 typedef int dummy;
14888
Skip Montanaro6dead952003-09-25 14:50:04 +000014889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014890if ac_fn_c_try_compile "$LINENO"; then :
14891
14892 # Check for potential -arch flags. It is not universal unless
14893 # there are at least two -arch flags with different values.
14894 ac_arch=
14895 ac_prev=
14896 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14897 if test -n "$ac_prev"; then
14898 case $ac_word in
14899 i?86 | x86_64 | ppc | ppc64)
14900 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14901 ac_arch=$ac_word
14902 else
14903 ac_cv_c_bigendian=universal
14904 break
14905 fi
14906 ;;
14907 esac
14908 ac_prev=
14909 elif test "x$ac_word" = "x-arch"; then
14910 ac_prev=arch
14911 fi
14912 done
14913fi
14914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14915 if test $ac_cv_c_bigendian = unknown; then
14916 # See if sys/param.h defines the BYTE_ORDER macro.
14917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922int
14923main ()
14924{
Matthias Kloseb9621712010-04-24 17:59:49 +000014925#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14926 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14927 && LITTLE_ENDIAN)
14928 bogus endian macros
14929 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931 ;
14932 return 0;
14933}
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014936 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014938/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014939#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942int
14943main ()
14944{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014945#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 not big endian
14947 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
14949 ;
14950 return 0;
14951}
14952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014953if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014954 ac_cv_c_bigendian=yes
14955else
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014959fi
14960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14961 fi
14962 if test $ac_cv_c_bigendian = unknown; then
14963 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014965/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014966#include <limits.h>
14967
Martin v. Löwis11437992002-04-12 09:54:03 +000014968int
14969main ()
14970{
Matthias Kloseb9621712010-04-24 17:59:49 +000014971#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14972 bogus endian macros
14973 #endif
14974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ;
14976 return 0;
14977}
14978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014979if ac_fn_c_try_compile "$LINENO"; then :
14980 # It does; now see whether it defined to _BIG_ENDIAN or not.
14981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982/* end confdefs.h. */
14983#include <limits.h>
14984
14985int
14986main ()
14987{
14988#ifndef _BIG_ENDIAN
14989 not big endian
14990 #endif
14991
14992 ;
14993 return 0;
14994}
14995_ACEOF
14996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014998else
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15002fi
15003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15004 fi
15005 if test $ac_cv_c_bigendian = unknown; then
15006 # Compile a test program.
15007 if test "$cross_compiling" = yes; then :
15008 # Try to guess by grepping values from an object file.
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010/* end confdefs.h. */
15011short int ascii_mm[] =
15012 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15013 short int ascii_ii[] =
15014 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15015 int use_ascii (int i) {
15016 return ascii_mm[i] + ascii_ii[i];
15017 }
15018 short int ebcdic_ii[] =
15019 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15020 short int ebcdic_mm[] =
15021 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15022 int use_ebcdic (int i) {
15023 return ebcdic_mm[i] + ebcdic_ii[i];
15024 }
15025 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027int
15028main ()
15029{
15030return use_ascii (foo) == use_ebcdic (foo);
15031 ;
15032 return 0;
15033}
15034_ACEOF
15035if ac_fn_c_try_compile "$LINENO"; then :
15036 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15037 ac_cv_c_bigendian=yes
15038 fi
15039 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15040 if test "$ac_cv_c_bigendian" = unknown; then
15041 ac_cv_c_bigendian=no
15042 else
15043 # finding both strings is unlikely to happen, but who knows?
15044 ac_cv_c_bigendian=unknown
15045 fi
15046 fi
15047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015051/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015053int
15054main ()
15055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 /* Are we little or big endian? From Harbison&Steele. */
15058 union
15059 {
15060 long int l;
15061 char c[sizeof (long int)];
15062 } u;
15063 u.l = 1;
15064 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065
15066 ;
15067 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015068}
Martin v. Löwis11437992002-04-12 09:54:03 +000015069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015071 ac_cv_c_bigendian=no
15072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15082$as_echo "$ac_cv_c_bigendian" >&6; }
15083 case $ac_cv_c_bigendian in #(
15084 yes)
15085 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15086;; #(
15087 no)
15088 ;; #(
15089 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 ;; #(
15094 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015095 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015096 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098
Michael W. Hudson54241132001-12-07 15:38:26 +000015099
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015100# ABI version string for Python extension modules. This appears between the
15101# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15102# from the following attributes which affect the ABI of this Python build (in
15103# this order):
15104#
15105# * The Python implementation (always 'cpython-' for us)
15106# * The major and minor version numbers
15107# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015108#
15109# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015110# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15111# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015112#
15113# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15114# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015115
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15117$as_echo_n "checking ABIFLAGS... " >&6; }
15118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15119$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15121$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015122SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15124$as_echo "$SOABI" >&6; }
15125
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015126# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15127if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015128 # Similar to SOABI but remove "d" flag from ABIFLAGS
15129
15130 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15131
15132cat >>confdefs.h <<_ACEOF
15133#define ALT_SOABI "${ALT_SOABI}"
15134_ACEOF
15135
15136fi
15137
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015138
15139case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015140 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015141 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15142 *)
15143 EXT_SUFFIX=${SHLIB_SUFFIX};;
15144esac
15145
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15147$as_echo_n "checking LDVERSION... " >&6; }
15148LDVERSION='$(VERSION)$(ABIFLAGS)'
15149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15150$as_echo "$LDVERSION" >&6; }
15151
xdegaye254b3092019-04-29 09:27:40 +020015152# On Android the shared libraries must be linked with libpython.
15153
15154if test -z "$ANDROID_API_LEVEL"; then
15155 LIBPYTHON=''
15156else
15157 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
15158fi
15159
doko@python.org87421192013-01-26 11:39:31 +010015160
doko@ubuntu.com55532312016-06-14 08:55:19 +020015161if test x$PLATFORM_TRIPLET = x; then
15162 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15163else
15164 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15165fi
doko@python.org87421192013-01-26 11:39:31 +010015166
15167
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015168# Check whether right shifting a negative integer extends the sign bit
15169# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15171$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015172if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015174else
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015177 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015178else
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015181
15182int main()
15183{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015184 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015185}
15186
Martin v. Löwis11437992002-04-12 09:54:03 +000015187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015188if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015189 ac_cv_rshift_extends_sign=yes
15190else
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015195fi
15196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197fi
15198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15200$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015201if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015202then
Martin v. Löwis11437992002-04-12 09:54:03 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015205
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015206fi
15207
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015208# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15210$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015211if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015213else
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015216/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015217#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015218int
15219main ()
15220{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015221
15222 FILE *f = fopen("/dev/null", "r");
15223 flockfile(f);
15224 getc_unlocked(f);
15225 funlockfile(f);
15226
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 ;
15228 return 0;
15229}
15230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015231if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015232 ac_cv_have_getc_unlocked=yes
15233else
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 ac_cv_have_getc_unlocked=no
15235fi
15236rm -f core conftest.err conftest.$ac_objext \
15237 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15241$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015242if test "$ac_cv_have_getc_unlocked" = yes
15243then
Martin v. Löwis11437992002-04-12 09:54:03 +000015244
Matthias Kloseb9621712010-04-24 17:59:49 +000015245$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015246
15247fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015248
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015249# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015250# save the value of LIBS so we don't actually link Python with readline
15251LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015252
Gregory P. Smith18820942008-09-07 06:24:49 +000015253# On some systems we need to link readline to a termcap compatible
15254# library. NOTE: Keep the precedence of listed libraries synchronised
15255# with setup.py.
15256py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15258$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015259for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015260 if test -z "$py_libtermcap"; then
15261 READLINE_LIBS="-lreadline"
15262 else
15263 READLINE_LIBS="-lreadline -l$py_libtermcap"
15264 fi
15265 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015267/* end confdefs.h. */
15268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269/* Override any GCC internal prototype to avoid an error.
15270 Use char because int might match the return type of a GCC
15271 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015272#ifdef __cplusplus
15273extern "C"
15274#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015275char readline ();
15276int
15277main ()
15278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015280 ;
15281 return 0;
15282}
15283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015285 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015287rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015289 if test $py_cv_lib_readline = yes; then
15290 break
15291 fi
15292done
15293# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15294#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015295if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15297$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015298else
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15300$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015303
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015304fi
15305
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015306# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015308/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015309#include <readline/readline.h>
15310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015311if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015312 have_readline=yes
15313else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015314 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015315
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015316fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015317rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015318if test $have_readline = yes
15319then
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015321/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015322#include <readline/readline.h>
15323
15324_ACEOF
15325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015329
15330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015331rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015334/* end confdefs.h. */
15335#include <readline/readline.h>
15336
15337_ACEOF
15338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015340
Matthias Kloseb9621712010-04-24 17:59:49 +000015341$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015342
15343fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015344rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015345
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015346fi
15347
Martin v. Löwis0daad592001-09-30 21:09:59 +000015348# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15350$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015351if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015355LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359/* Override any GCC internal prototype to avoid an error.
15360 Use char because int might match the return type of a GCC
15361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015362#ifdef __cplusplus
15363extern "C"
15364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015365char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015366int
15367main ()
15368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 ;
15371 return 0;
15372}
15373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015376else
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015379rm -f core conftest.err conftest.$ac_objext \
15380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015381LIBS=$ac_check_lib_save_LIBS
15382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15384$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015385if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015388
Martin v. Löwis0daad592001-09-30 21:09:59 +000015389fi
15390
Michael W. Hudson54241132001-12-07 15:38:26 +000015391
Thomas Wouters89d996e2007-09-08 17:39:28 +000015392# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15394$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015395if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015397else
15398 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015399LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015401/* end confdefs.h. */
15402
15403/* Override any GCC internal prototype to avoid an error.
15404 Use char because int might match the return type of a GCC
15405 builtin and then its argument prototype would still apply. */
15406#ifdef __cplusplus
15407extern "C"
15408#endif
15409char rl_completion_display_matches_hook ();
15410int
15411main ()
15412{
15413return rl_completion_display_matches_hook ();
15414 ;
15415 return 0;
15416}
15417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015418if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015419 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15420else
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015423rm -f core conftest.err conftest.$ac_objext \
15424 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015425LIBS=$ac_check_lib_save_LIBS
15426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15428$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015429if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015432
15433fi
15434
15435
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015436# also in 4.0, but not in editline
15437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15438$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15439if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15440 $as_echo_n "(cached) " >&6
15441else
15442 ac_check_lib_save_LIBS=$LIBS
15443LIBS="-lreadline $READLINE_LIBS $LIBS"
15444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445/* end confdefs.h. */
15446
15447/* Override any GCC internal prototype to avoid an error.
15448 Use char because int might match the return type of a GCC
15449 builtin and then its argument prototype would still apply. */
15450#ifdef __cplusplus
15451extern "C"
15452#endif
15453char rl_resize_terminal ();
15454int
15455main ()
15456{
15457return rl_resize_terminal ();
15458 ;
15459 return 0;
15460}
15461_ACEOF
15462if ac_fn_c_try_link "$LINENO"; then :
15463 ac_cv_lib_readline_rl_resize_terminal=yes
15464else
15465 ac_cv_lib_readline_rl_resize_terminal=no
15466fi
15467rm -f core conftest.err conftest.$ac_objext \
15468 conftest$ac_exeext conftest.$ac_ext
15469LIBS=$ac_check_lib_save_LIBS
15470fi
15471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15472$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15473if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15474
15475$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15476
15477fi
15478
15479
Martin v. Löwis0daad592001-09-30 21:09:59 +000015480# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15482$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015483if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015484 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015485else
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015487LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491/* Override any GCC internal prototype to avoid an error.
15492 Use char because int might match the return type of a GCC
15493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015494#ifdef __cplusplus
15495extern "C"
15496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015497char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015498int
15499main ()
15500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 ;
15503 return 0;
15504}
15505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015506if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015507 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015508else
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015511rm -f core conftest.err conftest.$ac_objext \
15512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015513LIBS=$ac_check_lib_save_LIBS
15514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15516$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015517if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015518
Matthias Kloseb9621712010-04-24 17:59:49 +000015519$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015520
Guido van Rossum353ae582001-07-10 16:45:32 +000015521fi
15522
Jack Jansendd19cf82001-12-06 22:36:17 +000015523
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015524# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015526/* end confdefs.h. */
15527#include <readline/readline.h>
15528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015530 have_readline=yes
15531else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015532 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015533
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015534fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015535rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015536if test $have_readline = yes
15537then
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015539/* end confdefs.h. */
15540#include <readline/readline.h>
15541
15542_ACEOF
15543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015547
15548fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015549rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015550
15551fi
15552
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15554$as_echo_n "checking for append_history in -lreadline... " >&6; }
15555if ${ac_cv_lib_readline_append_history+:} false; then :
15556 $as_echo_n "(cached) " >&6
15557else
15558 ac_check_lib_save_LIBS=$LIBS
15559LIBS="-lreadline $READLINE_LIBS $LIBS"
15560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15561/* end confdefs.h. */
15562
15563/* Override any GCC internal prototype to avoid an error.
15564 Use char because int might match the return type of a GCC
15565 builtin and then its argument prototype would still apply. */
15566#ifdef __cplusplus
15567extern "C"
15568#endif
15569char append_history ();
15570int
15571main ()
15572{
15573return append_history ();
15574 ;
15575 return 0;
15576}
15577_ACEOF
15578if ac_fn_c_try_link "$LINENO"; then :
15579 ac_cv_lib_readline_append_history=yes
15580else
15581 ac_cv_lib_readline_append_history=no
15582fi
15583rm -f core conftest.err conftest.$ac_objext \
15584 conftest$ac_exeext conftest.$ac_ext
15585LIBS=$ac_check_lib_save_LIBS
15586fi
15587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15588$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15589if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15590
15591$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15592
15593fi
15594
15595
Martin v. Löwis82bca632006-02-10 20:49:30 +000015596# End of readline checks: restore LIBS
15597LIBS=$LIBS_no_readline
15598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15600$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015601if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015603else
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015606 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015607else
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015609/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015610
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015611#include <stdlib.h>
15612#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015613int main()
15614{
15615 int val1 = nice(1);
15616 if (val1 != -1 && val1 == nice(2))
15617 exit(0);
15618 exit(1);
15619}
15620
Martin v. Löwis11437992002-04-12 09:54:03 +000015621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015622if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015623 ac_cv_broken_nice=yes
15624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015629fi
15630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631fi
15632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15634$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015635if test "$ac_cv_broken_nice" = yes
15636then
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015639
15640fi
15641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15643$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015644if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015646else
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015648 ac_cv_broken_poll=no
15649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015651/* end confdefs.h. */
15652
15653#include <poll.h>
15654
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015655int main()
15656{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015657 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015658 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659
15660 close (42);
15661
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015662 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015663 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015664 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015666 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015667 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668 return 1;
15669}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015670
15671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015672if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015673 ac_cv_broken_poll=yes
15674else
Matthias Kloseb9621712010-04-24 17:59:49 +000015675 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015681fi
15682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15684$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015685if test "$ac_cv_broken_poll" = yes
15686then
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015689
15690fi
15691
Martin v. Löwis1d459062005-03-14 21:23:33 +000015692# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15694$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015695if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015697else
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015700 ac_cv_working_tzset=no
15701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015703/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015704
15705#include <stdlib.h>
15706#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015707#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015708
15709#if HAVE_TZNAME
15710extern char *tzname[];
15711#endif
15712
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015713int main()
15714{
Brett Cannon18367812003-09-19 00:59:16 +000015715 /* Note that we need to ensure that not only does tzset(3)
15716 do 'something' with localtime, but it works as documented
15717 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015718 This includes making sure that tzname is set properly if
15719 tm->tm_zone does not exist since it is the alternative way
15720 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015721
15722 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015723 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015724 */
15725
Martin v. Löwis1d459062005-03-14 21:23:33 +000015726 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015727 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15728
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015729 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015731 if (localtime(&groundhogday)->tm_hour != 0)
15732 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015733#if HAVE_TZNAME
15734 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15735 if (strcmp(tzname[0], "UTC") ||
15736 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15737 exit(1);
15738#endif
Brett Cannon18367812003-09-19 00:59:16 +000015739
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015740 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015741 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015742 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015743 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015744#if HAVE_TZNAME
15745 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15746 exit(1);
15747#endif
Brett Cannon18367812003-09-19 00:59:16 +000015748
15749 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15750 tzset();
15751 if (localtime(&groundhogday)->tm_hour != 11)
15752 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015753#if HAVE_TZNAME
15754 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15755 exit(1);
15756#endif
15757
15758#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015759 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15760 exit(1);
15761 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15762 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015763#endif
Brett Cannon18367812003-09-19 00:59:16 +000015764
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765 exit(0);
15766}
15767
15768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015769if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015770 ac_cv_working_tzset=yes
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015776fi
15777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778fi
15779
Matthias Kloseb9621712010-04-24 17:59:49 +000015780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15781$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015782if test "$ac_cv_working_tzset" = yes
15783then
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015786
15787fi
15788
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015789# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15791$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015792if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015796/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015797#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015798int
15799main ()
15800{
15801
15802struct stat st;
15803st.st_mtim.tv_nsec = 1;
15804
15805 ;
15806 return 0;
15807}
15808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015810 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015811else
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815fi
15816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15818$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015819if test "$ac_cv_stat_tv_nsec" = yes
15820then
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015823
15824fi
15825
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015826# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15828$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015829if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015831else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015833/* end confdefs.h. */
15834#include <sys/stat.h>
15835int
15836main ()
15837{
15838
15839struct stat st;
15840st.st_mtimespec.tv_nsec = 1;
15841
15842 ;
15843 return 0;
15844}
15845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015846if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015847 ac_cv_stat_tv_nsec2=yes
15848else
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852fi
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15855$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015856if test "$ac_cv_stat_tv_nsec2" = yes
15857then
15858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015860
15861fi
15862
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015863# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015864ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015865if test "$cross_compiling" = no; then
15866 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15867fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015868
15869for ac_header in curses.h ncurses.h
15870do :
15871 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15872ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15874 cat >>confdefs.h <<_ACEOF
15875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15876_ACEOF
15877
15878fi
15879
15880done
15881
15882
15883# On Solaris, term.h requires curses.h
15884for ac_header in term.h
15885do :
15886 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15887#ifdef HAVE_CURSES_H
15888#include <curses.h>
15889#endif
15890
15891"
15892if test "x$ac_cv_header_term_h" = xyes; then :
15893 cat >>confdefs.h <<_ACEOF
15894#define HAVE_TERM_H 1
15895_ACEOF
15896
15897fi
15898
15899done
15900
15901
Jack Jansen666b1e72001-10-31 12:11:48 +000015902# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15904$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015905if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015907else
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015909/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015910#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015911int
15912main ()
15913{
Jack Jansen666b1e72001-10-31 12:11:48 +000015914
15915 int rtn;
15916 rtn = mvwdelch(0,0,0);
15917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918 ;
15919 return 0;
15920}
15921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015922if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015923 ac_cv_mvwdelch_is_expression=yes
15924else
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928fi
15929
Matthias Kloseb9621712010-04-24 17:59:49 +000015930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15931$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015932
15933if test "$ac_cv_mvwdelch_is_expression" = yes
15934then
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015937
15938fi
15939
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015940# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15941# structs since version 5.7. If the macro is defined as zero before including
15942# [n]curses.h, ncurses will expose fields of the structs regardless of the
15943# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15945$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015946if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015950/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015951
15952 #define NCURSES_OPAQUE 0
15953 #include <curses.h>
15954
Martin v. Löwis11437992002-04-12 09:54:03 +000015955int
15956main ()
15957{
Jack Jansen666b1e72001-10-31 12:11:48 +000015958
15959 WINDOW *w;
15960 w->_flags = 0;
15961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ;
15963 return 0;
15964}
15965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015966if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015967 ac_cv_window_has_flags=yes
15968else
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15972fi
15973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15975$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015976
Jack Jansen666b1e72001-10-31 12:11:48 +000015977
15978if test "$ac_cv_window_has_flags" = yes
15979then
Martin v. Löwis11437992002-04-12 09:54:03 +000015980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015982
15983fi
15984
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15986$as_echo_n "checking for is_pad... " >&6; }
15987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15988/* end confdefs.h. */
15989#include <curses.h>
15990int
15991main ()
15992{
15993
15994#ifndef is_pad
15995void *x=is_pad
15996#endif
15997
15998 ;
15999 return 0;
16000}
16001_ACEOF
16002if ac_fn_c_try_compile "$LINENO"; then :
16003
16004$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16005
16006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16007$as_echo "yes" >&6; }
16008else
16009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16010$as_echo "no" >&6; }
16011
16012fi
16013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16014
Matthias Kloseb9621712010-04-24 17:59:49 +000016015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16016$as_echo_n "checking for is_term_resized... " >&6; }
16017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018/* end confdefs.h. */
16019#include <curses.h>
16020int
16021main ()
16022{
16023void *x=is_term_resized
16024 ;
16025 return 0;
16026}
16027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016029
Matthias Kloseb9621712010-04-24 17:59:49 +000016030$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016031
Matthias Kloseb159a552010-04-25 21:00:44 +000016032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016033$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016034else
Matthias Kloseb9621712010-04-24 17:59:49 +000016035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16036$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016037
16038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16042$as_echo_n "checking for resize_term... " >&6; }
16043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016044/* end confdefs.h. */
16045#include <curses.h>
16046int
16047main ()
16048{
16049void *x=resize_term
16050 ;
16051 return 0;
16052}
16053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016054if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016057
Matthias Kloseb159a552010-04-25 21:00:44 +000016058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016059$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016060else
Matthias Kloseb9621712010-04-24 17:59:49 +000016061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16062$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016063
16064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16068$as_echo_n "checking for resizeterm... " >&6; }
16069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016070/* end confdefs.h. */
16071#include <curses.h>
16072int
16073main ()
16074{
16075void *x=resizeterm
16076 ;
16077 return 0;
16078}
16079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016080if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016081
Matthias Kloseb9621712010-04-24 17:59:49 +000016082$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016083
Matthias Kloseb159a552010-04-25 21:00:44 +000016084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016085$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016086else
Matthias Kloseb9621712010-04-24 17:59:49 +000016087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16088$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016089
16090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016092
16093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16094$as_echo_n "checking for immedok... " >&6; }
16095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096/* end confdefs.h. */
16097#include <curses.h>
16098int
16099main ()
16100{
16101
16102#ifndef immedok
16103void *x=immedok
16104#endif
16105
16106 ;
16107 return 0;
16108}
16109_ACEOF
16110if ac_fn_c_try_compile "$LINENO"; then :
16111
16112$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16113
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16115$as_echo "yes" >&6; }
16116else
16117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16118$as_echo "no" >&6; }
16119
16120fi
16121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16122
16123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16124$as_echo_n "checking for syncok... " >&6; }
16125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16126/* end confdefs.h. */
16127#include <curses.h>
16128int
16129main ()
16130{
16131
16132#ifndef syncok
16133void *x=syncok
16134#endif
16135
16136 ;
16137 return 0;
16138}
16139_ACEOF
16140if ac_fn_c_try_compile "$LINENO"; then :
16141
16142$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16143
16144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16145$as_echo "yes" >&6; }
16146else
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16148$as_echo "no" >&6; }
16149
16150fi
16151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16152
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16154$as_echo_n "checking for wchgat... " >&6; }
16155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156/* end confdefs.h. */
16157#include <curses.h>
16158int
16159main ()
16160{
16161
16162#ifndef wchgat
16163void *x=wchgat
16164#endif
16165
16166 ;
16167 return 0;
16168}
16169_ACEOF
16170if ac_fn_c_try_compile "$LINENO"; then :
16171
16172$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16173
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16175$as_echo "yes" >&6; }
16176else
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16178$as_echo "no" >&6; }
16179
16180fi
16181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16182
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16184$as_echo_n "checking for filter... " >&6; }
16185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16186/* end confdefs.h. */
16187#include <curses.h>
16188int
16189main ()
16190{
16191
16192#ifndef filter
16193void *x=filter
16194#endif
16195
16196 ;
16197 return 0;
16198}
16199_ACEOF
16200if ac_fn_c_try_compile "$LINENO"; then :
16201
16202$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16203
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16205$as_echo "yes" >&6; }
16206else
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16208$as_echo "no" >&6; }
16209
16210fi
16211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16212
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16214$as_echo_n "checking for has_key... " >&6; }
16215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16216/* end confdefs.h. */
16217#include <curses.h>
16218int
16219main ()
16220{
16221
16222#ifndef has_key
16223void *x=has_key
16224#endif
16225
16226 ;
16227 return 0;
16228}
16229_ACEOF
16230if ac_fn_c_try_compile "$LINENO"; then :
16231
16232$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16233
16234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16235$as_echo "yes" >&6; }
16236else
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16238$as_echo "no" >&6; }
16239
16240fi
16241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16242
16243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16244$as_echo_n "checking for typeahead... " >&6; }
16245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16246/* end confdefs.h. */
16247#include <curses.h>
16248int
16249main ()
16250{
16251
16252#ifndef typeahead
16253void *x=typeahead
16254#endif
16255
16256 ;
16257 return 0;
16258}
16259_ACEOF
16260if ac_fn_c_try_compile "$LINENO"; then :
16261
16262$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16263
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16265$as_echo "yes" >&6; }
16266else
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16268$as_echo "no" >&6; }
16269
16270fi
16271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16272
16273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16274$as_echo_n "checking for use_env... " >&6; }
16275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276/* end confdefs.h. */
16277#include <curses.h>
16278int
16279main ()
16280{
16281
16282#ifndef use_env
16283void *x=use_env
16284#endif
16285
16286 ;
16287 return 0;
16288}
16289_ACEOF
16290if ac_fn_c_try_compile "$LINENO"; then :
16291
16292$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16293
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16295$as_echo "yes" >&6; }
16296else
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16298$as_echo "no" >&6; }
16299
16300fi
16301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016302# last curses configure check
16303CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16306$as_echo "$as_me: checking for device files" >&6;}
16307
16308if test "x$cross_compiling" = xyes; then
16309 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16311$as_echo_n "checking for /dev/ptmx... " >&6; }
16312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16313$as_echo "not set" >&6; }
16314 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16315 fi
16316 if test "${ac_cv_file__dev_ptc+set}" != set; then
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16318$as_echo_n "checking for /dev/ptc... " >&6; }
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16320$as_echo "not set" >&6; }
16321 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16322 fi
16323fi
16324
Matthias Kloseb9621712010-04-24 17:59:49 +000016325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16326$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016327if ${ac_cv_file__dev_ptmx+:} false; then :
16328 $as_echo_n "(cached) " >&6
16329else
16330 test "$cross_compiling" = yes &&
16331 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16332if test -r "/dev/ptmx"; then
16333 ac_cv_file__dev_ptmx=yes
16334else
16335 ac_cv_file__dev_ptmx=no
16336fi
16337fi
16338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16339$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16340if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016341
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016342fi
16343
16344if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016345
Matthias Kloseb9621712010-04-24 17:59:49 +000016346$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016347
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16350$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016351if ${ac_cv_file__dev_ptc+:} false; then :
16352 $as_echo_n "(cached) " >&6
16353else
16354 test "$cross_compiling" = yes &&
16355 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16356if test -r "/dev/ptc"; then
16357 ac_cv_file__dev_ptc=yes
16358else
16359 ac_cv_file__dev_ptc=no
16360fi
16361fi
16362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16363$as_echo "$ac_cv_file__dev_ptc" >&6; }
16364if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016365
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016366fi
16367
16368if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016369
Matthias Kloseb9621712010-04-24 17:59:49 +000016370$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016371
Neal Norwitz865400f2003-03-21 01:42:58 +000016372fi
16373
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016374if test $ac_sys_system = Darwin
16375then
16376 LIBS="$LIBS -framework CoreFoundation"
16377fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016378
Matthias Kloseb9621712010-04-24 17:59:49 +000016379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16380$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016381if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016383else
Matthias Kloseb9621712010-04-24 17:59:49 +000016384 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016385 ac_cv_have_size_t_format="cross -- assuming yes"
16386
Thomas Wouters477c8d52006-05-27 19:21:47 +000016387else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016389/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016390
Thomas Wouters477c8d52006-05-27 19:21:47 +000016391#include <stdio.h>
16392#include <stddef.h>
16393#include <string.h>
16394
Christian Heimes2c181612007-12-17 20:04:13 +000016395#ifdef HAVE_SYS_TYPES_H
16396#include <sys/types.h>
16397#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016398
16399#ifdef HAVE_SSIZE_T
16400typedef ssize_t Py_ssize_t;
16401#elif SIZEOF_VOID_P == SIZEOF_LONG
16402typedef long Py_ssize_t;
16403#else
16404typedef int Py_ssize_t;
16405#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016406
Christian Heimes2c181612007-12-17 20:04:13 +000016407int main()
16408{
16409 char buffer[256];
16410
Thomas Wouters477c8d52006-05-27 19:21:47 +000016411 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16412 return 1;
16413
Thomas Wouters89f507f2006-12-13 04:49:30 +000016414 if (strcmp(buffer, "123"))
16415 return 1;
16416
16417 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16418 return 1;
16419
16420 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016421 return 1;
16422
16423 return 0;
16424}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016425
Thomas Wouters477c8d52006-05-27 19:21:47 +000016426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016427if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016428 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016429else
Matthias Kloseb9621712010-04-24 17:59:49 +000016430 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16433 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016434fi
16435
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16438$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016439if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016440
Matthias Kloseb9621712010-04-24 17:59:49 +000016441$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016442
16443fi
16444
Matthias Kloseb9621712010-04-24 17:59:49 +000016445ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016446#ifdef HAVE_SYS_TYPES_H
16447#include <sys/types.h>
16448#endif
16449#ifdef HAVE_SYS_SOCKET_H
16450#include <sys/socket.h>
16451#endif
16452
Matthias Kloseb9621712010-04-24 17:59:49 +000016453"
Victor Stinnere0be4232011-10-25 13:06:09 +020016454if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016455
Martin v. Löwis11437992002-04-12 09:54:03 +000016456else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016457
Matthias Kloseb9621712010-04-24 17:59:49 +000016458$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016459
16460fi
16461
Michael W. Hudson54241132001-12-07 15:38:26 +000016462
Matthias Kloseb9621712010-04-24 17:59:49 +000016463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16464$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016465if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016467else
Matthias Kloseb9621712010-04-24 17:59:49 +000016468 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016469 ac_cv_broken_mbstowcs=no
16470else
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016472/* end confdefs.h. */
16473
Stefan Krah19c21392012-11-22 23:47:32 +010016474#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016475#include<stdlib.h>
16476int main() {
16477 size_t len = -1;
16478 const char *str = "text";
16479 len = mbstowcs(NULL, str, 0);
16480 return (len != 4);
16481}
16482
16483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016484if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016485 ac_cv_broken_mbstowcs=no
16486else
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016491fi
16492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016493fi
16494
Matthias Kloseb9621712010-04-24 17:59:49 +000016495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16496$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016497if test "$ac_cv_broken_mbstowcs" = yes
16498then
16499
Matthias Kloseb9621712010-04-24 17:59:49 +000016500$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016501
16502fi
16503
Antoine Pitroub52ec782009-01-25 16:34:23 +000016504# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16506$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016507
16508# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016509if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016510 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016511if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016512then
16513
Matthias Kloseb9621712010-04-24 17:59:49 +000016514$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016515
Matthias Kloseb9621712010-04-24 17:59:49 +000016516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16517$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016518fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016519if test "$withval" = no
16520then
16521
16522$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16523
Matthias Kloseb9621712010-04-24 17:59:49 +000016524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016526fi
16527
Antoine Pitrou042b1282010-08-13 21:15:58 +000016528else
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16530$as_echo "no value specified" >&6; }
16531fi
16532
Antoine Pitroub52ec782009-01-25 16:34:23 +000016533
Matthias Kloseb17289e2012-03-15 19:51:34 +010016534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16535$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16536if ${ac_cv_computed_gotos+:} false; then :
16537 $as_echo_n "(cached) " >&6
16538else
16539 if test "$cross_compiling" = yes; then :
16540 if test "${with_computed_gotos+set}" = set; then
16541 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16542 else
16543 ac_cv_computed_gotos=no
16544 fi
16545else
16546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16547/* end confdefs.h. */
16548
16549int main(int argc, char **argv)
16550{
16551 static void *targets[1] = { &&LABEL1 };
16552 goto LABEL2;
16553LABEL1:
16554 return 0;
16555LABEL2:
16556 goto *targets[0];
16557 return 1;
16558}
16559
16560_ACEOF
16561if ac_fn_c_try_run "$LINENO"; then :
16562 ac_cv_computed_gotos=yes
16563else
16564 ac_cv_computed_gotos=no
16565fi
16566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16567 conftest.$ac_objext conftest.beam conftest.$ac_ext
16568fi
16569
16570fi
16571
16572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16573$as_echo "$ac_cv_computed_gotos" >&6; }
16574case "$ac_cv_computed_gotos" in yes*)
16575
16576$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16577
16578esac
16579
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016580case $ac_sys_system in
16581AIX*)
16582
16583$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16584 ;;
16585esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016586
Michael W. Hudson54241132001-12-07 15:38:26 +000016587
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016588
16589
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016590for h in `(cd $srcdir;echo Python/thread_*.h)`
16591do
16592 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16593done
16594
Michael W. Hudson54241132001-12-07 15:38:26 +000016595
Victor Stinner21a74a92019-04-11 22:28:12 +020016596SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16598$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016599for dir in $SRCDIRS; do
16600 if test ! -d $dir; then
16601 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016602 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016603done
Matthias Kloseb9621712010-04-24 17:59:49 +000016604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16605$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016606
Stefan Krah1919b7e2012-03-21 18:25:23 +010016607# Availability of -O2:
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16609$as_echo_n "checking for -O2... " >&6; }
16610saved_cflags="$CFLAGS"
16611CFLAGS="-O2"
16612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613/* end confdefs.h. */
16614
16615int
16616main ()
16617{
16618
16619
16620 ;
16621 return 0;
16622}
16623_ACEOF
16624if ac_fn_c_try_compile "$LINENO"; then :
16625 have_O2=yes
16626else
16627 have_O2=no
16628fi
16629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16631$as_echo "$have_O2" >&6; }
16632CFLAGS="$saved_cflags"
16633
16634# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16635# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16637$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16638saved_cflags="$CFLAGS"
16639CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16640if test "$have_O2" = no; then
16641 CFLAGS=""
16642fi
16643if test "$cross_compiling" = yes; then :
16644 have_glibc_memmove_bug=undefined
16645else
16646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16647/* end confdefs.h. */
16648
16649#include <stdio.h>
16650#include <stdlib.h>
16651#include <string.h>
16652void foo(void *p, void *q) { memmove(p, q, 19); }
16653int main() {
16654 char a[32] = "123456789000000000";
16655 foo(&a[9], a);
16656 if (strcmp(a, "123456789123456789000000000") != 0)
16657 return 1;
16658 foo(a, &a[9]);
16659 if (strcmp(a, "123456789000000000") != 0)
16660 return 1;
16661 return 0;
16662}
16663
16664_ACEOF
16665if ac_fn_c_try_run "$LINENO"; then :
16666 have_glibc_memmove_bug=no
16667else
16668 have_glibc_memmove_bug=yes
16669fi
16670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16671 conftest.$ac_objext conftest.beam conftest.$ac_ext
16672fi
16673
16674CFLAGS="$saved_cflags"
16675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16676$as_echo "$have_glibc_memmove_bug" >&6; }
16677if test "$have_glibc_memmove_bug" = yes; then
16678
16679$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16680
16681fi
16682
16683if test "$have_gcc_asm_for_x87" = yes; then
16684 # Some versions of gcc miscompile inline asm:
16685 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16686 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16687 case $CC in
16688 *gcc*)
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16690$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16691 saved_cflags="$CFLAGS"
16692 CFLAGS="-O2"
16693 if test "$cross_compiling" = yes; then :
16694 have_ipa_pure_const_bug=undefined
16695else
16696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16697/* end confdefs.h. */
16698
16699 __attribute__((noinline)) int
16700 foo(int *p) {
16701 int r;
16702 asm ( "movl \$6, (%1)\n\t"
16703 "xorl %0, %0\n\t"
16704 : "=r" (r) : "r" (p) : "memory"
16705 );
16706 return r;
16707 }
16708 int main() {
16709 int p = 8;
16710 if ((foo(&p) ? : p) != 6)
16711 return 1;
16712 return 0;
16713 }
16714
16715_ACEOF
16716if ac_fn_c_try_run "$LINENO"; then :
16717 have_ipa_pure_const_bug=no
16718else
16719 have_ipa_pure_const_bug=yes
16720fi
16721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16722 conftest.$ac_objext conftest.beam conftest.$ac_ext
16723fi
16724
16725 CFLAGS="$saved_cflags"
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16727$as_echo "$have_ipa_pure_const_bug" >&6; }
16728 if test "$have_ipa_pure_const_bug" = yes; then
16729
16730$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16731
16732 fi
16733 ;;
16734 esac
16735fi
16736
Victor Stinner4f5366e2015-01-09 02:13:19 +010016737# Check for stdatomic.h
16738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16739$as_echo_n "checking for stdatomic.h... " >&6; }
16740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16741/* end confdefs.h. */
16742
16743
16744 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016745 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016746 int main() {
16747 int loaded_value = atomic_load(&value);
16748 return 0;
16749 }
16750
16751
16752_ACEOF
16753if ac_fn_c_try_link "$LINENO"; then :
16754 have_stdatomic_h=yes
16755else
16756 have_stdatomic_h=no
16757fi
16758rm -f core conftest.err conftest.$ac_objext \
16759 conftest$ac_exeext conftest.$ac_ext
16760
16761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16762$as_echo "$have_stdatomic_h" >&6; }
16763
16764if test "$have_stdatomic_h" = yes; then
16765
16766$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16767
16768fi
16769
16770# Check for GCC >= 4.7 __atomic builtins
16771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16772$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774/* end confdefs.h. */
16775
16776
16777 volatile int val = 1;
16778 int main() {
16779 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16780 return 0;
16781 }
16782
16783
16784_ACEOF
16785if ac_fn_c_try_link "$LINENO"; then :
16786 have_builtin_atomic=yes
16787else
16788 have_builtin_atomic=no
16789fi
16790rm -f core conftest.err conftest.$ac_objext \
16791 conftest$ac_exeext conftest.$ac_ext
16792
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16794$as_echo "$have_builtin_atomic" >&6; }
16795
16796if test "$have_builtin_atomic" = yes; then
16797
16798$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16799
16800fi
16801
Ned Deily322f5ba2013-11-21 23:01:59 -080016802# ensurepip option
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16804$as_echo_n "checking for ensurepip... " >&6; }
16805
16806# Check whether --with-ensurepip was given.
16807if test "${with_ensurepip+set}" = set; then :
16808 withval=$with_ensurepip;
16809else
16810 with_ensurepip=upgrade
16811fi
16812
16813case $with_ensurepip in #(
16814 yes|upgrade) :
16815 ENSUREPIP=upgrade ;; #(
16816 install) :
16817 ENSUREPIP=install ;; #(
16818 no) :
16819 ENSUREPIP=no ;; #(
16820 *) :
16821 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16822esac
16823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16824$as_echo "$ENSUREPIP" >&6; }
16825
16826
Victor Stinner35a97c02015-03-08 02:59:09 +010016827# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16829$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16831/* end confdefs.h. */
16832
16833
16834 #include <dirent.h>
16835
16836 int main() {
16837 struct dirent entry;
16838 return entry.d_type == DT_UNKNOWN;
16839 }
16840
16841
16842_ACEOF
16843if ac_fn_c_try_link "$LINENO"; then :
16844 have_dirent_d_type=yes
16845else
16846 have_dirent_d_type=no
16847fi
16848rm -f core conftest.err conftest.$ac_objext \
16849 conftest$ac_exeext conftest.$ac_ext
16850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16851$as_echo "$have_dirent_d_type" >&6; }
16852
16853if test "$have_dirent_d_type" = yes; then
16854
16855$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16856
16857fi
16858
Victor Stinner9eb57c52015-03-19 22:21:49 +010016859# check if the Linux getrandom() syscall is available
16860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16861$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16863/* end confdefs.h. */
16864
16865
Victor Stinner1b80b242016-04-12 22:34:58 +020016866 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016867 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016868 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016869
16870 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016871 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016872 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016873 const int flags = GRND_NONBLOCK;
16874 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016875 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016876 return 0;
16877 }
16878
16879
16880_ACEOF
16881if ac_fn_c_try_link "$LINENO"; then :
16882 have_getrandom_syscall=yes
16883else
16884 have_getrandom_syscall=no
16885fi
16886rm -f core conftest.err conftest.$ac_objext \
16887 conftest$ac_exeext conftest.$ac_ext
16888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16889$as_echo "$have_getrandom_syscall" >&6; }
16890
16891if test "$have_getrandom_syscall" = yes; then
16892
16893$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16894
16895fi
16896
Victor Stinner3abf44e2015-09-18 15:38:37 +020016897# check if the getrandom() function is available
16898# the test was written for the Solaris function of <sys/random.h>
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16900$as_echo_n "checking for the getrandom() function... " >&6; }
16901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902/* end confdefs.h. */
16903
16904
16905 #include <sys/random.h>
16906
16907 int main() {
16908 char buffer[1];
16909 const size_t buflen = sizeof(buffer);
16910 const int flags = 0;
16911 /* ignore the result, Python checks for ENOSYS at runtime */
16912 (void)getrandom(buffer, buflen, flags);
16913 return 0;
16914 }
16915
16916
16917_ACEOF
16918if ac_fn_c_try_link "$LINENO"; then :
16919 have_getrandom=yes
16920else
16921 have_getrandom=no
16922fi
16923rm -f core conftest.err conftest.$ac_objext \
16924 conftest$ac_exeext conftest.$ac_ext
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16926$as_echo "$have_getrandom" >&6; }
16927
16928if test "$have_getrandom" = yes; then
16929
16930$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16931
16932fi
16933
Neil Schemenauer5741c452019-02-08 10:48:46 -080016934# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16935# shm_* may only be available if linking against librt
16936save_LIBS="$LIBS"
16937save_includes_default="$ac_includes_default"
16938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16939$as_echo_n "checking for library containing shm_open... " >&6; }
16940if ${ac_cv_search_shm_open+:} false; then :
16941 $as_echo_n "(cached) " >&6
16942else
16943 ac_func_search_save_LIBS=$LIBS
16944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16945/* end confdefs.h. */
16946
16947/* Override any GCC internal prototype to avoid an error.
16948 Use char because int might match the return type of a GCC
16949 builtin and then its argument prototype would still apply. */
16950#ifdef __cplusplus
16951extern "C"
16952#endif
16953char shm_open ();
16954int
16955main ()
16956{
16957return shm_open ();
16958 ;
16959 return 0;
16960}
16961_ACEOF
16962for ac_lib in '' rt; do
16963 if test -z "$ac_lib"; then
16964 ac_res="none required"
16965 else
16966 ac_res=-l$ac_lib
16967 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16968 fi
16969 if ac_fn_c_try_link "$LINENO"; then :
16970 ac_cv_search_shm_open=$ac_res
16971fi
16972rm -f core conftest.err conftest.$ac_objext \
16973 conftest$ac_exeext
16974 if ${ac_cv_search_shm_open+:} false; then :
16975 break
16976fi
16977done
16978if ${ac_cv_search_shm_open+:} false; then :
16979
16980else
16981 ac_cv_search_shm_open=no
16982fi
16983rm conftest.$ac_ext
16984LIBS=$ac_func_search_save_LIBS
16985fi
16986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16987$as_echo "$ac_cv_search_shm_open" >&6; }
16988ac_res=$ac_cv_search_shm_open
16989if test "$ac_res" != no; then :
16990 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16991
16992fi
16993
16994if test "$ac_cv_search_shm_open" = "-lrt"; then
16995
16996$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16997
16998fi
16999for ac_header in sys/mman.h
17000do :
17001 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17002if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17003 cat >>confdefs.h <<_ACEOF
17004#define HAVE_SYS_MMAN_H 1
17005_ACEOF
17006
17007fi
17008
17009done
17010
17011# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17012ac_includes_default="\
17013${ac_includes_default}
17014#ifndef __cplusplus
17015# ifdef HAVE_SYS_MMAN_H
17016# include <sys/mman.h>
17017# endif
17018#endif
17019"
17020for ac_func in shm_open shm_unlink
17021do :
17022 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17023ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17024if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17025 cat >>confdefs.h <<_ACEOF
17026#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17027_ACEOF
17028
17029fi
17030done
17031
17032# we don't want to link with librt always, restore LIBS
17033LIBS="$save_LIBS"
17034ac_includes_default="$save_includes_default"
17035
Christian Heimesff5be6e2018-01-20 13:19:21 +010017036# Check for usable OpenSSL
17037
17038 found=false
17039
17040# Check whether --with-openssl was given.
17041if test "${with_openssl+set}" = set; then :
17042 withval=$with_openssl;
17043 case "$withval" in
17044 "" | y | ye | yes | n | no)
17045 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17046 ;;
17047 *) ssldirs="$withval"
17048 ;;
17049 esac
17050
17051else
17052
17053 # if pkg-config is installed and openssl has installed a .pc file,
17054 # then use that information and don't search ssldirs
17055 if test -n "$ac_tool_prefix"; then
17056 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17057set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17059$as_echo_n "checking for $ac_word... " >&6; }
17060if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17061 $as_echo_n "(cached) " >&6
17062else
17063 if test -n "$PKG_CONFIG"; then
17064 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17065else
17066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17067for as_dir in $PATH
17068do
17069 IFS=$as_save_IFS
17070 test -z "$as_dir" && as_dir=.
17071 for ac_exec_ext in '' $ac_executable_extensions; do
17072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17073 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17075 break 2
17076 fi
17077done
17078 done
17079IFS=$as_save_IFS
17080
17081fi
17082fi
17083PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17084if test -n "$PKG_CONFIG"; then
17085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17086$as_echo "$PKG_CONFIG" >&6; }
17087else
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17089$as_echo "no" >&6; }
17090fi
17091
17092
17093fi
17094if test -z "$ac_cv_prog_PKG_CONFIG"; then
17095 ac_ct_PKG_CONFIG=$PKG_CONFIG
17096 # Extract the first word of "pkg-config", so it can be a program name with args.
17097set dummy pkg-config; ac_word=$2
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17099$as_echo_n "checking for $ac_word... " >&6; }
17100if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17101 $as_echo_n "(cached) " >&6
17102else
17103 if test -n "$ac_ct_PKG_CONFIG"; then
17104 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17105else
17106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $PATH
17108do
17109 IFS=$as_save_IFS
17110 test -z "$as_dir" && as_dir=.
17111 for ac_exec_ext in '' $ac_executable_extensions; do
17112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115 break 2
17116 fi
17117done
17118 done
17119IFS=$as_save_IFS
17120
17121fi
17122fi
17123ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17124if test -n "$ac_ct_PKG_CONFIG"; then
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17126$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17127else
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17129$as_echo "no" >&6; }
17130fi
17131
17132 if test "x$ac_ct_PKG_CONFIG" = x; then
17133 PKG_CONFIG=""
17134 else
17135 case $cross_compiling:$ac_tool_warned in
17136yes:)
17137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17139ac_tool_warned=yes ;;
17140esac
17141 PKG_CONFIG=$ac_ct_PKG_CONFIG
17142 fi
17143else
17144 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17145fi
17146
17147 if test x"$PKG_CONFIG" != x""; then
17148 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17149 if test $? = 0; then
17150 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17151 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17152 found=true
17153 fi
17154 fi
17155
17156 # no such luck; use some default ssldirs
17157 if ! $found; then
17158 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17159 fi
17160
17161
17162fi
17163
17164
17165
17166 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17167 # an 'openssl' subdirectory
17168
17169 if ! $found; then
17170 OPENSSL_INCLUDES=
17171 for ssldir in $ssldirs; do
17172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17173$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17174 if test -f "$ssldir/include/openssl/ssl.h"; then
17175 OPENSSL_INCLUDES="-I$ssldir/include"
17176 OPENSSL_LDFLAGS="-L$ssldir/lib"
17177 OPENSSL_LIBS="-lssl -lcrypto"
17178 found=true
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17180$as_echo "yes" >&6; }
17181 break
17182 else
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17184$as_echo "no" >&6; }
17185 fi
17186 done
17187
17188 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17189 # it will just work!
17190 fi
17191
17192 # try the preprocessor and linker with our new flags,
17193 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17194
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17196$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17197 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17198 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17199
17200 save_LIBS="$LIBS"
17201 save_LDFLAGS="$LDFLAGS"
17202 save_CPPFLAGS="$CPPFLAGS"
17203 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17204 LIBS="$OPENSSL_LIBS $LIBS"
17205 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17207/* end confdefs.h. */
17208#include <openssl/ssl.h>
17209int
17210main ()
17211{
17212SSL_new(NULL)
17213 ;
17214 return 0;
17215}
17216_ACEOF
17217if ac_fn_c_try_link "$LINENO"; then :
17218
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17220$as_echo "yes" >&6; }
17221 have_openssl=yes
17222
17223else
17224
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17226$as_echo "no" >&6; }
17227 have_openssl=no
17228
17229fi
17230rm -f core conftest.err conftest.$ac_objext \
17231 conftest$ac_exeext conftest.$ac_ext
17232 CPPFLAGS="$save_CPPFLAGS"
17233 LDFLAGS="$save_LDFLAGS"
17234 LIBS="$save_LIBS"
17235
17236
17237
17238
17239
17240
17241if test "$have_openssl" = yes; then
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17243$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17244
17245 save_LIBS="$LIBS"
17246 save_LDFLAGS="$LDFLAGS"
17247 save_CPPFLAGS="$CPPFLAGS"
17248 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17249 LIBS="$OPENSSL_LIBS $LIBS"
17250 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17251
17252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17253/* end confdefs.h. */
17254
17255 #include <openssl/x509_vfy.h>
17256
17257int
17258main ()
17259{
17260
17261 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17262 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17263 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17264 X509_VERIFY_PARAM_set_hostflags(p, 0);
17265
17266 ;
17267 return 0;
17268}
17269
17270_ACEOF
17271if ac_fn_c_try_link "$LINENO"; then :
17272
17273 ac_cv_has_x509_verify_param_set1_host=yes
17274
17275else
17276
17277 ac_cv_has_x509_verify_param_set1_host=no
17278
17279fi
17280rm -f core conftest.err conftest.$ac_objext \
17281 conftest$ac_exeext conftest.$ac_ext
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17283$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17284 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17285
17286$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17287
17288 fi
17289
17290 CPPFLAGS="$save_CPPFLAGS"
17291 LDFLAGS="$save_LDFLAGS"
17292 LIBS="$save_LIBS"
17293fi
17294
Christian Heimes892d66e2018-01-29 14:10:18 +010017295# ssl module default cipher suite string
17296
17297
17298
17299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17300$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17301
17302# Check whether --with-ssl-default-suites was given.
17303if test "${with_ssl_default_suites+set}" = set; then :
17304 withval=$with_ssl_default_suites;
17305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17306$as_echo "$withval" >&6; }
17307case "$withval" in
17308 python)
17309 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17310
17311 ;;
17312 openssl)
17313 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17314
17315 ;;
17316 *)
17317 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17318
17319 cat >>confdefs.h <<_ACEOF
17320#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17321_ACEOF
17322
17323 ;;
17324esac
17325
17326else
17327
17328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17329$as_echo "python" >&6; }
17330$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17331
17332
17333fi
17334
17335
17336
Guido van Rossum627b2d71993-12-24 10:39:16 +000017337# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017338ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017339
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017340ac_config_files="$ac_config_files Modules/ld_so_aix"
17341
Martin v. Löwis11437992002-04-12 09:54:03 +000017342cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017343# This file is a shell script that caches the results of configure
17344# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017345# scripts and configure runs, see configure's option --config-cache.
17346# It is not useful on other systems. If it contains results you don't
17347# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017348#
Martin v. Löwis11437992002-04-12 09:54:03 +000017349# config.status only pays attention to the cache file if you give it
17350# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017351#
Skip Montanaro6dead952003-09-25 14:50:04 +000017352# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017353# loading this file, other *unset* `ac_cv_foo' will be assigned the
17354# following values.
17355
17356_ACEOF
17357
Guido van Rossumf78abae1997-01-21 22:02:36 +000017358# The following way of writing the cache mishandles newlines in values,
17359# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017361# Ultrix sh set writes to stderr and can't be redirected directly,
17362# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363(
17364 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17365 eval ac_val=\$$ac_var
17366 case $ac_val in #(
17367 *${as_nl}*)
17368 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17370$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 esac
17372 case $ac_var in #(
17373 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17375 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 esac ;;
17377 esac
17378 done
17379
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17382 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017383 # `set' does not quote correctly, so add quotes: double-quote
17384 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017386 "s/'/'\\\\''/g;
17387 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 *)
17390 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 esac |
17394 sort
17395) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17401 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17403 :end' >>confcache
17404if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17405 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017406 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17408$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017409 if test ! -f "$cache_file" || test -h "$cache_file"; then
17410 cat confcache >"$cache_file"
17411 else
17412 case $cache_file in #(
17413 */* | ?:*)
17414 mv -f confcache "$cache_file"$$ &&
17415 mv -f "$cache_file"$$ "$cache_file" ;; #(
17416 *)
17417 mv -f confcache "$cache_file" ;;
17418 esac
17419 fi
17420 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017421 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017422 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17423$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017424 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017425fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017426rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017428test "x$prefix" = xNONE && prefix=$ac_default_prefix
17429# Let make expand exec_prefix.
17430test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017431
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017432DEFS=-DHAVE_CONFIG_H
17433
Skip Montanaro6dead952003-09-25 14:50:04 +000017434ac_libobjs=
17435ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017436U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017437for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17438 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17442 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17444 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017445done
17446LIBOBJS=$ac_libobjs
17447
17448LTLIBOBJS=$ac_ltlibobjs
17449
17450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451
Matthias Kloseb9621712010-04-24 17:59:49 +000017452
Victor Stinnere0be4232011-10-25 13:06:09 +020017453: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017454ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017455ac_clean_files_save=$ac_clean_files
17456ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017457{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17458$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17459as_write_fail=0
17460cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017461#! $SHELL
17462# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017463# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017464# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017465# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017466
Martin v. Löwis11437992002-04-12 09:54:03 +000017467debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017468ac_cs_recheck=false
17469ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017470
Matthias Kloseb9621712010-04-24 17:59:49 +000017471SHELL=\${CONFIG_SHELL-$SHELL}
17472export SHELL
17473_ASEOF
17474cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17475## -------------------- ##
17476## M4sh Initialization. ##
17477## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479# Be more Bourne compatible
17480DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017481if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 emulate sh
17483 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017484 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017485 # is contrary to our usage. Disable this feature.
17486 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017488else
Matthias Kloseb9621712010-04-24 17:59:49 +000017489 case `(set -o) 2>/dev/null` in #(
17490 *posix*) :
17491 set -o posix ;; #(
17492 *) :
17493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017495fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017496
17497
Matthias Kloseb9621712010-04-24 17:59:49 +000017498as_nl='
17499'
17500export as_nl
17501# Printing a long string crashes Solaris 7 /usr/bin/printf.
17502as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17503as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17504as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17505# Prefer a ksh shell builtin over an external printf program on Solaris,
17506# but without wasting forks for bash or zsh.
17507if test -z "$BASH_VERSION$ZSH_VERSION" \
17508 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17509 as_echo='print -r --'
17510 as_echo_n='print -rn --'
17511elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17512 as_echo='printf %s\n'
17513 as_echo_n='printf %s'
17514else
17515 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17516 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17517 as_echo_n='/usr/ucb/echo -n'
17518 else
17519 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17520 as_echo_n_body='eval
17521 arg=$1;
17522 case $arg in #(
17523 *"$as_nl"*)
17524 expr "X$arg" : "X\\(.*\\)$as_nl";
17525 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17526 esac;
17527 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17528 '
17529 export as_echo_n_body
17530 as_echo_n='sh -c $as_echo_n_body as_echo'
17531 fi
17532 export as_echo_body
17533 as_echo='sh -c $as_echo_body as_echo'
17534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017535
17536# The user is always right.
17537if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017538 PATH_SEPARATOR=:
17539 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17540 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17541 PATH_SEPARATOR=';'
17542 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545
17546# IFS
17547# We need space, tab and new line, in precisely that order. Quoting is
17548# there to prevent editors from complaining about space-tab.
17549# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17550# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551IFS=" "" $as_nl"
17552
17553# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017554as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017555case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556 *[\\/]* ) as_myself=$0 ;;
17557 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017558for as_dir in $PATH
17559do
17560 IFS=$as_save_IFS
17561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566 ;;
17567esac
17568# We did not find ourselves, most probably we were run as `sh COMMAND'
17569# in which case we are not to be found in the path.
17570if test "x$as_myself" = x; then
17571 as_myself=$0
17572fi
17573if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17575 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576fi
17577
Matthias Kloseb9621712010-04-24 17:59:49 +000017578# Unset variables that we do not need and which cause bugs (e.g. in
17579# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17580# suppresses any "Segmentation fault" message there. '((' could
17581# trigger a bug in pdksh 5.2.14.
17582for as_var in BASH_ENV ENV MAIL MAILPATH
17583do eval test x\${$as_var+set} = xset \
17584 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585done
17586PS1='$ '
17587PS2='> '
17588PS4='+ '
17589
17590# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017591LC_ALL=C
17592export LC_ALL
17593LANGUAGE=C
17594export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595
Matthias Kloseb9621712010-04-24 17:59:49 +000017596# CDPATH.
17597(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17598
17599
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017600# as_fn_error STATUS ERROR [LINENO LOG_FD]
17601# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017602# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17603# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017605as_fn_error ()
17606{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017607 as_status=$1; test $as_status -eq 0 && as_status=1
17608 if test "$4"; then
17609 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17610 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017613 as_fn_exit $as_status
17614} # as_fn_error
17615
17616
17617# as_fn_set_status STATUS
17618# -----------------------
17619# Set $? to STATUS, without forking.
17620as_fn_set_status ()
17621{
17622 return $1
17623} # as_fn_set_status
17624
17625# as_fn_exit STATUS
17626# -----------------
17627# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17628as_fn_exit ()
17629{
17630 set +e
17631 as_fn_set_status $1
17632 exit $1
17633} # as_fn_exit
17634
17635# as_fn_unset VAR
17636# ---------------
17637# Portably unset VAR.
17638as_fn_unset ()
17639{
17640 { eval $1=; unset $1;}
17641}
17642as_unset=as_fn_unset
17643# as_fn_append VAR VALUE
17644# ----------------------
17645# Append the text in VALUE to the end of the definition contained in VAR. Take
17646# advantage of any shell optimizations that allow amortized linear growth over
17647# repeated appends, instead of the typical quadratic growth present in naive
17648# implementations.
17649if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17650 eval 'as_fn_append ()
17651 {
17652 eval $1+=\$2
17653 }'
17654else
17655 as_fn_append ()
17656 {
17657 eval $1=\$$1\$2
17658 }
17659fi # as_fn_append
17660
17661# as_fn_arith ARG...
17662# ------------------
17663# Perform arithmetic evaluation on the ARGs, and store the result in the
17664# global $as_val. Take advantage of shells that can avoid forks. The arguments
17665# must be portable across $(()) and expr.
17666if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17667 eval 'as_fn_arith ()
17668 {
17669 as_val=$(( $* ))
17670 }'
17671else
17672 as_fn_arith ()
17673 {
17674 as_val=`expr "$@" || test $? -eq 1`
17675 }
17676fi # as_fn_arith
17677
17678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679if expr a : '\(a\)' >/dev/null 2>&1 &&
17680 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17681 as_expr=expr
17682else
17683 as_expr=false
17684fi
17685
17686if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17687 as_basename=basename
17688else
17689 as_basename=false
17690fi
17691
Matthias Kloseb9621712010-04-24 17:59:49 +000017692if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17693 as_dirname=dirname
17694else
17695 as_dirname=false
17696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698as_me=`$as_basename -- "$0" ||
17699$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17700 X"$0" : 'X\(//\)$' \| \
17701 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017702$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 sed '/^.*\/\([^/][^/]*\)\/*$/{
17704 s//\1/
17705 q
17706 }
17707 /^X\/\(\/\/\)$/{
17708 s//\1/
17709 q
17710 }
17711 /^X\/\(\/\).*/{
17712 s//\1/
17713 q
17714 }
17715 s/.*/./; q'`
17716
Matthias Kloseb9621712010-04-24 17:59:49 +000017717# Avoid depending upon Character Ranges.
17718as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17719as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17720as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17721as_cr_digits='0123456789'
17722as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723
17724ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017725case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017727 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017729 xy) ECHO_C='\c';;
17730 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17731 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732 esac;;
17733*)
17734 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017736
Martin v. Löwis11437992002-04-12 09:54:03 +000017737rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738if test -d conf$$.dir; then
17739 rm -f conf$$.dir/conf$$.file
17740else
17741 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017744if (echo >conf$$.file) 2>/dev/null; then
17745 if ln -s conf$$.file conf$$ 2>/dev/null; then
17746 as_ln_s='ln -s'
17747 # ... but there are two gotchas:
17748 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17749 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017750 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017752 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 elif ln conf$$.file conf$$ 2>/dev/null; then
17754 as_ln_s=ln
17755 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017756 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017758else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017759 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17762rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017763
Matthias Kloseb9621712010-04-24 17:59:49 +000017764
17765# as_fn_mkdir_p
17766# -------------
17767# Create "$as_dir" as a directory, including parents if necessary.
17768as_fn_mkdir_p ()
17769{
17770
17771 case $as_dir in #(
17772 -*) as_dir=./$as_dir;;
17773 esac
17774 test -d "$as_dir" || eval $as_mkdir_p || {
17775 as_dirs=
17776 while :; do
17777 case $as_dir in #(
17778 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17779 *) as_qdir=$as_dir;;
17780 esac
17781 as_dirs="'$as_qdir' $as_dirs"
17782 as_dir=`$as_dirname -- "$as_dir" ||
17783$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17784 X"$as_dir" : 'X\(//\)[^/]' \| \
17785 X"$as_dir" : 'X\(//\)$' \| \
17786 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17787$as_echo X"$as_dir" |
17788 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17789 s//\1/
17790 q
17791 }
17792 /^X\(\/\/\)[^/].*/{
17793 s//\1/
17794 q
17795 }
17796 /^X\(\/\/\)$/{
17797 s//\1/
17798 q
17799 }
17800 /^X\(\/\).*/{
17801 s//\1/
17802 q
17803 }
17804 s/.*/./; q'`
17805 test -d "$as_dir" && break
17806 done
17807 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017808 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017809
17810
17811} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017812if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017813 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017814else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017816 as_mkdir_p=false
17817fi
17818
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017819
17820# as_fn_executable_p FILE
17821# -----------------------
17822# Test if FILE is an executable regular file.
17823as_fn_executable_p ()
17824{
17825 test -f "$1" && test -x "$1"
17826} # as_fn_executable_p
17827as_test_x='test -x'
17828as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017829
17830# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831as_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 +000017832
17833# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017835
17836
Martin v. Löwis11437992002-04-12 09:54:03 +000017837exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017838## ----------------------------------- ##
17839## Main body of $CONFIG_STATUS script. ##
17840## ----------------------------------- ##
17841_ASEOF
17842test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017843
Matthias Kloseb9621712010-04-24 17:59:49 +000017844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17845# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017846# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847# values after options handling.
17848ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017849This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017850generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017851
17852 CONFIG_FILES = $CONFIG_FILES
17853 CONFIG_HEADERS = $CONFIG_HEADERS
17854 CONFIG_LINKS = $CONFIG_LINKS
17855 CONFIG_COMMANDS = $CONFIG_COMMANDS
17856 $ $0 $@
17857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858on `(hostname || uname -n) 2>/dev/null | sed 1q`
17859"
17860
Martin v. Löwis11437992002-04-12 09:54:03 +000017861_ACEOF
17862
Matthias Kloseb9621712010-04-24 17:59:49 +000017863case $ac_config_files in *"
17864"*) set x $ac_config_files; shift; ac_config_files=$*;;
17865esac
17866
17867case $ac_config_headers in *"
17868"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17869esac
17870
17871
17872cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017873# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017874config_files="$ac_config_files"
17875config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
Matthias Kloseb9621712010-04-24 17:59:49 +000017879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017880ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017881\`$as_me' instantiates files and other configuration actions
17882from templates according to the current configuration. Unless the files
17883and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017884
Matthias Kloseb9621712010-04-24 17:59:49 +000017885Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017886
17887 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017889 --config print configuration, then exit
17890 -q, --quiet, --silent
17891 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 -d, --debug don't remove temporary files
17893 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 --file=FILE[:TEMPLATE]
17895 instantiate the configuration file FILE
17896 --header=FILE[:TEMPLATE]
17897 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
17899Configuration files:
17900$config_files
17901
17902Configuration headers:
17903$config_headers
17904
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017905Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17909ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017910ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017911python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017912configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017913 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017915Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017916This config.status script is free software; the Free Software Foundation
17917gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918
17919ac_pwd='$ac_pwd'
17920srcdir='$srcdir'
17921INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017922MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017923test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017924_ACEOF
17925
Matthias Kloseb9621712010-04-24 17:59:49 +000017926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17927# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017928ac_need_defaults=:
17929while test $# != 0
17930do
17931 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017932 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17934 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017935 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017937 --*=)
17938 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17939 ac_optarg=
17940 ac_shift=:
17941 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017943 ac_option=$1
17944 ac_optarg=$2
17945 ac_shift=shift
17946 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 esac
17948
Skip Montanaro6dead952003-09-25 14:50:04 +000017949 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017951 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17952 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017954 $as_echo "$ac_cs_version"; exit ;;
17955 --config | --confi | --conf | --con | --co | --c )
17956 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 debug=: ;;
17959 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017960 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 case $ac_optarg in
17962 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017963 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017964 esac
17965 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 ac_need_defaults=false;;
17967 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017968 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017969 case $ac_optarg in
17970 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17971 esac
17972 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017974 --he | --h)
17975 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017976 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017977Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017979 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017980 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17981 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17982 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
17984 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017985 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017986Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017990
17991 esac
17992 shift
17993done
17994
Skip Montanaro6dead952003-09-25 14:50:04 +000017995ac_configure_extra_args=
17996
17997if $ac_cs_silent; then
17998 exec 6>/dev/null
17999 ac_configure_extra_args="$ac_configure_extra_args --silent"
18000fi
18001
18002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018004if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018005 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018006 shift
18007 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18008 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018011fi
18012
Martin v. Löwis11437992002-04-12 09:54:03 +000018013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018014cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015exec 5>>config.log
18016{
18017 echo
18018 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18019## Running $as_me. ##
18020_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018021 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018027
Matthias Kloseb9621712010-04-24 17:59:49 +000018028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029
18030# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018031for ac_config_target in $ac_config_targets
18032do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033 case $ac_config_target in
18034 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18035 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18036 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018037 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18038 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018040 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018041 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018042 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043
Victor Stinnere0be4232011-10-25 13:06:09 +020018044 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018045 esac
18046done
18047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048
Martin v. Löwis11437992002-04-12 09:54:03 +000018049# If the user did not use the arguments to specify the items to instantiate,
18050# then the envvar interface is used. Set only those that are not.
18051# We use the long form for the default assignment because of an extremely
18052# bizarre bug on SunOS 4.1.3.
18053if $ac_need_defaults; then
18054 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18055 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18056fi
18057
Skip Montanaro6dead952003-09-25 14:50:04 +000018058# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018060# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061# Hook for its removal unless debugging.
18062# Note that there is a small window in which the directory will not be cleaned:
18063# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018064$debug ||
18065{
Victor Stinnere0be4232011-10-25 13:06:09 +020018066 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018068 : "${ac_tmp:=$tmp}"
18069 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018071 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018072}
Martin v. Löwis11437992002-04-12 09:54:03 +000018073# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018074
Martin v. Löwis11437992002-04-12 09:54:03 +000018075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018077 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018078} ||
18079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 tmp=./conf$$-$RANDOM
18081 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018082} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018083ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
Matthias Kloseb9621712010-04-24 17:59:49 +000018085# Set up the scripts for CONFIG_FILES section.
18086# No need to generate them if there are no CONFIG_FILES.
18087# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018089
Matthias Kloseb9621712010-04-24 17:59:49 +000018090
18091ac_cr=`echo X | tr X '\015'`
18092# On cygwin, bash can eat \r inside `` if the user requested igncr.
18093# But we know of no other shell where ac_cr would be empty at this
18094# point, so we can use a bashism as a fallback.
18095if test "x$ac_cr" = x; then
18096 eval ac_cr=\$\'\\r\'
18097fi
18098ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18099if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018100 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018101else
18102 ac_cs_awk_cr=$ac_cr
18103fi
18104
Victor Stinnere0be4232011-10-25 13:06:09 +020018105echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018106_ACEOF
18107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108
Matthias Kloseb9621712010-04-24 17:59:49 +000018109{
18110 echo "cat >conf$$subs.awk <<_ACEOF" &&
18111 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18112 echo "_ACEOF"
18113} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018114 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18115ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116ac_delim='%!_!# '
18117for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018118 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018119 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18122 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123 break
18124 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018125 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 else
18127 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129done
Matthias Kloseb9621712010-04-24 17:59:49 +000018130rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131
Matthias Kloseb9621712010-04-24 17:59:49 +000018132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018133cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018135sed -n '
18136h
18137s/^/S["/; s/!.*/"]=/
18138p
18139g
18140s/^[^!]*!//
18141:repl
18142t repl
18143s/'"$ac_delim"'$//
18144t delim
18145:nl
18146h
18147s/\(.\{148\}\)..*/\1/
18148t more1
18149s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18150p
18151n
18152b repl
18153:more1
18154s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18155p
18156g
18157s/.\{148\}//
18158t nl
18159:delim
18160h
18161s/\(.\{148\}\)..*/\1/
18162t more2
18163s/["\\]/\\&/g; s/^/"/; s/$/"/
18164p
18165b
18166:more2
18167s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18168p
18169g
18170s/.\{148\}//
18171t delim
18172' <conf$$subs.awk | sed '
18173/^[^""]/{
18174 N
18175 s/\n//
18176}
18177' >>$CONFIG_STATUS || ac_write_fail=1
18178rm -f conf$$subs.awk
18179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18180_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018181cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018182 for (key in S) S_is_set[key] = 1
18183 FS = ""
18184
18185}
18186{
18187 line = $ 0
18188 nfields = split(line, field, "@")
18189 substed = 0
18190 len = length(field[1])
18191 for (i = 2; i < nfields; i++) {
18192 key = field[i]
18193 keylen = length(key)
18194 if (S_is_set[key]) {
18195 value = S[key]
18196 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18197 len += length(value) + length(field[++i])
18198 substed = 1
18199 } else
18200 len += 1 + keylen
18201 }
18202
18203 print line
18204}
18205
18206_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18209if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18210 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18211else
18212 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018213fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018214 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018215_ACEOF
18216
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018217# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18218# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219# trailing colons and then remove the whole line if VPATH becomes empty
18220# (actually we leave an empty line to preserve line numbers).
18221if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018222 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18223h
18224s///
18225s/^/:/
18226s/[ ]*$/:/
18227s/:\$(srcdir):/:/g
18228s/:\${srcdir}:/:/g
18229s/:@srcdir@:/:/g
18230s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018232x
18233s/\(=[ ]*\).*/\1/
18234G
18235s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236s/^[^=]*=[ ]*$//
18237}'
18238fi
18239
Matthias Kloseb9621712010-04-24 17:59:49 +000018240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018241fi # test -n "$CONFIG_FILES"
18242
Matthias Kloseb9621712010-04-24 17:59:49 +000018243# Set up the scripts for CONFIG_HEADERS section.
18244# No need to generate them if there are no CONFIG_HEADERS.
18245# This happens for instance with `./config.status Makefile'.
18246if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018247cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018248BEGIN {
18249_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250
Matthias Kloseb9621712010-04-24 17:59:49 +000018251# Transform confdefs.h into an awk script `defines.awk', embedded as
18252# here-document in config.status, that substitutes the proper values into
18253# config.h.in to produce config.h.
18254
18255# Create a delimiter string that does not exist in confdefs.h, to ease
18256# handling of long lines.
18257ac_delim='%!_!# '
18258for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018259 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18260 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018261 break
18262 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018263 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018264 else
18265 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18266 fi
18267done
18268
18269# For the awk script, D is an array of macro values keyed by name,
18270# likewise P contains macro parameters if any. Preserve backslash
18271# newline sequences.
18272
18273ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18274sed -n '
18275s/.\{148\}/&'"$ac_delim"'/g
18276t rset
18277:rset
18278s/^[ ]*#[ ]*define[ ][ ]*/ /
18279t def
18280d
18281:def
18282s/\\$//
18283t bsnl
18284s/["\\]/\\&/g
18285s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18286D["\1"]=" \3"/p
18287s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18288d
18289:bsnl
18290s/["\\]/\\&/g
18291s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18292D["\1"]=" \3\\\\\\n"\\/p
18293t cont
18294s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18295t cont
18296d
18297:cont
18298n
18299s/.\{148\}/&'"$ac_delim"'/g
18300t clear
18301:clear
18302s/\\$//
18303t bsnlc
18304s/["\\]/\\&/g; s/^/"/; s/$/"/p
18305d
18306:bsnlc
18307s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18308b cont
18309' <confdefs.h | sed '
18310s/'"$ac_delim"'/"\\\
18311"/g' >>$CONFIG_STATUS || ac_write_fail=1
18312
18313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18314 for (key in D) D_is_set[key] = 1
18315 FS = ""
18316}
18317/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18318 line = \$ 0
18319 split(line, arg, " ")
18320 if (arg[1] == "#") {
18321 defundef = arg[2]
18322 mac1 = arg[3]
18323 } else {
18324 defundef = substr(arg[1], 2)
18325 mac1 = arg[2]
18326 }
18327 split(mac1, mac2, "(") #)
18328 macro = mac2[1]
18329 prefix = substr(line, 1, index(line, defundef) - 1)
18330 if (D_is_set[macro]) {
18331 # Preserve the white space surrounding the "#".
18332 print prefix "define", macro P[macro] D[macro]
18333 next
18334 } else {
18335 # Replace #undef with comments. This is necessary, for example,
18336 # in the case of _POSIX_SOURCE, which is predefined and required
18337 # on some systems where configure will not decide to define it.
18338 if (defundef == "undef") {
18339 print "/*", prefix defundef, macro, "*/"
18340 next
18341 }
18342 }
18343}
18344{ print }
18345_ACAWK
18346_ACEOF
18347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018348 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018349fi # test -n "$CONFIG_HEADERS"
18350
18351
18352eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18353shift
18354for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355do
18356 case $ac_tag in
18357 :[FHLC]) ac_mode=$ac_tag; continue;;
18358 esac
18359 case $ac_mode$ac_tag in
18360 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018361 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018362 :[FH]-) ac_tag=-:-;;
18363 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18364 esac
18365 ac_save_IFS=$IFS
18366 IFS=:
18367 set x $ac_tag
18368 IFS=$ac_save_IFS
18369 shift
18370 ac_file=$1
18371 shift
18372
18373 case $ac_mode in
18374 :L) ac_source=$1;;
18375 :[FH])
18376 ac_file_inputs=
18377 for ac_f
18378 do
18379 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018380 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381 *) # Look for the file first in the build tree, then in the source tree
18382 # (if the path is not absolute). The absolute path cannot be DOS-style,
18383 # because $ac_f cannot contain `:'.
18384 test -f "$ac_f" ||
18385 case $ac_f in
18386 [\\/$]*) false;;
18387 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18388 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018389 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18392 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393 done
18394
18395 # Let's still pretend it is `configure' which instantiates (i.e., don't
18396 # use $as_me), people would be surprised to read:
18397 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018398 configure_input='Generated from '`
18399 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18400 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 if test x"$ac_file" != x-; then
18402 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018403 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18404$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018406 # Neutralize special characters interpreted by sed in replacement strings.
18407 case $configure_input in #(
18408 *\&* | *\|* | *\\* )
18409 ac_sed_conf_input=`$as_echo "$configure_input" |
18410 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18411 *) ac_sed_conf_input=$configure_input;;
18412 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413
18414 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018415 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18416 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 esac
18418 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 esac
18420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018422$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018423 X"$ac_file" : 'X\(//\)[^/]' \| \
18424 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018426$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18428 s//\1/
18429 q
18430 }
18431 /^X\(\/\/\)[^/].*/{
18432 s//\1/
18433 q
18434 }
18435 /^X\(\/\/\)$/{
18436 s//\1/
18437 q
18438 }
18439 /^X\(\/\).*/{
18440 s//\1/
18441 q
18442 }
18443 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018444 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018445 ac_builddir=.
18446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447case "$ac_dir" in
18448.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18449*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018450 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018452 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453 case $ac_top_builddir_sub in
18454 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18455 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18456 esac ;;
18457esac
18458ac_abs_top_builddir=$ac_pwd
18459ac_abs_builddir=$ac_pwd$ac_dir_suffix
18460# for backward compatibility:
18461ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018462
18463case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 ac_top_srcdir=$ac_top_builddir_sub
18467 ac_abs_top_srcdir=$ac_pwd ;;
18468 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 ac_top_srcdir=$srcdir
18471 ac_abs_top_srcdir=$srcdir ;;
18472 *) # Relative name.
18473 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18474 ac_top_srcdir=$ac_top_build_prefix$srcdir
18475 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018476esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018478
Martin v. Löwis11437992002-04-12 09:54:03 +000018479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480 case $ac_mode in
18481 :F)
18482 #
18483 # CONFIG_FILE
18484 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018485
18486 case $INSTALL in
18487 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018490 ac_MKDIR_P=$MKDIR_P
18491 case $MKDIR_P in
18492 [\\/$]* | ?:[\\/]* ) ;;
18493 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18494 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018495_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496
Matthias Kloseb9621712010-04-24 17:59:49 +000018497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498# If the template does not know about datarootdir, expand it.
18499# FIXME: This hack should be removed a few years after 2.60.
18500ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018501ac_sed_dataroot='
18502/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 p
18504 q
18505}
18506/@datadir@/p
18507/@docdir@/p
18508/@infodir@/p
18509/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018510/@mandir@/p'
18511case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512*datarootdir*) ac_datarootdir_seen=yes;;
18513*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18515$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518 ac_datarootdir_hack='
18519 s&@datadir@&$datadir&g
18520 s&@docdir@&$docdir&g
18521 s&@infodir@&$infodir&g
18522 s&@localedir@&$localedir&g
18523 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018524 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525esac
18526_ACEOF
18527
18528# Neutralize VPATH when `$srcdir' = `.'.
18529# Shell code in configure.ac might set extrasub.
18530# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018531cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18532ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018533$extrasub
18534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018536:t
18537/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018538s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018540s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541s&@srcdir@&$ac_srcdir&;t t
18542s&@abs_srcdir@&$ac_abs_srcdir&;t t
18543s&@top_srcdir@&$ac_top_srcdir&;t t
18544s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18545s&@builddir@&$ac_builddir&;t t
18546s&@abs_builddir@&$ac_abs_builddir&;t t
18547s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18548s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018549s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018551"
Victor Stinnere0be4232011-10-25 13:06:09 +020018552eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18553 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018556 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18557 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18558 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018560which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018561$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018562which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018563
Victor Stinnere0be4232011-10-25 13:06:09 +020018564 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018566 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18567 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018568 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018569 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570 ;;
18571 :H)
18572 #
18573 # CONFIG_HEADER
18574 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018576 {
18577 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018578 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18579 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018582 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18583$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018584 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018586 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018587 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 fi
18589 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018590 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018591 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018592 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018593 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018596
18597 esac
18598
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018599
18600 case $ac_file$ac_mode in
18601 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18602
18603 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604done # for ac_tag
18605
Guido van Rossum627b2d71993-12-24 10:39:16 +000018606
Matthias Kloseb9621712010-04-24 17:59:49 +000018607as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018608_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018609ac_clean_files=$ac_clean_files_save
18610
Matthias Kloseb9621712010-04-24 17:59:49 +000018611test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018612 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018613
Martin v. Löwis11437992002-04-12 09:54:03 +000018614
18615# configure is writing to config.log, and then calls config.status.
18616# config.status does its own redirection, appending to config.log.
18617# Unfortunately, on DOS this fails, as config.log is still kept open
18618# by configure, so config.status won't be able to write to it; its
18619# output is simply discarded. So we exec the FD to /dev/null,
18620# effectively closing config.log, so it can be properly (re)opened and
18621# appended to by config.status. When coming back to configure, we
18622# need to make the FD available again.
18623if test "$no_create" != yes; then
18624 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018625 ac_config_status_args=
18626 test "$silent" = yes &&
18627 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018629 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 exec 5>>config.log
18631 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18632 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018633 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018634fi
18635if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18637$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018638fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018639
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018640
Christian Heimes75ed8902013-11-20 01:11:18 +010018641echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018642if test ! -f Modules/Setup.local
18643then
18644 echo "# Edit this file for local setup changes" >Modules/Setup.local
18645fi
18646
Christian Heimes75ed8902013-11-20 01:11:18 +010018647echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018648$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018649 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018650 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018651mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018652
18653if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18654 echo "" >&6
18655 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018656 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 +000018657 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018658 echo "" >&6
18659 echo "" >&6
18660fi
18661