blob: 669060bea12887fdc2a11a6b07fea600c8d7f4be [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
Benjamin Peterson54016222018-05-14 21:39:22 -0700629PKG_CONFIG
Ned Deily322f5ba2013-11-21 23:01:59 -0800630ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000631SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000632THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100633LIBPL
634PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000636SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000637LIBC
638LIBM
639HAVE_GETHOSTBYNAME
640HAVE_GETHOSTBYNAME_R
641HAVE_GETHOSTBYNAME_R_3_ARG
642HAVE_GETHOSTBYNAME_R_5_ARG
643HAVE_GETHOSTBYNAME_R_6_ARG
644LIBOBJS
645TRUE
646MACHDEP_OBJS
647DYNLOADFILE
648DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700649DTRACE_OBJS
650DTRACE_HEADERS
651DFLAGS
652DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000653LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000657SHLIBS
658CFLAGSFORSHARED
659LINKFORSHARED
660CCSHARED
661BLDSHARED
662LDCXXSHARED
663LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700664SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000665LIBTOOL_CRUFT
666OTHER_LIBTOOL_OPT
667UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700668CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000669BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200670CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700683DEF_MAKE_RULE
684DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000686LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100687MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000688INSTALL_DATA
689INSTALL_SCRIPT
690INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200691ac_ct_READELF
692READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000693ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200694ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000695AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696GNULD
697LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000698LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000699RUNSHARED
700INSTSONAME
701LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000702PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000703BLDLIBRARY
704DLLLIBRARY
705LDLIBRARY
706LIBRARY
707BUILDEXEEXT
708EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200709NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200710MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711PLATFORM_TRIPLET
712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700716SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717GREP
718CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000719OBJEXT
720EXEEXT
721ac_ct_CC
722CPPFLAGS
723LDFLAGS
724CFLAGS
725CC
726EXPORT_MACOSX_DEPLOYMENT_TARGET
727CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200748PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200749PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100750host_os
751host_vendor
752host_cpu
753host
754build_os
755build_vendor
756build_cpu
757build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500758HAS_GIT
759GITBRANCH
760GITTAG
761GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400762BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000763target_alias
764host_alias
765build_alias
766LIBS
767ECHO_T
768ECHO_N
769ECHO_C
770DEFS
771mandir
772localedir
773libdir
774psdir
775pdfdir
776dvidir
777htmldir
778infodir
779docdir
780oldincludedir
781includedir
782localstatedir
783sharedstatedir
784sysconfdir
785datadir
786datarootdir
787libexecdir
788sbindir
789bindir
790program_transform_name
791prefix
792exec_prefix
793PACKAGE_URL
794PACKAGE_BUGREPORT
795PACKAGE_STRING
796PACKAGE_VERSION
797PACKAGE_TARNAME
798PACKAGE_NAME
799PATH_SEPARATOR
800SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000801ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_user_opts='
803enable_option_checking
804enable_universalsdk
805with_universal_archs
806with_framework_name
807enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_cxx_main
809with_suffix
810enable_shared
811enable_profiling
812with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200813with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000814enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700815with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100816with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100817with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_libs
819with_system_expat
820with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100821with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000822enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700823with_tcltk_includes
824with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000826enable_ipv6
827with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000829with_c_locale_coercion
830with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700832with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_libm
834with_libc
835enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800837with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100838with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100839with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000840'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 ac_precious_vars='build_alias
842host_alias
843target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100844MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845CC
846CFLAGS
847LDFLAGS
848LIBS
849CPPFLAGS
Benjamin Peterson54016222018-05-14 21:39:22 -0700850CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889includedir='${prefix}/include'
890oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 ac_prev=
909 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200913 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *=) ac_optarg= ;;
915 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Accept the important Cygnus configure options, so we can diagnose typos.
919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_dashdash$ac_option in
921 --)
922 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -bindir | --bindir | --bindi | --bind | --bin | --bi)
925 ac_prev=bindir ;;
926 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 -cache-file | --cache-file | --cache-fil | --cache-fi \
935 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936 ac_prev=cache_file ;;
937 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 cache_file=$ac_optarg ;;
940
941 --config-cache | -C)
942 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950 | --dataroo | --dataro | --datar)
951 ac_prev=datarootdir ;;
952 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954 datarootdir=$ac_optarg ;;
955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971
972 -docdir | --docdir | --docdi | --doc | --do)
973 ac_prev=docdir ;;
974 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975 docdir=$ac_optarg ;;
976
977 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978 ac_prev=dvidir ;;
979 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200986 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000 | --exec | --exe | --ex)
1001 ac_prev=exec_prefix ;;
1002 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --with-gas.
1009 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 -help | --help | --hel | --he | -h)
1012 ac_init_help=long ;;
1013 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014 ac_init_help=recursive ;;
1015 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024 ac_prev=htmldir ;;
1025 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026 | --ht=*)
1027 htmldir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -includedir | --includedir | --includedi | --included | --include \
1030 | --includ | --inclu | --incl | --inc)
1031 ac_prev=includedir ;;
1032 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -infodir | --infodir | --infodi | --infod | --info | --inf)
1037 ac_prev=infodir ;;
1038 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libdir | --libdir | --libdi | --libd)
1042 ac_prev=libdir ;;
1043 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047 | --libexe | --libex | --libe)
1048 ac_prev=libexecdir ;;
1049 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -localedir | --localedir | --localedi | --localed | --locale)
1054 ac_prev=localedir ;;
1055 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056 localedir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 ac_prev=localstatedir ;;
1061 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066 ac_prev=mandir ;;
1067 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Obsolete; use --without-fp.
1072 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 no_create=yes ;;
1077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084 | --oldin | --oldi | --old | --ol | --o)
1085 ac_prev=oldincludedir ;;
1086 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092 ac_prev=prefix ;;
1093 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097 | --program-pre | --program-pr | --program-p)
1098 ac_prev=program_prefix ;;
1099 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104 | --program-suf | --program-su | --program-s)
1105 ac_prev=program_suffix ;;
1106 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-transform-name | --program-transform-name \
1111 | --program-transform-nam | --program-transform-na \
1112 | --program-transform-n | --program-transform- \
1113 | --program-transform | --program-transfor \
1114 | --program-transfo | --program-transf \
1115 | --program-trans | --program-tran \
1116 | --progr-tra | --program-tr | --program-t)
1117 ac_prev=program_transform_name ;;
1118 -program-transform-name=* | --program-transform-name=* \
1119 | --program-transform-nam=* | --program-transform-na=* \
1120 | --program-transform-n=* | --program-transform-=* \
1121 | --program-transform=* | --program-transfor=* \
1122 | --program-transfo=* | --program-transf=* \
1123 | --program-trans=* | --program-tran=* \
1124 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001127 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128 ac_prev=pdfdir ;;
1129 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130 pdfdir=$ac_optarg ;;
1131
1132 -psdir | --psdir | --psdi | --psd | --ps)
1133 ac_prev=psdir ;;
1134 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135 psdir=$ac_optarg ;;
1136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138 | -silent | --silent | --silen | --sile | --sil)
1139 silent=yes ;;
1140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142 ac_prev=sbindir ;;
1143 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
1147 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149 | --sharedst | --shareds | --shared | --share | --shar \
1150 | --sha | --sh)
1151 ac_prev=sharedstatedir ;;
1152 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 -site | --site | --sit)
1159 ac_prev=site ;;
1160 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164 ac_prev=srcdir ;;
1165 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169 | --syscon | --sysco | --sysc | --sys | --sy)
1170 ac_prev=sysconfdir ;;
1171 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181 verbose=yes ;;
1182
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 -version | --version | --versio | --versi | --vers | -V)
1184 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 --x)
1219 # Obsolete; use --with-x.
1220 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223 | --x-incl | --x-inc | --x-in | --x-i)
1224 ac_prev=x_includes ;;
1225 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231 ac_prev=x_libraries ;;
1232 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 *=*)
1241 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 case $ac_envvar in #(
1244 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 export $ac_envvar ;;
1249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001255 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
1258 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259done
1260
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
1265
Matthias Kloseb9621712010-04-24 17:59:49 +00001266if test -n "$ac_unrecognized_opts"; then
1267 case $enable_option_checking in
1268 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271 esac
1272fi
1273
1274# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276 datadir sysconfdir sharedstatedir localstatedir includedir \
1277 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Eitan Adler3055c942018-05-15 22:58:09 -07001278 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 # Remove trailing slashes.
1282 case $ac_val in
1283 */ )
1284 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285 eval $ac_var=\$ac_val;;
1286 esac
1287 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 [\\/$]* | ?:[\\/]* ) continue;;
1290 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295# There might be people who depend on the old broken behavior: `$host'
1296# used to hold the argument of --host etc.
1297# FIXME: To remove some day.
1298build=$build_alias
1299host=$host_alias
1300target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# FIXME: To remove some day.
1303if test "x$host_alias" != x; then
1304 if test "x$build_alias" = x; then
1305 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 elif test "x$build_alias" != "x$host_alias"; then
1307 cross_compiling=yes
1308 fi
1309fi
1310
1311ac_tool_prefix=
1312test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314test "$silent" = yes && exec 6>/dev/null
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318ac_ls_di=`ls -di .` &&
1319ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001320 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# Find the source files, if location was not specified.
1326if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 ac_confdir=`$as_dirname -- "$as_myself" ||
1330$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331 X"$as_myself" : 'X\(//\)[^/]' \| \
1332 X"$as_myself" : 'X\(//\)$' \| \
1333 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)[^/].*/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\).*/{
1348 s//\1/
1349 q
1350 }
1351 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 srcdir=..
1355 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356else
1357 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359if test ! -r "$srcdir/$ac_unique_file"; then
1360 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001361 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 pwd)`
1367# When building in place, set srcdir=.
1368if test "$ac_abs_confdir" = "$ac_pwd"; then
1369 srcdir=.
1370fi
1371# Remove unnecessary trailing slashes from srcdir.
1372# Double slashes in file names in object file debugging info
1373# mess up M-x gdb in Emacs.
1374case $srcdir in
1375*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376esac
1377for ac_var in $ac_precious_vars; do
1378 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_env_${ac_var}_value=\$${ac_var}
1380 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383
Martin v. Löwis11437992002-04-12 09:54:03 +00001384#
1385# Report the --help message.
1386#
1387if test "$ac_init_help" = "long"; then
1388 # Omit some internal or obsolete options to make the list less imposing.
1389 # This message is too long to be a string in the A/UX 3.1 sh.
1390 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001391\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396VAR=VALUE. See below for descriptions of some of the useful variables.
1397
1398Defaults for the options are specified in brackets.
1399
1400Configuration:
1401 -h, --help display this help and exit
1402 --help=short display options specific to this package
1403 --help=recursive display the short help of all the included packages
1404 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001405 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --cache-file=FILE cache test results in FILE [disabled]
1407 -C, --config-cache alias for \`--cache-file=config.cache'
1408 -n, --no-create do not create output files
1409 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411Installation directories:
1412 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417By default, \`make install' will install all the files in
1418\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1419an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420for instance \`--prefix=\$HOME'.
1421
1422For better control, use the options below.
1423
1424Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 --bindir=DIR user executables [EPREFIX/bin]
1426 --sbindir=DIR system admin executables [EPREFIX/sbin]
1427 --libexecdir=DIR program executables [EPREFIX/libexec]
1428 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1429 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1430 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1431 --libdir=DIR object code libraries [EPREFIX/lib]
1432 --includedir=DIR C header files [PREFIX/include]
1433 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1434 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1435 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1436 --infodir=DIR info documentation [DATAROOTDIR/info]
1437 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1438 --mandir=DIR man documentation [DATAROOTDIR/man]
1439 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1440 --htmldir=DIR html documentation [DOCDIR]
1441 --dvidir=DIR dvi documentation [DOCDIR]
1442 --pdfdir=DIR pdf documentation [DOCDIR]
1443 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
1445
1446 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001447
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001451 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453fi
1454
1455if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001457 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001458 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 cat <<\_ACEOF
1460
1461Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1464 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001465 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001466 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-framework[=INSTALLDIR]
1468 Build (MacOSX|Darwin) framework
1469 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001470 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001471 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1472 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001473 --enable-loadable-sqlite-extensions
1474 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-ipv6 Enable ipv6 (with ipv4) support
1476 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001477 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480Optional Packages:
1481 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1482 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001483 --with-universal-archs=ARCH
1484 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001485 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1486 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001487 --with-framework-name=FRAMEWORK
1488 specify an alternate name of the framework built
1489 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001490 --with-cxx-main=<compiler>
1491 compile main() and link python executable with C++
1492 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-suffix=.exe set executable suffix
1494 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001495 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001496 --with-lto Enable Link Time Optimization in any build. Disabled
1497 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001498 --with-hash-algorithm=[fnv|siphash24]
1499 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001500 --with-address-sanitizer
1501 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001503 --with-system-expat build pyexpat module using an installed expat
1504 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001505 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001506 --with-system-libmpdec build _decimal module using an installed libmpdec
1507 library
Ned Deilyd819b932013-09-06 01:07:05 -07001508 --with-tcltk-includes='-I...'
1509 override search for Tcl and Tk include files
1510 --with-tcltk-libs='-L...'
1511 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001512 --with-dbmliborder=db1:db2:...
1513 order to check db backends for dbm. Valid value is a
1514 colon separated string with the backend names
1515 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with(out)-doc-strings disable/enable documentation strings
1517 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001518 --with(out)-c-locale-coercion
1519 disable/enable C locale coercion to a UTF-8 based
1520 locale
1521 --with(out)-c-locale-warning
1522 disable/enable locale compatibility warning in the C
1523 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001524 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001525 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-libm=STRING math library
1527 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001528 --with(out)-computed-gotos
1529 Use computed gotos in evaluation loop (enabled by
1530 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001531 --with(out)-ensurepip=[=upgrade]
1532 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001533 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001534 --with-ssl-default-suites=[python|openssl|STRING]
1535 Override default cipher suites string, python: use
1536 Python's preferred selection (default), openssl:
1537 leave OpenSSL's defaults untouched, STRING: use a
1538 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
1540Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001541 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 CC C compiler command
1543 CFLAGS C compiler flags
1544 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1545 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001547 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CPP C preprocessor
1550
1551Use these variables to override the choices made by `configure' or to help
1552it to find libraries and programs with nonstandard names/locations.
1553
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001554Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001557fi
1558
1559if test "$ac_init_help" = "recursive"; then
1560 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 test -d "$ac_dir" ||
1563 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1564 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 ac_builddir=.
1566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567case "$ac_dir" in
1568.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 case $ac_top_builddir_sub in
1574 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1576 esac ;;
1577esac
1578ac_abs_top_builddir=$ac_pwd
1579ac_abs_builddir=$ac_pwd$ac_dir_suffix
1580# for backward compatibility:
1581ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001582
1583case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 ac_top_srcdir=$ac_top_builddir_sub
1587 ac_abs_top_srcdir=$ac_pwd ;;
1588 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 ac_top_srcdir=$srcdir
1591 ac_abs_top_srcdir=$srcdir ;;
1592 *) # Relative name.
1593 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1594 ac_top_srcdir=$ac_top_build_prefix$srcdir
1595 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001596esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 cd "$ac_dir" || { ac_status=$?; continue; }
1600 # Check for guested configure.
1601 if test -f "$ac_srcdir/configure.gnu"; then
1602 echo &&
1603 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1604 elif test -f "$ac_srcdir/configure"; then
1605 echo &&
1606 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 fi || ac_status=$?
1610 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 done
1612fi
1613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001615if $ac_init_version; then
1616 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001617python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001618generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001620Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001621This configure script is free software; the Free Software Foundation
1622gives unlimited permission to copy, distribute and modify it.
1623_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001626
1627## ------------------------ ##
1628## Autoconf initialization. ##
1629## ------------------------ ##
1630
1631# ac_fn_c_try_compile LINENO
1632# --------------------------
1633# Try to compile conftest.$ac_ext, and return whether this succeeded.
1634ac_fn_c_try_compile ()
1635{
1636 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1637 rm -f conftest.$ac_objext
1638 if { { ac_try="$ac_compile"
1639case "(($ac_try" in
1640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641 *) ac_try_echo=$ac_try;;
1642esac
1643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644$as_echo "$ac_try_echo"; } >&5
1645 (eval "$ac_compile") 2>conftest.err
1646 ac_status=$?
1647 if test -s conftest.err; then
1648 grep -v '^ *+' conftest.err >conftest.er1
1649 cat conftest.er1 >&5
1650 mv -f conftest.er1 conftest.err
1651 fi
1652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1653 test $ac_status = 0; } && {
1654 test -z "$ac_c_werror_flag" ||
1655 test ! -s conftest.err
1656 } && test -s conftest.$ac_objext; then :
1657 ac_retval=0
1658else
1659 $as_echo "$as_me: failed program was:" >&5
1660sed 's/^/| /' conftest.$ac_ext >&5
1661
1662 ac_retval=1
1663fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 as_fn_set_status $ac_retval
1666
1667} # ac_fn_c_try_compile
1668
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001669# ac_fn_c_try_cpp LINENO
1670# ----------------------
1671# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1672ac_fn_c_try_cpp ()
1673{
1674 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1675 if { { ac_try="$ac_cpp conftest.$ac_ext"
1676case "(($ac_try" in
1677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1678 *) ac_try_echo=$ac_try;;
1679esac
1680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1681$as_echo "$ac_try_echo"; } >&5
1682 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1683 ac_status=$?
1684 if test -s conftest.err; then
1685 grep -v '^ *+' conftest.err >conftest.er1
1686 cat conftest.er1 >&5
1687 mv -f conftest.er1 conftest.err
1688 fi
1689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690 test $ac_status = 0; } > conftest.i && {
1691 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1692 test ! -s conftest.err
1693 }; then :
1694 ac_retval=0
1695else
1696 $as_echo "$as_me: failed program was:" >&5
1697sed 's/^/| /' conftest.$ac_ext >&5
1698
1699 ac_retval=1
1700fi
1701 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702 as_fn_set_status $ac_retval
1703
1704} # ac_fn_c_try_cpp
1705
Matthias Kloseb9621712010-04-24 17:59:49 +00001706# ac_fn_c_try_link LINENO
1707# -----------------------
1708# Try to link conftest.$ac_ext, and return whether this succeeded.
1709ac_fn_c_try_link ()
1710{
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext conftest$ac_exeext
1713 if { { ac_try="$ac_link"
1714case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717esac
1718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719$as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_link") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1726 fi
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest$ac_exeext && {
1732 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001733 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: failed program was:" >&5
1738sed 's/^/| /' conftest.$ac_ext >&5
1739
1740 ac_retval=1
1741fi
1742 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1743 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1744 # interfere with the next link command; also delete a directory that is
1745 # left behind by Apple's compiler. We do this before executing the actions.
1746 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 as_fn_set_status $ac_retval
1749
1750} # ac_fn_c_try_link
1751
Matthias Kloseb9621712010-04-24 17:59:49 +00001752# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1753# -------------------------------------------------------
1754# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1755# the include files in INCLUDES and setting the cache variable VAR
1756# accordingly.
1757ac_fn_c_check_header_mongrel ()
1758{
1759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1762$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001763if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 $as_echo_n "(cached) " >&6
1765fi
1766eval ac_res=\$$3
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1768$as_echo "$ac_res" >&6; }
1769else
1770 # Is the header compilable?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1772$as_echo_n "checking $2 usability... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775$4
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_compile "$LINENO"; then :
1779 ac_header_compiler=yes
1780else
1781 ac_header_compiler=no
1782fi
1783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1785$as_echo "$ac_header_compiler" >&6; }
1786
1787# Is the header present?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1789$as_echo_n "checking $2 presence... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_cpp "$LINENO"; then :
1795 ac_header_preproc=yes
1796else
1797 ac_header_preproc=no
1798fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001799rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1801$as_echo "$ac_header_preproc" >&6; }
1802
1803# So? What about this header?
1804case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1805 yes:no: )
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1807$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1809$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1810 ;;
1811 no:yes:* )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1813$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1815$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1817$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1819$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001822( $as_echo "## --------------------------------------- ##
1823## Report this to https://bugs.python.org/ ##
1824## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 ) | sed "s/^/$as_me: WARNING: /" >&2
1826 ;;
1827esac
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=\$ac_header_compiler"
1834fi
1835eval ac_res=\$$3
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837$as_echo "$ac_res" >&6; }
1838fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001840
1841} # ac_fn_c_check_header_mongrel
1842
1843# ac_fn_c_try_run LINENO
1844# ----------------------
1845# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1846# that executables *can* be run.
1847ac_fn_c_try_run ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 if { { ac_try="$ac_link"
1851case "(($ac_try" in
1852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853 *) ac_try_echo=$ac_try;;
1854esac
1855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856$as_echo "$ac_try_echo"; } >&5
1857 (eval "$ac_link") 2>&5
1858 ac_status=$?
1859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1860 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1861 { { case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_try") 2>&5
1868 ac_status=$?
1869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870 test $ac_status = 0; }; }; then :
1871 ac_retval=0
1872else
1873 $as_echo "$as_me: program exited with status $ac_status" >&5
1874 $as_echo "$as_me: failed program was:" >&5
1875sed 's/^/| /' conftest.$ac_ext >&5
1876
1877 ac_retval=$ac_status
1878fi
1879 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001880 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 as_fn_set_status $ac_retval
1882
1883} # ac_fn_c_try_run
1884
1885# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1886# -------------------------------------------------------
1887# Tests whether HEADER exists and can be compiled using the include files in
1888# INCLUDES, setting the cache variable VAR accordingly.
1889ac_fn_c_check_header_compile ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001894if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 $as_echo_n "(cached) " >&6
1896else
1897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898/* end confdefs.h. */
1899$4
1900#include <$2>
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 eval "$3=yes"
1904else
1905 eval "$3=no"
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1908fi
1909eval ac_res=\$$3
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1911$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914} # ac_fn_c_check_header_compile
1915
Matthias Kloseb9621712010-04-24 17:59:49 +00001916# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1917# -------------------------------------------
1918# Tests whether TYPE exists after having included INCLUDES, setting cache
1919# variable VAR accordingly.
1920ac_fn_c_check_type ()
1921{
1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001926 $as_echo_n "(cached) " >&6
1927else
1928 eval "$3=no"
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$4
1932int
1933main ()
1934{
1935if (sizeof ($2))
1936 return 0;
1937 ;
1938 return 0;
1939}
1940_ACEOF
1941if ac_fn_c_try_compile "$LINENO"; then :
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof (($2)))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955
1956else
1957 eval "$3=yes"
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963eval ac_res=\$$3
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968} # ac_fn_c_check_type
1969
Matthias Kloseb9621712010-04-24 17:59:49 +00001970# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1971# --------------------------------------------
1972# Tries to find the compile-time value of EXPR in a program that includes
1973# INCLUDES, setting VAR accordingly. Returns whether the value could be
1974# computed
1975ac_fn_c_compute_int ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 if test "$cross_compiling" = yes; then
1979 # Depending upon the size, compute the lo and hi bounds.
1980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$4
1983int
1984main ()
1985{
1986static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001987test_array [0] = 0;
1988return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990 ;
1991 return 0;
1992}
1993_ACEOF
1994if ac_fn_c_try_compile "$LINENO"; then :
1995 ac_lo=0 ac_mid=0
1996 while :; do
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) <= $ac_mid)];
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_hi=$ac_mid; break
2013else
2014 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2015 if test $ac_lo -le $ac_mid; then
2016 ac_lo= ac_hi=
2017 break
2018 fi
2019 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 done
2023else
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=-1 ac_mid=-1
2040 while :; do
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) >= $ac_mid)];
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_lo=$ac_mid; break
2057else
2058 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2059 if test $ac_mid -le $ac_hi; then
2060 ac_lo= ac_hi=
2061 break
2062 fi
2063 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066 done
2067else
2068 ac_lo= ac_hi=
2069fi
2070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073# Binary search between lo and hi bounds.
2074while test "x$ac_lo" != "x$ac_hi"; do
2075 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid
2092else
2093 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096done
2097case $ac_lo in #((
2098?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2099'') ac_retval=1 ;;
2100esac
2101 else
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105static long int longval () { return $2; }
2106static unsigned long int ulongval () { return $2; }
2107#include <stdio.h>
2108#include <stdlib.h>
2109int
2110main ()
2111{
2112
2113 FILE *f = fopen ("conftest.val", "w");
2114 if (! f)
2115 return 1;
2116 if (($2) < 0)
2117 {
2118 long int i = longval ();
2119 if (i != ($2))
2120 return 1;
2121 fprintf (f, "%ld", i);
2122 }
2123 else
2124 {
2125 unsigned long int i = ulongval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%lu", i);
2129 }
2130 /* Do not output a trailing newline, as this causes \r\n confusion
2131 on some platforms. */
2132 return ferror (f) || fclose (f) != 0;
2133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_run "$LINENO"; then :
2139 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2140else
2141 ac_retval=1
2142fi
2143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2144 conftest.$ac_objext conftest.beam conftest.$ac_ext
2145rm -f conftest.val
2146
2147 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002149 as_fn_set_status $ac_retval
2150
2151} # ac_fn_c_compute_int
2152
2153# ac_fn_c_check_func LINENO FUNC VAR
2154# ----------------------------------
2155# Tests whether FUNC exists, setting the cache variable VAR accordingly
2156ac_fn_c_check_func ()
2157{
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2160$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002161if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 $as_echo_n "(cached) " >&6
2163else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2168#define $2 innocuous_$2
2169
2170/* System header to define __stub macros and hopefully few prototypes,
2171 which can conflict with char $2 (); below.
2172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2173 <limits.h> exists even on freestanding compilers. */
2174
2175#ifdef __STDC__
2176# include <limits.h>
2177#else
2178# include <assert.h>
2179#endif
2180
2181#undef $2
2182
2183/* Override any GCC internal prototype to avoid an error.
2184 Use char because int might match the return type of a GCC
2185 builtin and then its argument prototype would still apply. */
2186#ifdef __cplusplus
2187extern "C"
2188#endif
2189char $2 ();
2190/* The GNU C library defines this for functions which it implements
2191 to always fail with ENOSYS. Some functions are actually named
2192 something starting with __ and the normal name is an alias. */
2193#if defined __stub_$2 || defined __stub___$2
2194choke me
2195#endif
2196
2197int
2198main ()
2199{
2200return $2 ();
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_link "$LINENO"; then :
2206 eval "$3=yes"
2207else
2208 eval "$3=no"
2209fi
2210rm -f core conftest.err conftest.$ac_objext \
2211 conftest$ac_exeext conftest.$ac_ext
2212fi
2213eval ac_res=\$$3
2214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2215$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002216 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002217
2218} # ac_fn_c_check_func
2219
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002220# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2221# ---------------------------------------------
2222# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2223# accordingly.
2224ac_fn_c_check_decl ()
2225{
2226 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227 as_decl_name=`echo $2|sed 's/ *(.*//'`
2228 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2230$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2231if eval \${$3+:} false; then :
2232 $as_echo_n "(cached) " >&6
2233else
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h. */
2236$4
2237int
2238main ()
2239{
2240#ifndef $as_decl_name
2241#ifdef __cplusplus
2242 (void) $as_decl_use;
2243#else
2244 (void) $as_decl_name;
2245#endif
2246#endif
2247
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_compile "$LINENO"; then :
2253 eval "$3=yes"
2254else
2255 eval "$3=no"
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258fi
2259eval ac_res=\$$3
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261$as_echo "$ac_res" >&6; }
2262 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263
2264} # ac_fn_c_check_decl
2265
Matthias Kloseb9621712010-04-24 17:59:49 +00002266# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2267# ----------------------------------------------------
2268# Tries to find if the field MEMBER exists in type AGGR, after including
2269# INCLUDES, setting cache variable VAR accordingly.
2270ac_fn_c_check_member ()
2271{
2272 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2274$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002275if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002276 $as_echo_n "(cached) " >&6
2277else
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h. */
2280$5
2281int
2282main ()
2283{
2284static $2 ac_aggr;
2285if (ac_aggr.$3)
2286return 0;
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291if ac_fn_c_try_compile "$LINENO"; then :
2292 eval "$4=yes"
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (sizeof ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 eval "$4=no"
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315fi
2316eval ac_res=\$$4
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2318$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002319 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002320
2321} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002322cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002323This file contains any messages produced by compilers while
2324running configure, to aid debugging if configure makes a mistake.
2325
Ned Deily5489bda2018-01-31 17:44:09 -05002326It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002327generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002328
2329 $ $0 $@
2330
2331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002333{
2334cat <<_ASUNAME
2335## --------- ##
2336## Platform. ##
2337## --------- ##
2338
2339hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2340uname -m = `(uname -m) 2>/dev/null || echo unknown`
2341uname -r = `(uname -r) 2>/dev/null || echo unknown`
2342uname -s = `(uname -s) 2>/dev/null || echo unknown`
2343uname -v = `(uname -v) 2>/dev/null || echo unknown`
2344
2345/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2346/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2347
2348/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2349/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2350/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002352/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2353/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2354/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2355
2356_ASUNAME
2357
2358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2359for as_dir in $PATH
2360do
2361 IFS=$as_save_IFS
2362 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002363 $as_echo "PATH: $as_dir"
2364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002366
2367} >&5
2368
2369cat >&5 <<_ACEOF
2370
2371
2372## ----------- ##
2373## Core tests. ##
2374## ----------- ##
2375
2376_ACEOF
2377
2378
2379# Keep a trace of the command line.
2380# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002381# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002382# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002383# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002384ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002385ac_configure_args0=
2386ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002387ac_must_keep_next=false
2388for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002389do
Skip Montanaro6dead952003-09-25 14:50:04 +00002390 for ac_arg
2391 do
2392 case $ac_arg in
2393 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2395 | -silent | --silent | --silen | --sile | --sil)
2396 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002399 esac
2400 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002405 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002407 case $ac_arg in
2408 *=* | --config-cache | -C | -disable-* | --disable-* \
2409 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2410 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2411 | -with-* | --with-* | -without-* | --without-* | --x)
2412 case "$ac_configure_args0 " in
2413 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2414 esac
2415 ;;
2416 -* ) ac_must_keep_next=true ;;
2417 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 ;;
2421 esac
2422 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002423done
Matthias Kloseb9621712010-04-24 17:59:49 +00002424{ ac_configure_args0=; unset ac_configure_args0;}
2425{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002426
2427# When interrupted or exit'd, cleanup temporary files, and complete
2428# config.log. We remove comments because anyway the quotes in there
2429# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430# WARNING: Use '\'' to represent an apostrophe within the trap.
2431# 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 +00002432trap 'exit_status=$?
2433 # Save into config.log some information that might help in debugging.
2434 {
2435 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002436
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002437 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002438## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002439## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002440 echo
2441 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442(
2443 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2444 eval ac_val=\$$ac_var
2445 case $ac_val in #(
2446 *${as_nl}*)
2447 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2449$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450 esac
2451 case $ac_var in #(
2452 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002453 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2454 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455 esac ;;
2456 esac
2457 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2460 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 "s/'\''/'\''\\\\'\'''\''/g;
2463 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2464 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002465 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002467 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac |
2469 sort
2470)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002472
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002473 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002474## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002475## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 echo
2477 for ac_var in $ac_subst_vars
2478 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 eval ac_val=\$$ac_var
2480 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002483 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 done | sort
2485 echo
2486
2487 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_files
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501 fi
2502
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002505## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 echo
2510 fi
2511 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$as_me: caught signal $ac_signal"
2513 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 rm -f core *.core core.conftest.* &&
2516 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002519for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002521done
2522ac_signal=0
2523
2524# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
Matthias Kloseb9621712010-04-24 17:59:49 +00002527$as_echo "/* confdefs.h */" > confdefs.h
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529# Predefined preprocessor variables.
2530
2531cat >>confdefs.h <<_ACEOF
2532#define PACKAGE_NAME "$PACKAGE_NAME"
2533_ACEOF
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535cat >>confdefs.h <<_ACEOF
2536#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2537_ACEOF
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539cat >>confdefs.h <<_ACEOF
2540#define PACKAGE_VERSION "$PACKAGE_VERSION"
2541_ACEOF
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_STRING "$PACKAGE_STRING"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2549_ACEOF
2550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_URL "$PACKAGE_URL"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002557# Prefer an explicitly selected file to automatically selected ones.
2558ac_site_file1=NONE
2559ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 # We do not want a PATH search for config.site.
2562 case $CONFIG_SITE in #((
2563 -*) ac_site_file1=./$CONFIG_SITE;;
2564 */*) ac_site_file1=$CONFIG_SITE;;
2565 *) ac_site_file1=./$CONFIG_SITE;;
2566 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 ac_site_file1=$prefix/share/config.site
2569 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570else
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 ac_site_file1=$ac_default_prefix/share/config.site
2572 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002574for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575do
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 test "x$ac_site_file" = xNONE && continue
2577 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2579$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581 . "$ac_site_file" \
2582 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2584as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002585See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586 fi
2587done
2588
2589if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 # Some versions of bash will fail to source /dev/null (special files
2591 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2592 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2594$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2597 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 esac
2599 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600else
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2602$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 >$cache_file
2604fi
2605
2606# Check that the precious variables saved in the cache have kept the same
2607# value.
2608ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2611 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2613 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $ac_old_set,$ac_new_set in
2615 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2617$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 +00002618 ac_cache_corrupted=: ;;
2619 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_cache_corrupted=: ;;
2623 ,);;
2624 *)
2625 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 # differences in whitespace do not lead to failure.
2627 ac_old_val_w=`echo x $ac_old_val`
2628 ac_new_val_w=`echo x $ac_new_val`
2629 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2631$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2632 ac_cache_corrupted=:
2633 else
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2635$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2636 eval $ac_var=\$ac_old_val
2637 fi
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2639$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2641$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 fi;;
2643 esac
2644 # Pass precious variables to config.status.
2645 if test "$ac_new_set" = set; then
2646 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 *) ac_arg=$ac_var=$ac_new_val ;;
2649 esac
2650 case " $ac_configure_args " in
2651 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 esac
2654 fi
2655done
2656if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2660$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002663## -------------------- ##
2664## Main body of script. ##
2665## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666
Guido van Rossum7f43da71994-08-01 12:15:30 +00002667ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2671ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672
Guido van Rossum627b2d71993-12-24 10:39:16 +00002673
Michael W. Hudson54241132001-12-07 15:38:26 +00002674
Trent Nelson4d4ec652012-10-16 08:51:24 -04002675
Christian Heimesff5be6e2018-01-20 13:19:21 +01002676
2677
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002678if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002679 # If we're building out-of-tree, we need to make sure the following
2680 # resources get picked up before their $srcdir counterparts.
2681 # Objects/ -> typeslots.inc
2682 # Include/ -> Python-ast.h, graminit.h
2683 # Python/ -> importlib.h
2684 # (A side effect of this is that these resources will automatically be
2685 # regenerated when building out-of-tree, regardless of whether or not
2686 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2687 # off.)
2688 BASECPPFLAGS="-IObjects -IInclude -IPython"
2689else
2690 BASECPPFLAGS=""
2691fi
2692
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002693
2694
2695
2696
Victor Stinner9ed34a82017-05-02 22:35:58 +02002697if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002699# Extract the first word of "git", so it can be a program name with args.
2700set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2702$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002703if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002704 $as_echo_n "(cached) " >&6
2705else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002706 if test -n "$HAS_GIT"; then
2707 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708else
2709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2710for as_dir in $PATH
2711do
2712 IFS=$as_save_IFS
2713 test -z "$as_dir" && as_dir=.
2714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2718 break 2
2719 fi
2720done
2721 done
2722IFS=$as_save_IFS
2723
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725fi
2726fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727HAS_GIT=$ac_cv_prog_HAS_GIT
2728if test -n "$HAS_GIT"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2730$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731else
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2733$as_echo "no" >&6; }
2734fi
2735
2736
2737else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741then
Ned Deily554626a2017-03-20 23:41:52 -04002742 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2743 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746 GITVERSION=""
2747 GITTAG=""
2748 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
2750
2751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002753
2754
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002755ac_aux_dir=
2756for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2757 if test -f "$ac_dir/install-sh"; then
2758 ac_aux_dir=$ac_dir
2759 ac_install_sh="$ac_aux_dir/install-sh -c"
2760 break
2761 elif test -f "$ac_dir/install.sh"; then
2762 ac_aux_dir=$ac_dir
2763 ac_install_sh="$ac_aux_dir/install.sh -c"
2764 break
2765 elif test -f "$ac_dir/shtool"; then
2766 ac_aux_dir=$ac_dir
2767 ac_install_sh="$ac_aux_dir/shtool install -c"
2768 break
2769 fi
2770done
2771if test -z "$ac_aux_dir"; then
2772 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2773fi
2774
2775# These three variables are undocumented and unsupported,
2776# and are intended to be withdrawn in a future Autoconf release.
2777# They can cause serious problems if a builder's source tree is in a directory
2778# whose full name contains unusual characters.
2779ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2780ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2781ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2782
2783
2784# Make sure we can run config.sub.
2785$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2786 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2787
2788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2789$as_echo_n "checking build system type... " >&6; }
2790if ${ac_cv_build+:} false; then :
2791 $as_echo_n "(cached) " >&6
2792else
2793 ac_build_alias=$build_alias
2794test "x$ac_build_alias" = x &&
2795 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2796test "x$ac_build_alias" = x &&
2797 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2798ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2799 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2800
2801fi
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2803$as_echo "$ac_cv_build" >&6; }
2804case $ac_cv_build in
2805*-*-*) ;;
2806*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2807esac
2808build=$ac_cv_build
2809ac_save_IFS=$IFS; IFS='-'
2810set x $ac_cv_build
2811shift
2812build_cpu=$1
2813build_vendor=$2
2814shift; shift
2815# Remember, the first character of IFS is used to create $*,
2816# except with old shells:
2817build_os=$*
2818IFS=$ac_save_IFS
2819case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2820
2821
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2823$as_echo_n "checking host system type... " >&6; }
2824if ${ac_cv_host+:} false; then :
2825 $as_echo_n "(cached) " >&6
2826else
2827 if test "x$host_alias" = x; then
2828 ac_cv_host=$ac_cv_build
2829else
2830 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2831 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2832fi
2833
2834fi
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2836$as_echo "$ac_cv_host" >&6; }
2837case $ac_cv_host in
2838*-*-*) ;;
2839*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2840esac
2841host=$ac_cv_host
2842ac_save_IFS=$IFS; IFS='-'
2843set x $ac_cv_host
2844shift
2845host_cpu=$1
2846host_vendor=$2
2847shift; shift
2848# Remember, the first character of IFS is used to create $*,
2849# except with old shells:
2850host_os=$*
2851IFS=$ac_save_IFS
2852case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2853
2854
2855
doko@python.orga10e4a92013-01-25 18:45:12 +01002856
2857
Ned Deilyfcbc2462014-08-22 13:32:49 -07002858# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2859rm -f pybuilddir.txt
2860
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002861for ac_prog in python$PACKAGE_VERSION python3 python
2862do
2863 # Extract the first word of "$ac_prog", so it can be a program name with args.
2864set dummy $ac_prog; ac_word=$2
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2866$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002867if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002868 $as_echo_n "(cached) " >&6
2869else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002870 if test -n "$PYTHON_FOR_REGEN"; then
2871 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002872else
2873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2874for as_dir in $PATH
2875do
2876 IFS=$as_save_IFS
2877 test -z "$as_dir" && as_dir=.
2878 for ac_exec_ext in '' $ac_executable_extensions; do
2879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2882 break 2
2883 fi
2884done
2885 done
2886IFS=$as_save_IFS
2887
2888fi
2889fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002890PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2891if test -n "$PYTHON_FOR_REGEN"; then
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2893$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894else
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2896$as_echo "no" >&6; }
2897fi
2898
2899
Victor Stinnera5c62a82017-05-03 18:21:48 +02002900 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002901done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002903
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002904
2905
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002906if test "$cross_compiling" = yes; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2908$as_echo_n "checking for python interpreter for cross build... " >&6; }
2909 if test -z "$PYTHON_FOR_BUILD"; then
2910 for interp in python$PACKAGE_VERSION python3 python; do
2911 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002912 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 +02002913 break
2914 fi
2915 interp=
2916 done
2917 if test x$interp = x; then
2918 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2919 fi
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2921$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002922 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 +02002923 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002924elif test "$cross_compiling" = maybe; then
2925 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926else
2927 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2928fi
2929
2930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
Benjamin Petersond23f8222009-04-05 19:13:16 +00002932if test "$prefix" != "/"; then
2933 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2934fi
2935
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
2938
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002939# We don't use PACKAGE_ variables, and they cause conflicts
2940# with other autoconf-based packages that include Python.h
2941grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2942rm confdefs.h
2943mv confdefs.h.new confdefs.h
2944
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002945
Ned Deily5489bda2018-01-31 17:44:09 -05002946VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002947
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002948# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002949
2950SOVERSION=1.0
2951
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002952# The later defininition of _XOPEN_SOURCE disables certain features
2953# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2954
Matthias Kloseb9621712010-04-24 17:59:49 +00002955$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002956
2957
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002958# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2959# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2960# them.
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002963
2964
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002965# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2966# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2967# them.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002970
2971
Martin v. Löwisd6320502004-08-12 13:45:08 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002973# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002977
2978
2979
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002980define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002982# Arguments passed to configure.
2983
2984CONFIG_ARGS="$ac_configure_args"
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2987$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002989if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002991 case $enableval in
2992 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002993 # Locate the best usable SDK, see Mac/README.txt for more
2994 # information
2995 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07002996 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002997 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002998 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2999 if test ! -d "${enableval}"
3000 then
3001 enableval=/
3002 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 ;;
3005 esac
3006 case $enableval in
3007 no)
3008 UNIVERSALSDK=
3009 enable_universalsdk=
3010 ;;
3011 *)
3012 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 if test ! -d "${UNIVERSALSDK}"
3014 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003015 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021else
3022
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028if test -n "${UNIVERSALSDK}"
3029then
Matthias Kloseb9621712010-04-24 17:59:49 +00003030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3031$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032else
Matthias Kloseb9621712010-04-24 17:59:49 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3034$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003038
Ned Deily87adb6e2013-10-18 21:09:56 -07003039ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003040
Ned Deilycbfb9a52012-06-23 16:02:19 -07003041# For backward compatibility reasons we prefer to select '32-bit' if available,
3042# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003044if test "`uname -s`" = "Darwin"
3045then
3046 if test -n "${UNIVERSALSDK}"
3047 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003048 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049 then
3050 UNIVERSAL_ARCHS="intel"
3051 fi
3052 fi
3053fi
3054
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3057$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058
3059# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003060if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062 UNIVERSAL_ARCHS="$withval"
3063
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064fi
3065
Ned Deily87adb6e2013-10-18 21:09:56 -07003066if test -n "${UNIVERSALSDK}"
3067then
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3069$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3070else
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3072$as_echo "no" >&6; }
3073fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003075
3076# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003078 withval=$with_framework_name;
3079 PYTHONFRAMEWORK=${withval}
3080 PYTHONFRAMEWORKDIR=${withval}.framework
3081 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3082
3083else
3084
3085 PYTHONFRAMEWORK=Python
3086 PYTHONFRAMEWORKDIR=Python.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3088
3089fi
3090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003094 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003096 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 esac
3098 case $enableval in
3099 no)
3100 PYTHONFRAMEWORK=
3101 PYTHONFRAMEWORKDIR=no-framework
3102 PYTHONFRAMEWORKPREFIX=
3103 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104 FRAMEWORKINSTALLFIRST=
3105 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003106 FRAMEWORKALTINSTALLFIRST=
3107 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003108 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003109 if test "x${prefix}" = "xNONE"; then
3110 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3111 else
3112 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3113 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003115 ;;
3116 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003117 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003118 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003120 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003121 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3122 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003123 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003124 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003125
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 if test "x${prefix}" = "xNONE" ; then
3127 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003128
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 else
3130 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3131 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003132
3133 case "${enableval}" in
3134 /System*)
3135 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3136 if test "${prefix}" = "NONE" ; then
3137 # See below
3138 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3139 fi
3140 ;;
3141
3142 /Library*)
3143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3144 ;;
3145
3146 */Library/Frameworks)
3147 MDIR="`dirname "${enableval}"`"
3148 MDIR="`dirname "${MDIR}"`"
3149 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3150
3151 if test "${prefix}" = "NONE"; then
3152 # User hasn't specified the
3153 # --prefix option, but wants to install
3154 # the framework in a non-default location,
3155 # ensure that the compatibility links get
3156 # installed relative to that prefix as well
3157 # instead of in /usr/local.
3158 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3159 fi
3160 ;;
3161
3162 *)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 ;;
3165 esac
3166
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003169 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003175 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3176
3177 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3178
Jack Jansene578a632001-08-15 01:27:14 +00003179 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Guido van Rossum563e7081996-09-10 18:20:48 +00003181else
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Jack Jansene578a632001-08-15 01:27:14 +00003183 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003185 PYTHONFRAMEWORKPREFIX=
3186 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 FRAMEWORKINSTALLFIRST=
3188 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 FRAMEWORKALTINSTALLFIRST=
3190 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003191 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 if test "x${prefix}" = "xNONE" ; then
3193 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3194 else
3195 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3196 fi
Jack Jansene578a632001-08-15 01:27:14 +00003197 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003198
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200fi
3201
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
3203
Michael W. Hudson54241132001-12-07 15:38:26 +00003204
3205
3206
3207
Jack Jansene578a632001-08-15 01:27:14 +00003208
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209
3210
3211
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003212
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003213
Ned Deilyb8f944f2013-11-21 22:42:25 -08003214
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003215
3216cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003217#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003218_ACEOF
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003222## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003223## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003224##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003225# Set name for machine-dependent library files
3226
Matthias Kloseb9621712010-04-24 17:59:49 +00003227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3228$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229if test -z "$MACHDEP"
3230then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003231 # avoid using uname for cross builds
3232 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003233 # ac_sys_system and ac_sys_release are used for setting
3234 # a lot of different things including 'define_xopen_source'
3235 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003236 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003237 *-*-linux-android*)
3238 ac_sys_system=Linux-android
3239 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003240 *-*-linux*)
3241 ac_sys_system=Linux
3242 ;;
3243 *-*-cygwin*)
3244 ac_sys_system=Cygwin
3245 ;;
3246 *)
3247 # for now, limit cross builds to known configurations
3248 MACHDEP="unknown"
3249 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3250 esac
3251 ac_sys_release=
3252 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003253 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003254 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003255 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003256 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003258 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 fi
3261 ac_md_system=`echo $ac_sys_system |
3262 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3263 ac_md_release=`echo $ac_sys_release |
3264 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3265 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003266
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003267 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003268 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003269 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003270 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003271 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273fi
Guido van Rossum91922671997-10-09 20:24:13 +00003274
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003275
3276if test "$cross_compiling" = yes; then
3277 case "$host" in
3278 *-*-linux*)
3279 case "$host_cpu" in
3280 arm*)
3281 _host_cpu=arm
3282 ;;
3283 *)
3284 _host_cpu=$host_cpu
3285 esac
3286 ;;
3287 *-*-cygwin*)
3288 _host_cpu=
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3296fi
3297
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003298# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3299# disable features if it is defined, without any means to access these
3300# features as extensions. For these systems, we skip the definition of
3301# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3302# some feature, make sure there is no alternative way to access this
3303# feature. Also, when using wildcards, make sure you have verified the
3304# need for not defining _XOPEN_SOURCE on all systems matching the
3305# wildcard, and that the wildcard does not include future systems
3306# (which may remove their limitations).
3307case $ac_sys_system/$ac_sys_release in
3308 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3309 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003310 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003311 # In addition, Stefan Krah confirms that issue #1244610 exists through
3312 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003313 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003314 define_xopen_source=no
3315 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3316 # also defined. This can be overridden by defining _BSD_SOURCE
3317 # As this has a different meaning on Linux, only define it on OpenBSD
3318
Matthias Kloseb9621712010-04-24 17:59:49 +00003319$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003320
3321 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003322 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003323 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3324 # also defined. This can be overridden by defining _BSD_SOURCE
3325 # As this has a different meaning on Linux, only define it on OpenBSD
3326
Matthias Kloseb9621712010-04-24 17:59:49 +00003327$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003328
3329 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003330 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3331 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3332 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003333 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 +00003334 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003335 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3336 # request to enable features supported by the standard as a request
3337 # to disable features not supported by the standard. The best way
3338 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3339 # entirely and define __EXTENSIONS__ instead.
3340 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003341 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003342 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3343 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003344 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003345 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003346 define_xopen_source=no;;
3347 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003348 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003349 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003350 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003351 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3352 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3353 # identifies itself as Darwin/7.*
3354 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3355 # disables platform specific features beyond repair.
3356 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3357 # has no effect, don't bother defining them
3358 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003359 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003360 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003361 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003362 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3363 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3364 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003365 AIX/4)
3366 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003367 AIX/5)
3368 if test `uname -r` -eq 1; then
3369 define_xopen_source=no
3370 fi
3371 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003372 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3373 # defining NI_NUMERICHOST.
3374 QNX/6.3.2)
3375 define_xopen_source=no
3376 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003377
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003378esac
3379
3380if test $define_xopen_source = yes
3381then
Victor Stinner14d098d2011-09-07 22:29:43 +02003382 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003383
Victor Stinner14d098d2011-09-07 22:29:43 +02003384$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003385
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003386
3387 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3388 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3389 # several APIs are not declared. Since this is also needed in some
3390 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
Matthias Kloseb9621712010-04-24 17:59:49 +00003392$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
3394
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003396$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398fi
3399
Christian Heimes647cd872013-12-07 23:39:33 +01003400# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3401case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003402 hp*|HP*)
3403 define_stdc_a1=yes;;
3404 *)
3405 define_stdc_a1=no;;
3406esac
3407
3408if test $define_stdc_a1 = yes
3409then
Christian Heimes647cd872013-12-07 23:39:33 +01003410
3411$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3412
Christian Heimesb02bcae2013-12-08 15:21:08 +01003413fi
Christian Heimes647cd872013-12-07 23:39:33 +01003414
Jack Jansen6b08a402004-06-03 12:41:45 +00003415# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3416# it may influence the way we can build extensions, so distutils
3417# needs to check it
3418
Thomas Wouters477c8d52006-05-27 19:21:47 +00003419
Jack Jansen6b08a402004-06-03 12:41:45 +00003420CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003421EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003422
Guido van Rossum627b2d71993-12-24 10:39:16 +00003423# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003424
3425# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3426# for debug/optimization stuff. BASECFLAGS is for flags that are required
3427# just to get things to compile and link. Users are free to override OPT
3428# when running configure or make. The build should not break if they do.
3429# BASECFLAGS should generally not be messed with, however.
3430
Guido van Rossum8b131c51995-03-09 14:10:13 +00003431# If the user switches compilers, we can't believe the cache
3432if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3433then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003434 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003435(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003436fi
3437
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003438# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3439# when the compiler supports them, but we don't always want -O2, and
3440# we set -g later.
3441if test -z "$CFLAGS"; then
3442 CFLAGS=
3443fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003444
3445if test "$ac_sys_system" = "Darwin"
3446then
3447 # Compiler selection on MacOSX is more complicated than
3448 # AC_PROG_CC can handle, see Mac/README.txt for more
3449 # information
3450 if test -z "${CC}"
3451 then
3452 found_gcc=
3453 found_clang=
3454 as_save_IFS=$IFS; IFS=:
3455 for as_dir in $PATH
3456 do
3457 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003458 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003459 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003460 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003461 fi
3462 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003463 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003464 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003465 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003466 fi
3467 fi
3468 done
3469 IFS=$as_save_IFS
3470
3471 if test -n "$found_gcc" -a -n "$found_clang"
3472 then
3473 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3474 then
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3476$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3477 CC="$found_clang"
3478 CXX="$found_clang++"
3479 fi
3480
3481
3482 elif test -z "$found_gcc" -a -n "$found_clang"
3483 then
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3485$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3486 CC="$found_clang"
3487 CXX="$found_clang++"
3488
3489 elif test -z "$found_gcc" -a -z "$found_clang"
3490 then
3491 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3492 if test -n "${found_clang}"
3493 then
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3495$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3496 CC="${found_clang}"
3497 CXX="`/usr/bin/xcrun -find clang++`"
3498
3499 # else: use default behaviour
3500 fi
3501 fi
3502 fi
3503fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003504ac_ext=c
3505ac_cpp='$CPP $CPPFLAGS'
3506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3508ac_compiler_gnu=$ac_cv_c_compiler_gnu
3509if test -n "$ac_tool_prefix"; then
3510 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3511set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3513$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003514if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003516else
3517 if test -n "$CC"; then
3518 ac_cv_prog_CC="$CC" # Let the user override the test.
3519else
Martin v. Löwis11437992002-04-12 09:54:03 +00003520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3521for as_dir in $PATH
3522do
3523 IFS=$as_save_IFS
3524 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003528 $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 +00003529 break 2
3530 fi
3531done
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003534
Jack Jansendd19cf82001-12-06 22:36:17 +00003535fi
3536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003537CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003538if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3540$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003541else
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3543$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544fi
3545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546
Martin v. Löwis11437992002-04-12 09:54:03 +00003547fi
3548if test -z "$ac_cv_prog_CC"; then
3549 ac_ct_CC=$CC
3550 # Extract the first word of "gcc", so it can be a program name with args.
3551set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3553$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003554if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003556else
3557 if test -n "$ac_ct_CC"; then
3558 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3559else
3560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3561for as_dir in $PATH
3562do
3563 IFS=$as_save_IFS
3564 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 $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 +00003569 break 2
3570 fi
3571done
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003574
3575fi
3576fi
3577ac_ct_CC=$ac_cv_prog_ac_ct_CC
3578if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3580$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003581else
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3583$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003584fi
3585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586 if test "x$ac_ct_CC" = x; then
3587 CC=""
3588 else
3589 case $cross_compiling:$ac_tool_warned in
3590yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593ac_tool_warned=yes ;;
3594esac
3595 CC=$ac_ct_CC
3596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003597else
3598 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003599fi
3600
Jack Jansendd19cf82001-12-06 22:36:17 +00003601if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602 if test -n "$ac_tool_prefix"; then
3603 # 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 +00003604set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003607if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003609else
3610 if test -n "$CC"; then
3611 ac_cv_prog_CC="$CC" # Let the user override the test.
3612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $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 +00003622 break 2
3623 fi
3624done
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003627
3628fi
3629fi
3630CC=$ac_cv_prog_CC
3631if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3633$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3636$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642if test -z "$CC"; then
3643 # Extract the first word of "cc", so it can be a program name with args.
3644set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3646$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003647if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 if test -n "$CC"; then
3651 ac_cv_prog_CC="$CC" # Let the user override the test.
3652else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003653 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655for as_dir in $PATH
3656do
3657 IFS=$as_save_IFS
3658 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003661 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3662 ac_prog_rejected=yes
3663 continue
3664 fi
3665 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $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 +00003667 break 2
3668 fi
3669done
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003672
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003673if test $ac_prog_rejected = yes; then
3674 # We found a bogon in the path, so make sure we never use it.
3675 set dummy $ac_cv_prog_CC
3676 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678 # We chose a different compiler from the bogus one.
3679 # However, it has the same basename, so the bogon will be chosen
3680 # first if we set CC to just the basename; use the full file name.
3681 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003682 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003683 fi
3684fi
3685fi
3686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003687CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003688if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691else
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003694fi
3695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698if test -z "$CC"; then
3699 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 do
3702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 test -n "$CC" && break
3740 done
3741fi
3742if test -z "$CC"; then
3743 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003745do
3746 # Extract the first word of "$ac_prog", so it can be a program name with args.
3747set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003750if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
3753 if test -n "$ac_ct_CC"; then
3754 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3755else
3756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3757for as_dir in $PATH
3758do
3759 IFS=$as_save_IFS
3760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 $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 +00003765 break 2
3766 fi
3767done
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
3772fi
3773ac_ct_CC=$ac_cv_prog_ac_ct_CC
3774if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3776$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003780fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 test -n "$ac_ct_CC" && break
3784done
Michael W. Hudson54241132001-12-07 15:38:26 +00003785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 if test "x$ac_ct_CC" = x; then
3787 CC=""
3788 else
3789 case $cross_compiling:$ac_tool_warned in
3790yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793ac_tool_warned=yes ;;
3794esac
3795 CC=$ac_ct_CC
3796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
3798
3799fi
3800
3801
Matthias Kloseb9621712010-04-24 17:59:49 +00003802test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003804as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003805See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
3807# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3809set X $ac_compile
3810ac_compiler=$2
3811for ac_option in --version -v -V -qversion; do
3812 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813case "(($ac_try" in
3814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3815 *) ac_try_echo=$ac_try;;
3816esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3818$as_echo "$ac_try_echo"; } >&5
3819 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 if test -s conftest.err; then
3822 sed '10a\
3823... rest of stderr output deleted ...
3824 10q' conftest.err >conftest.er1
3825 cat conftest.er1 >&5
3826 fi
3827 rm -f conftest.er1 conftest.err
3828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3829 test $ac_status = 0; }
3830done
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
Matthias Kloseb9621712010-04-24 17:59:49 +00003832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003833/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835int
3836main ()
3837{
3838
3839 ;
3840 return 0;
3841}
3842_ACEOF
3843ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003844ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003845# Try to create an executable without -o first, disregard a.out.
3846# It will help us diagnose broken compilers, and finding out an intuition
3847# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3849$as_echo_n "checking whether the C compiler works... " >&6; }
3850ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3851
3852# The possible output files:
3853ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855ac_rmfiles=
3856for ac_file in $ac_files
3857do
3858 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3861 esac
3862done
3863rm -f $ac_rmfiles
3864
Matthias Kloseb9621712010-04-24 17:59:49 +00003865if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866case "(($ac_try" in
3867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3868 *) ac_try_echo=$ac_try;;
3869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3871$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3875 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3877# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3878# in a Makefile. We should not override ac_cv_exeext if it was cached,
3879# so that the user can short-circuit this test for compilers unknown to
3880# Autoconf.
3881for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003882do
3883 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003886 ;;
3887 [ab].out )
3888 # We found the default executable, but exeext='' is most
3889 # certainly right.
3890 break;;
3891 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 then :; else
3894 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3895 fi
3896 # We set ac_cv_exeext here because the later test for it is not
3897 # safe: cross compilers may not add the suffix if given an `-o'
3898 # argument, so we may need to know it at that point already.
3899 # Even if this section looks crufty: it has the advantage of
3900 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003901 break;;
3902 * )
3903 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 esac
3905done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906test "$ac_cv_exeext" = no && ac_cv_exeext=
3907
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003908else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 ac_file=''
3910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003911if test -z "$ac_file"; then :
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3913$as_echo "no" >&6; }
3914$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003915sed 's/^/| /' conftest.$ac_ext >&5
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003921else
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3923$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3926$as_echo_n "checking for C compiler default output file name... " >&6; }
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3928$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003929ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003932ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3934$as_echo_n "checking for suffix of executables... " >&6; }
3935if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003946 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3947# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3948# work properly (i.e., refer to `conftest.exe'), while it won't with
3949# `rm'.
3950for ac_file in conftest.exe conftest conftest.*; do
3951 test -f "$ac_file" || continue
3952 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3955 break;;
3956 * ) break;;
3957 esac
3958done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959else
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003962as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003963See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003965rm -f conftest conftest$ac_cv_exeext
3966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3967$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968
3969rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003970EXEEXT=$ac_cv_exeext
3971ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3973/* end confdefs.h. */
3974#include <stdio.h>
3975int
3976main ()
3977{
3978FILE *f = fopen ("conftest.out", "w");
3979 return ferror (f) || fclose (f) != 0;
3980
3981 ;
3982 return 0;
3983}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003985ac_clean_files="$ac_clean_files conftest.out"
3986# Check that the compiler produces executables we can run. If not, either
3987# the compiler is broken, or we cross compile.
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3989$as_echo_n "checking whether we are cross compiling... " >&6; }
3990if test "$cross_compiling" != yes; then
3991 { { ac_try="$ac_link"
3992case "(($ac_try" in
3993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3994 *) ac_try_echo=$ac_try;;
3995esac
3996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3997$as_echo "$ac_try_echo"; } >&5
3998 (eval "$ac_link") 2>&5
3999 ac_status=$?
4000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4001 test $ac_status = 0; }
4002 if { ac_try='./conftest$ac_cv_exeext'
4003 { { case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
4007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
4009 (eval "$ac_try") 2>&5
4010 ac_status=$?
4011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012 test $ac_status = 0; }; }; then
4013 cross_compiling=no
4014 else
4015 if test "$cross_compiling" = maybe; then
4016 cross_compiling=yes
4017 else
4018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004021If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004022See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 fi
4024 fi
4025fi
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4027$as_echo "$cross_compiling" >&6; }
4028
4029rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4030ac_clean_files=$ac_clean_files_save
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4032$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004033if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 $as_echo_n "(cached) " >&6
4035else
4036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037/* end confdefs.h. */
4038
4039int
4040main ()
4041{
4042
4043 ;
4044 return 0;
4045}
4046_ACEOF
4047rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004048if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 for ac_file in conftest.o conftest.obj conftest.*; do
4060 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004063 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4064 break;;
4065 esac
4066done
4067else
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004069sed 's/^/| /' conftest.$ac_ext >&5
4070
Matthias Kloseb9621712010-04-24 17:59:49 +00004071{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004073as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004074See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004075fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004076rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4079$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004080OBJEXT=$ac_cv_objext
4081ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4083$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004084if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004086else
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
Martin v. Löwis11437992002-04-12 09:54:03 +00004090int
4091main ()
4092{
4093#ifndef __GNUC__
4094 choke me
4095#endif
4096
4097 ;
4098 return 0;
4099}
4100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004102 ac_compiler_gnu=yes
4103else
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004107ac_cv_c_compiler_gnu=$ac_compiler_gnu
4108
4109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4111$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4112if test $ac_compiler_gnu = yes; then
4113 GCC=yes
4114else
4115 GCC=
4116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004117ac_test_CFLAGS=${CFLAGS+set}
4118ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4120$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004123else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 ac_save_c_werror_flag=$ac_c_werror_flag
4125 ac_c_werror_flag=yes
4126 ac_cv_prog_cc_g=no
4127 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131int
4132main ()
4133{
4134
4135 ;
4136 return 0;
4137}
4138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004139if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004140 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 CFLAGS=""
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144/* end confdefs.h. */
4145
4146int
4147main ()
4148{
4149
4150 ;
4151 return 0;
4152}
4153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004154if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155
Matthias Kloseb9621712010-04-24 17:59:49 +00004156else
4157 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004160/* end confdefs.h. */
4161
4162int
4163main ()
4164{
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4178 ac_c_werror_flag=$ac_save_c_werror_flag
4179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4181$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004182if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004184elif test $ac_cv_prog_cc_g = yes; then
4185 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004186 CFLAGS="-g -O2"
4187 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004188 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189 fi
4190else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004191 if test "$GCC" = yes; then
4192 CFLAGS="-O2"
4193 else
4194 CFLAGS=
4195 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4198$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004201else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004203ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
4206#include <stdarg.h>
4207#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004208struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004209/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4210struct buf { int x; };
4211FILE * (*rcsopen) (struct buf *, struct stat *, int);
4212static char *e (p, i)
4213 char **p;
4214 int i;
4215{
4216 return p[i];
4217}
4218static char *f (char * (*g) (char **, int), char **p, ...)
4219{
4220 char *s;
4221 va_list v;
4222 va_start (v,p);
4223 s = g (p, va_arg (v,int));
4224 va_end (v);
4225 return s;
4226}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004227
4228/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4229 function prototypes and stuff, but not '\xHH' hex character constants.
4230 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004232 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4233 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4238 inside strings and character constants. */
4239#define FOO(x) 'x'
4240int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4241
Skip Montanaro6dead952003-09-25 14:50:04 +00004242int test (int i, double x);
4243struct s1 {int (*f) (int a);};
4244struct s2 {int (*f) (double a);};
4245int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4246int argc;
4247char **argv;
4248int
4249main ()
4250{
4251return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4252 ;
4253 return 0;
4254}
4255_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4257 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004258do
4259 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext
4264 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004265done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004267CC=$ac_save_CC
4268
4269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270# AC_CACHE_VAL
4271case "x$ac_cv_prog_cc_c89" in
4272 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4274$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4277$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004278 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4281$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004282esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004283if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004284
Matthias Kloseb9621712010-04-24 17:59:49 +00004285fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287ac_ext=c
4288ac_cpp='$CPP $CPPFLAGS'
4289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4291ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004293ac_ext=c
4294ac_cpp='$CPP $CPPFLAGS'
4295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4297ac_compiler_gnu=$ac_cv_c_compiler_gnu
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4299$as_echo_n "checking how to run the C preprocessor... " >&6; }
4300# On Suns, sometimes $CPP names a directory.
4301if test -n "$CPP" && test -d "$CPP"; then
4302 CPP=
4303fi
4304if test -z "$CPP"; then
4305 if ${ac_cv_prog_CPP+:} false; then :
4306 $as_echo_n "(cached) " >&6
4307else
4308 # Double quotes because CPP needs to be expanded
4309 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4310 do
4311 ac_preproc_ok=false
4312for ac_c_preproc_warn_flag in '' yes
4313do
4314 # Use a header file that comes with gcc, so configuring glibc
4315 # with a fresh cross-compiler works.
4316 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4317 # <limits.h> exists even on freestanding compilers.
4318 # On the NeXT, cc -E runs the code through the compiler's parser,
4319 # not just through cpp. "Syntax error" is here to catch this case.
4320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321/* end confdefs.h. */
4322#ifdef __STDC__
4323# include <limits.h>
4324#else
4325# include <assert.h>
4326#endif
4327 Syntax error
4328_ACEOF
4329if ac_fn_c_try_cpp "$LINENO"; then :
4330
4331else
4332 # Broken: fails on valid input.
4333continue
4334fi
4335rm -f conftest.err conftest.i conftest.$ac_ext
4336
4337 # OK, works on sane cases. Now check whether nonexistent headers
4338 # can be detected and how.
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340/* end confdefs.h. */
4341#include <ac_nonexistent.h>
4342_ACEOF
4343if ac_fn_c_try_cpp "$LINENO"; then :
4344 # Broken: success on invalid input.
4345continue
4346else
4347 # Passes both tests.
4348ac_preproc_ok=:
4349break
4350fi
4351rm -f conftest.err conftest.i conftest.$ac_ext
4352
4353done
4354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4355rm -f conftest.i conftest.err conftest.$ac_ext
4356if $ac_preproc_ok; then :
4357 break
4358fi
4359
4360 done
4361 ac_cv_prog_CPP=$CPP
4362
4363fi
4364 CPP=$ac_cv_prog_CPP
4365else
4366 ac_cv_prog_CPP=$CPP
4367fi
4368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4369$as_echo "$CPP" >&6; }
4370ac_preproc_ok=false
4371for ac_c_preproc_warn_flag in '' yes
4372do
4373 # Use a header file that comes with gcc, so configuring glibc
4374 # with a fresh cross-compiler works.
4375 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4376 # <limits.h> exists even on freestanding compilers.
4377 # On the NeXT, cc -E runs the code through the compiler's parser,
4378 # not just through cpp. "Syntax error" is here to catch this case.
4379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4380/* end confdefs.h. */
4381#ifdef __STDC__
4382# include <limits.h>
4383#else
4384# include <assert.h>
4385#endif
4386 Syntax error
4387_ACEOF
4388if ac_fn_c_try_cpp "$LINENO"; then :
4389
4390else
4391 # Broken: fails on valid input.
4392continue
4393fi
4394rm -f conftest.err conftest.i conftest.$ac_ext
4395
4396 # OK, works on sane cases. Now check whether nonexistent headers
4397 # can be detected and how.
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399/* end confdefs.h. */
4400#include <ac_nonexistent.h>
4401_ACEOF
4402if ac_fn_c_try_cpp "$LINENO"; then :
4403 # Broken: success on invalid input.
4404continue
4405else
4406 # Passes both tests.
4407ac_preproc_ok=:
4408break
4409fi
4410rm -f conftest.err conftest.i conftest.$ac_ext
4411
4412done
4413# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4414rm -f conftest.i conftest.err conftest.$ac_ext
4415if $ac_preproc_ok; then :
4416
4417else
4418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4420as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4421See \`config.log' for more details" "$LINENO" 5; }
4422fi
4423
4424ac_ext=c
4425ac_cpp='$CPP $CPPFLAGS'
4426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4428ac_compiler_gnu=$ac_cv_c_compiler_gnu
4429
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4431$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4432if ${ac_cv_path_GREP+:} false; then :
4433 $as_echo_n "(cached) " >&6
4434else
4435 if test -z "$GREP"; then
4436 ac_path_GREP_found=false
4437 # Loop through the user's path and test for each of PROGNAME-LIST
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_prog in grep ggrep; do
4444 for ac_exec_ext in '' $ac_executable_extensions; do
4445 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4446 as_fn_executable_p "$ac_path_GREP" || continue
4447# Check for GNU ac_path_GREP and select it if it is found.
4448 # Check for GNU $ac_path_GREP
4449case `"$ac_path_GREP" --version 2>&1` in
4450*GNU*)
4451 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4452*)
4453 ac_count=0
4454 $as_echo_n 0123456789 >"conftest.in"
4455 while :
4456 do
4457 cat "conftest.in" "conftest.in" >"conftest.tmp"
4458 mv "conftest.tmp" "conftest.in"
4459 cp "conftest.in" "conftest.nl"
4460 $as_echo 'GREP' >> "conftest.nl"
4461 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4462 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4463 as_fn_arith $ac_count + 1 && ac_count=$as_val
4464 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4465 # Best one so far, save it but keep looking for a better one
4466 ac_cv_path_GREP="$ac_path_GREP"
4467 ac_path_GREP_max=$ac_count
4468 fi
4469 # 10*(2^10) chars as input seems more than enough
4470 test $ac_count -gt 10 && break
4471 done
4472 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4473esac
4474
4475 $ac_path_GREP_found && break 3
4476 done
4477 done
4478 done
4479IFS=$as_save_IFS
4480 if test -z "$ac_cv_path_GREP"; then
4481 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4482 fi
4483else
4484 ac_cv_path_GREP=$GREP
4485fi
4486
4487fi
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4489$as_echo "$ac_cv_path_GREP" >&6; }
4490 GREP="$ac_cv_path_GREP"
4491
4492
Łukasz Langaa785c872016-09-09 17:37:37 -07004493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4494$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4495if ${ac_cv_path_SED+:} false; then :
4496 $as_echo_n "(cached) " >&6
4497else
4498 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4499 for ac_i in 1 2 3 4 5 6 7; do
4500 ac_script="$ac_script$as_nl$ac_script"
4501 done
4502 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4503 { ac_script=; unset ac_script;}
4504 if test -z "$SED"; then
4505 ac_path_SED_found=false
4506 # Loop through the user's path and test for each of PROGNAME-LIST
4507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH
4509do
4510 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=.
4512 for ac_prog in sed gsed; do
4513 for ac_exec_ext in '' $ac_executable_extensions; do
4514 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4515 as_fn_executable_p "$ac_path_SED" || continue
4516# Check for GNU ac_path_SED and select it if it is found.
4517 # Check for GNU $ac_path_SED
4518case `"$ac_path_SED" --version 2>&1` in
4519*GNU*)
4520 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4521*)
4522 ac_count=0
4523 $as_echo_n 0123456789 >"conftest.in"
4524 while :
4525 do
4526 cat "conftest.in" "conftest.in" >"conftest.tmp"
4527 mv "conftest.tmp" "conftest.in"
4528 cp "conftest.in" "conftest.nl"
4529 $as_echo '' >> "conftest.nl"
4530 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4532 as_fn_arith $ac_count + 1 && ac_count=$as_val
4533 if test $ac_count -gt ${ac_path_SED_max-0}; then
4534 # Best one so far, save it but keep looking for a better one
4535 ac_cv_path_SED="$ac_path_SED"
4536 ac_path_SED_max=$ac_count
4537 fi
4538 # 10*(2^10) chars as input seems more than enough
4539 test $ac_count -gt 10 && break
4540 done
4541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4542esac
4543
4544 $ac_path_SED_found && break 3
4545 done
4546 done
4547 done
4548IFS=$as_save_IFS
4549 if test -z "$ac_cv_path_SED"; then
4550 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4551 fi
4552else
4553 ac_cv_path_SED=$SED
4554fi
4555
4556fi
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4558$as_echo "$ac_cv_path_SED" >&6; }
4559 SED="$ac_cv_path_SED"
4560 rm -f conftest.sed
4561
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004562
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004563
4564
Matthias Kloseb9621712010-04-24 17:59:49 +00004565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4566$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004568# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004569if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004570 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571
4572 case $withval in
4573 no) with_cxx_main=no
4574 MAINCC='$(CC)';;
4575 yes) with_cxx_main=yes
4576 MAINCC='$(CXX)';;
4577 *) with_cxx_main=yes
4578 MAINCC=$withval
4579 if test -z "$CXX"
4580 then
4581 CXX=$withval
4582 fi;;
4583 esac
4584else
4585
4586 with_cxx_main=no
4587 MAINCC='$(CC)'
4588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004589fi
4590
Matthias Kloseb9621712010-04-24 17:59:49 +00004591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4592$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594preset_cxx="$CXX"
4595if test -z "$CXX"
4596then
4597 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004598 gcc) if test -n "$ac_tool_prefix"; then
4599 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4600set dummy ${ac_tool_prefix}g++; ac_word=$2
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4602$as_echo_n "checking for $ac_word... " >&6; }
4603if ${ac_cv_path_CXX+:} false; then :
4604 $as_echo_n "(cached) " >&6
4605else
4606 case $CXX in
4607 [\\/]* | ?:[\\/]*)
4608 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4609 ;;
4610 *)
4611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4612for as_dir in notfound
4613do
4614 IFS=$as_save_IFS
4615 test -z "$as_dir" && as_dir=.
4616 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004618 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4620 break 2
4621 fi
4622done
4623 done
4624IFS=$as_save_IFS
4625
4626 ;;
4627esac
4628fi
4629CXX=$ac_cv_path_CXX
4630if test -n "$CXX"; then
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4632$as_echo "$CXX" >&6; }
4633else
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635$as_echo "no" >&6; }
4636fi
4637
4638
4639fi
4640if test -z "$ac_cv_path_CXX"; then
4641 ac_pt_CXX=$CXX
4642 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004646if ${ac_cv_path_ac_pt_CXX+:} false; then :
4647 $as_echo_n "(cached) " >&6
4648else
4649 case $ac_pt_CXX in
4650 [\\/]* | ?:[\\/]*)
4651 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4652 ;;
4653 *)
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in notfound
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4663 break 2
4664 fi
4665done
4666 done
4667IFS=$as_save_IFS
4668
4669 ;;
4670esac
4671fi
4672ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4673if test -n "$ac_pt_CXX"; then
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4675$as_echo "$ac_pt_CXX" >&6; }
4676else
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4678$as_echo "no" >&6; }
4679fi
4680
4681 if test "x$ac_pt_CXX" = x; then
4682 CXX="g++"
4683 else
4684 case $cross_compiling:$ac_tool_warned in
4685yes:)
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4688ac_tool_warned=yes ;;
4689esac
4690 CXX=$ac_pt_CXX
4691 fi
4692else
4693 CXX="$ac_cv_path_CXX"
4694fi
4695 ;;
4696 cc) if test -n "$ac_tool_prefix"; then
4697 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4698set dummy ${ac_tool_prefix}c++; ac_word=$2
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4700$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004701if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004703else
4704 case $CXX in
4705 [\\/]* | ?:[\\/]*)
4706 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4707 ;;
4708 *)
4709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4710for as_dir in notfound
4711do
4712 IFS=$as_save_IFS
4713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004716 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718 break 2
4719 fi
4720done
Matthias Kloseb9621712010-04-24 17:59:49 +00004721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004722IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724 ;;
4725esac
4726fi
4727CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004728if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4730$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004731else
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4733$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004735
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004736
4737fi
4738if test -z "$ac_cv_path_CXX"; then
4739 ac_pt_CXX=$CXX
4740 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 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 +00004750 ;;
4751 *)
4752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in notfound
4754do
4755 IFS=$as_save_IFS
4756 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761 break 2
4762 fi
4763done
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767 ;;
4768esac
4769fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004770ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4771if test -n "$ac_pt_CXX"; then
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4773$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774else
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004778
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779 if test "x$ac_pt_CXX" = x; then
4780 CXX="c++"
4781 else
4782 case $cross_compiling:$ac_tool_warned in
4783yes:)
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4786ac_tool_warned=yes ;;
4787esac
4788 CXX=$ac_pt_CXX
4789 fi
4790else
4791 CXX="$ac_cv_path_CXX"
4792fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 clang|*/clang) if test -n "$ac_tool_prefix"; then
4795 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4796set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798$as_echo_n "checking for $ac_word... " >&6; }
4799if ${ac_cv_path_CXX+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801else
4802 case $CXX in
4803 [\\/]* | ?:[\\/]*)
4804 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4805 ;;
4806 *)
4807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4808for as_dir in notfound
4809do
4810 IFS=$as_save_IFS
4811 test -z "$as_dir" && as_dir=.
4812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004814 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4816 break 2
4817 fi
4818done
4819 done
4820IFS=$as_save_IFS
4821
Ned Deilycbfb9a52012-06-23 16:02:19 -07004822 ;;
4823esac
4824fi
4825CXX=$ac_cv_path_CXX
4826if test -n "$CXX"; then
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4828$as_echo "$CXX" >&6; }
4829else
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4831$as_echo "no" >&6; }
4832fi
4833
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834
4835fi
4836if test -z "$ac_cv_path_CXX"; then
4837 ac_pt_CXX=$CXX
4838 # Extract the first word of "clang++", so it can be a program name with args.
4839set dummy clang++; ac_word=$2
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841$as_echo_n "checking for $ac_word... " >&6; }
4842if ${ac_cv_path_ac_pt_CXX+:} false; then :
4843 $as_echo_n "(cached) " >&6
4844else
4845 case $ac_pt_CXX in
4846 [\\/]* | ?:[\\/]*)
4847 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4848 ;;
4849 *)
4850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851for as_dir in notfound
4852do
4853 IFS=$as_save_IFS
4854 test -z "$as_dir" && as_dir=.
4855 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004857 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4859 break 2
4860 fi
4861done
4862 done
4863IFS=$as_save_IFS
4864
4865 ;;
4866esac
4867fi
4868ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4869if test -n "$ac_pt_CXX"; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4871$as_echo "$ac_pt_CXX" >&6; }
4872else
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874$as_echo "no" >&6; }
4875fi
4876
4877 if test "x$ac_pt_CXX" = x; then
4878 CXX="clang++"
4879 else
4880 case $cross_compiling:$ac_tool_warned in
4881yes:)
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4884ac_tool_warned=yes ;;
4885esac
4886 CXX=$ac_pt_CXX
4887 fi
4888else
4889 CXX="$ac_cv_path_CXX"
4890fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004892 icc|*/icc) if test -n "$ac_tool_prefix"; then
4893 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4894set dummy ${ac_tool_prefix}icpc; ac_word=$2
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if ${ac_cv_path_CXX+:} false; then :
4898 $as_echo_n "(cached) " >&6
4899else
4900 case $CXX in
4901 [\\/]* | ?:[\\/]*)
4902 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4903 ;;
4904 *)
4905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in notfound
4907do
4908 IFS=$as_save_IFS
4909 test -z "$as_dir" && as_dir=.
4910 for ac_exec_ext in '' $ac_executable_extensions; do
4911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914 break 2
4915 fi
4916done
4917 done
4918IFS=$as_save_IFS
4919
4920 ;;
4921esac
4922fi
4923CXX=$ac_cv_path_CXX
4924if test -n "$CXX"; then
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4926$as_echo "$CXX" >&6; }
4927else
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929$as_echo "no" >&6; }
4930fi
4931
4932
4933fi
4934if test -z "$ac_cv_path_CXX"; then
4935 ac_pt_CXX=$CXX
4936 # Extract the first word of "icpc", so it can be a program name with args.
4937set dummy icpc; ac_word=$2
4938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4939$as_echo_n "checking for $ac_word... " >&6; }
4940if ${ac_cv_path_ac_pt_CXX+:} false; then :
4941 $as_echo_n "(cached) " >&6
4942else
4943 case $ac_pt_CXX in
4944 [\\/]* | ?:[\\/]*)
4945 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4946 ;;
4947 *)
4948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949for as_dir in notfound
4950do
4951 IFS=$as_save_IFS
4952 test -z "$as_dir" && as_dir=.
4953 for ac_exec_ext in '' $ac_executable_extensions; do
4954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4955 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957 break 2
4958 fi
4959done
4960 done
4961IFS=$as_save_IFS
4962
4963 ;;
4964esac
4965fi
4966ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4967if test -n "$ac_pt_CXX"; then
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4969$as_echo "$ac_pt_CXX" >&6; }
4970else
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972$as_echo "no" >&6; }
4973fi
4974
4975 if test "x$ac_pt_CXX" = x; then
4976 CXX="icpc"
4977 else
4978 case $cross_compiling:$ac_tool_warned in
4979yes:)
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4982ac_tool_warned=yes ;;
4983esac
4984 CXX=$ac_pt_CXX
4985 fi
4986else
4987 CXX="$ac_cv_path_CXX"
4988fi
4989 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004990 esac
4991 if test "$CXX" = "notfound"
4992 then
4993 CXX=""
4994 fi
4995fi
4996if test -z "$CXX"
4997then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004998 if test -n "$ac_tool_prefix"; then
4999 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5000 do
5001 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5002set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005005if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005007else
5008 if test -n "$CXX"; then
5009 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5010else
5011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005018 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005020 break 2
5021 fi
5022done
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005024IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025
5026fi
5027fi
5028CXX=$ac_cv_prog_CXX
5029if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5031$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032else
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005035fi
5036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005037
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005038 test -n "$CXX" && break
5039 done
5040fi
5041if test -z "$CXX"; then
5042 ac_ct_CXX=$CXX
5043 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5044do
5045 # Extract the first word of "$ac_prog", so it can be a program name with args.
5046set dummy $ac_prog; ac_word=$2
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048$as_echo_n "checking for $ac_word... " >&6; }
5049if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5050 $as_echo_n "(cached) " >&6
5051else
5052 if test -n "$ac_ct_CXX"; then
5053 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5054else
5055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
5060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005062 ac_cv_prog_ac_ct_CXX="$ac_prog"
5063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064 break 2
5065 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005066done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 done
5068IFS=$as_save_IFS
5069
5070fi
5071fi
5072ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5073if test -n "$ac_ct_CXX"; then
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5075$as_echo "$ac_ct_CXX" >&6; }
5076else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
5079fi
5080
5081
5082 test -n "$ac_ct_CXX" && break
5083done
5084
5085 if test "x$ac_ct_CXX" = x; then
5086 CXX="notfound"
5087 else
5088 case $cross_compiling:$ac_tool_warned in
5089yes:)
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5092ac_tool_warned=yes ;;
5093esac
5094 CXX=$ac_ct_CXX
5095 fi
5096fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097
5098 if test "$CXX" = "notfound"
5099 then
5100 CXX=""
5101 fi
5102fi
5103if test "$preset_cxx" != "$CXX"
5104then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005105 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106
5107 By default, distutils will build C++ extension modules with \"$CXX\".
5108 If this is not intended, then set CXX on the configure command line.
5109 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005110$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111
5112 By default, distutils will build C++ extension modules with \"$CXX\".
5113 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005114 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115fi
5116
5117
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005118MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5119
5120
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5122$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5123cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005124#undef bfin
5125#undef cris
5126#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005127#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005128#undef hppa
5129#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005130#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005131#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005132#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005133#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005134#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005135#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005136 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005137#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005138# if defined(__x86_64__) && defined(__LP64__)
5139 x86_64-linux-gnu
5140# elif defined(__x86_64__) && defined(__ILP32__)
5141 x86_64-linux-gnux32
5142# elif defined(__i386__)
5143 i386-linux-gnu
5144# elif defined(__aarch64__) && defined(__AARCH64EL__)
5145# if defined(__ILP32__)
5146 aarch64_ilp32-linux-gnu
5147# else
5148 aarch64-linux-gnu
5149# endif
5150# elif defined(__aarch64__) && defined(__AARCH64EB__)
5151# if defined(__ILP32__)
5152 aarch64_be_ilp32-linux-gnu
5153# else
5154 aarch64_be-linux-gnu
5155# endif
5156# elif defined(__alpha__)
5157 alpha-linux-gnu
5158# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5159# if defined(__ARMEL__)
5160 arm-linux-gnueabihf
5161# else
5162 armeb-linux-gnueabihf
5163# endif
5164# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5165# if defined(__ARMEL__)
5166 arm-linux-gnueabi
5167# else
5168 armeb-linux-gnueabi
5169# endif
5170# elif defined(__hppa__)
5171 hppa-linux-gnu
5172# elif defined(__ia64__)
5173 ia64-linux-gnu
5174# elif defined(__m68k__) && !defined(__mcoldfire__)
5175 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005176# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5177# if _MIPS_SIM == _ABIO32
5178 mipsisa32r6el-linux-gnu
5179# elif _MIPS_SIM == _ABIN32
5180 mipsisa64r6el-linux-gnuabin32
5181# elif _MIPS_SIM == _ABI64
5182 mipsisa64r6el-linux-gnuabi64
5183# else
5184# error unknown platform triplet
5185# endif
5186# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5187# if _MIPS_SIM == _ABIO32
5188 mipsisa32r6-linux-gnu
5189# elif _MIPS_SIM == _ABIN32
5190 mipsisa64r6-linux-gnuabin32
5191# elif _MIPS_SIM == _ABI64
5192 mipsisa64r6-linux-gnuabi64
5193# else
5194# error unknown platform triplet
5195# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196# elif defined(__mips_hard_float) && defined(_MIPSEL)
5197# if _MIPS_SIM == _ABIO32
5198 mipsel-linux-gnu
5199# elif _MIPS_SIM == _ABIN32
5200 mips64el-linux-gnuabin32
5201# elif _MIPS_SIM == _ABI64
5202 mips64el-linux-gnuabi64
5203# else
5204# error unknown platform triplet
5205# endif
5206# elif defined(__mips_hard_float)
5207# if _MIPS_SIM == _ABIO32
5208 mips-linux-gnu
5209# elif _MIPS_SIM == _ABIN32
5210 mips64-linux-gnuabin32
5211# elif _MIPS_SIM == _ABI64
5212 mips64-linux-gnuabi64
5213# else
5214# error unknown platform triplet
5215# endif
5216# elif defined(__or1k__)
5217 or1k-linux-gnu
5218# elif defined(__powerpc__) && defined(__SPE__)
5219 powerpc-linux-gnuspe
5220# elif defined(__powerpc64__)
5221# if defined(__LITTLE_ENDIAN__)
5222 powerpc64le-linux-gnu
5223# else
5224 powerpc64-linux-gnu
5225# endif
5226# elif defined(__powerpc__)
5227 powerpc-linux-gnu
5228# elif defined(__s390x__)
5229 s390x-linux-gnu
5230# elif defined(__s390__)
5231 s390-linux-gnu
5232# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5233 sh4-linux-gnu
5234# elif defined(__sparc__) && defined(__arch64__)
5235 sparc64-linux-gnu
5236# elif defined(__sparc__)
5237 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005238# elif defined(__riscv)
5239# if __riscv_xlen == 32
5240 riscv32-linux-gnu
5241# elif __riscv_xlen == 64
5242 riscv64-linux-gnu
5243# else
5244# error unknown platform triplet
5245# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005246# else
5247# error unknown platform triplet
5248# endif
5249#elif defined(__FreeBSD_kernel__)
5250# if defined(__LP64__)
5251 x86_64-kfreebsd-gnu
5252# elif defined(__i386__)
5253 i386-kfreebsd-gnu
5254# else
5255# error unknown platform triplet
5256# endif
5257#elif defined(__gnu_hurd__)
5258 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005259#elif defined(__APPLE__)
5260 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005261#else
5262# error unknown platform triplet
5263#endif
5264
5265EOF
5266
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005267if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005268 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5270$as_echo "$PLATFORM_TRIPLET" >&6; }
5271else
5272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5273$as_echo "none" >&6; }
5274fi
5275rm -f conftest.c conftest.out
5276
5277if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5278 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5279 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5280 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005281elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5282 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005283fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284
doko@ubuntu.com55532312016-06-14 08:55:19 +02005285if test x$MULTIARCH != x; then
5286 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5287fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288
5289
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5291$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5292save_LDFLAGS="$LDFLAGS"
5293LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005294
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5296/* end confdefs.h. */
5297
5298int
5299main ()
5300{
5301
5302 ;
5303 return 0;
5304}
5305_ACEOF
5306if ac_fn_c_try_link "$LINENO"; then :
5307 NO_AS_NEEDED="-Wl,--no-as-needed"
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5309$as_echo "yes" >&6; }
5310else
5311 NO_AS_NEEDED=""
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
5314fi
5315rm -f core conftest.err conftest.$ac_objext \
5316 conftest$ac_exeext conftest.$ac_ext
5317LDFLAGS="$save_LDFLAGS"
5318
5319
5320
5321# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5324$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005325if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005326 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005327else
5328 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5329 then ac_cv_path_EGREP="$GREP -E"
5330 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005332 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 # Loop through the user's path and test for each of PROGNAME-LIST
5334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005335for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5336do
5337 IFS=$as_save_IFS
5338 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005339 for ac_prog in egrep; do
5340 for ac_exec_ext in '' $ac_executable_extensions; do
5341 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005342 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005343# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344 # Check for GNU $ac_path_EGREP
5345case `"$ac_path_EGREP" --version 2>&1` in
5346*GNU*)
5347 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5348*)
5349 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005351 while :
5352 do
5353 cat "conftest.in" "conftest.in" >"conftest.tmp"
5354 mv "conftest.tmp" "conftest.in"
5355 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5358 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005359 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5361 # Best one so far, save it but keep looking for a better one
5362 ac_cv_path_EGREP="$ac_path_EGREP"
5363 ac_path_EGREP_max=$ac_count
5364 fi
5365 # 10*(2^10) chars as input seems more than enough
5366 test $ac_count -gt 10 && break
5367 done
5368 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5369esac
5370
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 $ac_path_EGREP_found && break 3
5372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005377 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 +00005378 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379else
5380 ac_cv_path_EGREP=$EGREP
5381fi
5382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 fi
5384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5386$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005388
5389
Matthias Kloseb9621712010-04-24 17:59:49 +00005390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5391$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005392if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo_n "(cached) " >&6
5394else
5395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005396/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005397#include <stdlib.h>
5398#include <stdarg.h>
5399#include <string.h>
5400#include <float.h>
5401
5402int
5403main ()
5404{
5405
5406 ;
5407 return 0;
5408}
5409_ACEOF
5410if ac_fn_c_try_compile "$LINENO"; then :
5411 ac_cv_header_stdc=yes
5412else
5413 ac_cv_header_stdc=no
5414fi
5415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416
5417if test $ac_cv_header_stdc = yes; then
5418 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5420/* end confdefs.h. */
5421#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005422
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005423_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005427else
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005429fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005430rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432fi
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438#include <stdlib.h>
5439
5440_ACEOF
5441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5442 $EGREP "free" >/dev/null 2>&1; then :
5443
5444else
5445 ac_cv_header_stdc=no
5446fi
5447rm -f conftest*
5448
5449fi
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5453 if test "$cross_compiling" = yes; then :
5454 :
5455else
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <ctype.h>
5459#include <stdlib.h>
5460#if ((' ' & 0x0FF) == 0x020)
5461# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5462# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5463#else
5464# define ISLOWER(c) \
5465 (('a' <= (c) && (c) <= 'i') \
5466 || ('j' <= (c) && (c) <= 'r') \
5467 || ('s' <= (c) && (c) <= 'z'))
5468# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5469#endif
5470
5471#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5472int
5473main ()
5474{
5475 int i;
5476 for (i = 0; i < 256; i++)
5477 if (XOR (islower (i), ISLOWER (i))
5478 || toupper (i) != TOUPPER (i))
5479 return 2;
5480 return 0;
5481}
5482_ACEOF
5483if ac_fn_c_try_run "$LINENO"; then :
5484
5485else
5486 ac_cv_header_stdc=no
5487fi
5488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5489 conftest.$ac_objext conftest.beam conftest.$ac_ext
5490fi
5491
5492fi
5493fi
5494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5495$as_echo "$ac_cv_header_stdc" >&6; }
5496if test $ac_cv_header_stdc = yes; then
5497
5498$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5499
5500fi
5501
5502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5503for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5504 inttypes.h stdint.h unistd.h
5505do :
5506 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5507ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5508"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005509if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005510 cat >>confdefs.h <<_ACEOF
5511#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5512_ACEOF
5513
5514fi
5515
5516done
5517
5518
5519
5520 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 +02005521if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005522 MINIX=yes
5523else
5524 MINIX=
5525fi
5526
5527
5528 if test "$MINIX" = yes; then
5529
5530$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5531
5532
5533$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5534
5535
5536$as_echo "#define _MINIX 1" >>confdefs.h
5537
5538 fi
5539
5540
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5542$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005543if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 $as_echo_n "(cached) " >&6
5545else
5546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5547/* end confdefs.h. */
5548
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005549# define __EXTENSIONS__ 1
5550 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005551int
5552main ()
5553{
5554
5555 ;
5556 return 0;
5557}
5558_ACEOF
5559if ac_fn_c_try_compile "$LINENO"; then :
5560 ac_cv_safe_to_define___extensions__=yes
5561else
5562 ac_cv_safe_to_define___extensions__=no
5563fi
5564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5567$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5568 test $ac_cv_safe_to_define___extensions__ = yes &&
5569 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5570
5571 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5572
5573 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5574
5575 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5576
5577 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5578
5579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
Xavier de Gaye95750b12016-07-09 11:05:42 +02005581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5582$as_echo_n "checking for the Android API level... " >&6; }
5583cat >> conftest.c <<EOF
5584#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005585android_api = __ANDROID_API__
5586arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005587#else
5588#error not Android
5589#endif
5590EOF
5591
5592if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005593 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5594 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5596$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005597 if test -z "$ANDROID_API_LEVEL"; then
5598 echo 'Fatal: you must define __ANDROID_API__'
5599 exit 1
5600 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005601
5602cat >>confdefs.h <<_ACEOF
5603#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5604_ACEOF
5605
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005606
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5608$as_echo_n "checking for the Android arm ABI... " >&6; }
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5610$as_echo "$_arm_arch" >&6; }
5611 if test "$_arm_arch" = 7; then
5612 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5613 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5614 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005615else
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5617$as_echo "not Android" >&6; }
5618fi
5619rm -f conftest.c conftest.out
5620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621# Check for unsupported systems
5622case $ac_sys_system/$ac_sys_release in
5623atheos*|Linux*/1*)
5624 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5625 echo See README for details.
5626 exit 1;;
5627esac
5628
5629
Matthias Kloseb9621712010-04-24 17:59:49 +00005630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5631$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
5633# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005634if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 withval=$with_suffix;
5636 case $withval in
5637 no) EXEEXT=;;
5638 yes) EXEEXT=.exe;;
5639 *) EXEEXT=$withval;;
5640 esac
5641fi
5642
Matthias Kloseb9621712010-04-24 17:59:49 +00005643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5644$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
5646# Test whether we're running on a non-case-sensitive system, in which
5647# case we give a warning if no ext is given
5648
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5650$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651if test ! -d CaseSensitiveTestDir; then
5652mkdir CaseSensitiveTestDir
5653fi
5654
5655if test -d casesensitivetestdir
5656then
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5658$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 BUILDEXEEXT=.exe
5660else
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 BUILDEXEEXT=$EXEEXT
5664fi
5665rmdir CaseSensitiveTestDir
5666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667case $ac_sys_system in
5668hp*|HP*)
5669 case $CC in
5670 cc|*/cc) CC="$CC -Ae";;
5671 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672esac
5673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5676$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677if test -z "$LIBRARY"
5678then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005679 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5682$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683
5684# LDLIBRARY is the name of the library to link against (as opposed to the
5685# name of the library into which to insert object files). BLDLIBRARY is also
5686# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5687# is blank as the main program is not linked directly against LDLIBRARY.
5688# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5689# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5690# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5691# DLLLIBRARY is the shared (i.e., DLL) library.
5692#
5693# RUNSHARED is used to run shared python without installed libraries
5694#
5695# INSTSONAME is the name of the shared library that will be use to install
5696# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005697#
5698# LDVERSION is the shared library version number, normally the Python version
5699# with the ABI build flags appended.
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702
5703
5704
5705
5706
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708LDLIBRARY="$LIBRARY"
5709BLDLIBRARY='$(LDLIBRARY)'
5710INSTSONAME='$(LDLIBRARY)'
5711DLLLIBRARY=''
5712LDLIBRARYDIR=''
5713RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005714LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716# LINKCC is the command that links the python executable -- default is $(CC).
5717# If CXX is set, and if it is needed to link a main function that was
5718# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5719# python might then depend on the C++ runtime
5720# This is altered for AIX in order to build the export list before
5721# linking.
5722
Matthias Kloseb9621712010-04-24 17:59:49 +00005723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5724$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725if test -z "$LINKCC"
5726then
5727 LINKCC='$(PURIFY) $(MAINCC)'
5728 case $ac_sys_system in
5729 AIX*)
5730 exp_extra="\"\""
5731 if test $ac_sys_release -ge 5 -o \
5732 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5733 exp_extra="."
5734 fi
5735 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 QNX*)
5737 # qcc must be used because the other compilers do not
5738 # support -N.
5739 LINKCC=qcc;;
5740 esac
5741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5743$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5746# make sure we default having it set to "no": this is used by
5747# distutils.unixccompiler to know if it should add --enable-new-dtags
5748# to linker command lines, and failing to detect GNU ld simply results
5749# in the same bahaviour as before.
5750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5752$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753ac_prog=ld
5754if test "$GCC" = yes; then
5755 ac_prog=`$CC -print-prog-name=ld`
5756fi
5757case `"$ac_prog" -V 2>&1 < /dev/null` in
5758 *GNU*)
5759 GNULD=yes;;
5760 *)
5761 GNULD=no;;
5762esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5764$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5767$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005769if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 enableval=$enable_shared;
5771fi
5772
5773
5774if test -z "$enable_shared"
5775then
5776 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005777 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 enable_shared="yes";;
5779 *)
5780 enable_shared="no";;
5781 esac
5782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5784$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5787$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005789if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005790 enableval=$enable_profiling;
5791fi
5792
5793if test "x$enable_profiling" = xyes; then
5794 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005795 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797/* end confdefs.h. */
5798int main() { return 0; }
5799_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005800if ac_fn_c_try_link "$LINENO"; then :
5801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005803 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005805rm -f core conftest.err conftest.$ac_objext \
5806 conftest$ac_exeext conftest.$ac_ext
5807 CC="$ac_save_cc"
5808else
5809 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5812$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
doko@ubuntu.comba015832012-06-30 16:52:05 +02005814if test "x$enable_profiling" = xyes; then
5815 BASECFLAGS="-pg $BASECFLAGS"
5816 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5820$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
5822# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5823# library that we build, but we do not want to link against it (we
5824# will find it with a -framework option). For this reason there is an
5825# extra variable BLDLIBRARY against which Python and the extension
5826# modules are linked, BLDLIBRARY. This is normally the same as
5827# LDLIBRARY, but empty for MacOSX framework builds.
5828if test "$enable_framework"
5829then
5830 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005831 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 BLDLIBRARY=''
5833else
5834 BLDLIBRARY='$(LDLIBRARY)'
5835fi
5836
5837# Other platforms follow
5838if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005839 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842
5843 case $ac_sys_system in
5844 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005845 LDLIBRARY='libpython$(LDVERSION).dll.a'
5846 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847 ;;
5848 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005849 LDLIBRARY='libpython$(LDVERSION).so'
5850 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005851 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005853 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005854 then
5855 PY3LIBRARY=libpython3.so
5856 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005858 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005859 LDLIBRARY='libpython$(LDVERSION).so'
5860 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005861 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005863 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005864 then
5865 PY3LIBRARY=libpython3.so
5866 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ;;
5868 hp*|HP*)
5869 case `uname -m` in
5870 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005871 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872 ;;
5873 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005874 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 ;;
5876 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005878 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005881 LDLIBRARY='libpython$(LDVERSION).dylib'
5882 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005883 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005885 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005887 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005888 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
5890 esac
5891else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005892 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 case $ac_sys_system in
5894 CYGWIN*)
5895 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
5898 esac
5899fi
5900
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005901if test "$cross_compiling" = yes; then
5902 RUNSHARED=
5903fi
5904
Matthias Kloseb9621712010-04-24 17:59:49 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5906$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005909if test -n "$ac_tool_prefix"; then
5910 for ac_prog in ar aal
5911 do
5912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005916if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918else
5919 if test -n "$AR"; then
5920 ac_cv_prog_AR="$AR" # Let the user override the test.
5921else
5922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005929 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 break 2
5932 fi
5933done
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935IFS=$as_save_IFS
5936
5937fi
5938fi
5939AR=$ac_cv_prog_AR
5940if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5942$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943else
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946fi
5947
5948
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005949 test -n "$AR" && break
5950 done
5951fi
5952if test -z "$AR"; then
5953 ac_ct_AR=$AR
5954 for ac_prog in ar aal
5955do
5956 # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_prog_ac_ct_AR+:} false; then :
5961 $as_echo_n "(cached) " >&6
5962else
5963 if test -n "$ac_ct_AR"; then
5964 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
5971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 ac_cv_prog_ac_ct_AR="$ac_prog"
5974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975 break 2
5976 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005978 done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983ac_ct_AR=$ac_cv_prog_ac_ct_AR
5984if test -n "$ac_ct_AR"; then
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5986$as_echo "$ac_ct_AR" >&6; }
5987else
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993 test -n "$ac_ct_AR" && break
5994done
5995
5996 if test "x$ac_ct_AR" = x; then
5997 AR="ar"
5998 else
5999 case $cross_compiling:$ac_tool_warned in
6000yes:)
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6003ac_tool_warned=yes ;;
6004esac
6005 AR=$ac_ct_AR
6006 fi
6007fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009
6010# tweak ARFLAGS only if the user didn't set it on the command line
6011
6012if test -z "$ARFLAGS"
6013then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006014 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015fi
6016
doko@ubuntu.com58844492012-06-30 18:25:32 +02006017if test -n "$ac_tool_prefix"; then
6018 for ac_prog in readelf
6019 do
6020 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6021set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
6024if ${ac_cv_prog_READELF+:} false; then :
6025 $as_echo_n "(cached) " >&6
6026else
6027 if test -n "$READELF"; then
6028 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6029else
6030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033 IFS=$as_save_IFS
6034 test -z "$as_dir" && as_dir=.
6035 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006037 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6039 break 2
6040 fi
6041done
6042 done
6043IFS=$as_save_IFS
6044
6045fi
6046fi
6047READELF=$ac_cv_prog_READELF
6048if test -n "$READELF"; then
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6050$as_echo "$READELF" >&6; }
6051else
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054fi
6055
6056
6057 test -n "$READELF" && break
6058 done
6059fi
6060if test -z "$READELF"; then
6061 ac_ct_READELF=$READELF
6062 for ac_prog in readelf
6063do
6064 # Extract the first word of "$ac_prog", so it can be a program name with args.
6065set dummy $ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6069 $as_echo_n "(cached) " >&6
6070else
6071 if test -n "$ac_ct_READELF"; then
6072 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
6079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006081 ac_cv_prog_ac_ct_READELF="$ac_prog"
6082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083 break 2
6084 fi
6085done
6086 done
6087IFS=$as_save_IFS
6088
6089fi
6090fi
6091ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6092if test -n "$ac_ct_READELF"; then
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6094$as_echo "$ac_ct_READELF" >&6; }
6095else
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099
6100
6101 test -n "$ac_ct_READELF" && break
6102done
6103
6104 if test "x$ac_ct_READELF" = x; then
6105 READELF=":"
6106 else
6107 case $cross_compiling:$ac_tool_warned in
6108yes:)
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6111ac_tool_warned=yes ;;
6112esac
6113 READELF=$ac_ct_READELF
6114 fi
6115fi
6116
6117if test "$cross_compiling" = yes; then
6118 case "$READELF" in
6119 readelf|:)
6120 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6121 ;;
6122 esac
6123fi
6124
6125
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006128hp*|HP*)
6129 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130 if test -z "$INSTALL"
6131 then
6132 INSTALL="${srcdir}/install-sh -c"
6133 fi
6134esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135# Find a good install program. We prefer a C program (faster),
6136# so one script is as good as another. But avoid the broken or
6137# incompatible versions:
6138# SysV /etc/install, /usr/sbin/install
6139# SunOS /usr/etc/install
6140# IRIX /sbin/install
6141# AIX /bin/install
6142# AmigaOS /C/install, which installs bootblocks on floppy discs
6143# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6144# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6145# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6146# OS/2's system install, which has a completely different semantic
6147# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006148# Reject install programs that cannot install multiple files.
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6150$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006152if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154else
6155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156for as_dir in $PATH
6157do
6158 IFS=$as_save_IFS
6159 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 # Account for people who put trailing slashes in PATH elements.
6161case $as_dir/ in #((
6162 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006164 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165 /usr/ucb/* ) ;;
6166 *)
6167 # OSF1 and SCO ODT 3.0 have their own names for install.
6168 # Don't use installbsd from OSF since it installs stuff as root
6169 # by default.
6170 for ac_prog in ginstall scoinst install; do
6171 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006172 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 if test $ac_prog = install &&
6174 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6175 # AIX install. It has an incompatible calling convention.
6176 :
6177 elif test $ac_prog = install &&
6178 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6179 # program-specific install script used by HP pwplus--don't use.
6180 :
6181 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 rm -rf conftest.one conftest.two conftest.dir
6183 echo one > conftest.one
6184 echo two > conftest.two
6185 mkdir conftest.dir
6186 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6187 test -s conftest.one && test -s conftest.two &&
6188 test -s conftest.dir/conftest.one &&
6189 test -s conftest.dir/conftest.two
6190 then
6191 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6192 break 3
6193 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 fi
6195 fi
6196 done
6197 done
6198 ;;
6199esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006200
6201 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202IFS=$as_save_IFS
6203
Matthias Kloseb9621712010-04-24 17:59:49 +00006204rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205
6206fi
6207 if test "${ac_cv_path_install+set}" = set; then
6208 INSTALL=$ac_cv_path_install
6209 else
6210 # As a last resort, use the slow shell script. Don't cache a
6211 # value for INSTALL within a source directory, because that will
6212 # break other packages using the cache if that directory is
6213 # removed, or if the value is a relative name.
6214 INSTALL=$ac_install_sh
6215 fi
6216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6218$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219
6220# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6221# It thinks the first close brace ends the variable substitution.
6222test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6223
6224test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6225
6226test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6227
Matthias Klose93a0ef12012-03-15 18:08:34 +01006228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6229$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6230if test -z "$MKDIR_P"; then
6231 if ${ac_cv_path_mkdir+:} false; then :
6232 $as_echo_n "(cached) " >&6
6233else
6234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6236do
6237 IFS=$as_save_IFS
6238 test -z "$as_dir" && as_dir=.
6239 for ac_prog in mkdir gmkdir; do
6240 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006241 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006242 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6243 'mkdir (GNU coreutils) '* | \
6244 'mkdir (coreutils) '* | \
6245 'mkdir (fileutils) '4.1*)
6246 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6247 break 3;;
6248 esac
6249 done
6250 done
6251 done
6252IFS=$as_save_IFS
6253
6254fi
6255
6256 test -d ./--version && rmdir ./--version
6257 if test "${ac_cv_path_mkdir+set}" = set; then
6258 MKDIR_P="$ac_cv_path_mkdir -p"
6259 else
6260 # As a last resort, use the slow shell script. Don't cache a
6261 # value for MKDIR_P within a source directory, because that will
6262 # break other packages using the cache if that directory is
6263 # removed, or if the value is a relative name.
6264 MKDIR_P="$ac_install_sh -d"
6265 fi
6266fi
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6268$as_echo "$MKDIR_P" >&6; }
6269
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270
6271# Not every filesystem supports hard links
6272
6273if test -z "$LN" ; then
6274 case $ac_sys_system in
6275 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276 *) LN=ln;;
6277 esac
6278fi
6279
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006280# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006281
6282ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6286$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
6288# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006289if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290 withval=$with_pydebug;
6291if test "$withval" != no
6292then
6293
Matthias Kloseb9621712010-04-24 17:59:49 +00006294$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6297$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006299 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006300else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6301$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302fi
6303else
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6305$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306fi
6307
6308
T. Woutersddbfa2c2017-05-23 01:30:49 +02006309# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6310# the ABI. This allows enabling assertions without changing the ABI.
6311assertions='false'
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6313$as_echo_n "checking for --with-assertions... " >&6; }
6314
6315# Check whether --with-assertions was given.
6316if test "${with_assertions+set}" = set; then :
6317 withval=$with_assertions;
6318if test "$withval" != no
6319then
6320 assertions='true'
6321fi
6322fi
6323
6324if test "$assertions" = 'true'; then
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326$as_echo "yes" >&6; }
6327elif test "$Py_DEBUG" = 'true'; then
6328 assertions='true'
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6330$as_echo "implied by --with-pydebug" >&6; }
6331else
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
Brett Cannon63d98bc2016-09-06 17:12:40 -07006336# Enable optimization flags
6337
6338
6339Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6341$as_echo_n "checking for --enable-optimizations... " >&6; }
6342# Check whether --enable-optimizations was given.
6343if test "${enable_optimizations+set}" = set; then :
6344 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006345if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006346then
6347 Py_OPT='true'
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6349$as_echo "yes" >&6; };
6350else
6351 Py_OPT='false'
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; };
6354fi
6355else
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357$as_echo "no" >&6; }
6358fi
6359
6360if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006361 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6362 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006363 # 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 +00006364 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006365 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006366 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006367 DEF_MAKE_RULE="build_all"
6368else
6369 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006370 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006371 DEF_MAKE_RULE="all"
6372fi
6373
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006374# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6376$as_echo_n "checking for --with-lto... " >&6; }
6377
6378# Check whether --with-lto was given.
6379if test "${with_lto+set}" = set; then :
6380 withval=$with_lto;
6381if test "$withval" != no
6382then
6383 Py_LTO='true'
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385$as_echo "yes" >&6; };
6386else
6387 Py_LTO='false'
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; };
6390fi
6391else
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396if test "$Py_LTO" = 'true' ; then
6397 case $CC in
6398 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006399 case $ac_sys_system in
6400 Darwin*)
6401 # Any changes made here should be reflected in the GCC+Darwin case below
6402 LTOFLAGS="-flto -Wl,-export_dynamic"
6403 ;;
6404 *)
6405 LTOFLAGS="-flto"
6406 ;;
6407 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006408 ;;
6409 *gcc*)
6410 case $ac_sys_system in
6411 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006412 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006413 ;;
6414 *)
6415 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6416 ;;
6417 esac
6418 ;;
6419 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006420 CFLAGS="$CFLAGS $LTOFLAGS"
6421 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006422fi
6423
Brett Cannon7188a3e2015-09-18 15:13:44 -07006424# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006425
6426
6427
6428
6429
Gregory P. Smith799520c2016-09-07 16:10:00 -07006430# Make this work on systems where llvm tools are not installed with their
6431# normal names in the default $PATH (ie: Ubuntu). They exist under the
6432# non-suffixed name in their versioned llvm directory.
6433llvm_bin_dir=''
6434llvm_path="${PATH}"
6435if test "${CC}" = "clang"
6436then
6437 clang_bin=`which clang`
6438 # Some systems install clang elsewhere as a symlink to the real path
6439 # which is where the related llvm tools are located.
6440 if test -L "${clang_bin}"
6441 then
6442 clang_dir=`dirname "${clang_bin}"`
6443 clang_bin=`readlink "${clang_bin}"`
6444 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6445 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6446 fi
6447fi
Zachary Ware5af85642015-12-21 12:09:17 -06006448
Gregory P. Smith799520c2016-09-07 16:10:00 -07006449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6450$as_echo_n "checking target system type... " >&6; }
6451if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006452 $as_echo_n "(cached) " >&6
6453else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006454 if test "x$target_alias" = x; then
6455 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006456else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006457 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6458 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6459fi
6460
6461fi
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6463$as_echo "$ac_cv_target" >&6; }
6464case $ac_cv_target in
6465*-*-*) ;;
6466*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6467esac
6468target=$ac_cv_target
6469ac_save_IFS=$IFS; IFS='-'
6470set x $ac_cv_target
6471shift
6472target_cpu=$1
6473target_vendor=$2
6474shift; shift
6475# Remember, the first character of IFS is used to create $*,
6476# except with old shells:
6477target_os=$*
6478IFS=$ac_save_IFS
6479case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6480
6481
6482# The aliases save the names the user supplied, while $host etc.
6483# will get canonicalized.
6484test -n "$target_alias" &&
6485 test "$program_prefix$program_suffix$program_transform_name" = \
6486 NONENONEs,x,x, &&
6487 program_prefix=${target_alias}-
6488# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6489set dummy $target_alias-llvm-profdata; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6493 $as_echo_n "(cached) " >&6
6494else
6495 case $LLVM_PROFDATA in
6496 [\\/]* | ?:[\\/]*)
6497 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6498 ;;
6499 *)
6500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006502do
6503 IFS=$as_save_IFS
6504 test -z "$as_dir" && as_dir=.
6505 for ac_exec_ext in '' $ac_executable_extensions; do
6506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006507 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509 break 2
6510 fi
6511done
6512 done
6513IFS=$as_save_IFS
6514
Gregory P. Smith799520c2016-09-07 16:10:00 -07006515 ;;
6516esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006517fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006518LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6519if test -n "$LLVM_PROFDATA"; then
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6521$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006522else
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
Gregory P. Smith799520c2016-09-07 16:10:00 -07006528if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6529 if test "$build" = "$target"; then
6530 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6531 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6532set dummy llvm-profdata; ac_word=$2
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6536 $as_echo_n "(cached) " >&6
6537else
6538 case $ac_pt_LLVM_PROFDATA in
6539 [\\/]* | ?:[\\/]*)
6540 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6541 ;;
6542 *)
6543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544for as_dir in ${llvm_path}
6545do
6546 IFS=$as_save_IFS
6547 test -z "$as_dir" && as_dir=.
6548 for ac_exec_ext in '' $ac_executable_extensions; do
6549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6552 break 2
6553 fi
6554done
6555 done
6556IFS=$as_save_IFS
6557
6558 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6559 ;;
6560esac
6561fi
6562ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6563if test -n "$ac_pt_LLVM_PROFDATA"; then
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6565$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6566else
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6572 else
6573 LLVM_PROFDATA="''"
6574 fi
6575else
6576 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6577fi
6578
6579
6580if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6581then
6582 LLVM_PROF_FOUND="found"
6583else
6584 LLVM_PROF_FOUND="not-found"
6585fi
6586if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6587then
6588 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6589 if test -n "${found_llvm_profdata}"
6590 then
6591 # llvm-profdata isn't directly in $PATH in some cases.
6592 # https://apple.stackexchange.com/questions/197053/
6593 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6594 LLVM_PROF_FOUND=found
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6596$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6597 fi
6598fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006599LLVM_PROF_ERR=no
6600case $CC in
6601 *clang*)
6602 # Any changes made here should be reflected in the GCC+Darwin case below
6603 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6604 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006605 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006606 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6607 if test $LLVM_PROF_FOUND = not-found
6608 then
6609 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006610 if test "${REQUIRE_PGO}" = "yes"
6611 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006612 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 -07006613 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006614 fi
6615 ;;
6616 *gcc*)
6617 case $ac_sys_system in
6618 Darwin*)
6619 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6620 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006621 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006622 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006623 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006624 then
6625 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006626 if test "${REQUIRE_PGO}" = "yes"
6627 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006628 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 -07006629 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006630 fi
6631 ;;
6632 *)
6633 PGO_PROF_GEN_FLAG="-fprofile-generate"
6634 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6635 LLVM_PROF_MERGER="true"
6636 LLVM_PROF_FILE=""
6637 ;;
6638 esac
6639 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006640 *icc*)
6641 PGO_PROF_GEN_FLAG="-prof-gen"
6642 PGO_PROF_USE_FLAG="-prof-use"
6643 LLVM_PROF_MERGER="true"
6644 LLVM_PROF_FILE=""
6645 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006646esac
6647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006648# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6649# merged with this chunk of code?
6650
6651# Optimizer/debugger flags
6652# ------------------------
6653# (The following bit of code is complicated enough - please keep things
6654# indented properly. Just pretend you're editing Python code. ;-)
6655
6656# There are two parallel sets of case statements below, one that checks to
6657# see if OPT was set and one that does BASECFLAGS setting based upon
6658# compiler and platform. BASECFLAGS tweaks need to be made even if the
6659# user set OPT.
6660
6661# tweak OPT based on compiler and platform, only if the user didn't set
6662# it on the command line
6663
Victor Stinner9ed34a82017-05-02 22:35:58 +02006664
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006665if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666then
6667 case $GCC in
6668 yes)
6669 if test "$CC" != 'g++' ; then
6670 STRICT_PROTO="-Wstrict-prototypes"
6671 fi
6672 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6673 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6674 WRAP="-fwrapv"
6675 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006676
Stefan Krahaf04ff22011-12-08 22:20:31 +01006677 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006678 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006679 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006680 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006681 *)
6682 if $CC --version 2>&1 | grep -q clang
6683 then
6684 cc_is_clang=1
6685 else
6686 cc_is_clang=
6687 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006688 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006689
Victor Stinner35f3d242017-04-21 12:35:24 +02006690 if test -n "${cc_is_clang}"
6691 then
6692 # Clang also needs -fwrapv
6693 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006694 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6695 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006696 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006697 fi
6698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699 case $ac_cv_prog_cc_g in
6700 yes)
6701 if test "$Py_DEBUG" = 'true' ; then
6702 # Optimization messes up debuggers, so turn it off for
6703 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006704 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006705 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006706 else
Victor Stinner28205b22017-04-21 11:24:34 +02006707 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006708 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709 else
Victor Stinner28205b22017-04-21 11:24:34 +02006710 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711 fi
6712 ;;
6713 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006714 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715 ;;
6716 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006717
Victor Stinner826f83f2017-04-28 15:07:10 +02006718 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720 case $ac_sys_system in
6721 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6722 ;;
6723 esac
6724 ;;
6725
6726 *)
6727 OPT="-O"
6728 ;;
6729 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730fi
6731
6732
6733
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735# The -arch flags for universal builds on OSX
6736UNIVERSAL_ARCH_FLAGS=
6737
6738
6739# tweak BASECFLAGS based on compiler and platform
6740case $GCC in
6741yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006742 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006743
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6745$as_echo_n "checking for -Wextra... " >&6; }
6746 ac_save_cc="$CC"
6747 CC="$CC -Wextra -Werror"
6748 if ${ac_cv_extra_warnings+:} false; then :
6749 $as_echo_n "(cached) " >&6
6750else
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752/* end confdefs.h. */
6753
6754
6755int
6756main ()
6757{
6758
6759 ;
6760 return 0;
6761}
6762
6763_ACEOF
6764if ac_fn_c_try_compile "$LINENO"; then :
6765
6766 ac_cv_extra_warnings=yes
6767
6768else
6769
6770 ac_cv_extra_warnings=no
6771
6772fi
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6774fi
6775
6776 CC="$ac_save_cc"
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6778$as_echo "$ac_cv_extra_warnings" >&6; }
6779
6780 if test $ac_cv_extra_warnings = yes
6781 then
6782 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6783 fi
6784
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006785 # Python doesn't violate C99 aliasing rules, but older versions of
6786 # GCC produce warnings for legal Python code. Enable
6787 # -fno-strict-aliasing on versions of GCC that support but produce
6788 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6790$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791 ac_save_cc="$CC"
6792 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006793 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006794 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006798/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006799
Matthias Kloseb159a552010-04-25 21:00:44 +00006800
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006801int
6802main ()
6803{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006804
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006805 ;
6806 return 0;
6807}
Matthias Kloseb159a552010-04-25 21:00:44 +00006808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006810if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006811
6812 CC="$ac_save_cc -fstrict-aliasing"
6813 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006815/* end confdefs.h. */
6816
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006817 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006818int
6819main ()
6820{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006821double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822 ;
6823 return 0;
6824}
Matthias Kloseb159a552010-04-25 21:00:44 +00006825
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006827if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006828
6829 ac_cv_no_strict_aliasing=no
6830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831else
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
6833 ac_cv_no_strict_aliasing=yes
6834
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006835fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006838else
Matthias Kloseb159a552010-04-25 21:00:44 +00006839
6840 ac_cv_no_strict_aliasing=no
6841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006844fi
6845
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006846 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6849$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006850 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 then
6852 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6853 fi
6854
Zachary Ware5af85642015-12-21 12:09:17 -06006855 # ICC doesn't recognize the option, but only emits a warning
6856 ## XXX does it emit an unused result warning and can it be disabled?
6857 case "$CC" in
6858 *icc*)
6859 ac_cv_disable_unused_result_warning=no
6860 ;;
6861 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6863$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6864 ac_save_cc="$CC"
6865 CC="$CC -Wunused-result -Werror"
6866 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006867 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006868 $as_echo_n "(cached) " >&6
6869else
6870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6871/* end confdefs.h. */
6872
6873
6874int
6875main ()
6876{
6877
6878 ;
6879 return 0;
6880}
6881
6882_ACEOF
6883if ac_fn_c_try_compile "$LINENO"; then :
6884
6885 ac_cv_disable_unused_result_warning=yes
6886
6887else
6888
6889 ac_cv_disable_unused_result_warning=no
6890
6891fi
6892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6893fi
6894
6895 CFLAGS="$save_CFLAGS"
6896 CC="$ac_save_cc"
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6898$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006899 ;;
6900 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006901
6902 if test $ac_cv_disable_unused_result_warning = yes
6903 then
6904 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006905 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6906 fi
6907
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6909$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6910 ac_save_cc="$CC"
6911 CC="$CC -Wunused-parameter -Werror"
6912 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6913 $as_echo_n "(cached) " >&6
6914else
6915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6916/* end confdefs.h. */
6917
6918
6919int
6920main ()
6921{
6922
6923 ;
6924 return 0;
6925}
6926
6927_ACEOF
6928if ac_fn_c_try_compile "$LINENO"; then :
6929
6930 ac_cv_disable_unused_parameter_warning=yes
6931
6932else
6933
6934 ac_cv_disable_unused_parameter_warning=no
6935
6936fi
6937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6938fi
6939
6940 CC="$ac_save_cc"
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6942$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6943
6944 if test $ac_cv_disable_unused_parameter_warning = yes
6945 then
6946 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6947 fi
6948
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6950$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6951 ac_save_cc="$CC"
6952 CC="$CC -Wmissing-field-initializers -Werror"
6953 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h. */
6958
6959
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967
6968_ACEOF
6969if ac_fn_c_try_compile "$LINENO"; then :
6970
6971 ac_cv_disable_missing_field_initializers=yes
6972
6973else
6974
6975 ac_cv_disable_missing_field_initializers=no
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979fi
6980
6981 CC="$ac_save_cc"
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
6983$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
6984
6985 if test $ac_cv_disable_missing_field_initializers = yes
6986 then
6987 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006988 fi
6989
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6991$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6992 ac_save_cc="$CC"
6993 CC="$CC -Wsign-compare"
6994 save_CFLAGS="$CFLAGS"
6995 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6996 $as_echo_n "(cached) " >&6
6997else
6998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6999/* end confdefs.h. */
7000
7001
7002int
7003main ()
7004{
7005
7006 ;
7007 return 0;
7008}
7009
7010_ACEOF
7011if ac_fn_c_try_compile "$LINENO"; then :
7012
7013 ac_cv_enable_sign_compare_warning=yes
7014
7015else
7016
7017 ac_cv_enable_sign_compare_warning=no
7018
7019fi
7020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7021fi
7022
7023 CFLAGS="$save_CFLAGS"
7024 CC="$ac_save_cc"
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7026$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7027
7028 if test $ac_cv_enable_sign_compare_warning = yes
7029 then
7030 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7031 fi
7032
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7034$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7035 ac_save_cc="$CC"
7036 CC="$CC -Wunreachable-code"
7037 save_CFLAGS="$CFLAGS"
7038 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7039 $as_echo_n "(cached) " >&6
7040else
7041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7042/* end confdefs.h. */
7043
7044
7045int
7046main ()
7047{
7048
7049 ;
7050 return 0;
7051}
7052
7053_ACEOF
7054if ac_fn_c_try_compile "$LINENO"; then :
7055
7056 ac_cv_enable_unreachable_code_warning=yes
7057
7058else
7059
7060 ac_cv_enable_unreachable_code_warning=no
7061
7062fi
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064fi
7065
7066 CFLAGS="$save_CFLAGS"
7067 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007068
7069 # Don't enable unreachable code warning in debug mode, since it usually
7070 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007071 # Issue #24324: Unfortunately, the unreachable code warning does not work
7072 # correctly on gcc and has been silently removed from the compiler.
7073 # It is supported on clang but on OS X systems gcc may be an alias
7074 # for clang. Try to determine if the compiler is not really gcc and,
7075 # if so, only then enable the warning.
7076 if test $ac_cv_enable_unreachable_code_warning = yes && \
7077 test "$Py_DEBUG" != "true" && \
7078 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007079 then
7080 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007081 else
7082 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007083 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7085$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007086
Victor Stinner193ee0a2017-02-06 14:24:00 +01007087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7088$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7089 ac_save_cc="$CC"
7090 CC="$CC -Werror=implicit-function-declaration"
7091 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105
7106_ACEOF
7107if ac_fn_c_try_compile "$LINENO"; then :
7108
7109 ac_cv_enable_implicit_function_declaration_error=yes
7110
7111else
7112
7113 ac_cv_enable_implicit_function_declaration_error=no
7114
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117fi
7118
7119 CC="$ac_save_cc"
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7121$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7122
7123 if test $ac_cv_enable_implicit_function_declaration_error = yes
7124 then
7125 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7126 fi
7127
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7129 # support. Without this, treatment of subnormals doesn't follow
7130 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007131 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007132 alpha*)
7133 BASECFLAGS="$BASECFLAGS -mieee"
7134 ;;
7135 esac
7136
7137 case $ac_sys_system in
7138 SCO_SV*)
7139 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7140 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007141
Ned Deily87adb6e2013-10-18 21:09:56 -07007142 Darwin*)
7143 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7144 # used to be here, but non-Apple gcc doesn't accept them.
7145 if test "${CC}" = gcc
7146 then
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007148$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007149 case "${UNIVERSALSDK}" in
7150 */MacOSX10.4u.sdk)
7151 # Build using 10.4 SDK, force usage of gcc when the
7152 # compiler is gcc, otherwise the user will get very
7153 # confusing error messages when building on OSX 10.6
7154 CC=gcc-4.0
7155 CPP=cpp-4.0
7156 ;;
7157 esac
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007159$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007160 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007161
Ned Deily87adb6e2013-10-18 21:09:56 -07007162 if test "${enable_universalsdk}"
7163 then
7164 case "$UNIVERSAL_ARCHS" in
7165 32-bit)
7166 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7167 LIPO_32BIT_FLAGS=""
7168 ARCH_RUN_32BIT=""
7169 ;;
7170 64-bit)
7171 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7172 LIPO_32BIT_FLAGS=""
7173 ARCH_RUN_32BIT="true"
7174 ;;
7175 all)
7176 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7177 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7178 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7179 ;;
7180 intel)
7181 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7182 LIPO_32BIT_FLAGS="-extract i386"
7183 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7184 ;;
7185 intel-32)
7186 UNIVERSAL_ARCH_FLAGS="-arch i386"
7187 LIPO_32BIT_FLAGS=""
7188 ARCH_RUN_32BIT=""
7189 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007190 intel-64)
7191 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7192 LIPO_32BIT_FLAGS=""
7193 ARCH_RUN_32BIT="true"
7194 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007195 3-way)
7196 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7197 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7198 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7199 ;;
7200 *)
7201 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7202 ;;
7203 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007204
Ned Deily87adb6e2013-10-18 21:09:56 -07007205 if test "${UNIVERSALSDK}" != "/"
7206 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007207 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7208 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007209 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007210 else
7211 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7212 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007213 fi
7214 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215
Ned Deily87adb6e2013-10-18 21:09:56 -07007216 # Calculate an appropriate deployment target for this build:
7217 # The deployment target value is used explicitly to enable certain
7218 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007219 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007220 # component of the string returned by distutils.get_platform().
7221 #
7222 # Use the value from:
7223 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7224 # 2. the operating system version of the build machine if >= 10.6
7225 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7226 # below to pick either 10.3, 10.4, or 10.5 as the target.
7227 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007228
Ned Deily87adb6e2013-10-18 21:09:56 -07007229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7230$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007231 cur_target_major=`sw_vers -productVersion | \
7232 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7233 cur_target_minor=`sw_vers -productVersion | \
7234 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7235 cur_target="${cur_target_major}.${cur_target_minor}"
7236 if test ${cur_target_major} -eq 10 && \
7237 test ${cur_target_minor} -ge 3 && \
7238 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007239 then
Ned Deily36820b62014-06-25 13:44:22 -07007240 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007241 cur_target=10.3
7242 if test ${enable_universalsdk}
7243 then
7244 case "$UNIVERSAL_ARCHS" in
7245 all|3-way|intel|64-bit)
7246 # These configurations were first supported in 10.5
7247 cur_target='10.5'
7248 ;;
7249 esac
7250 else
7251 if test `/usr/bin/arch` = "i386"
7252 then
7253 # 10.4 was the first release to support Intel archs
7254 cur_target="10.4"
7255 fi
7256 fi
7257 fi
7258 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007259
Ned Deily87adb6e2013-10-18 21:09:56 -07007260 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7261 # environment with a value that is the same as what we'll use
7262 # in the Makefile to ensure that we'll get the same compiler
7263 # environment during configure and build time.
7264 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7265 export MACOSX_DEPLOYMENT_TARGET
7266 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7268$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007269
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 # end of Darwin* tests
7271 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272 esac
7273 ;;
7274
7275*)
7276 case $ac_sys_system in
7277 OpenUNIX*|UnixWare*)
7278 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7279 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007280 SCO_SV*)
7281 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7282 ;;
7283 esac
7284 ;;
7285esac
7286
Zachary Ware5af85642015-12-21 12:09:17 -06007287# ICC needs -fp-model strict or floats behave badly
7288case "$CC" in
7289*icc*)
7290 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7291 ;;
7292esac
7293
T. Woutersddbfa2c2017-05-23 01:30:49 +02007294if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295 :
7296else
7297 OPT="-DNDEBUG $OPT"
7298fi
7299
7300if test "$ac_arch_flags"
7301then
7302 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7303fi
7304
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305# On some compilers, pthreads are available without further options
7306# (e.g. MacOS X). On some of these systems, the compiler will not
7307# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7308# So we have to see first whether pthreads are available without
7309# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7311$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314else
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316 ac_cv_pthread_is_default=no
7317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319/* end confdefs.h. */
7320
Stefan Krah7dba5942012-11-22 22:49:11 +01007321#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322#include <pthread.h>
7323
7324void* routine(void* p){return NULL;}
7325
7326int main(){
7327 pthread_t p;
7328 if(pthread_create(&p,NULL,routine,NULL)!=0)
7329 return 1;
7330 (void)pthread_detach(p);
7331 return 0;
7332}
7333
7334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007335if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336
7337 ac_cv_pthread_is_default=yes
7338 ac_cv_kthread=no
7339 ac_cv_pthread=no
7340
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346fi
7347
7348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349fi
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7352$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353
7354
7355if test $ac_cv_pthread_is_default = yes
7356then
7357 ac_cv_kpthread=no
7358else
7359# -Kpthread, if available, provides the right #defines
7360# and linker options to make pthread_create available
7361# Some compilers won't report that they do not support -Kpthread,
7362# so we need to run a program to see whether it really made the
7363# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7365$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007366if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368else
7369 ac_save_cc="$CC"
7370CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007371if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372 ac_cv_kpthread=no
7373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375/* end confdefs.h. */
7376
Stefan Krah7dba5942012-11-22 22:49:11 +01007377#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378#include <pthread.h>
7379
7380void* routine(void* p){return NULL;}
7381
7382int main(){
7383 pthread_t p;
7384 if(pthread_create(&p,NULL,routine,NULL)!=0)
7385 return 1;
7386 (void)pthread_detach(p);
7387 return 0;
7388}
7389
7390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007391if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392 ac_cv_kpthread=yes
7393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7397 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398fi
7399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400CC="$ac_save_cc"
7401fi
7402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7404$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
7406
7407if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7408then
7409# -Kthread, if available, provides the right #defines
7410# and linker options to make pthread_create available
7411# Some compilers won't report that they do not support -Kthread,
7412# so we need to run a program to see whether it really made the
7413# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7415$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007416if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418else
7419 ac_save_cc="$CC"
7420CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007421if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 ac_cv_kthread=no
7423else
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425/* end confdefs.h. */
7426
Stefan Krah7dba5942012-11-22 22:49:11 +01007427#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428#include <pthread.h>
7429
7430void* routine(void* p){return NULL;}
7431
7432int main(){
7433 pthread_t p;
7434 if(pthread_create(&p,NULL,routine,NULL)!=0)
7435 return 1;
7436 (void)pthread_detach(p);
7437 return 0;
7438}
7439
7440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007441if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442 ac_cv_kthread=yes
7443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448fi
7449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450CC="$ac_save_cc"
7451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7454$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455fi
7456
7457if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7458then
7459# -pthread, if available, provides the right #defines
7460# and linker options to make pthread_create available
7461# Some compilers won't report that they do not support -pthread,
7462# so we need to run a program to see whether it really made the
7463# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7465$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007466if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468else
7469 ac_save_cc="$CC"
7470CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007471if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472 ac_cv_pthread=no
7473else
Matthias Kloseb9621712010-04-24 17:59:49 +00007474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475/* end confdefs.h. */
7476
Stefan Krah7dba5942012-11-22 22:49:11 +01007477#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478#include <pthread.h>
7479
7480void* routine(void* p){return NULL;}
7481
7482int main(){
7483 pthread_t p;
7484 if(pthread_create(&p,NULL,routine,NULL)!=0)
7485 return 1;
7486 (void)pthread_detach(p);
7487 return 0;
7488}
7489
7490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007491if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492 ac_cv_pthread=yes
7493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498fi
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500CC="$ac_save_cc"
7501fi
7502
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7504$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505fi
7506
7507# If we have set a CC compiler flag for thread support then
7508# check if it works for CXX, too.
7509ac_cv_cxx_thread=no
7510if test ! -z "$CXX"
7511then
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7513$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514ac_save_cxx="$CXX"
7515
7516if test "$ac_cv_kpthread" = "yes"
7517then
7518 CXX="$CXX -Kpthread"
7519 ac_cv_cxx_thread=yes
7520elif test "$ac_cv_kthread" = "yes"
7521then
7522 CXX="$CXX -Kthread"
7523 ac_cv_cxx_thread=yes
7524elif test "$ac_cv_pthread" = "yes"
7525then
7526 CXX="$CXX -pthread"
7527 ac_cv_cxx_thread=yes
7528fi
7529
7530if test $ac_cv_cxx_thread = yes
7531then
7532 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7533 $CXX -c conftest.$ac_ext 2>&5
7534 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7535 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7536 then
7537 ac_cv_cxx_thread=yes
7538 else
7539 ac_cv_cxx_thread=no
7540 fi
7541 rm -fr conftest*
7542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7544$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
7546CXX="$ac_save_cxx"
7547
7548
7549# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7551$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007552if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556/* end confdefs.h. */
7557#include <stdlib.h>
7558#include <stdarg.h>
7559#include <string.h>
7560#include <float.h>
7561
7562int
7563main ()
7564{
7565
7566 ;
7567 return 0;
7568}
7569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007570if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571 ac_cv_header_stdc=yes
7572else
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7576
7577if test $ac_cv_header_stdc = yes; then
7578 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580/* end confdefs.h. */
7581#include <string.h>
7582
7583_ACEOF
7584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 $EGREP "memchr" >/dev/null 2>&1; then :
7586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587else
7588 ac_cv_header_stdc=no
7589fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007590rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591
7592fi
7593
7594if test $ac_cv_header_stdc = yes; then
7595 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597/* end confdefs.h. */
7598#include <stdlib.h>
7599
7600_ACEOF
7601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $EGREP "free" >/dev/null 2>&1; then :
7603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604else
7605 ac_cv_header_stdc=no
7606fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007607rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608
7609fi
7610
7611if test $ac_cv_header_stdc = yes; then
7612 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614 :
7615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617/* end confdefs.h. */
7618#include <ctype.h>
7619#include <stdlib.h>
7620#if ((' ' & 0x0FF) == 0x020)
7621# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7622# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7623#else
7624# define ISLOWER(c) \
7625 (('a' <= (c) && (c) <= 'i') \
7626 || ('j' <= (c) && (c) <= 'r') \
7627 || ('s' <= (c) && (c) <= 'z'))
7628# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7629#endif
7630
7631#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7632int
7633main ()
7634{
7635 int i;
7636 for (i = 0; i < 256; i++)
7637 if (XOR (islower (i), ISLOWER (i))
7638 || toupper (i) != TOUPPER (i))
7639 return 2;
7640 return 0;
7641}
7642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007643if ac_fn_c_try_run "$LINENO"; then :
7644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650fi
7651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
7653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7655$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656if test $ac_cv_header_stdc = yes; then
7657
Matthias Kloseb9621712010-04-24 17:59:49 +00007658$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659
7660fi
7661
stratakise768c862018-01-23 16:11:24 +01007662for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007663fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007664ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007665sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007666unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007667poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007668sys/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 +01007669sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007670sys/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 +01007671sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007672sys/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 -07007673libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007674linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007675sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007676do :
7677 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7678ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007679if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007681#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007682_ACEOF
7683
7684fi
7685
Guido van Rossum627b2d71993-12-24 10:39:16 +00007686done
7687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007688ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007689for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7692$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007693if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007697/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007698#include <sys/types.h>
7699#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
7703{
7704if ((DIR *) 0)
7705return 0;
7706 ;
7707 return 0;
7708}
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717eval ac_res=\$$as_ac_Header
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7719$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007720if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007721 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007723_ACEOF
7724
7725ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007727
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728done
7729# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7730if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7732$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007733if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007735else
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740/* Override any GCC internal prototype to avoid an error.
7741 Use char because int might match the return type of a GCC
7742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007743#ifdef __cplusplus
7744extern "C"
7745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007746char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007747int
7748main ()
7749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ;
7752 return 0;
7753}
7754_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755for ac_lib in '' dir; do
7756 if test -z "$ac_lib"; then
7757 ac_res="none required"
7758 else
7759 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007760 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765rm -f core conftest.err conftest.$ac_objext \
7766 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007767 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770done
Victor Stinnere0be4232011-10-25 13:06:09 +02007771if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773else
7774 ac_cv_search_opendir=no
7775fi
7776rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007777LIBS=$ac_func_search_save_LIBS
7778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7780$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007784
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007786
Michael W. Hudson54241132001-12-07 15:38:26 +00007787else
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7789$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
7793 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797/* Override any GCC internal prototype to avoid an error.
7798 Use char because int might match the return type of a GCC
7799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#ifdef __cplusplus
7801extern "C"
7802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007803char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
7806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ;
7809 return 0;
7810}
7811_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812for ac_lib in '' x; do
7813 if test -z "$ac_lib"; then
7814 ac_res="none required"
7815 else
7816 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007824 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827done
Victor Stinnere0be4232011-10-25 13:06:09 +02007828if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830else
7831 ac_cv_search_opendir=no
7832fi
7833rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007834LIBS=$ac_func_search_save_LIBS
7835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7837$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007839if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007842fi
7843
7844fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007845
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7847$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007848if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007850else
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007853#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007854int
7855main ()
7856{
7857return makedev(0, 0);
7858 ;
7859 return 0;
7860}
7861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007863 ac_cv_header_sys_types_h_makedev=yes
7864else
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867rm -f core conftest.err conftest.$ac_objext \
7868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007869
7870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7872$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007873
7874if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007875ac_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 +02007876if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007879
7880fi
7881
7882
7883
7884 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 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 +02007886if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007889
7890fi
7891
7892
7893 fi
7894fi
7895
Michael W. Hudson54241132001-12-07 15:38:26 +00007896
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007897# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7898# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7899SAVE_CFLAGS=$CFLAGS
7900CFLAGS="-std=c99 $CFLAGS"
7901for ac_header in bluetooth/bluetooth.h
7902do :
7903 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7904if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7905 cat >>confdefs.h <<_ACEOF
7906#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7907_ACEOF
7908
7909fi
7910
7911done
7912
7913CFLAGS=$SAVE_CFLAGS
7914
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007915# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7916for ac_header in net/if.h
7917do :
7918 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7919#ifdef STDC_HEADERS
7920# include <stdlib.h>
7921# include <stddef.h>
7922#else
7923# ifdef HAVE_STDLIB_H
7924# include <stdlib.h>
7925# endif
7926#endif
7927#ifdef HAVE_SYS_SOCKET_H
7928# include <sys/socket.h>
7929#endif
7930
7931"
Victor Stinnere0be4232011-10-25 13:06:09 +02007932if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007933 cat >>confdefs.h <<_ACEOF
7934#define HAVE_NET_IF_H 1
7935_ACEOF
7936
7937fi
7938
7939done
7940
7941
Martin v. Löwis11017b12006-01-14 18:12:57 +00007942# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007943for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007944do :
7945 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 +00007946#ifdef HAVE_ASM_TYPES_H
7947#include <asm/types.h>
7948#endif
7949#ifdef HAVE_SYS_SOCKET_H
7950#include <sys/socket.h>
7951#endif
7952
Matthias Kloseb9621712010-04-24 17:59:49 +00007953"
Victor Stinnere0be4232011-10-25 13:06:09 +02007954if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007955 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007957_ACEOF
7958
7959fi
7960
7961done
7962
7963
caaveryeffc12f2017-09-06 18:18:10 -04007964for ac_header in linux/vm_sockets.h
7965do :
7966 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7967#ifdef HAVE_SYS_SOCKET_H
7968#include <sys/socket.h>
7969#endif
7970
7971"
7972if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
7973 cat >>confdefs.h <<_ACEOF
7974#define HAVE_LINUX_VM_SOCKETS_H 1
7975_ACEOF
7976
7977fi
7978
7979done
7980
7981
Charles-François Natali47413c12011-10-06 19:47:44 +02007982# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007983for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007984do :
7985 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7986ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7987#ifdef HAVE_SYS_SOCKET_H
7988#include <sys/socket.h>
7989#endif
7990
7991"
7992if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7993 cat >>confdefs.h <<_ACEOF
7994#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7995_ACEOF
7996
7997fi
7998
7999done
8000
8001
Guido van Rossum627b2d71993-12-24 10:39:16 +00008002# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008003was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8005$as_echo_n "checking for clock_t in time.h... " >&6; }
8006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008008#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008009
8010_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008013 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014else
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
8016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008018
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008019
Guido van Rossum627b2d71993-12-24 10:39:16 +00008020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008021rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008022
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8024$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8027$as_echo_n "checking for makedev... " >&6; }
8028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008030
Jesus Cea740f53a2010-04-28 11:35:30 +00008031#if defined(MAJOR_IN_MKDEV)
8032#include <sys/mkdev.h>
8033#elif defined(MAJOR_IN_SYSMACROS)
8034#include <sys/sysmacros.h>
8035#else
8036#include <sys/types.h>
8037#endif
8038
Neal Norwitz11690112002-07-30 01:08:28 +00008039int
8040main ()
8041{
Jesus Cea740f53a2010-04-28 11:35:30 +00008042
8043 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008044 ;
8045 return 0;
8046}
Matthias Kloseb159a552010-04-25 21:00:44 +00008047
Neal Norwitz11690112002-07-30 01:08:28 +00008048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008049if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008050 ac_cv_has_makedev=yes
8051else
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8057$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008058if test "$ac_cv_has_makedev" = "yes"; then
8059
Matthias Kloseb9621712010-04-24 17:59:49 +00008060$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008061
8062fi
8063
Christian Heimes985ecdc2013-11-20 11:46:18 +01008064# byte swapping
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8066$as_echo_n "checking for le64toh... " >&6; }
8067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8068/* end confdefs.h. */
8069
8070#ifdef HAVE_ENDIAN_H
8071#include <endian.h>
8072#elif defined(HAVE_SYS_ENDIAN_H)
8073#include <sys/endian.h>
8074#endif
8075
8076int
8077main ()
8078{
8079
8080 le64toh(1)
8081 ;
8082 return 0;
8083}
8084
8085_ACEOF
8086if ac_fn_c_try_link "$LINENO"; then :
8087 ac_cv_has_le64toh=yes
8088else
8089 ac_cv_has_le64toh=no
8090fi
8091rm -f core conftest.err conftest.$ac_objext \
8092 conftest$ac_exeext conftest.$ac_ext
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8094$as_echo "$ac_cv_has_le64toh" >&6; }
8095if test "$ac_cv_has_le64toh" = "yes"; then
8096
8097$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8098
8099fi
8100
Martin v. Löwis399a6892002-10-04 10:22:02 +00008101use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008102# Don't use largefile support for GNU/Hurd
8103case $ac_sys_system in GNU*)
8104 use_lfs=no
8105esac
8106
Martin v. Löwis399a6892002-10-04 10:22:02 +00008107if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008108# Two defines needed to enable largefile support on various platforms
8109# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008110case $ac_sys_system/$ac_sys_release in
8111AIX*)
8112
8113$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8114
8115 ;;
8116esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008117
Matthias Kloseb9621712010-04-24 17:59:49 +00008118$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
8120
Matthias Kloseb9621712010-04-24 17:59:49 +00008121$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008122
Martin v. Löwis399a6892002-10-04 10:22:02 +00008123fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008124
Guido van Rossum84e7b241996-08-19 21:59:00 +00008125# Add some code to confdefs.h so that the test for off_t works on SCO
8126cat >> confdefs.h <<\EOF
8127#if defined(SCO_DS)
8128#undef _OFF_T
8129#endif
8130EOF
8131
Guido van Rossumef2255b2000-03-10 22:30:29 +00008132# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008133ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008134if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008136else
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
8138cat >>confdefs.h <<_ACEOF
8139#define mode_t int
8140_ACEOF
8141
8142fi
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008145if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008147else
Martin v. Löwis11437992002-04-12 09:54:03 +00008148
8149cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008151_ACEOF
8152
8153fi
8154
Matthias Kloseb9621712010-04-24 17:59:49 +00008155ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008156if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008158else
Martin v. Löwis11437992002-04-12 09:54:03 +00008159
8160cat >>confdefs.h <<_ACEOF
8161#define pid_t int
8162_ACEOF
8163
8164fi
8165
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008166
Martin v. Löwis11437992002-04-12 09:54:03 +00008167cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008168#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008169_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008174else
Martin v. Löwis11437992002-04-12 09:54:03 +00008175
8176cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008178_ACEOF
8179
8180fi
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8183$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008184if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008188/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008189#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008190
8191_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008194 ac_cv_type_uid_t=yes
8195else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008196 ac_cv_type_uid_t=no
8197fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008198rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8202$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008203if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008209
8210fi
8211
Mark Dickinson983bc162012-12-02 12:11:38 +00008212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008214if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008217
8218fi
8219
Stefan Krah1919b7e2012-03-21 18:25:23 +01008220ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8221if test "x$ac_cv_type___uint128_t" = xyes; then :
8222
8223$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8224
8225fi
8226
Jack Jansendd19cf82001-12-06 22:36:17 +00008227
Michael W. Hudson54241132001-12-07 15:38:26 +00008228# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008229# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230# The cast to long int works around a bug in the HP C Compiler
8231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8233# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8235$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008236if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 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 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241else
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 if test "$ac_cv_type_int" = yes; then
8243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008245as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008246See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 else
8248 ac_cv_sizeof_int=0
8249 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8254$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255
8256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261
8262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# The cast to long int works around a bug in the HP C Compiler
8264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8266# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8268$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008269if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 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 +00008273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 if test "$ac_cv_type_long" = yes; then
8276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008278as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008279See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280 else
8281 ac_cv_sizeof_long=0
8282 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8287$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288
8289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008292#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294
8295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296# The cast to long int works around a bug in the HP C Compiler
8297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8299# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8301$as_echo_n "checking size of long long... " >&6; }
8302if ${ac_cv_sizeof_long_long+:} false; then :
8303 $as_echo_n "(cached) " >&6
8304else
8305 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8306
8307else
8308 if test "$ac_cv_type_long_long" = yes; then
8309 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8311as_fn_error 77 "cannot compute sizeof (long long)
8312See \`config.log' for more details" "$LINENO" 5; }
8313 else
8314 ac_cv_sizeof_long_long=0
8315 fi
8316fi
8317
8318fi
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8320$as_echo "$ac_cv_sizeof_long_long" >&6; }
8321
8322
8323
8324cat >>confdefs.h <<_ACEOF
8325#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8326_ACEOF
8327
8328
8329# The cast to long int works around a bug in the HP C Compiler
8330# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8331# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8332# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8334$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 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 +00008339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340else
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 if test "$ac_cv_type_void_p" = yes; then
8342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008344as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008345See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346 else
8347 ac_cv_sizeof_void_p=0
8348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8353$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
8355
8356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008358#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008360
8361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362# The cast to long int works around a bug in the HP C Compiler
8363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8365# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8367$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 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 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 if test "$ac_cv_type_short" = yes; then
8375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008377as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008378See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379 else
8380 ac_cv_sizeof_short=0
8381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8386$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387
8388
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008391#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008392_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008393
8394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395# The cast to long int works around a bug in the HP C Compiler
8396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8398# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8400$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 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 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 if test "$ac_cv_type_float" = yes; then
8408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008410as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008411See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 else
8413 ac_cv_sizeof_float=0
8414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8419$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
8421
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008424#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008426
8427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428# The cast to long int works around a bug in the HP C Compiler
8429# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8430# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8431# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8433$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008434if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008436else
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 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 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 if test "$ac_cv_type_double" = yes; then
8441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008443as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008444See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445 else
8446 ac_cv_sizeof_double=0
8447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8452$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
8454
8455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008457#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008459
8460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461# The cast to long int works around a bug in the HP C Compiler
8462# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8463# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8464# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8466$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008469else
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 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 +00008471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 if test "$ac_cv_type_fpos_t" = yes; then
8474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008476as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008477See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478 else
8479 ac_cv_sizeof_fpos_t=0
8480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8485$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486
8487
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008490#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008492
Michael W. Hudson54241132001-12-07 15:38:26 +00008493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494# The cast to long int works around a bug in the HP C Compiler
8495# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8496# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8497# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8499$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008500if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 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 +00008504
Martin v. Löwis18e16552006-02-15 17:27:45 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 if test "$ac_cv_type_size_t" = yes; then
8507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008509as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008510See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511 else
8512 ac_cv_sizeof_size_t=0
8513 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515
Martin v. Löwis18e16552006-02-15 17:27:45 +00008516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8518$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519
8520
8521
Martin v. Löwis18e16552006-02-15 17:27:45 +00008522cat >>confdefs.h <<_ACEOF
8523#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8524_ACEOF
8525
8526
Christian Heimes400adb02008-02-01 08:12:03 +00008527# The cast to long int works around a bug in the HP C Compiler
8528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8532$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008533if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 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 +00008537
Christian Heimes400adb02008-02-01 08:12:03 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 if test "$ac_cv_type_pid_t" = yes; then
8540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008542as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008543See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008544 else
8545 ac_cv_sizeof_pid_t=0
8546 fi
8547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548
Christian Heimes400adb02008-02-01 08:12:03 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8551$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008552
8553
8554
8555cat >>confdefs.h <<_ACEOF
8556#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8557_ACEOF
8558
8559
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008560# The cast to long int works around a bug in the HP C Compiler
8561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8563# This bug is HP SR number 8606223364.
8564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8565$as_echo_n "checking size of uintptr_t... " >&6; }
8566if ${ac_cv_sizeof_uintptr_t+:} false; then :
8567 $as_echo_n "(cached) " >&6
8568else
8569 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8570
8571else
8572 if test "$ac_cv_type_uintptr_t" = yes; then
8573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8575as_fn_error 77 "cannot compute sizeof (uintptr_t)
8576See \`config.log' for more details" "$LINENO" 5; }
8577 else
8578 ac_cv_sizeof_uintptr_t=0
8579 fi
8580fi
8581
8582fi
8583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8584$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8585
8586
8587
8588cat >>confdefs.h <<_ACEOF
8589#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8590_ACEOF
8591
8592
Michael W. Hudson54241132001-12-07 15:38:26 +00008593
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008594
Eitan Adler3055c942018-05-15 22:58:09 -07008595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8596$as_echo_n "checking for long double... " >&6; }
8597if ${ac_cv_type_long_double+:} false; then :
8598 $as_echo_n "(cached) " >&6
8599else
8600 if test "$GCC" = yes; then
8601 ac_cv_type_long_double=yes
8602 else
8603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8604/* end confdefs.h. */
8605/* The Stardent Vistra knows sizeof (long double), but does
8606 not support it. */
8607 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608int
8609main ()
8610{
Eitan Adler3055c942018-05-15 22:58:09 -07008611static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8612 sizeof (double) <= sizeof (long double))];
8613test_array [0] = 0;
8614return test_array [0];
8615
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008616 ;
8617 return 0;
8618}
8619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008620if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008621 ac_cv_type_long_double=yes
8622else
8623 ac_cv_type_long_double=no
8624fi
8625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8626 fi
8627fi
8628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8629$as_echo "$ac_cv_type_long_double" >&6; }
8630 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008633
Eitan Adler3055c942018-05-15 22:58:09 -07008634 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008636# The cast to long int works around a bug in the HP C Compiler
8637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8639# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8641$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008642if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 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 +00008646
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 if test "$ac_cv_type_long_double" = yes; then
8649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008651as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008652See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008653 else
8654 ac_cv_sizeof_long_double=0
8655 fi
8656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8660$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008661
8662
8663
8664cat >>confdefs.h <<_ACEOF
8665#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8666_ACEOF
8667
8668
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670# The cast to long int works around a bug in the HP C Compiler
8671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8675$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008676if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 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 +00008680
Thomas Woutersb2137042007-02-01 18:02:27 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 if test "$ac_cv_type__Bool" = yes; then
8683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008685as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008686See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 else
8688 ac_cv_sizeof__Bool=0
8689 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691
Thomas Woutersb2137042007-02-01 18:02:27 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8694$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695
8696
8697
Thomas Woutersb2137042007-02-01 18:02:27 +00008698cat >>confdefs.h <<_ACEOF
8699#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8700_ACEOF
8701
8702
Thomas Woutersb2137042007-02-01 18:02:27 +00008703
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008704# The cast to long int works around a bug in the HP C Compiler
8705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8707# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8709$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008712else
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008714#ifdef HAVE_SYS_TYPES_H
8715#include <sys/types.h>
8716#endif
8717
Matthias Kloseb9621712010-04-24 17:59:49 +00008718"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008719
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 if test "$ac_cv_type_off_t" = yes; then
8722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008724as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008725See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008726 else
8727 ac_cv_sizeof_off_t=0
8728 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8733$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008734
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008735
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008738#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008739_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008740
Michael W. Hudson54241132001-12-07 15:38:26 +00008741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8744$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008745if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008746 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8751$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8754$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008755fi
8756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008757# The cast to long int works around a bug in the HP C Compiler
8758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8760# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8762$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008763if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008767#ifdef HAVE_SYS_TYPES_H
8768#include <sys/types.h>
8769#endif
8770#ifdef HAVE_TIME_H
8771#include <time.h>
8772#endif
8773
Matthias Kloseb9621712010-04-24 17:59:49 +00008774"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if test "$ac_cv_type_time_t" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008780as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008781See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782 else
8783 ac_cv_sizeof_time_t=0
8784 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8789$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008791
8792
Martin v. Löwis11437992002-04-12 09:54:03 +00008793cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008794#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008795_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008796
Michael W. Hudson54241132001-12-07 15:38:26 +00008797
8798
Trent Mick635f6fb2000-08-23 21:33:05 +00008799# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008800ac_save_cc="$CC"
8801if test "$ac_cv_kpthread" = "yes"
8802then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008803elif test "$ac_cv_kthread" = "yes"
8804then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805elif test "$ac_cv_pthread" = "yes"
8806then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008807fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8810$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008811have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008814
8815 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
Guido van Rossum12580492000-09-24 16:47:19 +00008819pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 ;
8821 return 0;
8822}
Matthias Kloseb159a552010-04-25 21:00:44 +00008823
Martin v. Löwis11437992002-04-12 09:54:03 +00008824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008825if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008826 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8830$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008831if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8835# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8837$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008838if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840else
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842#ifdef HAVE_PTHREAD_H
8843#include <pthread.h>
8844#endif
8845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if test "$ac_cv_type_pthread_t" = yes; then
8850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008852as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008853See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854 else
8855 ac_cv_sizeof_pthread_t=0
8856 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858
Trent Mick635f6fb2000-08-23 21:33:05 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8861$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863
8864
Martin v. Löwis11437992002-04-12 09:54:03 +00008865cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008866#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008867_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869
Trent Mick635f6fb2000-08-23 21:33:05 +00008870fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008871
8872# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8873# This checking will be unnecessary after removing deprecated TLS API.
8874# The cast to long int works around a bug in the HP C Compiler
8875# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8876# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8877# This bug is HP SR number 8606223364.
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8879$as_echo_n "checking size of pthread_key_t... " >&6; }
8880if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8881 $as_echo_n "(cached) " >&6
8882else
8883 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8884"; then :
8885
8886else
8887 if test "$ac_cv_type_pthread_key_t" = yes; then
8888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8890as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8891See \`config.log' for more details" "$LINENO" 5; }
8892 else
8893 ac_cv_sizeof_pthread_key_t=0
8894 fi
8895fi
8896
8897fi
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8899$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8900
8901
8902
8903cat >>confdefs.h <<_ACEOF
8904#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8905_ACEOF
8906
8907
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8909$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8910if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8912/* end confdefs.h. */
8913#include <pthread.h>
8914int
8915main ()
8916{
8917pthread_key_t k; k * 1;
8918 ;
8919 return 0;
8920}
8921_ACEOF
8922if ac_fn_c_try_compile "$LINENO"; then :
8923 ac_pthread_key_t_is_arithmetic_type=yes
8924else
8925 ac_pthread_key_t_is_arithmetic_type=no
8926
8927fi
8928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8930$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8931 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8932
8933$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8934
8935 fi
8936else
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008940CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008941
Michael W. Hudson54241132001-12-07 15:38:26 +00008942
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008943case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008944 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008945 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8946 ;;
8947 Darwin/*)
8948 OTHER_LIBTOOL_OPT=""
8949 ;;
8950esac
8951
8952
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008953
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008954case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008955 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008956 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8957 if test "${enable_universalsdk}"; then
8958 :
8959 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008960 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008961 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008962 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008963 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008964 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008965 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008966 if test ${gcc_version} '<' 4.0
8967 then
8968 LIBTOOL_CRUFT="-lcc_dynamic"
8969 else
8970 LIBTOOL_CRUFT=""
8971 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008973 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008976/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008977
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978 #include <unistd.h>
8979 int main(int argc, char*argv[])
8980 {
8981 if (sizeof(long) == 4) {
8982 return 0;
8983 } else {
8984 return 1;
8985 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008986 }
8987
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008989if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 ac_osx_32bit=yes
8991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996fi
8997
8998
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009000 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001 i386)
9002 MACOSX_DEFAULT_ARCH="i386"
9003 ;;
9004 ppc)
9005 MACOSX_DEFAULT_ARCH="ppc"
9006 ;;
9007 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009008 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009009 ;;
9010 esac
9011 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009012 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013 i386)
9014 MACOSX_DEFAULT_ARCH="x86_64"
9015 ;;
9016 ppc)
9017 MACOSX_DEFAULT_ARCH="ppc64"
9018 ;;
9019 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009020 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 ;;
9022 esac
9023
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024 fi
9025
9026 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009028 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9031$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009032if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009033then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009034 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009036 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037
Matthias Kloseb9621712010-04-24 17:59:49 +00009038$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009039
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9041$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009042 if test $enable_shared = "yes"
9043 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009044 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 +00009045 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046else
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009049fi
9050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9052$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009053case $ac_sys_system/$ac_sys_release in
9054 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009055
Matthias Kloseb9621712010-04-24 17:59:49 +00009056$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9059$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009060 ;;
9061 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9063$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009064 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009065esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009066
Guido van Rossum0a516c91994-09-12 10:58:40 +00009067# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009068
Michael W. Hudson54241132001-12-07 15:38:26 +00009069
9070
9071
9072
Benjamin Peterson99f03762010-04-11 22:15:28 +00009073
Thomas Wouters477c8d52006-05-27 19:21:47 +00009074
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009075# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9076# -- usually .so, .sl on HP-UX, .dll on Cygwin
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9078$as_echo_n "checking the extension of shared libraries... " >&6; }
9079if test -z "$SHLIB_SUFFIX"; then
9080 case $ac_sys_system in
9081 hp*|HP*)
9082 case `uname -m` in
9083 ia64) SHLIB_SUFFIX=.so;;
9084 *) SHLIB_SUFFIX=.sl;;
9085 esac
9086 ;;
9087 CYGWIN*) SHLIB_SUFFIX=.dll;;
9088 *) SHLIB_SUFFIX=.so;;
9089 esac
9090fi
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9092$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009093
Guido van Rossum0a516c91994-09-12 10:58:40 +00009094# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009095# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096# (Shared libraries in this instance are shared modules to be loaded into
9097# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9099$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009100if test -z "$LDSHARED"
9101then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009102 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009103 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009104 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009105 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009108 if test "$GCC" = "yes" ; then
9109 LDSHARED='$(CC) -shared'
9110 LDCXXSHARED='$(CXX) -shared'
9111 else
9112 LDSHARED='$(CC) -G'
9113 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009114 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009115 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009116 if test "$GCC" = "yes" ; then
9117 LDSHARED='$(CC) -shared'
9118 LDCXXSHARED='$(CXX) -shared'
9119 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009120 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009121 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009122 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009123 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009124 LDSHARED='$(CC) -bundle'
9125 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009126 if test "$enable_framework" ; then
9127 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009128 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9129 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009130 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009131 else
9132 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009133 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009134 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009135 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009136 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009137 LDSHARED='$(CC) -bundle'
9138 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009139 if test "$enable_framework" ; then
9140 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009141 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9142 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009143 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009144 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009145 # No framework, use the Python app as bundle-loader
9146 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009147 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009150 Darwin/*)
9151 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9152 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009153
Ned Deily36820b62014-06-25 13:44:22 -07009154 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9155 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9156 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9157 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9158 if test ${dep_target_major} -eq 10 && \
9159 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009160 then
Ned Deily36820b62014-06-25 13:44:22 -07009161 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009162 LDSHARED='$(CC) -bundle'
9163 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009164 if test "$enable_framework" ; then
9165 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009166 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9167 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009168 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009169 else
9170 # No framework, use the Python app as bundle-loader
9171 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9172 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009173 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009174 fi
Ned Deily36820b62014-06-25 13:44:22 -07009175 else
9176 # building for OS X 10.3 and later
9177 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9178 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9179 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009180 fi
9181 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009182 Linux*|GNU*|QNX*)
9183 LDSHARED='$(CC) -shared'
9184 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009185 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009186 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009187 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009188 LDSHARED='$(CC) -shared'
9189 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009190 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009191 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009192 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009193 OpenBSD*)
9194 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9195 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009196 LDSHARED='$(CC) -shared $(CCSHARED)'
9197 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009198 else
9199 case `uname -r` in
9200 [01].* | 2.[0-7] | 2.[0-7].*)
9201 LDSHARED="ld -Bshareable ${LDFLAGS}"
9202 ;;
9203 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009204 LDSHARED='$(CC) -shared $(CCSHARED)'
9205 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009206 ;;
9207 esac
9208 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009210 LDSHARED='$(CC) -shared'
9211 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009212 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 if test "$GCC" = "yes" ; then
9214 LDSHARED='$(CC) -shared'
9215 LDCXXSHARED='$(CXX) -shared'
9216 else
9217 LDSHARED='$(CC) -G'
9218 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009219 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009220 SCO_SV*)
9221 LDSHARED='$(CC) -Wl,-G,-Bexport'
9222 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9223 CYGWIN*)
9224 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9225 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226 *) LDSHARED="ld";;
9227 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9230$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009232BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009234# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9236$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009237if test -z "$CCSHARED"
9238then
Guido van Rossum07397971997-04-29 21:49:50 +00009239 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009240 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009241 then CCSHARED="-fPIC";
9242 elif test `uname -p` = sparc;
9243 then CCSHARED="-xcode=pic32";
9244 else CCSHARED="-Kpic";
9245 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009246 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009247 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009248 else CCSHARED="+z";
9249 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009250 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009251 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009252 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009253 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009254 if test "$GCC" = "yes"
9255 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009256 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009257 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009258 SCO_SV*)
9259 if test "$GCC" = "yes"
9260 then CCSHARED="-fPIC"
9261 else CCSHARED="-Kpic -belf"
9262 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009263 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9266$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009268# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9270$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271if test -z "$LINKFORSHARED"
9272then
Guido van Rossum07397971997-04-29 21:49:50 +00009273 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009274 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009275 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009276 LINKFORSHARED="-Wl,-E -Wl,+s";;
9277# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009278 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009279 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009280 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009282 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009283
9284 # Issue #18075: the default maximum stack size (8MBytes) is too
9285 # small for the default recursion limit. Increase the stack size
9286 # to ensure that tests don't crash
9287 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9288
Jack Jansene578a632001-08-15 01:27:14 +00009289 if test "$enable_framework"
9290 then
Jack Jansenda49e192005-01-07 13:08:22 +00009291 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009292 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009293 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009294 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009295 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009296 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009297 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009298 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9299 then
9300 LINKFORSHARED="-Wl,--export-dynamic"
9301 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009302 SunOS/5*) case $CC in
9303 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009304 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009305 then
9306 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009307 fi;;
9308 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009309 CYGWIN*)
9310 if test $enable_shared = "no"
9311 then
9312 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9313 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009314 QNX*)
9315 # -Wl,-E causes the symbols to be added to the dynamic
9316 # symbol table so that they can be found when a module
9317 # is loaded. -N 2048K causes the stack size to be set
9318 # to 2048 kilobytes so that the stack doesn't overflow
9319 # when running test_compile.py.
9320 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9324$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325
Michael W. Hudson54241132001-12-07 15:38:26 +00009326
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009327
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9329$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009330if test ! "$LIBRARY" = "$LDLIBRARY"
9331then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009332 case $ac_sys_system in
9333 CYGWIN*)
9334 # Cygwin needs CCSHARED when building extension DLLs
9335 # but not when building the interpreter DLL.
9336 CFLAGSFORSHARED='';;
9337 *)
9338 CFLAGSFORSHARED='$(CCSHARED)'
9339 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9342$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009343
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009344# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9345# library (with --enable-shared).
9346# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009347# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9348# if it is not required, since it creates a dependency of the shared library
9349# to LIBS. This, in turn, means that applications linking the shared libpython
9350# don't need to link LIBS explicitly. The default should be only changed
9351# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9354$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009356 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009357 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9360$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361
9362
Guido van Rossum627b2d71993-12-24 10:39:16 +00009363# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9365$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009366if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009367 $as_echo_n "(cached) " >&6
9368else
9369 ac_check_lib_save_LIBS=$LIBS
9370LIBS="-lsendfile $LIBS"
9371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9372/* end confdefs.h. */
9373
9374/* Override any GCC internal prototype to avoid an error.
9375 Use char because int might match the return type of a GCC
9376 builtin and then its argument prototype would still apply. */
9377#ifdef __cplusplus
9378extern "C"
9379#endif
9380char sendfile ();
9381int
9382main ()
9383{
9384return sendfile ();
9385 ;
9386 return 0;
9387}
9388_ACEOF
9389if ac_fn_c_try_link "$LINENO"; then :
9390 ac_cv_lib_sendfile_sendfile=yes
9391else
9392 ac_cv_lib_sendfile_sendfile=no
9393fi
9394rm -f core conftest.err conftest.$ac_objext \
9395 conftest$ac_exeext conftest.$ac_ext
9396LIBS=$ac_check_lib_save_LIBS
9397fi
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9399$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009400if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009401 cat >>confdefs.h <<_ACEOF
9402#define HAVE_LIBSENDFILE 1
9403_ACEOF
9404
9405 LIBS="-lsendfile $LIBS"
9406
9407fi
9408
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9410$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009411if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009413else
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009415LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419/* Override any GCC internal prototype to avoid an error.
9420 Use char because int might match the return type of a GCC
9421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009422#ifdef __cplusplus
9423extern "C"
9424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009425char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ;
9431 return 0;
9432}
9433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009434if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436else
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009439rm -f core conftest.err conftest.$ac_objext \
9440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9444$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 cat >>confdefs.h <<_ACEOF
9447#define HAVE_LIBDL 1
9448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009450 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009452fi
9453 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9455$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009460LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464/* Override any GCC internal prototype to avoid an error.
9465 Use char because int might match the return type of a GCC
9466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467#ifdef __cplusplus
9468extern "C"
9469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009470char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009471int
9472main ()
9473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484rm -f core conftest.err conftest.$ac_objext \
9485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009486LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9489$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009490if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 cat >>confdefs.h <<_ACEOF
9492#define HAVE_LIBDLD 1
9493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009494
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009495 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497fi
9498 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009499
Michael Felt0d3ccb42017-12-30 22:39:20 +01009500# checks for uuid.h location
9501for ac_header in uuid/uuid.h uuid.h
9502do :
9503 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9504ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9505if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9506 cat >>confdefs.h <<_ACEOF
9507#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9508_ACEOF
9509
9510fi
9511
9512done
9513
9514
Berker Peksag9a10ff42017-11-08 23:09:16 +03009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9516$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9518/* end confdefs.h. */
9519#include <uuid/uuid.h>
9520int
9521main ()
9522{
9523
9524#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009525void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009526#endif
9527
9528 ;
9529 return 0;
9530}
9531_ACEOF
9532if ac_fn_c_try_compile "$LINENO"; then :
9533
9534$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9535
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9537$as_echo "yes" >&6; }
9538else
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541
9542fi
9543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9544
Michael Felt0d3ccb42017-12-30 22:39:20 +01009545# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009546# FreeBSD and OpenBSD provides support as well
9547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9548$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9550/* end confdefs.h. */
9551#include <uuid.h>
9552int
9553main ()
9554{
9555
9556#ifndef uuid_create
9557void *x = uuid_create
9558#endif
9559
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564if ac_fn_c_try_compile "$LINENO"; then :
9565
9566$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9567
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9569$as_echo "yes" >&6; }
9570else
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
9573
9574fi
9575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9576
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009577# 'Real Time' functions on Solaris
9578# posix4 on Solaris 2.6
9579# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009582if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009584else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009585 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
9591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009592#ifdef __cplusplus
9593extern "C"
9594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009595char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009596int
9597main ()
9598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ;
9601 return 0;
9602}
9603_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604for ac_lib in '' pthread rt posix4; do
9605 if test -z "$ac_lib"; then
9606 ac_res="none required"
9607 else
9608 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009609 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614rm -f core conftest.err conftest.$ac_objext \
9615 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009616 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619done
Victor Stinnere0be4232011-10-25 13:06:09 +02009620if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622else
9623 ac_cv_search_sem_init=no
9624fi
9625rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009626LIBS=$ac_func_search_save_LIBS
9627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9629$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009631if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009633
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009634fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009635
Martin v. Löwis519adae2003-09-20 10:47:47 +00009636
Martin v. Löwis19d17342003-06-14 21:03:05 +00009637# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9639$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009642else
9643 ac_check_lib_save_LIBS=$LIBS
9644LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651#ifdef __cplusplus
9652extern "C"
9653#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655int
9656main ()
9657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659 ;
9660 return 0;
9661}
9662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009664 ac_cv_lib_intl_textdomain=yes
9665else
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009668rm -f core conftest.err conftest.$ac_objext \
9669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009670LIBS=$ac_check_lib_save_LIBS
9671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9673$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675
Matthias Kloseb9621712010-04-24 17:59:49 +00009676$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677
Brett Cannonc6d936e2009-06-07 20:09:53 +00009678 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679fi
9680
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009681
9682# checks for system dependent C++ extensions support
9683case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009684 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9685$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009687/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009688
Georg Brandl59e87bd2011-02-15 19:48:59 +00009689 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009693loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ;
9695 return 0;
9696}
Matthias Kloseb159a552010-04-25 21:00:44 +00009697
Martin v. Löwis11437992002-04-12 09:54:03 +00009698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009699if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009700
Matthias Kloseb159a552010-04-25 21:00:44 +00009701
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Matthias Kloseb159a552010-04-25 21:00:44 +00009704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009706
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009707else
Matthias Kloseb159a552010-04-25 21:00:44 +00009708
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009710$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009711
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009715 *) ;;
9716esac
9717
Christian Heimes985ecdc2013-11-20 11:46:18 +01009718# check for systems that require aligned memory access
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9720$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009721if ${ac_cv_aligned_required+:} false; then :
9722 $as_echo_n "(cached) " >&6
9723else
9724 if test "$cross_compiling" = yes; then :
9725 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009726else
9727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728/* end confdefs.h. */
9729
9730int main()
9731{
9732 char s[16];
9733 int i, *p1, *p2;
9734 for (i=0; i < 16; i++)
9735 s[i] = i;
9736 p1 = (int*)(s+1);
9737 p2 = (int*)(s+2);
9738 if (*p1 == *p2)
9739 return 1;
9740 return 0;
9741}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009742_ACEOF
9743if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009744 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009745else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009746 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009747fi
9748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9749 conftest.$ac_objext conftest.beam conftest.$ac_ext
9750fi
9751
9752
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009753fi
9754
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9756$as_echo "$ac_cv_aligned_required" >&6; }
9757if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009758
9759$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9760
9761fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009762
9763# str, bytes and memoryview hash algorithm
9764
9765
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9767$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9768
9769# Check whether --with-hash_algorithm was given.
9770if test "${with_hash_algorithm+set}" = set; then :
9771 withval=$with_hash_algorithm;
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9773$as_echo "$withval" >&6; }
9774case "$withval" in
9775 siphash24)
9776 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9777
9778 ;;
9779 fnv)
9780 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9781
9782 ;;
9783 *)
9784 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9785 ;;
9786esac
9787
9788else
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9790$as_echo "default" >&6; }
9791fi
9792
9793
Charles-François Natalid30b0222014-05-08 23:08:51 +01009794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9795$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9796
9797# Check whether --with-address_sanitizer was given.
9798if test "${with_address_sanitizer+set}" = set; then :
9799 withval=$with_address_sanitizer;
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9801$as_echo "$withval" >&6; }
9802BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9803LDFLAGS="-fsanitize=address $LDFLAGS"
9804
9805else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
Guido van Rossum70c7f481998-03-26 18:44:10 +00009811# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9813$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009814if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009816else
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009818LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822/* Override any GCC internal prototype to avoid an error.
9823 Use char because int might match the return type of a GCC
9824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#ifdef __cplusplus
9826extern "C"
9827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009828char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ;
9834 return 0;
9835}
9836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842rm -f core conftest.err conftest.$ac_objext \
9843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009844LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9847$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009848if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009849 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009850fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009851 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9853$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009854if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009856else
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009858LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862/* Override any GCC internal prototype to avoid an error.
9863 Use char because int might match the return type of a GCC
9864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009865#ifdef __cplusplus
9866extern "C"
9867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009868char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009869int
9870main ()
9871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ;
9874 return 0;
9875}
9876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009882rm -f core conftest.err conftest.$ac_objext \
9883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009884LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9887$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009888if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009889 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009890fi
9891 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009892
Matthias Kloseb9621712010-04-24 17:59:49 +00009893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9894$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009897if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9900$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009901LIBS="$withval $LIBS"
9902
9903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9905$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906fi
9907
Guido van Rossum7f43da71994-08-01 12:15:30 +00009908
Benjamin Peterson54016222018-05-14 21:39:22 -07009909PKG_PROG_PKG_CONFIG
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009910
9911# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9913$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009914
9915# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009916if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009917 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009918else
9919 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009920fi
9921
9922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9924$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009925
9926# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9928$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009929
9930# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009931if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009932 withval=$with_system_ffi;
9933fi
9934
9935
Zachary Waref40d4dd2016-09-17 01:25:24 -05009936if test "$ac_sys_system" = "Darwin"
9937then
9938 case "$with_system_ffi" in
9939 "")
9940 with_system_ffi="no"
9941 ;;
9942 yes|no)
9943 ;;
9944 *)
9945 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
9946 ;;
9947 esac
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9949$as_echo "$with_system_ffi" >&6; }
9950else
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9952$as_echo "yes" >&6; }
9953 if test "$with_system_ffi" != ""
9954 then
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
9956$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
9957 fi
9958 with_system_ffi="yes"
9959fi
Zachary Ware935043d2016-09-09 17:01:21 -07009960
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009961if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009962 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9963else
9964 LIBFFI_INCLUDEDIR=""
9965fi
9966
9967
Stefan Krah60187b52012-03-23 19:06:27 +01009968# Check for use of the system libmpdec library
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9970$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9971
9972# Check whether --with-system_libmpdec was given.
9973if test "${with_system_libmpdec+set}" = set; then :
9974 withval=$with_system_libmpdec;
9975else
9976 with_system_libmpdec="no"
9977fi
9978
9979
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9981$as_echo "$with_system_libmpdec" >&6; }
9982
Benjamin Peterson076ed002010-10-31 17:11:02 +00009983# Check for support for loadable sqlite extensions
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9985$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9986# Check whether --enable-loadable-sqlite-extensions was given.
9987if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9988 enableval=$enable_loadable_sqlite_extensions;
9989else
9990 enable_loadable_sqlite_extensions="no"
9991fi
9992
9993
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9995$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9996
Ned Deilyd819b932013-09-06 01:07:05 -07009997# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9998
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10001$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10002
10003# Check whether --with-tcltk-includes was given.
10004if test "${with_tcltk_includes+set}" = set; then :
10005 withval=$with_tcltk_includes;
10006else
10007 with_tcltk_includes="default"
10008fi
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10011$as_echo "$with_tcltk_includes" >&6; }
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10013$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10014
10015# Check whether --with-tcltk-libs was given.
10016if test "${with_tcltk_libs+set}" = set; then :
10017 withval=$with_tcltk_libs;
10018else
10019 with_tcltk_libs="default"
10020fi
10021
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10023$as_echo "$with_tcltk_libs" >&6; }
10024if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10025then
10026 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10027 then
10028 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10029 fi
10030 TCLTK_INCLUDES=""
10031 TCLTK_LIBS=""
10032else
10033 TCLTK_INCLUDES="$with_tcltk_includes"
10034 TCLTK_LIBS="$with_tcltk_libs"
10035fi
10036
Matthias Klose55708cc2009-04-30 08:06:49 +000010037# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10039$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010040
10041# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010043 withval=$with_dbmliborder;
10044if test x$with_dbmliborder = xyes
10045then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010046as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010047else
10048 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10049 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10050 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010051 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010052 fi
10053 done
10054fi
10055fi
10056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10058$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
10062# Templates for things AC_DEFINEd more than once.
10063# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010064
10065
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010066if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010067then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010068 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010069 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010070
10071 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010072elif test "$ac_cv_kpthread" = "yes"
10073then
10074 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010075 if test "$ac_cv_cxx_thread" = "yes"; then
10076 CXX="$CXX -Kpthread"
10077 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010078 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010079elif test "$ac_cv_kthread" = "yes"
10080then
10081 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010082 if test "$ac_cv_cxx_thread" = "yes"; then
10083 CXX="$CXX -Kthread"
10084 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010085 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086elif test "$ac_cv_pthread" = "yes"
10087then
10088 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010089 if test "$ac_cv_cxx_thread" = "yes"; then
10090 CXX="$CXX -pthread"
10091 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010092 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010093else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010094 if test ! -z "$withval" -a -d "$withval"
10095 then LDFLAGS="$LDFLAGS -L$withval"
10096 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010097
10098 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010099 # define _POSIX_THREADS in unistd.h. Some apparently don't
10100 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10102$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010104/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010105
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010106#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010107#ifdef _POSIX_THREADS
10108yes
10109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
10111_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010114 unistd_defines_pthreads=yes
10115else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010116 unistd_defines_pthreads=no
10117fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010118rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10121$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010124
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010125 # Just looking for pthread_create in libpthread is not enough:
10126 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10127 # So we really have to include pthread.h, and then link.
10128 _libs=$LIBS
10129 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10131$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010133/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010134
10135#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010136#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010137
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010138void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010139int
10140main ()
10141{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010142
10143pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ;
10145 return 0;
10146}
10147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010149
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10151$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010152 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010153
Guido van Rossum02a1c402000-02-25 19:26:31 +000010154else
Martin v. Löwis11437992002-04-12 09:54:03 +000010155
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010156 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010158if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010159
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010160 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010161
Guido van Rossumad678af1998-10-02 14:42:15 +000010162else
Guido van Rossumad678af1998-10-02 14:42:15 +000010163
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10165$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010166if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010168else
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010170LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174/* Override any GCC internal prototype to avoid an error.
10175 Use char because int might match the return type of a GCC
10176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010177#ifdef __cplusplus
10178extern "C"
10179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010180char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010181int
10182main ()
10183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ;
10186 return 0;
10187}
10188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010191else
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194rm -f core conftest.err conftest.$ac_objext \
10195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010196LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10199$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010200if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010201
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010202 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010203 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010204
Greg Steinadf63d62000-07-05 10:38:09 +000010205else
Greg Steinadf63d62000-07-05 10:38:09 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10208$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010209if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010213LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10242$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010243if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010244
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010245 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010246 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010247
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010248else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10251$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010252if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010254else
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010256LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260/* Override any GCC internal prototype to avoid an error.
10261 Use char because int might match the return type of a GCC
10262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010263#ifdef __cplusplus
10264extern "C"
10265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010266char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010267int
10268main ()
10269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ;
10272 return 0;
10273}
10274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010277else
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010280rm -f core conftest.err conftest.$ac_objext \
10281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010282LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10285$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010287
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010288 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010289 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010290
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010291else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10294$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010295if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303/* Override any GCC internal prototype to avoid an error.
10304 Use char because int might match the return type of a GCC
10305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010306#ifdef __cplusplus
10307extern "C"
10308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010309char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010310int
10311main ()
10312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010320else
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010323rm -f core conftest.err conftest.$ac_objext \
10324 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010325LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10328$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010329if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010332 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010333
Guido van Rossumb93a8621998-05-07 13:27:32 +000010334else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010335
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010336 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10337
Guido van Rossum2d38f911996-06-26 19:47:01 +000010338fi
10339
Guido van Rossum627b2d71993-12-24 10:39:16 +000010340
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010341fi
10342
Guido van Rossum0be3e491997-05-22 20:33:33 +000010343fi
10344
Guido van Rossum49545951997-12-02 19:28:29 +000010345fi
10346
Guido van Rossumb93a8621998-05-07 13:27:32 +000010347fi
10348
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350rm -f core conftest.err conftest.$ac_objext \
10351 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10354$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010355if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010359LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363/* Override any GCC internal prototype to avoid an error.
10364 Use char because int might match the return type of a GCC
10365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010366#ifdef __cplusplus
10367extern "C"
10368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010369char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370int
10371main ()
10372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ;
10375 return 0;
10376}
10377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010380else
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010385LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10388$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390
Martin v. Löwis130fb172001-07-19 11:00:41 +000010391 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010392
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393fi
10394
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010395
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010396fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010397
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010398if test "$posix_threads" = "yes"; then
10399 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010400
Matthias Kloseb9621712010-04-24 17:59:49 +000010401$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010402
10403 fi
10404
10405 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10406 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010407 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010408$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010409
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010410 ;;
10411 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010412$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010413
10414 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010415 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010417
10418 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010419 esac
10420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10422$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010427 ac_cv_pthread_system_supported=no
10428else
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010430/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010431
10432 #include <stdio.h>
10433 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010434 void *foo(void *parm) {
10435 return NULL;
10436 }
10437 main() {
10438 pthread_attr_t attr;
10439 pthread_t id;
10440 if (pthread_attr_init(&attr)) exit(-1);
10441 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10442 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10443 exit(0);
10444 }
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010447 ac_cv_pthread_system_supported=yes
10448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10452 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010453fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455
Guido van Rossum627b2d71993-12-24 10:39:16 +000010456fi
10457
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10459$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010460 if test "$ac_cv_pthread_system_supported" = "yes"; then
10461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010463
10464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 for ac_func in pthread_sigmask
10466do :
10467 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010468if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010469 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010472 case $ac_sys_system in
10473 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010474
Matthias Kloseb9621712010-04-24 17:59:49 +000010475$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010476
10477 ;;
10478 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010479fi
10480done
10481
pdoxe14679c2017-10-05 00:01:56 -070010482 for ac_func in pthread_getcpuclockid
10483do :
10484 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10485if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10486 cat >>confdefs.h <<_ACEOF
10487#define HAVE_PTHREAD_GETCPUCLOCKID 1
10488_ACEOF
10489
10490fi
10491done
10492
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010493fi
10494
10495
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010496# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10499$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010501if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010506 ipv6=no
10507 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10509$as_echo "yes" >&6; }
10510 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010511
10512 ipv6=yes
10513 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010515else
Martin v. Löwis11437992002-04-12 09:54:03 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010518/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010519 /* AF_INET6 available check */
10520#include <sys/types.h>
10521#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010522int
10523main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010525int domain = AF_INET6;
10526 ;
10527 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010528}
Martin v. Löwis11437992002-04-12 09:54:03 +000010529_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010530if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10533$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010534 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010535
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536else
Matthias Kloseb159a552010-04-25 21:00:44 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010540 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010541
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010545if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10547$as_echo_n "checking if RFC2553 API is available... " >&6; }
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010550
10551 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010552#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010553int
10554main ()
10555{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010556struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010557 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 ;
10559 return 0;
10560}
Matthias Kloseb159a552010-04-25 21:00:44 +000010561
Martin v. Löwis11437992002-04-12 09:54:03 +000010562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010563if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010564
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010566$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010567 ipv6=yes
10568
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010569else
Matthias Kloseb159a552010-04-25 21:00:44 +000010570
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010572$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010573 ipv6=no
10574
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010577fi
10578
10579if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010581
10582fi
10583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584fi
10585
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010586
10587ipv6type=unknown
10588ipv6lib=none
10589ipv6trylibc=no
10590
10591if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10593$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010594 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10595 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010596 case $i in
10597 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010600
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601#include <netinet/in.h>
10602#ifdef IPV6_INRIA_VERSION
10603yes
10604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010608 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010610rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611
10612 ;;
10613 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010616
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617#include <netinet/in.h>
10618#ifdef __KAME__
10619yes
10620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624 ipv6type=$i;
10625 ipv6lib=inet6
10626 ipv6libdir=/usr/local/v6/lib
10627 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010629rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630
10631 ;;
10632 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636#include <features.h>
10637#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10638yes
10639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643 ipv6type=$i;
10644 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010646rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647
10648 ;;
10649 linux-inet6)
10650 if test -d /usr/inet6; then
10651 ipv6type=$i
10652 ipv6lib=inet6
10653 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010654 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655 fi
10656 ;;
10657 solaris)
10658 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010659 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660 ipv6type=$i
10661 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662 fi
10663 fi
10664 ;;
10665 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669#include <sys/param.h>
10670#ifdef _TOSHIBA_INET6
10671yes
10672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010673_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 ipv6type=$i;
10677 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010678 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010680rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681
10682 ;;
10683 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010686
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687#include </usr/local/v6/include/sys/v6config.h>
10688#ifdef __V6D__
10689yes
10690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010691_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694 ipv6type=$i;
10695 ipv6lib=v6;
10696 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010697 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010699rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700
10701 ;;
10702 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010705
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706#include <sys/param.h>
10707#ifdef _ZETA_MINAMI_INET6
10708yes
10709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010710_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713 ipv6type=$i;
10714 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010715 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010717rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718
10719 ;;
10720 esac
10721 if test "$ipv6type" != "unknown"; then
10722 break
10723 fi
10724 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10726$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727fi
10728
10729if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10730 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10731 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10732 echo "using lib$ipv6lib"
10733 else
10734 if test $ipv6trylibc = "yes"; then
10735 echo "using libc"
10736 else
10737 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10738 echo "You need to fetch lib$ipv6lib.a from appropriate"
10739 echo 'ipv6 kit and compile beforehand.'
10740 exit 1
10741 fi
10742 fi
10743fi
10744
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10746$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10748/* end confdefs.h. */
10749 /* CAN_RAW_FD_FRAMES available check */
10750#include <linux/can/raw.h>
10751int
10752main ()
10753{
10754int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10755 ;
10756 return 0;
10757}
10758_ACEOF
10759if ac_fn_c_try_compile "$LINENO"; then :
10760
10761
10762$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10763
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10765$as_echo "yes" >&6; }
10766
10767else
10768
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
10771
10772fi
10773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10774
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010775# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10777$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010780if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781 withval=$with_doc_strings;
10782fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010783
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010784
10785if test -z "$with_doc_strings"
10786then with_doc_strings="yes"
10787fi
10788if test "$with_doc_strings" != "no"
10789then
10790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010792
10793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10795$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010796
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010797# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10799$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010802if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803 withval=$with_pymalloc;
10804fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010805
Neil Schemenauera35c6882001-02-27 04:45:05 +000010806
Neil Schemenauer16c22972002-03-22 15:34:49 +000010807if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010808then
10809 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010810fi
10811if test "$with_pymalloc" != "no"
10812then
Martin v. Löwis11437992002-04-12 09:54:03 +000010813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010815
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010816 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10819$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010820
Nick Coghlan6ea41862017-06-11 13:16:15 +100010821# Check for --with-c-locale-coercion
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10823$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10824
10825# Check whether --with-c-locale-coercion was given.
10826if test "${with_c_locale_coercion+set}" = set; then :
10827 withval=$with_c_locale_coercion;
10828fi
10829
10830
10831if test -z "$with_c_locale_coercion"
10832then
10833 with_c_locale_coercion="yes"
10834fi
10835if test "$with_c_locale_coercion" != "no"
10836then
10837
10838$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10839
10840fi
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10842$as_echo "$with_c_locale_coercion" >&6; }
10843
10844# Check for --with-c-locale-warning
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10846$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10847
10848# Check whether --with-c-locale-warning was given.
10849if test "${with_c_locale_warning+set}" = set; then :
10850 withval=$with_c_locale_warning;
10851fi
10852
10853
10854if test -z "$with_c_locale_warning"
10855then
10856 with_c_locale_warning="yes"
10857fi
10858if test "$with_c_locale_warning" != "no"
10859then
10860
10861$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10862
10863fi
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10865$as_echo "$with_c_locale_warning" >&6; }
10866
Benjamin Peterson05159c42009-12-03 03:01:27 +000010867# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10869$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010870
10871# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010872if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010873 withval=$with_valgrind;
10874else
10875 with_valgrind=no
10876fi
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10879$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010880if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 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 +020010882if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010885
10886else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010887 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010888
10889fi
10890
10891
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010892 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010893fi
10894
Łukasz Langaa785c872016-09-09 17:37:37 -070010895# Check for DTrace support
10896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10897$as_echo_n "checking for --with-dtrace... " >&6; }
10898
10899# Check whether --with-dtrace was given.
10900if test "${with_dtrace+set}" = set; then :
10901 withval=$with_dtrace;
10902else
10903 with_dtrace=no
10904fi
10905
10906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10907$as_echo "$with_dtrace" >&6; }
10908
10909
10910
10911
10912
10913DTRACE=
10914DFLAGS=
10915DTRACE_HEADERS=
10916DTRACE_OBJS=
10917
10918if test "$with_dtrace" = "yes"
10919then
10920 # Extract the first word of "dtrace", so it can be a program name with args.
10921set dummy dtrace; ac_word=$2
10922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10923$as_echo_n "checking for $ac_word... " >&6; }
10924if ${ac_cv_path_DTRACE+:} false; then :
10925 $as_echo_n "(cached) " >&6
10926else
10927 case $DTRACE in
10928 [\\/]* | ?:[\\/]*)
10929 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
10930 ;;
10931 *)
10932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10933for as_dir in $PATH
10934do
10935 IFS=$as_save_IFS
10936 test -z "$as_dir" && as_dir=.
10937 for ac_exec_ext in '' $ac_executable_extensions; do
10938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10939 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
10940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10941 break 2
10942 fi
10943done
10944 done
10945IFS=$as_save_IFS
10946
10947 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
10948 ;;
10949esac
10950fi
10951DTRACE=$ac_cv_path_DTRACE
10952if test -n "$DTRACE"; then
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
10954$as_echo "$DTRACE" >&6; }
10955else
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958fi
10959
10960
10961 if test "$DTRACE" = "not found"; then
10962 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
10963 fi
10964
10965$as_echo "#define WITH_DTRACE 1" >>confdefs.h
10966
10967 DTRACE_HEADERS="Include/pydtrace_probes.h"
10968
10969 # On OS X, DTrace providers do not need to be explicitly compiled and
10970 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
10971 # generation flag '-G'. We check for presence of this flag, rather than
10972 # hardcoding support by OS, in the interest of robustness.
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
10974$as_echo_n "checking whether DTrace probes require linking... " >&6; }
10975if ${ac_cv_dtrace_link+:} false; then :
10976 $as_echo_n "(cached) " >&6
10977else
10978 ac_cv_dtrace_link=no
10979 echo 'BEGIN' > conftest.d
10980 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
10981 ac_cv_dtrace_link=yes
10982
10983fi
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
10985$as_echo "$ac_cv_dtrace_link" >&6; }
10986 if test "$ac_cv_dtrace_link" = "yes"; then
10987 DTRACE_OBJS="Python/pydtrace.o"
10988 fi
10989fi
10990
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010991# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010992
Guido van Rossum98935bf2001-09-05 19:13:16 +000010993DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010994
Guido van Rossume97ee181999-12-20 21:27:22 +000010995# the dlopen() function means we might want to use dynload_shlib.o. some
10996# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010997for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010998do :
10999 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011000if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011003_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011004
Guido van Rossume97ee181999-12-20 21:27:22 +000011005fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011006done
Guido van Rossume97ee181999-12-20 21:27:22 +000011007
Michael W. Hudson54241132001-12-07 15:38:26 +000011008
Guido van Rossume97ee181999-12-20 21:27:22 +000011009# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11010# loading of modules.
11011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11013$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011014if test -z "$DYNLOADFILE"
11015then
11016 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011017 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11018 if test "$ac_cv_func_dlopen" = yes
11019 then DYNLOADFILE="dynload_shlib.o"
11020 else DYNLOADFILE="dynload_aix.o"
11021 fi
11022 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011023 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011024 *)
11025 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11026 # out any dynamic loading
11027 if test "$ac_cv_func_dlopen" = yes
11028 then DYNLOADFILE="dynload_shlib.o"
11029 else DYNLOADFILE="dynload_stub.o"
11030 fi
11031 ;;
11032 esac
11033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11035$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011036if test "$DYNLOADFILE" != "dynload_stub.o"
11037then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011040
11041fi
11042
Neil Schemenauer4e425612001-06-19 15:44:15 +000011043# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11044
Michael W. Hudson54241132001-12-07 15:38:26 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11047$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011048if test -z "$MACHDEP_OBJS"
11049then
Jack Jansene578a632001-08-15 01:27:14 +000011050 MACHDEP_OBJS=$extra_machdep_objs
11051else
11052 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011053fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011054if test -z "$MACHDEP_OBJS"; then
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11056$as_echo "none" >&6; }
11057else
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11059$as_echo "$MACHDEP_OBJS" >&6; }
11060fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011061
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011063for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011064 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011065 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011066 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011067 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011068 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011069 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011070 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011071 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011072 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011073 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011074 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011075 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011076 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011077 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011078 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11079 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011080 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011081 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011082 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011083 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011084 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011085do :
11086 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11087ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011088if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011090#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011091_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011093fi
11094done
11095
Michael W. Hudson54241132001-12-07 15:38:26 +000011096
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011097ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11098 #include <dirent.h>
11099"
11100if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11101
11102$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11103
11104fi
11105
11106
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011107# For some functions, having a definition is not sufficient, since
11108# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11110$as_echo_n "checking for chroot... " >&6; }
11111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011113#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011114int
11115main ()
11116{
11117void *x=chroot
11118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011125
Matthias Kloseb159a552010-04-25 21:00:44 +000011126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011128else
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011131
11132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11135$as_echo_n "checking for link... " >&6; }
11136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011137/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011138#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011139int
11140main ()
11141{
11142void *x=link
11143 ;
11144 return 0;
11145}
11146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011150
Matthias Kloseb159a552010-04-25 21:00:44 +000011151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153else
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11155$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011156
11157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11160$as_echo_n "checking for symlink... " >&6; }
11161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011163#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011164int
11165main ()
11166{
11167void *x=symlink
11168 ;
11169 return 0;
11170}
11171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175
Matthias Kloseb159a552010-04-25 21:00:44 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011177$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178else
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11180$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011181
11182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11185$as_echo_n "checking for fchdir... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011188#include <unistd.h>
11189int
11190main ()
11191{
11192void *x=fchdir
11193 ;
11194 return 0;
11195}
11196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011198
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011200
Matthias Kloseb159a552010-04-25 21:00:44 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011202$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11205$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011206
11207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11210$as_echo_n "checking for fsync... " >&6; }
11211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011213#include <unistd.h>
11214int
11215main ()
11216{
11217void *x=fsync
11218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011225
Matthias Kloseb159a552010-04-25 21:00:44 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011228else
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11230$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011231
11232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11235$as_echo_n "checking for fdatasync... " >&6; }
11236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011238#include <unistd.h>
11239int
11240main ()
11241{
11242void *x=fdatasync
11243 ;
11244 return 0;
11245}
11246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011250
Matthias Kloseb159a552010-04-25 21:00:44 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011253else
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11255$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011256
11257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11260$as_echo_n "checking for epoll... " >&6; }
11261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011262/* end confdefs.h. */
11263#include <sys/epoll.h>
11264int
11265main ()
11266{
11267void *x=epoll_create
11268 ;
11269 return 0;
11270}
11271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011275
Matthias Kloseb159a552010-04-25 21:00:44 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011277$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011278else
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11280$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011281
11282fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11285$as_echo_n "checking for epoll_create1... " >&6; }
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287/* end confdefs.h. */
11288#include <sys/epoll.h>
11289int
11290main ()
11291{
11292void *x=epoll_create1
11293 ;
11294 return 0;
11295}
11296_ACEOF
11297if ac_fn_c_try_compile "$LINENO"; then :
11298
11299$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11300
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11302$as_echo "yes" >&6; }
11303else
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306
11307fi
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11310$as_echo_n "checking for kqueue... " >&6; }
11311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011312/* end confdefs.h. */
11313
11314#include <sys/types.h>
11315#include <sys/event.h>
11316
11317int
11318main ()
11319{
11320int x=kqueue()
11321 ;
11322 return 0;
11323}
11324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011325if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011328
Matthias Kloseb159a552010-04-25 21:00:44 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011331else
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011334
11335fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11338$as_echo_n "checking for prlimit... " >&6; }
11339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h. */
11341
11342#include <sys/time.h>
11343#include <sys/resource.h>
11344
11345int
11346main ()
11347{
11348void *x=prlimit
11349 ;
11350 return 0;
11351}
11352_ACEOF
11353if ac_fn_c_try_compile "$LINENO"; then :
11354
11355$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11356
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11358$as_echo "yes" >&6; }
11359else
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
11362
11363fi
11364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11365
Martin v. Löwisd5843682002-11-21 20:41:28 +000011366# On some systems (eg. FreeBSD 5), we would find a definition of the
11367# functions ctermid_r, setgroups in the library, but no prototype
11368# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11369# address to avoid compiler warnings and potential miscompilations
11370# because of the missing prototypes.
11371
Matthias Kloseb9621712010-04-24 17:59:49 +000011372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11373$as_echo_n "checking for ctermid_r... " >&6; }
11374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011376
Martin v. Löwisd5843682002-11-21 20:41:28 +000011377#include <stdio.h>
11378
Martin v. Löwisd5843682002-11-21 20:41:28 +000011379int
11380main ()
11381{
11382void* p = ctermid_r
11383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390
Matthias Kloseb159a552010-04-25 21:00:44 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011392$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393else
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11395$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011396
11397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11399
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11401$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011403 $as_echo_n "(cached) " >&6
11404else
11405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011406/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011407#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011408int
11409main ()
11410{
11411void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011412
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011418 ac_cv_flock_decl=yes
11419else
11420 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011421
11422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011424
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011425fi
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11427$as_echo "$ac_cv_flock_decl" >&6; }
11428if test "x${ac_cv_flock_decl}" = xyes; then
11429 for ac_func in flock
11430do :
11431 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011432if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011433 cat >>confdefs.h <<_ACEOF
11434#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011435_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011436
Antoine Pitroua3000072010-09-07 14:52:42 +000011437else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011439$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011440if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011441 $as_echo_n "(cached) " >&6
11442else
11443 ac_check_lib_save_LIBS=$LIBS
11444LIBS="-lbsd $LIBS"
11445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11446/* end confdefs.h. */
11447
11448/* Override any GCC internal prototype to avoid an error.
11449 Use char because int might match the return type of a GCC
11450 builtin and then its argument prototype would still apply. */
11451#ifdef __cplusplus
11452extern "C"
11453#endif
11454char flock ();
11455int
11456main ()
11457{
11458return flock ();
11459 ;
11460 return 0;
11461}
11462_ACEOF
11463if ac_fn_c_try_link "$LINENO"; then :
11464 ac_cv_lib_bsd_flock=yes
11465else
11466 ac_cv_lib_bsd_flock=no
11467fi
11468rm -f core conftest.err conftest.$ac_objext \
11469 conftest$ac_exeext conftest.$ac_ext
11470LIBS=$ac_check_lib_save_LIBS
11471fi
11472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11473$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011474if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011475 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011476
11477
11478$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11479
11480
11481fi
11482
11483
11484fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011485done
11486
Antoine Pitroua3000072010-09-07 14:52:42 +000011487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11490$as_echo_n "checking for getpagesize... " >&6; }
11491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011493
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494#include <unistd.h>
11495
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011496int
11497main ()
11498{
11499void* p = getpagesize
11500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011505
Matthias Kloseb9621712010-04-24 17:59:49 +000011506$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507
Matthias Kloseb159a552010-04-25 21:00:44 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011510else
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011513
11514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011516
Victor Stinner984890f2011-11-24 13:53:38 +010011517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11518$as_echo_n "checking for broken unsetenv... " >&6; }
11519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11520/* end confdefs.h. */
11521
11522#include <stdlib.h>
11523
11524int
11525main ()
11526{
11527int res = unsetenv("DUMMY")
11528 ;
11529 return 0;
11530}
11531_ACEOF
11532if ac_fn_c_try_compile "$LINENO"; then :
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535else
11536
11537$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11538
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540$as_echo "yes" >&6; }
11541
11542fi
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011545for ac_prog in true
11546do
11547 # Extract the first word of "$ac_prog", so it can be a program name with args.
11548set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11550$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011551if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011553else
11554 if test -n "$TRUE"; then
11555 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11556else
11557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11558for as_dir in $PATH
11559do
11560 IFS=$as_save_IFS
11561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011564 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 $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 +000011566 break 2
11567 fi
11568done
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011571
11572fi
11573fi
11574TRUE=$ac_cv_prog_TRUE
11575if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11577$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011578else
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581fi
11582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011584 test -n "$TRUE" && break
11585done
11586test -n "$TRUE" || TRUE="/bin/true"
11587
11588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11590$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011591if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011593else
11594 ac_check_lib_save_LIBS=$LIBS
11595LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011597/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599/* Override any GCC internal prototype to avoid an error.
11600 Use char because int might match the return type of a GCC
11601 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011602#ifdef __cplusplus
11603extern "C"
11604#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011605char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011606int
11607main ()
11608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011615 ac_cv_lib_c_inet_aton=yes
11616else
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011619rm -f core conftest.err conftest.$ac_objext \
11620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011621LIBS=$ac_check_lib_save_LIBS
11622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11624$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011625if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011626 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11629$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011632else
11633 ac_check_lib_save_LIBS=$LIBS
11634LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638/* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641#ifdef __cplusplus
11642extern "C"
11643#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011644char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645int
11646main ()
11647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654 ac_cv_lib_resolv_inet_aton=yes
11655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011660LIBS=$ac_check_lib_save_LIBS
11661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11663$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011665 cat >>confdefs.h <<_ACEOF
11666#define HAVE_LIBRESOLV 1
11667_ACEOF
11668
11669 LIBS="-lresolv $LIBS"
11670
11671fi
11672
11673
11674fi
11675
11676
Christian Heimesd0764e22007-12-04 15:00:33 +000011677# On Tru64, chflags seems to be present, but calling it will
11678# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11680$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011681if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011685 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011688/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011689
Christian Heimesd0764e22007-12-04 15:00:33 +000011690#include <sys/stat.h>
11691#include <unistd.h>
11692int main(int argc, char*argv[])
11693{
11694 if(chflags(argv[0], 0) != 0)
11695 return 1;
11696 return 0;
11697}
Ned Deily3eb67d52011-06-28 00:00:28 -070011698
Christian Heimesd0764e22007-12-04 15:00:33 +000011699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011701 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011707fi
11708
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11712$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011713if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011715if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011716 ac_cv_have_chflags="yes"
11717else
11718 ac_cv_have_chflags="no"
11719fi
11720
11721fi
11722if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011725
11726fi
11727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11729$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011734 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011737/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011738
Christian Heimesd0764e22007-12-04 15:00:33 +000011739#include <sys/stat.h>
11740#include <unistd.h>
11741int main(int argc, char*argv[])
11742{
11743 if(lchflags(argv[0], 0) != 0)
11744 return 1;
11745 return 0;
11746}
Ned Deily3eb67d52011-06-28 00:00:28 -070011747
Christian Heimesd0764e22007-12-04 15:00:33 +000011748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011756fi
11757
11758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11761$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011762if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011765 ac_cv_have_lchflags="yes"
11766else
11767 ac_cv_have_lchflags="no"
11768fi
11769
11770fi
11771if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011774
11775fi
11776
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011777case $ac_sys_system/$ac_sys_release in
11778Darwin/*)
11779 _CUR_CFLAGS="${CFLAGS}"
11780 _CUR_LDFLAGS="${LDFLAGS}"
11781 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11782 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11783 ;;
11784esac
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11787$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011788if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011790else
11791 ac_check_lib_save_LIBS=$LIBS
11792LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011794/* end confdefs.h. */
11795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796/* Override any GCC internal prototype to avoid an error.
11797 Use char because int might match the return type of a GCC
11798 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011799#ifdef __cplusplus
11800extern "C"
11801#endif
11802char inflateCopy ();
11803int
11804main ()
11805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011806return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011807 ;
11808 return 0;
11809}
11810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011812 ac_cv_lib_z_inflateCopy=yes
11813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816rm -f core conftest.err conftest.$ac_objext \
11817 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011818LIBS=$ac_check_lib_save_LIBS
11819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11821$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011823
Matthias Kloseb9621712010-04-24 17:59:49 +000011824$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011825
11826fi
11827
11828
11829case $ac_sys_system/$ac_sys_release in
11830Darwin/*)
11831 CFLAGS="${_CUR_CFLAGS}"
11832 LDFLAGS="${_CUR_LDFLAGS}"
11833 ;;
11834esac
11835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11837$as_echo_n "checking for hstrerror... " >&6; }
11838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011839/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011840
Martin v. Löwise9416172003-05-03 10:12:45 +000011841#include <netdb.h>
11842
Martin v. Löwise9416172003-05-03 10:12:45 +000011843int
11844main ()
11845{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011846void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011847 ;
11848 return 0;
11849}
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011854
Matthias Kloseb159a552010-04-25 21:00:44 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11859$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011860
11861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011862rm -f core conftest.err conftest.$ac_objext \
11863 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11866$as_echo_n "checking for inet_aton... " >&6; }
11867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011869
Martin v. Löwis86d66262006-02-17 08:40:11 +000011870#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011871#include <sys/socket.h>
11872#include <netinet/in.h>
11873#include <arpa/inet.h>
11874
Martin v. Löwise9416172003-05-03 10:12:45 +000011875int
11876main ()
11877{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011878void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011879 ;
11880 return 0;
11881}
11882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011886
Matthias Kloseb159a552010-04-25 21:00:44 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011888$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11891$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011892
11893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011894rm -f core conftest.err conftest.$ac_objext \
11895 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11898$as_echo_n "checking for inet_pton... " >&6; }
11899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011900/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011901
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011902#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011903#include <sys/socket.h>
11904#include <netinet/in.h>
11905#include <arpa/inet.h>
11906
Martin v. Löwise9416172003-05-03 10:12:45 +000011907int
11908main ()
11909{
11910void* p = inet_pton
11911 ;
11912 return 0;
11913}
11914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011918
Matthias Kloseb159a552010-04-25 21:00:44 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
11925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011927
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011928# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11930$as_echo_n "checking for setgroups... " >&6; }
11931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011932/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011933
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011934#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011935#ifdef HAVE_GRP_H
11936#include <grp.h>
11937#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011938
Martin v. Löwisd5843682002-11-21 20:41:28 +000011939int
11940main ()
11941{
11942void* p = setgroups
11943 ;
11944 return 0;
11945}
11946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011950
Matthias Kloseb159a552010-04-25 21:00:44 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011953else
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11955$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011956
11957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011960# check for openpty and forkpty
11961
11962for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011963do :
11964 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011965if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011968_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011969
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11972$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011973if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975else
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011977LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011981/* Override any GCC internal prototype to avoid an error.
11982 Use char because int might match the return type of a GCC
11983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011984#ifdef __cplusplus
11985extern "C"
11986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011987char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011988int
11989main ()
11990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011997 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012001rm -f core conftest.err conftest.$ac_objext \
12002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012003LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12006$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012009 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12012$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012015else
12016 ac_check_lib_save_LIBS=$LIBS
12017LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012019/* end confdefs.h. */
12020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021/* Override any GCC internal prototype to avoid an error.
12022 Use char because int might match the return type of a GCC
12023 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012024#ifdef __cplusplus
12025extern "C"
12026#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012027char openpty ();
12028int
12029main ()
12030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012031return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012032 ;
12033 return 0;
12034}
12035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012037 ac_cv_lib_bsd_openpty=yes
12038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041rm -f core conftest.err conftest.$ac_objext \
12042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012043LIBS=$ac_check_lib_save_LIBS
12044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12046$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012049 LIBS="$LIBS -lbsd"
12050fi
12051
12052
12053fi
12054
Fred Drake8cef4cf2000-06-28 16:40:38 +000012055
12056fi
12057done
12058
12059for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012060do :
12061 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012064#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012065_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012066
Fred Drake8cef4cf2000-06-28 16:40:38 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12069$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012072else
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012074LIBS="-lutil $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öwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000012081#ifdef __cplusplus
12082extern "C"
12083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012084char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012085int
12086main ()
12087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000012094 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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öwis11437992002-04-12 09:54:03 +000012100LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12103$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12109$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012112else
12113 ac_check_lib_save_LIBS=$LIBS
12114LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012116/* end confdefs.h. */
12117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012121#ifdef __cplusplus
12122extern "C"
12123#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124char forkpty ();
12125int
12126main ()
12127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012134 ac_cv_lib_bsd_forkpty=yes
12135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012140LIBS=$ac_check_lib_save_LIBS
12141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12143$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146 LIBS="$LIBS -lbsd"
12147fi
12148
12149
12150fi
12151
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152
12153fi
12154done
12155
Jack Jansendd19cf82001-12-06 22:36:17 +000012156
Michael W. Hudson54241132001-12-07 15:38:26 +000012157# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012159do :
12160 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12161ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012162if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012164#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012165_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012166
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012167fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168done
12169
Michael W. Hudson54241132001-12-07 15:38:26 +000012170
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012171ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012172if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012173 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012174
Martin v. Löwis1142de32002-03-29 16:28:31 +000012175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012177 *" dup2.$ac_objext "* ) ;;
12178 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012180esac
12181
Martin v. Löwis1142de32002-03-29 16:28:31 +000012182fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012183
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012184ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012186 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12187
12188else
12189 case " $LIBOBJS " in
12190 *" strdup.$ac_objext "* ) ;;
12191 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12192 ;;
12193esac
12194
12195fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012196
12197
12198for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012199do :
12200 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012206/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012207#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012208int
12209main ()
12210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012211getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 ;
12213 return 0;
12214}
12215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012219
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012222
Guido van Rossum627b2d71993-12-24 10:39:16 +000012223fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012224done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225
Jack Jansen150753c2003-03-29 22:07:47 +000012226for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012227do :
12228 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012230 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012234/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012235#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012236int
12237main ()
12238{
12239setpgrp(0,0);
12240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012247
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012250
12251fi
12252done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012253
Thomas Wouters3a584202000-08-05 23:28:51 +000012254for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012255do :
12256 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012262/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012263#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012264int
12265main ()
12266{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ;
12269 return 0;
12270}
12271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_compile "$LINENO"; then :
12273
Guido van Rossum627b2d71993-12-24 10:39:16 +000012274else
Skip Montanaro6dead952003-09-25 14:50:04 +000012275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012277
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012281
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012283done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284
Michael W. Hudson54241132001-12-07 15:38:26 +000012285
Victor Stinnere0be4232011-10-25 13:06:09 +020012286for ac_func in clock_gettime
12287do :
12288 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12289if test "x$ac_cv_func_clock_gettime" = xyes; then :
12290 cat >>confdefs.h <<_ACEOF
12291#define HAVE_CLOCK_GETTIME 1
12292_ACEOF
12293
12294else
12295
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12297$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12298if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12299 $as_echo_n "(cached) " >&6
12300else
12301 ac_check_lib_save_LIBS=$LIBS
12302LIBS="-lrt $LIBS"
12303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304/* end confdefs.h. */
12305
12306/* Override any GCC internal prototype to avoid an error.
12307 Use char because int might match the return type of a GCC
12308 builtin and then its argument prototype would still apply. */
12309#ifdef __cplusplus
12310extern "C"
12311#endif
12312char clock_gettime ();
12313int
12314main ()
12315{
12316return clock_gettime ();
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321if ac_fn_c_try_link "$LINENO"; then :
12322 ac_cv_lib_rt_clock_gettime=yes
12323else
12324 ac_cv_lib_rt_clock_gettime=no
12325fi
12326rm -f core conftest.err conftest.$ac_objext \
12327 conftest$ac_exeext conftest.$ac_ext
12328LIBS=$ac_check_lib_save_LIBS
12329fi
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12331$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12332if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12333
Victor Stinner7efb8332014-08-29 15:41:08 +020012334 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012335 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12336
12337
12338$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12339
12340
12341fi
12342
12343
12344fi
12345done
12346
12347
12348for ac_func in clock_getres
12349do :
12350 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12351if test "x$ac_cv_func_clock_getres" = xyes; then :
12352 cat >>confdefs.h <<_ACEOF
12353#define HAVE_CLOCK_GETRES 1
12354_ACEOF
12355
12356else
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12359$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12360if ${ac_cv_lib_rt_clock_getres+:} false; then :
12361 $as_echo_n "(cached) " >&6
12362else
12363 ac_check_lib_save_LIBS=$LIBS
12364LIBS="-lrt $LIBS"
12365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367
12368/* Override any GCC internal prototype to avoid an error.
12369 Use char because int might match the return type of a GCC
12370 builtin and then its argument prototype would still apply. */
12371#ifdef __cplusplus
12372extern "C"
12373#endif
12374char clock_getres ();
12375int
12376main ()
12377{
12378return clock_getres ();
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383if ac_fn_c_try_link "$LINENO"; then :
12384 ac_cv_lib_rt_clock_getres=yes
12385else
12386 ac_cv_lib_rt_clock_getres=no
12387fi
12388rm -f core conftest.err conftest.$ac_objext \
12389 conftest$ac_exeext conftest.$ac_ext
12390LIBS=$ac_check_lib_save_LIBS
12391fi
12392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12393$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12394if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12395
12396 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12397
12398
12399fi
12400
12401
12402fi
12403done
12404
12405
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012406for ac_func in clock_settime
12407do :
12408 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12409if test "x$ac_cv_func_clock_settime" = xyes; then :
12410 cat >>confdefs.h <<_ACEOF
12411#define HAVE_CLOCK_SETTIME 1
12412_ACEOF
12413
12414else
12415
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12417$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12418if ${ac_cv_lib_rt_clock_settime+:} false; then :
12419 $as_echo_n "(cached) " >&6
12420else
12421 ac_check_lib_save_LIBS=$LIBS
12422LIBS="-lrt $LIBS"
12423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424/* end confdefs.h. */
12425
12426/* Override any GCC internal prototype to avoid an error.
12427 Use char because int might match the return type of a GCC
12428 builtin and then its argument prototype would still apply. */
12429#ifdef __cplusplus
12430extern "C"
12431#endif
12432char clock_settime ();
12433int
12434main ()
12435{
12436return clock_settime ();
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441if ac_fn_c_try_link "$LINENO"; then :
12442 ac_cv_lib_rt_clock_settime=yes
12443else
12444 ac_cv_lib_rt_clock_settime=no
12445fi
12446rm -f core conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
12448LIBS=$ac_check_lib_save_LIBS
12449fi
12450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12451$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12452if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12453
12454 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12455
12456
12457fi
12458
12459
12460fi
12461done
12462
12463
Matthias Kloseb9621712010-04-24 17:59:49 +000012464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12465$as_echo_n "checking for major... " >&6; }
12466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012468
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012469#if defined(MAJOR_IN_MKDEV)
12470#include <sys/mkdev.h>
12471#elif defined(MAJOR_IN_SYSMACROS)
12472#include <sys/sysmacros.h>
12473#else
12474#include <sys/types.h>
12475#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012476
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012477int
12478main ()
12479{
12480
12481 makedev(major(0),minor(0));
12482
12483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012488
12489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12493$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012494
12495else
Skip Montanaro6dead952003-09-25 14:50:04 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12498$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012499
12500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501rm -f core conftest.err conftest.$ac_objext \
12502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012503
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012504# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012505# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12507$as_echo_n "checking for getaddrinfo... " >&6; }
12508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012510
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012511#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012512#include <sys/socket.h>
12513#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012514#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012515
Martin v. Löwis11437992002-04-12 09:54:03 +000012516int
12517main ()
12518{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012519getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ;
12521 return 0;
12522}
12523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012525 have_getaddrinfo=yes
12526else
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012529rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12532$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012533if test $have_getaddrinfo = yes
12534then
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12536$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012537 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012541
12542if test "${enable_ipv6+set}" = set; then
12543 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12544else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012545 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012546fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550
Stefan Krah19c21392012-11-22 23:47:32 +010012551#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012552#include <sys/types.h>
12553#include <netdb.h>
12554#include <string.h>
12555#include <sys/socket.h>
12556#include <netinet/in.h>
12557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012558int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012559{
12560 int passive, gaierr, inet4 = 0, inet6 = 0;
12561 struct addrinfo hints, *ai, *aitop;
12562 char straddr[INET6_ADDRSTRLEN], strport[16];
12563
12564 for (passive = 0; passive <= 1; passive++) {
12565 memset(&hints, 0, sizeof(hints));
12566 hints.ai_family = AF_UNSPEC;
12567 hints.ai_flags = passive ? AI_PASSIVE : 0;
12568 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012569 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012570 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12571 (void)gai_strerror(gaierr);
12572 goto bad;
12573 }
12574 for (ai = aitop; ai; ai = ai->ai_next) {
12575 if (ai->ai_addr == NULL ||
12576 ai->ai_addrlen == 0 ||
12577 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12578 straddr, sizeof(straddr), strport, sizeof(strport),
12579 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12580 goto bad;
12581 }
12582 switch (ai->ai_family) {
12583 case AF_INET:
12584 if (strcmp(strport, "54321") != 0) {
12585 goto bad;
12586 }
12587 if (passive) {
12588 if (strcmp(straddr, "0.0.0.0") != 0) {
12589 goto bad;
12590 }
12591 } else {
12592 if (strcmp(straddr, "127.0.0.1") != 0) {
12593 goto bad;
12594 }
12595 }
12596 inet4++;
12597 break;
12598 case AF_INET6:
12599 if (strcmp(strport, "54321") != 0) {
12600 goto bad;
12601 }
12602 if (passive) {
12603 if (strcmp(straddr, "::") != 0) {
12604 goto bad;
12605 }
12606 } else {
12607 if (strcmp(straddr, "::1") != 0) {
12608 goto bad;
12609 }
12610 }
12611 inet6++;
12612 break;
12613 case AF_UNSPEC:
12614 goto bad;
12615 break;
12616 default:
12617 /* another family support? */
12618 break;
12619 }
12620 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012621 freeaddrinfo(aitop);
12622 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012623 }
12624
12625 if (!(inet4 == 0 || inet4 == 2))
12626 goto bad;
12627 if (!(inet6 == 0 || inet6 == 2))
12628 goto bad;
12629
12630 if (aitop)
12631 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012632 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633
12634 bad:
12635 if (aitop)
12636 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012637 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638}
12639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012650fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012651
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12655$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12656
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012657if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012658then
12659 if test $ipv6 = yes
12660 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012661 echo 'Fatal: You must get working getaddrinfo() function.'
12662 echo ' or you can specify "--disable-ipv6"'.
12663 exit 1
12664 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012665else
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012668
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012669fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012670
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012671for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012672do :
12673 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012674if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012676#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012677_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012678
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012679fi
12680done
12681
Michael W. Hudson54241132001-12-07 15:38:26 +000012682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12685$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012686if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691#include <sys/types.h>
12692#include <sys/time.h>
12693#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Martin v. Löwis11437992002-04-12 09:54:03 +000012695int
12696main ()
12697{
12698if ((struct tm *) 0)
12699return 0;
12700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012705 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12712$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012713if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716
12717fi
12718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12720$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012721if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012725/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726#include <sys/types.h>
12727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732struct tm tm;
12733 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740 ac_cv_struct_tm=time.h
12741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12747$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012748if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751
12752fi
12753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754ac_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 +000012755#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757"
Victor Stinnere0be4232011-10-25 13:06:09 +020012758if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
12760cat >>confdefs.h <<_ACEOF
12761#define HAVE_STRUCT_TM_TM_ZONE 1
12762_ACEOF
12763
12764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770
12771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12773"
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778fi
12779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782_ACEOF
12783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12785$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012786if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792#if !HAVE_DECL_TZNAME
12793extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796int
12797main ()
12798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805 ac_cv_var_tzname=yes
12806else
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012809rm -f core conftest.err conftest.$ac_objext \
12810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12813$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012814 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818 fi
12819fi
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821ac_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 +020012822if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
12824cat >>confdefs.h <<_ACEOF
12825#define HAVE_STRUCT_STAT_ST_RDEV 1
12826_ACEOF
12827
12828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012829fi
12830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831ac_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 +020012832if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012833
Martin v. Löwis11437992002-04-12 09:54:03 +000012834cat >>confdefs.h <<_ACEOF
12835#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12836_ACEOF
12837
12838
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012839fi
12840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841ac_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 +020012842if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012843
12844cat >>confdefs.h <<_ACEOF
12845#define HAVE_STRUCT_STAT_ST_FLAGS 1
12846_ACEOF
12847
12848
12849fi
12850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851ac_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 +020012852if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012853
12854cat >>confdefs.h <<_ACEOF
12855#define HAVE_STRUCT_STAT_ST_GEN 1
12856_ACEOF
12857
12858
12859fi
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861ac_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 +020012862if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012863
12864cat >>confdefs.h <<_ACEOF
12865#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12866_ACEOF
12867
12868
12869fi
12870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871ac_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 +020012872if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874cat >>confdefs.h <<_ACEOF
12875#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12876_ACEOF
12877
12878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879fi
12880
Stefan Krah267b6392016-04-26 01:09:18 +020012881ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12882 #include <sys/types.h>
12883 #include <pwd.h>
12884
12885"
12886if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12887
12888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12890_ACEOF
12891
12892
12893fi
12894ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12895 #include <sys/types.h>
12896 #include <pwd.h>
12897
12898"
12899if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12900
12901cat >>confdefs.h <<_ACEOF
12902#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12903_ACEOF
12904
12905
12906fi
12907
Zachary Ware6a6967e2016-10-01 00:47:27 -050012908# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
12909ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
12910"
12911if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
12912
12913cat >>confdefs.h <<_ACEOF
12914#define HAVE_SIGINFO_T_SI_BAND 1
12915_ACEOF
12916
12917
12918fi
12919
Michael W. Hudson54241132001-12-07 15:38:26 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12922$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012923if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925else
Matthias Kloseb159a552010-04-25 21:00:44 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012928/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012929#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012930int
12931main ()
12932{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 ;
12935 return 0;
12936}
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939 ac_cv_header_time_altzone=yes
12940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945fi
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12948$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952
12953fi
12954
Guido van Rossumda88dad1995-01-26 00:46:29 +000012955was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12957$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012959/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012960
12961#include <sys/types.h>
12962#include <sys/select.h>
12963#include <sys/time.h>
12964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968;
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
12975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012978 was_it_defined=yes
12979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12983$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12986$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012987if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012992#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002 ac_cv_struct_addrinfo=yes
13003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007fi
13008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13010$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014
13015fi
13016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13018$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024
13025# include <sys/types.h>
13026# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013027int
13028main ()
13029{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 ;
13032 return 0;
13033}
13034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036 ac_cv_struct_sockaddr_storage=yes
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13041fi
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13044$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048
13049fi
13050
Christian Heimesdffa3942016-09-05 23:54:41 +020013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13052$as_echo_n "checking for sockaddr_alg... " >&6; }
13053if ${ac_cv_struct_sockaddr_alg+:} false; then :
13054 $as_echo_n "(cached) " >&6
13055else
13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13057/* end confdefs.h. */
13058
13059# include <sys/types.h>
13060# include <sys/socket.h>
13061# include <linux/if_alg.h>
13062int
13063main ()
13064{
13065struct sockaddr_alg s
13066 ;
13067 return 0;
13068}
13069_ACEOF
13070if ac_fn_c_try_compile "$LINENO"; then :
13071 ac_cv_struct_sockaddr_alg=yes
13072else
13073 ac_cv_struct_sockaddr_alg=no
13074fi
13075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13076fi
13077
13078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13079$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13080if test $ac_cv_struct_sockaddr_alg = yes; then
13081
13082$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13083
13084fi
13085
Guido van Rossum627b2d71993-12-24 10:39:16 +000013086# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13089$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013090if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013092else
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013095$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
13099static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013100test_array [0] = 0;
13101return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
13103 ;
13104 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013105}
Martin v. Löwis11437992002-04-12 09:54:03 +000013106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013108 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13115$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118
13119fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13122$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013123if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013127/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129int
13130main ()
13131{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013132
Martin v. Löwis11437992002-04-12 09:54:03 +000013133#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013134 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013136 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138 char const *const *pcpcc;
13139 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 /* NEC SVR4.0.2 mips cc rejects this. */
13141 struct point {int x, y;};
13142 static struct point const zero = {0,0};
13143 /* AIX XL C 1.02.0.0 rejects this.
13144 It does not let you subtract one const X* pointer from another in
13145 an arm of an if-expression whose if-part is not a constant
13146 expression */
13147 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150 ++pcpcc;
13151 ppc = (char**) pcpcc;
13152 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013153 { /* SCO 3.2v4 cc rejects this sort of thing. */
13154 char tx;
13155 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 }
13161 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13162 int x[] = {25, 17};
13163 const int *foo = &x[0];
13164 ++foo;
13165 }
13166 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13167 typedef const int *iptr;
13168 iptr p = 0;
13169 ++p;
13170 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013171 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013173 struct s { int j; const int *ap[3]; } bx;
13174 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 }
13176 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13177 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013181#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013182
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 ;
13184 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013185}
Martin v. Löwis11437992002-04-12 09:54:03 +000013186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013188 ac_cv_c_const=yes
13189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13195$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199
13200fi
13201
Michael W. Hudson54241132001-12-07 15:38:26 +000013202
Guido van Rossumda88dad1995-01-26 00:46:29 +000013203works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13205$as_echo_n "checking for working signed char... " >&6; }
13206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013208
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 ;
13214 return 0;
13215}
13216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013218 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013219else
Skip Montanaro6dead952003-09-25 14:50:04 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013223
Guido van Rossum7f43da71994-08-01 12:15:30 +000013224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13227$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013228
Guido van Rossumda88dad1995-01-26 00:46:29 +000013229have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13231$as_echo_n "checking for prototypes... " >&6; }
13232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013234int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013235int
13236main ()
13237{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 ;
13240 return 0;
13241}
13242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
Matthias Kloseb159a552010-04-25 21:00:44 +000013247 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13251$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013252
Guido van Rossumda88dad1995-01-26 00:46:29 +000013253works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13255$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013257/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013258
13259#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013260int foo(int x, ...) {
13261 va_list va;
13262 va_start(va, x);
13263 va_arg(va, int);
13264 va_arg(va, char *);
13265 va_arg(va, double);
13266 return 0;
13267}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269int
13270main ()
13271{
Guido van Rossum90eea071996-08-30 20:58:57 +000013272return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 ;
13274 return 0;
13275}
13276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013282 works=yes
13283
Guido van Rossum627b2d71993-12-24 10:39:16 +000013284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13287$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288
Martin v. Löwisd6320502004-08-12 13:45:08 +000013289# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13291$as_echo_n "checking for socketpair... " >&6; }
13292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013293/* end confdefs.h. */
13294
13295#include <sys/types.h>
13296#include <sys/socket.h>
13297
13298int
13299main ()
13300{
13301void *x=socketpair
13302 ;
13303 return 0;
13304}
13305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013309
Matthias Kloseb159a552010-04-25 21:00:44 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013311$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013312else
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13314$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013315
13316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013318
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13321$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324#include <sys/types.h>
13325#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013326int
13327main ()
13328{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329struct sockaddr x;
13330x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 ;
13332 return 0;
13333}
13334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013335if ac_fn_c_try_compile "$LINENO"; then :
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13337$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013340
13341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13343$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013344
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013347
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013348# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013352if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13357$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013358 OLD_CFLAGS=$CFLAGS
13359 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013361/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013362
13363# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365int
13366main ()
13367{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013368
13369 char *name;
13370 struct hostent *he, *res;
13371 char buffer[2048];
13372 int buflen = 2048;
13373 int h_errnop;
13374
13375 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
13377 ;
13378 return 0;
13379}
13380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13389$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013391else
Skip Montanaro6dead952003-09-25 14:50:04 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13394$as_echo "no" >&6; }
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13396$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013400# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013405
13406 char *name;
13407 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013408 char buffer[2048];
13409 int buflen = 2048;
13410 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013411
Matthias Kloseb159a552010-04-25 21:00:44 +000013412 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb159a552010-04-25 21:00:44 +000013423$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13426$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428else
Skip Montanaro6dead952003-09-25 14:50:04 +000013429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13433$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13435/* end confdefs.h. */
13436
13437# include <netdb.h>
13438
13439int
13440main ()
13441{
13442
13443 char *name;
13444 struct hostent *he;
13445 struct hostent_data data;
13446
13447 (void) gethostbyname_r(name, he, &data);
13448
13449 ;
13450 return 0;
13451}
13452_ACEOF
13453if ac_fn_c_try_compile "$LINENO"; then :
13454
13455 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13456
13457
13458$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13459
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13461$as_echo "yes" >&6; }
13462
13463else
13464
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13466$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013476 CFLAGS=$OLD_CFLAGS
13477
13478else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 for ac_func in gethostbyname
13481do :
13482 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013483if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013485#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013486_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013488fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013489done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013490
Michael W. Hudson54241132001-12-07 15:38:26 +000013491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013492fi
13493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
13495
13496
13497
13498
13499
Guido van Rossum627b2d71993-12-24 10:39:16 +000013500# checks for system services
13501# (none yet)
13502
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013504ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013505if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013506
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013507else
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13509$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013510if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512else
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013514LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518/* Override any GCC internal prototype to avoid an error.
13519 Use char because int might match the return type of a GCC
13520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013521#ifdef __cplusplus
13522extern "C"
13523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013524char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013538rm -f core conftest.err conftest.$ac_objext \
13539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13543$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 cat >>confdefs.h <<_ACEOF
13546#define HAVE_LIBIEEE 1
13547_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013549 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550
Guido van Rossum627b2d71993-12-24 10:39:16 +000013551fi
13552
Michael W. Hudson54241132001-12-07 15:38:26 +000013553
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013554fi
13555
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
Guido van Rossum7f43da71994-08-01 12:15:30 +000013557# check for --with-libm=...
13558
Guido van Rossum563e7081996-09-10 18:20:48 +000013559case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013560Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013561*) LIBM=-lm
13562esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13564$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013569if test "$withval" = no
13570then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13572$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013573elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013574then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13576$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013577else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013578fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13581$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013582fi
13583
Guido van Rossum7f43da71994-08-01 12:15:30 +000013584
13585# check for --with-libc=...
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13588$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013591if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013593if test "$withval" = no
13594then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13596$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013597elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013598then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13600$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013601else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013602fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13605$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606fi
13607
Guido van Rossum7f43da71994-08-01 12:15:30 +000013608
Stefan Krah1919b7e2012-03-21 18:25:23 +010013609# **************************************
13610# * Check for gcc x64 inline assembler *
13611# **************************************
13612
13613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13614$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13616/* end confdefs.h. */
13617
13618int
13619main ()
13620{
13621
13622 __asm__ __volatile__ ("movq %rcx, %rax");
13623
13624 ;
13625 return 0;
13626}
13627_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013628if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013629 have_gcc_asm_for_x64=yes
13630else
13631 have_gcc_asm_for_x64=no
13632fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013633rm -f core conftest.err conftest.$ac_objext \
13634 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13636$as_echo "$have_gcc_asm_for_x64" >&6; }
13637if test "$have_gcc_asm_for_x64" = yes
13638then
13639
13640$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13641
13642fi
13643
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013644# **************************************************
13645# * Check for various properties of floating point *
13646# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13649$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013652else
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655 ac_cv_little_endian_double=no
13656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658/* end confdefs.h. */
13659
13660#include <string.h>
13661int main() {
13662 double x = 9006104071832581.0;
13663 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13664 return 0;
13665 else
13666 return 1;
13667}
13668
13669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671 ac_cv_little_endian_double=yes
13672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013677fi
13678
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679fi
13680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13682$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013683if test "$ac_cv_little_endian_double" = yes
13684then
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013687
13688fi
13689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13691$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013692if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694else
13695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013697 ac_cv_big_endian_double=no
13698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013700/* end confdefs.h. */
13701
13702#include <string.h>
13703int main() {
13704 double x = 9006104071832581.0;
13705 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13706 return 0;
13707 else
13708 return 1;
13709}
13710
13711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713 ac_cv_big_endian_double=yes
13714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719fi
13720
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721fi
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13724$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013725if test "$ac_cv_big_endian_double" = yes
13726then
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013729
13730fi
13731
13732# Some ARM platforms use a mixed-endian representation for doubles.
13733# While Python doesn't currently have full support for these platforms
13734# (see e.g., issue 1762561), we can at least make sure that float <-> string
13735# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13737$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013738if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013740else
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743 ac_cv_mixed_endian_double=no
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746/* end confdefs.h. */
13747
13748#include <string.h>
13749int main() {
13750 double x = 9006104071832581.0;
13751 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13752 return 0;
13753 else
13754 return 1;
13755}
13756
13757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759 ac_cv_mixed_endian_double=yes
13760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765fi
13766
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767fi
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13770$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013771if test "$ac_cv_mixed_endian_double" = yes
13772then
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775
13776fi
13777
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013778# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013779# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013780# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013781# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013782# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013783# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013784
13785# This inline assembler syntax may also work for suncc and icc,
13786# so we try it on all platforms.
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13789$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791/* end confdefs.h. */
13792
13793int
13794main ()
13795{
13796
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013797 unsigned short cw;
13798 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13799 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800
13801 ;
13802 return 0;
13803}
13804_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013805if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806 have_gcc_asm_for_x87=yes
13807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013810rm -f core conftest.err conftest.$ac_objext \
13811 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13813$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013814if test "$have_gcc_asm_for_x87" = yes
13815then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13822$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824/* end confdefs.h. */
13825
13826int
13827main ()
13828{
13829
13830 unsigned int fpcr;
13831 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13832 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13833
13834 ;
13835 return 0;
13836}
13837_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013838if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013839 have_gcc_asm_for_mc68881=yes
13840else
13841 have_gcc_asm_for_mc68881=no
13842fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013843rm -f core conftest.err conftest.$ac_objext \
13844 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13846$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13847if test "$have_gcc_asm_for_mc68881" = yes
13848then
13849
13850$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13851
13852fi
13853
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013854# Detect whether system arithmetic is subject to x87-style double
13855# rounding issues. The result of this test has little meaning on non
13856# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13857# mode is round-to-nearest and double rounding issues are present, and
13858# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13860$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861# $BASECFLAGS may affect the result
13862ac_save_cc="$CC"
13863CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013864if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013865 ac_cv_x87_double_rounding=no
13866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013868/* end confdefs.h. */
13869
13870#include <stdlib.h>
13871#include <math.h>
13872int main() {
13873 volatile double x, y, z;
13874 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13875 x = 0.99999999999999989; /* 1-2**-53 */
13876 y = 1./x;
13877 if (y != 1.)
13878 exit(0);
13879 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13880 x = 1e16;
13881 y = 2.99999;
13882 z = x + y;
13883 if (z != 1e16+4.)
13884 exit(0);
13885 /* both tests show evidence of double rounding */
13886 exit(1);
13887}
13888
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013891 ac_cv_x87_double_rounding=no
13892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013897fi
13898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13901$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013902if test "$ac_cv_x87_double_rounding" = yes
13903then
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013906
13907fi
13908
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909# ************************************
13910# * Check for mathematical functions *
13911# ************************************
13912
13913LIBS_SAVE=$LIBS
13914LIBS="$LIBS $LIBM"
13915
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013916for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13917do :
13918 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13919ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013920if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013921 cat >>confdefs.h <<_ACEOF
13922#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13923_ACEOF
13924
13925fi
13926done
13927
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013928for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013929do :
13930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13931ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013932if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013933 cat >>confdefs.h <<_ACEOF
13934#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13935_ACEOF
13936
13937fi
13938done
13939
13940ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13941"
Victor Stinnere0be4232011-10-25 13:06:09 +020013942if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013943 ac_have_decl=1
13944else
13945 ac_have_decl=0
13946fi
13947
13948cat >>confdefs.h <<_ACEOF
13949#define HAVE_DECL_ISINF $ac_have_decl
13950_ACEOF
13951ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13952"
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013954 ac_have_decl=1
13955else
13956 ac_have_decl=0
13957fi
13958
13959cat >>confdefs.h <<_ACEOF
13960#define HAVE_DECL_ISNAN $ac_have_decl
13961_ACEOF
13962ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13963"
Victor Stinnere0be4232011-10-25 13:06:09 +020013964if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013965 ac_have_decl=1
13966else
13967 ac_have_decl=0
13968fi
13969
13970cat >>confdefs.h <<_ACEOF
13971#define HAVE_DECL_ISFINITE $ac_have_decl
13972_ACEOF
13973
13974
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013975# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13976# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13978$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013979if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013981else
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013984 ac_cv_tanh_preserves_zero_sign=no
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013987/* end confdefs.h. */
13988
13989#include <math.h>
13990#include <stdlib.h>
13991int main() {
13992 /* return 0 if either negative zeros don't exist
13993 on this platform or if negative zeros exist
13994 and tanh(-0.) == -0. */
13995 if (atan2(0., -1.) == atan2(-0., -1.) ||
13996 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13997 else exit(1);
13998}
13999
14000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014002 ac_cv_tanh_preserves_zero_sign=yes
14003else
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014008fi
14009
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014010fi
14011
Matthias Kloseb9621712010-04-24 17:59:49 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14013$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014014if test "$ac_cv_tanh_preserves_zero_sign" = yes
14015then
14016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014018
14019fi
14020
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014021if test "$ac_cv_func_log1p" = yes
14022then
14023 # On some versions of AIX, log1p(-0.) returns 0. instead of
14024 # -0. See issue #9920.
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14026$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014027 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014028 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014029else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031 if test "$cross_compiling" = yes; then :
14032 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14035/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014036
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014037 #include <math.h>
14038 #include <stdlib.h>
14039 int main() {
14040 /* Fail if the signs of log1p(-0.) and -0. can be
14041 distinguished. */
14042 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14043 return 0;
14044 else
14045 return 1;
14046 }
14047
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014048_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014049if ac_fn_c_try_run "$LINENO"; then :
14050 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014051else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014052 ac_cv_log1p_drops_zero_sign=yes
14053fi
14054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014057
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014058fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014059
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14061$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14062fi
14063if test "$ac_cv_log1p_drops_zero_sign" = yes
14064then
14065
14066$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14067
14068fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014069
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014070LIBS=$LIBS_SAVE
14071
Mark Dickinsona614f042009-11-28 12:48:43 +000014072# For multiprocessing module, check that sem_open
14073# actually works. For FreeBSD versions <= 7.2,
14074# the kernel module that provides POSIX semaphores
14075# isn't loaded by default, so an attempt to call
14076# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14078$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014079if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014083 ac_cv_posix_semaphores_enabled=yes
14084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014086/* end confdefs.h. */
14087
14088#include <unistd.h>
14089#include <fcntl.h>
14090#include <stdio.h>
14091#include <semaphore.h>
14092#include <sys/stat.h>
14093
14094int main(void) {
14095 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14096 if (a == SEM_FAILED) {
14097 perror("sem_open");
14098 return 1;
14099 }
14100 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014101 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014102 return 0;
14103}
14104
14105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014106if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014107 ac_cv_posix_semaphores_enabled=yes
14108else
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014113fi
14114
14115
Mark Dickinsona614f042009-11-28 12:48:43 +000014116fi
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14119$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014120if test $ac_cv_posix_semaphores_enabled = no
14121then
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014124
14125fi
14126
Mark Dickinson10683072009-04-18 21:18:19 +000014127# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14129$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014130if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014137/* end confdefs.h. */
14138
14139#include <unistd.h>
14140#include <fcntl.h>
14141#include <stdio.h>
14142#include <semaphore.h>
14143#include <sys/stat.h>
14144
14145int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014146 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014147 int count;
14148 int res;
14149 if(a==SEM_FAILED){
14150 perror("sem_open");
14151 return 1;
14152
14153 }
14154 res = sem_getvalue(a, &count);
14155 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014156 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014157 return res==-1 ? 1 : 0;
14158}
14159
Mark Dickinson10683072009-04-18 21:18:19 +000014160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014162 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014168fi
14169
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014171fi
14172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14174$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175if test $ac_cv_broken_sem_getvalue = yes
14176then
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014179
14180fi
14181
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014182ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14183"
14184if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14185 ac_have_decl=1
14186else
14187 ac_have_decl=0
14188fi
14189
14190cat >>confdefs.h <<_ACEOF
14191#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14192_ACEOF
14193ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14194"
14195if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14196 ac_have_decl=1
14197else
14198 ac_have_decl=0
14199fi
14200
14201cat >>confdefs.h <<_ACEOF
14202#define HAVE_DECL_RTLD_NOW $ac_have_decl
14203_ACEOF
14204ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14205"
14206if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14207 ac_have_decl=1
14208else
14209 ac_have_decl=0
14210fi
14211
14212cat >>confdefs.h <<_ACEOF
14213#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14214_ACEOF
14215ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14216"
14217if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14218 ac_have_decl=1
14219else
14220 ac_have_decl=0
14221fi
14222
14223cat >>confdefs.h <<_ACEOF
14224#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14225_ACEOF
14226ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14227"
14228if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14229 ac_have_decl=1
14230else
14231 ac_have_decl=0
14232fi
14233
14234cat >>confdefs.h <<_ACEOF
14235#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14236_ACEOF
14237ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14238"
14239if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14240 ac_have_decl=1
14241else
14242 ac_have_decl=0
14243fi
14244
14245cat >>confdefs.h <<_ACEOF
14246#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14247_ACEOF
14248ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14249"
14250if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14251 ac_have_decl=1
14252else
14253 ac_have_decl=0
14254fi
14255
14256cat >>confdefs.h <<_ACEOF
14257#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14258_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014259ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14260"
14261if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14262 ac_have_decl=1
14263else
14264 ac_have_decl=0
14265fi
14266
14267cat >>confdefs.h <<_ACEOF
14268#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14269_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014270
14271
Mark Dickinsonbd792642009-03-18 20:06:12 +000014272# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14274$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014275# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014276if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014277 enableval=$enable_big_digits; case $enable_big_digits in
14278yes)
14279 enable_big_digits=30 ;;
14280no)
14281 enable_big_digits=15 ;;
1428215|30)
14283 ;;
14284*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014285 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 +000014286esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14288$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014289
14290cat >>confdefs.h <<_ACEOF
14291#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14292_ACEOF
14293
14294
14295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14297$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014298fi
14299
14300
Guido van Rossumef2255b2000-03-10 22:30:29 +000014301# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014302ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014303if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014308 wchar_h="yes"
14309
Guido van Rossumef2255b2000-03-10 22:30:29 +000014310else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014312
14313fi
14314
Michael W. Hudson54241132001-12-07 15:38:26 +000014315
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014317# determine wchar_t size
14318if test "$wchar_h" = yes
14319then
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14322# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14323# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14325$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014326if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014328else
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14330"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Martin v. Löwis11437992002-04-12 09:54:03 +000014332else
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 if test "$ac_cv_type_wchar_t" = yes; then
14334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014336as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014337See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 else
14339 ac_cv_sizeof_wchar_t=0
14340 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14345$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346
14347
14348
Martin v. Löwis11437992002-04-12 09:54:03 +000014349cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014350#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014351_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014352
Michael W. Hudson54241132001-12-07 15:38:26 +000014353
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014354fi
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14357$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014358have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014360/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014361
14362#include <tcl.h>
14363#if TCL_UTF_MAX != 6
14364# error "NOT UCS4_TCL"
14365#endif
14366int
14367main ()
14368{
14369
14370 ;
14371 return 0;
14372}
14373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014375
14376
Matthias Kloseb9621712010-04-24 17:59:49 +000014377$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014378
14379 have_ucs4_tcl=yes
14380
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14384$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014385
Skip Montanaro6dead952003-09-25 14:50:04 +000014386# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014387if test "$wchar_h" = yes
14388then
14389 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14391$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014392 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014394else
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014397 ac_cv_wchar_t_signed=yes
14398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014400/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014401
14402 #include <wchar.h>
14403 int main()
14404 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014405 /* Success: exit code 0 */
14406 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014407 }
14408
14409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014410if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014411 ac_cv_wchar_t_signed=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014417fi
14418
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014419fi
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14422$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423fi
14424
Georg Brandl52d168a2008-01-07 18:10:24 +000014425# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014426if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014427 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014428then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014429 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Georg Brandl52d168a2008-01-07 18:10:24 +000014433else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014434 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014435fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14437$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014438
14439# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14441$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014442if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 ac_cv_c_bigendian=unknown
14446 # See if we're dealing with a universal compiler.
14447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14448/* end confdefs.h. */
14449#ifndef __APPLE_CC__
14450 not a universal capable compiler
14451 #endif
14452 typedef int dummy;
14453
Skip Montanaro6dead952003-09-25 14:50:04 +000014454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014455if ac_fn_c_try_compile "$LINENO"; then :
14456
14457 # Check for potential -arch flags. It is not universal unless
14458 # there are at least two -arch flags with different values.
14459 ac_arch=
14460 ac_prev=
14461 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14462 if test -n "$ac_prev"; then
14463 case $ac_word in
14464 i?86 | x86_64 | ppc | ppc64)
14465 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14466 ac_arch=$ac_word
14467 else
14468 ac_cv_c_bigendian=universal
14469 break
14470 fi
14471 ;;
14472 esac
14473 ac_prev=
14474 elif test "x$ac_word" = "x-arch"; then
14475 ac_prev=arch
14476 fi
14477 done
14478fi
14479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14480 if test $ac_cv_c_bigendian = unknown; then
14481 # See if sys/param.h defines the BYTE_ORDER macro.
14482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014483/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014484#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487int
14488main ()
14489{
Matthias Kloseb9621712010-04-24 17:59:49 +000014490#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14491 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14492 && LITTLE_ENDIAN)
14493 bogus endian macros
14494 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
14496 ;
14497 return 0;
14498}
14499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014501 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014503/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014506
Martin v. Löwis11437992002-04-12 09:54:03 +000014507int
14508main ()
14509{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014510#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 not big endian
14512 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
14514 ;
14515 return 0;
14516}
14517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014518if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519 ac_cv_c_bigendian=yes
14520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014524fi
14525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14526 fi
14527 if test $ac_cv_c_bigendian = unknown; then
14528 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014531#include <limits.h>
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533int
14534main ()
14535{
Matthias Kloseb9621712010-04-24 17:59:49 +000014536#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14537 bogus endian macros
14538 #endif
14539
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544if ac_fn_c_try_compile "$LINENO"; then :
14545 # It does; now see whether it defined to _BIG_ENDIAN or not.
14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547/* end confdefs.h. */
14548#include <limits.h>
14549
14550int
14551main ()
14552{
14553#ifndef _BIG_ENDIAN
14554 not big endian
14555 #endif
14556
14557 ;
14558 return 0;
14559}
14560_ACEOF
14561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14567fi
14568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569 fi
14570 if test $ac_cv_c_bigendian = unknown; then
14571 # Compile a test program.
14572 if test "$cross_compiling" = yes; then :
14573 # Try to guess by grepping values from an object file.
14574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14575/* end confdefs.h. */
14576short int ascii_mm[] =
14577 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14578 short int ascii_ii[] =
14579 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14580 int use_ascii (int i) {
14581 return ascii_mm[i] + ascii_ii[i];
14582 }
14583 short int ebcdic_ii[] =
14584 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14585 short int ebcdic_mm[] =
14586 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14587 int use_ebcdic (int i) {
14588 return ebcdic_mm[i] + ebcdic_ii[i];
14589 }
14590 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592int
14593main ()
14594{
14595return use_ascii (foo) == use_ebcdic (foo);
14596 ;
14597 return 0;
14598}
14599_ACEOF
14600if ac_fn_c_try_compile "$LINENO"; then :
14601 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14602 ac_cv_c_bigendian=yes
14603 fi
14604 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14605 if test "$ac_cv_c_bigendian" = unknown; then
14606 ac_cv_c_bigendian=no
14607 else
14608 # finding both strings is unlikely to happen, but who knows?
14609 ac_cv_c_bigendian=unknown
14610 fi
14611 fi
14612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014616/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014618int
14619main ()
14620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 /* Are we little or big endian? From Harbison&Steele. */
14623 union
14624 {
14625 long int l;
14626 char c[sizeof (long int)];
14627 } u;
14628 u.l = 1;
14629 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630
14631 ;
14632 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633}
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014635if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014636 ac_cv_c_bigendian=no
14637else
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14647$as_echo "$ac_cv_c_bigendian" >&6; }
14648 case $ac_cv_c_bigendian in #(
14649 yes)
14650 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14651;; #(
14652 no)
14653 ;; #(
14654 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 ;; #(
14659 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014660 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014661 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014663
Michael W. Hudson54241132001-12-07 15:38:26 +000014664
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014665# ABI version string for Python extension modules. This appears between the
14666# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14667# from the following attributes which affect the ABI of this Python build (in
14668# this order):
14669#
14670# * The Python implementation (always 'cpython-' for us)
14671# * The major and minor version numbers
14672# * --with-pydebug (adds a 'd')
14673# * --with-pymalloc (adds a 'm')
14674# * --with-wide-unicode (adds a 'u')
14675#
14676# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014677# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14678# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014679
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14681$as_echo_n "checking ABIFLAGS... " >&6; }
14682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14683$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14685$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014686SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14688$as_echo "$SOABI" >&6; }
14689
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014690
14691case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014692 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014693 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14694 *)
14695 EXT_SUFFIX=${SHLIB_SUFFIX};;
14696esac
14697
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14699$as_echo_n "checking LDVERSION... " >&6; }
14700LDVERSION='$(VERSION)$(ABIFLAGS)'
14701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14702$as_echo "$LDVERSION" >&6; }
14703
doko@python.org87421192013-01-26 11:39:31 +010014704
doko@ubuntu.com55532312016-06-14 08:55:19 +020014705if test x$PLATFORM_TRIPLET = x; then
14706 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14707else
14708 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14709fi
doko@python.org87421192013-01-26 11:39:31 +010014710
14711
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014712# Check whether right shifting a negative integer extends the sign bit
14713# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14715$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014716if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014718else
Martin v. Löwis11437992002-04-12 09:54:03 +000014719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014721 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014722else
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014724/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014725
14726int main()
14727{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014728 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014729}
14730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014732if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014733 ac_cv_rshift_extends_sign=yes
14734else
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014739fi
14740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741fi
14742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14744$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014745if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014746then
Martin v. Löwis11437992002-04-12 09:54:03 +000014747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014749
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014750fi
14751
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014752# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14754$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014755if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014757else
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014760/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014761#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014762int
14763main ()
14764{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014765
14766 FILE *f = fopen("/dev/null", "r");
14767 flockfile(f);
14768 getc_unlocked(f);
14769 funlockfile(f);
14770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ;
14772 return 0;
14773}
14774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014775if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014776 ac_cv_have_getc_unlocked=yes
14777else
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 ac_cv_have_getc_unlocked=no
14779fi
14780rm -f core conftest.err conftest.$ac_objext \
14781 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14785$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014786if test "$ac_cv_have_getc_unlocked" = yes
14787then
Martin v. Löwis11437992002-04-12 09:54:03 +000014788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014790
14791fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014792
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014793# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014794# save the value of LIBS so we don't actually link Python with readline
14795LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014796
Gregory P. Smith18820942008-09-07 06:24:49 +000014797# On some systems we need to link readline to a termcap compatible
14798# library. NOTE: Keep the precedence of listed libraries synchronised
14799# with setup.py.
14800py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14802$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014803for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014804 if test -z "$py_libtermcap"; then
14805 READLINE_LIBS="-lreadline"
14806 else
14807 READLINE_LIBS="-lreadline -l$py_libtermcap"
14808 fi
14809 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014811/* end confdefs.h. */
14812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813/* Override any GCC internal prototype to avoid an error.
14814 Use char because int might match the return type of a GCC
14815 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014816#ifdef __cplusplus
14817extern "C"
14818#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014819char readline ();
14820int
14821main ()
14822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014824 ;
14825 return 0;
14826}
14827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014828if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014829 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014831rm -f core conftest.err conftest.$ac_objext \
14832 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014833 if test $py_cv_lib_readline = yes; then
14834 break
14835 fi
14836done
14837# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14838#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014839if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14841$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014842else
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14844$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014847
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014848fi
14849
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014850# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014853#include <readline/readline.h>
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014856 have_readline=yes
14857else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014858 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014859
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014860fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014861rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014862if test $have_readline = yes
14863then
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014865/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014866#include <readline/readline.h>
14867
14868_ACEOF
14869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014873
14874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014875rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014878/* end confdefs.h. */
14879#include <readline/readline.h>
14880
14881_ACEOF
14882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014886
14887fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014888rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014889
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014890fi
14891
Martin v. Löwis0daad592001-09-30 21:09:59 +000014892# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14894$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014895if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014897else
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014899LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903/* Override any GCC internal prototype to avoid an error.
14904 Use char because int might match the return type of a GCC
14905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#ifdef __cplusplus
14907extern "C"
14908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014909char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ;
14915 return 0;
14916}
14917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014923rm -f core conftest.err conftest.$ac_objext \
14924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014925LIBS=$ac_check_lib_save_LIBS
14926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14928$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014929if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014932
Martin v. Löwis0daad592001-09-30 21:09:59 +000014933fi
14934
Michael W. Hudson54241132001-12-07 15:38:26 +000014935
Thomas Wouters89d996e2007-09-08 17:39:28 +000014936# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14938$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014939if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014941else
14942 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014943LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014945/* end confdefs.h. */
14946
14947/* Override any GCC internal prototype to avoid an error.
14948 Use char because int might match the return type of a GCC
14949 builtin and then its argument prototype would still apply. */
14950#ifdef __cplusplus
14951extern "C"
14952#endif
14953char rl_completion_display_matches_hook ();
14954int
14955main ()
14956{
14957return rl_completion_display_matches_hook ();
14958 ;
14959 return 0;
14960}
14961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014962if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014963 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14964else
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967rm -f core conftest.err conftest.$ac_objext \
14968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014969LIBS=$ac_check_lib_save_LIBS
14970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14972$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014976
14977fi
14978
14979
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014980# also in 4.0, but not in editline
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14982$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14983if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14984 $as_echo_n "(cached) " >&6
14985else
14986 ac_check_lib_save_LIBS=$LIBS
14987LIBS="-lreadline $READLINE_LIBS $LIBS"
14988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14989/* end confdefs.h. */
14990
14991/* Override any GCC internal prototype to avoid an error.
14992 Use char because int might match the return type of a GCC
14993 builtin and then its argument prototype would still apply. */
14994#ifdef __cplusplus
14995extern "C"
14996#endif
14997char rl_resize_terminal ();
14998int
14999main ()
15000{
15001return rl_resize_terminal ();
15002 ;
15003 return 0;
15004}
15005_ACEOF
15006if ac_fn_c_try_link "$LINENO"; then :
15007 ac_cv_lib_readline_rl_resize_terminal=yes
15008else
15009 ac_cv_lib_readline_rl_resize_terminal=no
15010fi
15011rm -f core conftest.err conftest.$ac_objext \
15012 conftest$ac_exeext conftest.$ac_ext
15013LIBS=$ac_check_lib_save_LIBS
15014fi
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15016$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15017if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15018
15019$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15020
15021fi
15022
15023
Martin v. Löwis0daad592001-09-30 21:09:59 +000015024# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15026$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015027if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029else
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015031LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035/* Override any GCC internal prototype to avoid an error.
15036 Use char because int might match the return type of a GCC
15037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015038#ifdef __cplusplus
15039extern "C"
15040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015041char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ;
15047 return 0;
15048}
15049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015055rm -f core conftest.err conftest.$ac_objext \
15056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015057LIBS=$ac_check_lib_save_LIBS
15058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15060$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015061if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015064
Guido van Rossum353ae582001-07-10 16:45:32 +000015065fi
15066
Jack Jansendd19cf82001-12-06 22:36:17 +000015067
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015068# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015070/* end confdefs.h. */
15071#include <readline/readline.h>
15072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015073if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015074 have_readline=yes
15075else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015076 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015077
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015078fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015079rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015080if test $have_readline = yes
15081then
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015083/* end confdefs.h. */
15084#include <readline/readline.h>
15085
15086_ACEOF
15087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015091
15092fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015093rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015094
15095fi
15096
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15098$as_echo_n "checking for append_history in -lreadline... " >&6; }
15099if ${ac_cv_lib_readline_append_history+:} false; then :
15100 $as_echo_n "(cached) " >&6
15101else
15102 ac_check_lib_save_LIBS=$LIBS
15103LIBS="-lreadline $READLINE_LIBS $LIBS"
15104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15105/* end confdefs.h. */
15106
15107/* Override any GCC internal prototype to avoid an error.
15108 Use char because int might match the return type of a GCC
15109 builtin and then its argument prototype would still apply. */
15110#ifdef __cplusplus
15111extern "C"
15112#endif
15113char append_history ();
15114int
15115main ()
15116{
15117return append_history ();
15118 ;
15119 return 0;
15120}
15121_ACEOF
15122if ac_fn_c_try_link "$LINENO"; then :
15123 ac_cv_lib_readline_append_history=yes
15124else
15125 ac_cv_lib_readline_append_history=no
15126fi
15127rm -f core conftest.err conftest.$ac_objext \
15128 conftest$ac_exeext conftest.$ac_ext
15129LIBS=$ac_check_lib_save_LIBS
15130fi
15131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15132$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15133if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15134
15135$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15136
15137fi
15138
15139
Martin v. Löwis82bca632006-02-10 20:49:30 +000015140# End of readline checks: restore LIBS
15141LIBS=$LIBS_no_readline
15142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15144$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015150 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015151else
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015154
15155int main()
15156{
15157 int val1 = nice(1);
15158 if (val1 != -1 && val1 == nice(2))
15159 exit(0);
15160 exit(1);
15161}
15162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015164if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015165 ac_cv_broken_nice=yes
15166else
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015171fi
15172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173fi
15174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15176$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015177if test "$ac_cv_broken_nice" = yes
15178then
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015181
15182fi
15183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15185$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015186if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015188else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015190 ac_cv_broken_poll=no
15191else
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015193/* end confdefs.h. */
15194
15195#include <poll.h>
15196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015197int main()
15198{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015199 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015200 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015201
15202 close (42);
15203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015204 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015205 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015206 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015207 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015208 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015209 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015210 return 1;
15211}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015212
15213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015214if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015215 ac_cv_broken_poll=yes
15216else
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015223fi
15224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15226$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015227if test "$ac_cv_broken_poll" = yes
15228then
15229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015231
15232fi
15233
Brett Cannon43802422005-02-10 20:48:03 +000015234# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000015235# (which is not required by ISO C or UNIX spec) and/or if we support
15236# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015237ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000015238#include <$ac_cv_struct_tm>
15239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240"
Victor Stinnere0be4232011-10-25 13:06:09 +020015241if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015242
15243cat >>confdefs.h <<_ACEOF
15244#define HAVE_STRUCT_TM_TM_ZONE 1
15245_ACEOF
15246
15247
15248fi
15249
15250if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015253
15254else
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15256"
Victor Stinnere0be4232011-10-25 13:06:09 +020015257if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261fi
15262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265_ACEOF
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15268$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015269if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015273/* end confdefs.h. */
15274#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275#if !HAVE_DECL_TZNAME
15276extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015277#endif
15278
15279int
15280main ()
15281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015283 ;
15284 return 0;
15285}
15286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015287if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015288 ac_cv_var_tzname=yes
15289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292rm -f core conftest.err conftest.$ac_objext \
15293 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15296$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015297 if test $ac_cv_var_tzname = yes; then
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015300
15301 fi
15302fi
15303
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304
Martin v. Löwis1d459062005-03-14 21:23:33 +000015305# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15307$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015308if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015310else
15311
Matthias Kloseb9621712010-04-24 17:59:49 +000015312if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015313 ac_cv_working_tzset=no
15314else
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015316/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015317
15318#include <stdlib.h>
15319#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015320#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015321
15322#if HAVE_TZNAME
15323extern char *tzname[];
15324#endif
15325
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015326int main()
15327{
Brett Cannon18367812003-09-19 00:59:16 +000015328 /* Note that we need to ensure that not only does tzset(3)
15329 do 'something' with localtime, but it works as documented
15330 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015331 This includes making sure that tzname is set properly if
15332 tm->tm_zone does not exist since it is the alternative way
15333 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015334
15335 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015336 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015337 */
15338
Martin v. Löwis1d459062005-03-14 21:23:33 +000015339 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015340 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15341
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015342 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015343 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015344 if (localtime(&groundhogday)->tm_hour != 0)
15345 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015346#if HAVE_TZNAME
15347 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15348 if (strcmp(tzname[0], "UTC") ||
15349 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15350 exit(1);
15351#endif
Brett Cannon18367812003-09-19 00:59:16 +000015352
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015353 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015354 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015355 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015356 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015357#if HAVE_TZNAME
15358 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15359 exit(1);
15360#endif
Brett Cannon18367812003-09-19 00:59:16 +000015361
15362 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15363 tzset();
15364 if (localtime(&groundhogday)->tm_hour != 11)
15365 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015366#if HAVE_TZNAME
15367 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15368 exit(1);
15369#endif
15370
15371#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015372 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15373 exit(1);
15374 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15375 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015376#endif
Brett Cannon18367812003-09-19 00:59:16 +000015377
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015378 exit(0);
15379}
15380
15381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015382if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015383 ac_cv_working_tzset=yes
15384else
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15388 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015389fi
15390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391fi
15392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15394$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015395if test "$ac_cv_working_tzset" = yes
15396then
15397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015399
15400fi
15401
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015402# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15404$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015405if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015410#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015411int
15412main ()
15413{
15414
15415struct stat st;
15416st.st_mtim.tv_nsec = 1;
15417
15418 ;
15419 return 0;
15420}
15421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015423 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15428fi
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15431$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015432if test "$ac_cv_stat_tv_nsec" = yes
15433then
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015436
15437fi
15438
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015439# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15441$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015442if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015446/* end confdefs.h. */
15447#include <sys/stat.h>
15448int
15449main ()
15450{
15451
15452struct stat st;
15453st.st_mtimespec.tv_nsec = 1;
15454
15455 ;
15456 return 0;
15457}
15458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015460 ac_cv_stat_tv_nsec2=yes
15461else
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15465fi
15466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15468$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015469if test "$ac_cv_stat_tv_nsec2" = yes
15470then
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015473
15474fi
15475
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015476# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015477ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015478if test "$cross_compiling" = no; then
15479 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15480fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015481
15482for ac_header in curses.h ncurses.h
15483do :
15484 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15485ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15486if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15487 cat >>confdefs.h <<_ACEOF
15488#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15489_ACEOF
15490
15491fi
15492
15493done
15494
15495
15496# On Solaris, term.h requires curses.h
15497for ac_header in term.h
15498do :
15499 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15500#ifdef HAVE_CURSES_H
15501#include <curses.h>
15502#endif
15503
15504"
15505if test "x$ac_cv_header_term_h" = xyes; then :
15506 cat >>confdefs.h <<_ACEOF
15507#define HAVE_TERM_H 1
15508_ACEOF
15509
15510fi
15511
15512done
15513
15514
Jack Jansen666b1e72001-10-31 12:11:48 +000015515# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15517$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015518if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015522/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015523#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015524int
15525main ()
15526{
Jack Jansen666b1e72001-10-31 12:11:48 +000015527
15528 int rtn;
15529 rtn = mvwdelch(0,0,0);
15530
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 ;
15532 return 0;
15533}
15534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015536 ac_cv_mvwdelch_is_expression=yes
15537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15541fi
15542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15544$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015545
15546if test "$ac_cv_mvwdelch_is_expression" = yes
15547then
Martin v. Löwis11437992002-04-12 09:54:03 +000015548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015550
15551fi
15552
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015553# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15554# structs since version 5.7. If the macro is defined as zero before including
15555# [n]curses.h, ncurses will expose fields of the structs regardless of the
15556# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15558$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015559if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015561else
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015563/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015564
15565 #define NCURSES_OPAQUE 0
15566 #include <curses.h>
15567
Martin v. Löwis11437992002-04-12 09:54:03 +000015568int
15569main ()
15570{
Jack Jansen666b1e72001-10-31 12:11:48 +000015571
15572 WINDOW *w;
15573 w->_flags = 0;
15574
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 ;
15576 return 0;
15577}
15578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015579if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015580 ac_cv_window_has_flags=yes
15581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15585fi
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15588$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015589
Jack Jansen666b1e72001-10-31 12:11:48 +000015590
15591if test "$ac_cv_window_has_flags" = yes
15592then
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015595
15596fi
15597
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15599$as_echo_n "checking for is_pad... " >&6; }
15600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15601/* end confdefs.h. */
15602#include <curses.h>
15603int
15604main ()
15605{
15606
15607#ifndef is_pad
15608void *x=is_pad
15609#endif
15610
15611 ;
15612 return 0;
15613}
15614_ACEOF
15615if ac_fn_c_try_compile "$LINENO"; then :
15616
15617$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15618
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15620$as_echo "yes" >&6; }
15621else
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15623$as_echo "no" >&6; }
15624
15625fi
15626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15629$as_echo_n "checking for is_term_resized... " >&6; }
15630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015631/* end confdefs.h. */
15632#include <curses.h>
15633int
15634main ()
15635{
15636void *x=is_term_resized
15637 ;
15638 return 0;
15639}
15640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015644
Matthias Kloseb159a552010-04-25 21:00:44 +000015645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015646$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15649$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015650
15651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15655$as_echo_n "checking for resize_term... " >&6; }
15656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015657/* end confdefs.h. */
15658#include <curses.h>
15659int
15660main ()
15661{
15662void *x=resize_term
15663 ;
15664 return 0;
15665}
15666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015667if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015670
Matthias Kloseb159a552010-04-25 21:00:44 +000015671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015672$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015673else
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15675$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015676
15677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15681$as_echo_n "checking for resizeterm... " >&6; }
15682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015683/* end confdefs.h. */
15684#include <curses.h>
15685int
15686main ()
15687{
15688void *x=resizeterm
15689 ;
15690 return 0;
15691}
15692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015693if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015694
Matthias Kloseb9621712010-04-24 17:59:49 +000015695$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015696
Matthias Kloseb159a552010-04-25 21:00:44 +000015697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015698$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015699else
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15701$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015702
15703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015705
15706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15707$as_echo_n "checking for immedok... " >&6; }
15708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709/* end confdefs.h. */
15710#include <curses.h>
15711int
15712main ()
15713{
15714
15715#ifndef immedok
15716void *x=immedok
15717#endif
15718
15719 ;
15720 return 0;
15721}
15722_ACEOF
15723if ac_fn_c_try_compile "$LINENO"; then :
15724
15725$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15726
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15728$as_echo "yes" >&6; }
15729else
15730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15731$as_echo "no" >&6; }
15732
15733fi
15734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15735
15736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15737$as_echo_n "checking for syncok... " >&6; }
15738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739/* end confdefs.h. */
15740#include <curses.h>
15741int
15742main ()
15743{
15744
15745#ifndef syncok
15746void *x=syncok
15747#endif
15748
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753if ac_fn_c_try_compile "$LINENO"; then :
15754
15755$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15756
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15758$as_echo "yes" >&6; }
15759else
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15761$as_echo "no" >&6; }
15762
15763fi
15764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15765
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15767$as_echo_n "checking for wchgat... " >&6; }
15768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15769/* end confdefs.h. */
15770#include <curses.h>
15771int
15772main ()
15773{
15774
15775#ifndef wchgat
15776void *x=wchgat
15777#endif
15778
15779 ;
15780 return 0;
15781}
15782_ACEOF
15783if ac_fn_c_try_compile "$LINENO"; then :
15784
15785$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15786
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15788$as_echo "yes" >&6; }
15789else
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15791$as_echo "no" >&6; }
15792
15793fi
15794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15795
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15797$as_echo_n "checking for filter... " >&6; }
15798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15799/* end confdefs.h. */
15800#include <curses.h>
15801int
15802main ()
15803{
15804
15805#ifndef filter
15806void *x=filter
15807#endif
15808
15809 ;
15810 return 0;
15811}
15812_ACEOF
15813if ac_fn_c_try_compile "$LINENO"; then :
15814
15815$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15816
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15818$as_echo "yes" >&6; }
15819else
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15821$as_echo "no" >&6; }
15822
15823fi
15824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15825
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15827$as_echo_n "checking for has_key... " >&6; }
15828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15829/* end confdefs.h. */
15830#include <curses.h>
15831int
15832main ()
15833{
15834
15835#ifndef has_key
15836void *x=has_key
15837#endif
15838
15839 ;
15840 return 0;
15841}
15842_ACEOF
15843if ac_fn_c_try_compile "$LINENO"; then :
15844
15845$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15846
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15848$as_echo "yes" >&6; }
15849else
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15851$as_echo "no" >&6; }
15852
15853fi
15854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15855
15856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15857$as_echo_n "checking for typeahead... " >&6; }
15858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15859/* end confdefs.h. */
15860#include <curses.h>
15861int
15862main ()
15863{
15864
15865#ifndef typeahead
15866void *x=typeahead
15867#endif
15868
15869 ;
15870 return 0;
15871}
15872_ACEOF
15873if ac_fn_c_try_compile "$LINENO"; then :
15874
15875$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15876
15877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15878$as_echo "yes" >&6; }
15879else
15880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15881$as_echo "no" >&6; }
15882
15883fi
15884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15885
15886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15887$as_echo_n "checking for use_env... " >&6; }
15888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
15890#include <curses.h>
15891int
15892main ()
15893{
15894
15895#ifndef use_env
15896void *x=use_env
15897#endif
15898
15899 ;
15900 return 0;
15901}
15902_ACEOF
15903if ac_fn_c_try_compile "$LINENO"; then :
15904
15905$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15906
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15908$as_echo "yes" >&6; }
15909else
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15911$as_echo "no" >&6; }
15912
15913fi
15914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015915# last curses configure check
15916CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15919$as_echo "$as_me: checking for device files" >&6;}
15920
15921if test "x$cross_compiling" = xyes; then
15922 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15924$as_echo_n "checking for /dev/ptmx... " >&6; }
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15926$as_echo "not set" >&6; }
15927 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15928 fi
15929 if test "${ac_cv_file__dev_ptc+set}" != set; then
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15931$as_echo_n "checking for /dev/ptc... " >&6; }
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15933$as_echo "not set" >&6; }
15934 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15935 fi
15936fi
15937
Matthias Kloseb9621712010-04-24 17:59:49 +000015938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15939$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015940if ${ac_cv_file__dev_ptmx+:} false; then :
15941 $as_echo_n "(cached) " >&6
15942else
15943 test "$cross_compiling" = yes &&
15944 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15945if test -r "/dev/ptmx"; then
15946 ac_cv_file__dev_ptmx=yes
15947else
15948 ac_cv_file__dev_ptmx=no
15949fi
15950fi
15951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15952$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15953if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015954
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015955fi
15956
15957if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015960
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15963$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015964if ${ac_cv_file__dev_ptc+:} false; then :
15965 $as_echo_n "(cached) " >&6
15966else
15967 test "$cross_compiling" = yes &&
15968 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15969if test -r "/dev/ptc"; then
15970 ac_cv_file__dev_ptc=yes
15971else
15972 ac_cv_file__dev_ptc=no
15973fi
15974fi
15975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15976$as_echo "$ac_cv_file__dev_ptc" >&6; }
15977if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015978
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015979fi
15980
15981if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015982
Matthias Kloseb9621712010-04-24 17:59:49 +000015983$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015984
Neal Norwitz865400f2003-03-21 01:42:58 +000015985fi
15986
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015987if test $ac_sys_system = Darwin
15988then
15989 LIBS="$LIBS -framework CoreFoundation"
15990fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15993$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015994if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015996else
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015998 ac_cv_have_size_t_format="cross -- assuming yes"
15999
Thomas Wouters477c8d52006-05-27 19:21:47 +000016000else
Matthias Kloseb9621712010-04-24 17:59:49 +000016001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016002/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016003
Thomas Wouters477c8d52006-05-27 19:21:47 +000016004#include <stdio.h>
16005#include <stddef.h>
16006#include <string.h>
16007
Christian Heimes2c181612007-12-17 20:04:13 +000016008#ifdef HAVE_SYS_TYPES_H
16009#include <sys/types.h>
16010#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016011
16012#ifdef HAVE_SSIZE_T
16013typedef ssize_t Py_ssize_t;
16014#elif SIZEOF_VOID_P == SIZEOF_LONG
16015typedef long Py_ssize_t;
16016#else
16017typedef int Py_ssize_t;
16018#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016019
Christian Heimes2c181612007-12-17 20:04:13 +000016020int main()
16021{
16022 char buffer[256];
16023
Thomas Wouters477c8d52006-05-27 19:21:47 +000016024 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16025 return 1;
16026
Thomas Wouters89f507f2006-12-13 04:49:30 +000016027 if (strcmp(buffer, "123"))
16028 return 1;
16029
16030 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16031 return 1;
16032
16033 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016034 return 1;
16035
16036 return 0;
16037}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016038
Thomas Wouters477c8d52006-05-27 19:21:47 +000016039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016040if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016041 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016042else
Matthias Kloseb9621712010-04-24 17:59:49 +000016043 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016047fi
16048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16051$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016052if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016055
16056fi
16057
Matthias Kloseb9621712010-04-24 17:59:49 +000016058ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016059#ifdef HAVE_SYS_TYPES_H
16060#include <sys/types.h>
16061#endif
16062#ifdef HAVE_SYS_SOCKET_H
16063#include <sys/socket.h>
16064#endif
16065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066"
Victor Stinnere0be4232011-10-25 13:06:09 +020016067if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016068
Martin v. Löwis11437992002-04-12 09:54:03 +000016069else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016072
16073fi
16074
Michael W. Hudson54241132001-12-07 15:38:26 +000016075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16077$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016078if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016080else
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016082 ac_cv_broken_mbstowcs=no
16083else
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016085/* end confdefs.h. */
16086
Stefan Krah19c21392012-11-22 23:47:32 +010016087#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016088#include<stdlib.h>
16089int main() {
16090 size_t len = -1;
16091 const char *str = "text";
16092 len = mbstowcs(NULL, str, 0);
16093 return (len != 4);
16094}
16095
16096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016097if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016098 ac_cv_broken_mbstowcs=no
16099else
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016104fi
16105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016106fi
16107
Matthias Kloseb9621712010-04-24 17:59:49 +000016108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16109$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016110if test "$ac_cv_broken_mbstowcs" = yes
16111then
16112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016114
16115fi
16116
Antoine Pitroub52ec782009-01-25 16:34:23 +000016117# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16119$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016120
16121# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016122if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016123 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016124if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016125then
16126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016128
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16130$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016131fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016132if test "$withval" = no
16133then
16134
16135$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16138$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016139fi
16140
Antoine Pitrou042b1282010-08-13 21:15:58 +000016141else
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16143$as_echo "no value specified" >&6; }
16144fi
16145
Antoine Pitroub52ec782009-01-25 16:34:23 +000016146
Matthias Kloseb17289e2012-03-15 19:51:34 +010016147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16148$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16149if ${ac_cv_computed_gotos+:} false; then :
16150 $as_echo_n "(cached) " >&6
16151else
16152 if test "$cross_compiling" = yes; then :
16153 if test "${with_computed_gotos+set}" = set; then
16154 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16155 else
16156 ac_cv_computed_gotos=no
16157 fi
16158else
16159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16160/* end confdefs.h. */
16161
16162int main(int argc, char **argv)
16163{
16164 static void *targets[1] = { &&LABEL1 };
16165 goto LABEL2;
16166LABEL1:
16167 return 0;
16168LABEL2:
16169 goto *targets[0];
16170 return 1;
16171}
16172
16173_ACEOF
16174if ac_fn_c_try_run "$LINENO"; then :
16175 ac_cv_computed_gotos=yes
16176else
16177 ac_cv_computed_gotos=no
16178fi
16179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16180 conftest.$ac_objext conftest.beam conftest.$ac_ext
16181fi
16182
16183fi
16184
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16186$as_echo "$ac_cv_computed_gotos" >&6; }
16187case "$ac_cv_computed_gotos" in yes*)
16188
16189$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16190
16191esac
16192
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016193case $ac_sys_system in
16194AIX*)
16195
16196$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16197 ;;
16198esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016199
Michael W. Hudson54241132001-12-07 15:38:26 +000016200
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016201
16202
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016203for h in `(cd $srcdir;echo Python/thread_*.h)`
16204do
16205 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16206done
16207
Michael W. Hudson54241132001-12-07 15:38:26 +000016208
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016209SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16211$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016212for dir in $SRCDIRS; do
16213 if test ! -d $dir; then
16214 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016215 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016216done
Matthias Kloseb9621712010-04-24 17:59:49 +000016217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16218$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016219
Stefan Krah1919b7e2012-03-21 18:25:23 +010016220# Availability of -O2:
16221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16222$as_echo_n "checking for -O2... " >&6; }
16223saved_cflags="$CFLAGS"
16224CFLAGS="-O2"
16225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227
16228int
16229main ()
16230{
16231
16232
16233 ;
16234 return 0;
16235}
16236_ACEOF
16237if ac_fn_c_try_compile "$LINENO"; then :
16238 have_O2=yes
16239else
16240 have_O2=no
16241fi
16242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16244$as_echo "$have_O2" >&6; }
16245CFLAGS="$saved_cflags"
16246
16247# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16248# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16250$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16251saved_cflags="$CFLAGS"
16252CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16253if test "$have_O2" = no; then
16254 CFLAGS=""
16255fi
16256if test "$cross_compiling" = yes; then :
16257 have_glibc_memmove_bug=undefined
16258else
16259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16260/* end confdefs.h. */
16261
16262#include <stdio.h>
16263#include <stdlib.h>
16264#include <string.h>
16265void foo(void *p, void *q) { memmove(p, q, 19); }
16266int main() {
16267 char a[32] = "123456789000000000";
16268 foo(&a[9], a);
16269 if (strcmp(a, "123456789123456789000000000") != 0)
16270 return 1;
16271 foo(a, &a[9]);
16272 if (strcmp(a, "123456789000000000") != 0)
16273 return 1;
16274 return 0;
16275}
16276
16277_ACEOF
16278if ac_fn_c_try_run "$LINENO"; then :
16279 have_glibc_memmove_bug=no
16280else
16281 have_glibc_memmove_bug=yes
16282fi
16283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16284 conftest.$ac_objext conftest.beam conftest.$ac_ext
16285fi
16286
16287CFLAGS="$saved_cflags"
16288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16289$as_echo "$have_glibc_memmove_bug" >&6; }
16290if test "$have_glibc_memmove_bug" = yes; then
16291
16292$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16293
16294fi
16295
16296if test "$have_gcc_asm_for_x87" = yes; then
16297 # Some versions of gcc miscompile inline asm:
16298 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16299 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16300 case $CC in
16301 *gcc*)
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16303$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16304 saved_cflags="$CFLAGS"
16305 CFLAGS="-O2"
16306 if test "$cross_compiling" = yes; then :
16307 have_ipa_pure_const_bug=undefined
16308else
16309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310/* end confdefs.h. */
16311
16312 __attribute__((noinline)) int
16313 foo(int *p) {
16314 int r;
16315 asm ( "movl \$6, (%1)\n\t"
16316 "xorl %0, %0\n\t"
16317 : "=r" (r) : "r" (p) : "memory"
16318 );
16319 return r;
16320 }
16321 int main() {
16322 int p = 8;
16323 if ((foo(&p) ? : p) != 6)
16324 return 1;
16325 return 0;
16326 }
16327
16328_ACEOF
16329if ac_fn_c_try_run "$LINENO"; then :
16330 have_ipa_pure_const_bug=no
16331else
16332 have_ipa_pure_const_bug=yes
16333fi
16334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16335 conftest.$ac_objext conftest.beam conftest.$ac_ext
16336fi
16337
16338 CFLAGS="$saved_cflags"
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16340$as_echo "$have_ipa_pure_const_bug" >&6; }
16341 if test "$have_ipa_pure_const_bug" = yes; then
16342
16343$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16344
16345 fi
16346 ;;
16347 esac
16348fi
16349
Victor Stinner4f5366e2015-01-09 02:13:19 +010016350# Check for stdatomic.h
16351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16352$as_echo_n "checking for stdatomic.h... " >&6; }
16353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16354/* end confdefs.h. */
16355
16356
16357 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016358 atomic_int value = ATOMIC_VAR_INIT(1);
16359 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016360 int main() {
16361 int loaded_value = atomic_load(&value);
16362 return 0;
16363 }
16364
16365
16366_ACEOF
16367if ac_fn_c_try_link "$LINENO"; then :
16368 have_stdatomic_h=yes
16369else
16370 have_stdatomic_h=no
16371fi
16372rm -f core conftest.err conftest.$ac_objext \
16373 conftest$ac_exeext conftest.$ac_ext
16374
16375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16376$as_echo "$have_stdatomic_h" >&6; }
16377
16378if test "$have_stdatomic_h" = yes; then
16379
16380$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16381
16382fi
16383
16384# Check for GCC >= 4.7 __atomic builtins
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16386$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388/* end confdefs.h. */
16389
16390
16391 volatile int val = 1;
16392 int main() {
16393 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16394 return 0;
16395 }
16396
16397
16398_ACEOF
16399if ac_fn_c_try_link "$LINENO"; then :
16400 have_builtin_atomic=yes
16401else
16402 have_builtin_atomic=no
16403fi
16404rm -f core conftest.err conftest.$ac_objext \
16405 conftest$ac_exeext conftest.$ac_ext
16406
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16408$as_echo "$have_builtin_atomic" >&6; }
16409
16410if test "$have_builtin_atomic" = yes; then
16411
16412$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16413
16414fi
16415
Ned Deily322f5ba2013-11-21 23:01:59 -080016416# ensurepip option
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16418$as_echo_n "checking for ensurepip... " >&6; }
16419
16420# Check whether --with-ensurepip was given.
16421if test "${with_ensurepip+set}" = set; then :
16422 withval=$with_ensurepip;
16423else
16424 with_ensurepip=upgrade
16425fi
16426
16427case $with_ensurepip in #(
16428 yes|upgrade) :
16429 ENSUREPIP=upgrade ;; #(
16430 install) :
16431 ENSUREPIP=install ;; #(
16432 no) :
16433 ENSUREPIP=no ;; #(
16434 *) :
16435 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16436esac
16437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16438$as_echo "$ENSUREPIP" >&6; }
16439
16440
Victor Stinner35a97c02015-03-08 02:59:09 +010016441# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16443$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446
16447
16448 #include <dirent.h>
16449
16450 int main() {
16451 struct dirent entry;
16452 return entry.d_type == DT_UNKNOWN;
16453 }
16454
16455
16456_ACEOF
16457if ac_fn_c_try_link "$LINENO"; then :
16458 have_dirent_d_type=yes
16459else
16460 have_dirent_d_type=no
16461fi
16462rm -f core conftest.err conftest.$ac_objext \
16463 conftest$ac_exeext conftest.$ac_ext
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16465$as_echo "$have_dirent_d_type" >&6; }
16466
16467if test "$have_dirent_d_type" = yes; then
16468
16469$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16470
16471fi
16472
Victor Stinner9eb57c52015-03-19 22:21:49 +010016473# check if the Linux getrandom() syscall is available
16474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16475$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16477/* end confdefs.h. */
16478
16479
Victor Stinner1b80b242016-04-12 22:34:58 +020016480 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016481 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016482 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016483
16484 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016485 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016486 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016487 const int flags = GRND_NONBLOCK;
16488 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016489 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016490 return 0;
16491 }
16492
16493
16494_ACEOF
16495if ac_fn_c_try_link "$LINENO"; then :
16496 have_getrandom_syscall=yes
16497else
16498 have_getrandom_syscall=no
16499fi
16500rm -f core conftest.err conftest.$ac_objext \
16501 conftest$ac_exeext conftest.$ac_ext
16502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16503$as_echo "$have_getrandom_syscall" >&6; }
16504
16505if test "$have_getrandom_syscall" = yes; then
16506
16507$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16508
16509fi
16510
Victor Stinner3abf44e2015-09-18 15:38:37 +020016511# check if the getrandom() function is available
16512# the test was written for the Solaris function of <sys/random.h>
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16514$as_echo_n "checking for the getrandom() function... " >&6; }
16515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16516/* end confdefs.h. */
16517
16518
16519 #include <sys/random.h>
16520
16521 int main() {
16522 char buffer[1];
16523 const size_t buflen = sizeof(buffer);
16524 const int flags = 0;
16525 /* ignore the result, Python checks for ENOSYS at runtime */
16526 (void)getrandom(buffer, buflen, flags);
16527 return 0;
16528 }
16529
16530
16531_ACEOF
16532if ac_fn_c_try_link "$LINENO"; then :
16533 have_getrandom=yes
16534else
16535 have_getrandom=no
16536fi
16537rm -f core conftest.err conftest.$ac_objext \
16538 conftest$ac_exeext conftest.$ac_ext
16539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16540$as_echo "$have_getrandom" >&6; }
16541
16542if test "$have_getrandom" = yes; then
16543
16544$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16545
16546fi
16547
Christian Heimesff5be6e2018-01-20 13:19:21 +010016548# Check for usable OpenSSL
16549
16550 found=false
16551
16552# Check whether --with-openssl was given.
16553if test "${with_openssl+set}" = set; then :
16554 withval=$with_openssl;
16555 case "$withval" in
16556 "" | y | ye | yes | n | no)
16557 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16558 ;;
16559 *) ssldirs="$withval"
16560 ;;
16561 esac
16562
16563else
16564
16565 # if pkg-config is installed and openssl has installed a .pc file,
16566 # then use that information and don't search ssldirs
16567 if test -n "$ac_tool_prefix"; then
16568 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16569set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16571$as_echo_n "checking for $ac_word... " >&6; }
16572if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16573 $as_echo_n "(cached) " >&6
16574else
16575 if test -n "$PKG_CONFIG"; then
16576 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16577else
16578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16579for as_dir in $PATH
16580do
16581 IFS=$as_save_IFS
16582 test -z "$as_dir" && as_dir=.
16583 for ac_exec_ext in '' $ac_executable_extensions; do
16584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16585 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16587 break 2
16588 fi
16589done
16590 done
16591IFS=$as_save_IFS
16592
16593fi
16594fi
16595PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16596if test -n "$PKG_CONFIG"; then
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16598$as_echo "$PKG_CONFIG" >&6; }
16599else
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16601$as_echo "no" >&6; }
16602fi
16603
16604
16605fi
16606if test -z "$ac_cv_prog_PKG_CONFIG"; then
16607 ac_ct_PKG_CONFIG=$PKG_CONFIG
16608 # Extract the first word of "pkg-config", so it can be a program name with args.
16609set dummy pkg-config; ac_word=$2
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16611$as_echo_n "checking for $ac_word... " >&6; }
16612if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16613 $as_echo_n "(cached) " >&6
16614else
16615 if test -n "$ac_ct_PKG_CONFIG"; then
16616 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16617else
16618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16619for as_dir in $PATH
16620do
16621 IFS=$as_save_IFS
16622 test -z "$as_dir" && as_dir=.
16623 for ac_exec_ext in '' $ac_executable_extensions; do
16624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16625 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16627 break 2
16628 fi
16629done
16630 done
16631IFS=$as_save_IFS
16632
16633fi
16634fi
16635ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16636if test -n "$ac_ct_PKG_CONFIG"; then
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16638$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16639else
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16641$as_echo "no" >&6; }
16642fi
16643
16644 if test "x$ac_ct_PKG_CONFIG" = x; then
16645 PKG_CONFIG=""
16646 else
16647 case $cross_compiling:$ac_tool_warned in
16648yes:)
16649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16651ac_tool_warned=yes ;;
16652esac
16653 PKG_CONFIG=$ac_ct_PKG_CONFIG
16654 fi
16655else
16656 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16657fi
16658
16659 if test x"$PKG_CONFIG" != x""; then
16660 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16661 if test $? = 0; then
16662 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16663 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16664 found=true
16665 fi
16666 fi
16667
16668 # no such luck; use some default ssldirs
16669 if ! $found; then
16670 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16671 fi
16672
16673
16674fi
16675
16676
16677
16678 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16679 # an 'openssl' subdirectory
16680
16681 if ! $found; then
16682 OPENSSL_INCLUDES=
16683 for ssldir in $ssldirs; do
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16685$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16686 if test -f "$ssldir/include/openssl/ssl.h"; then
16687 OPENSSL_INCLUDES="-I$ssldir/include"
16688 OPENSSL_LDFLAGS="-L$ssldir/lib"
16689 OPENSSL_LIBS="-lssl -lcrypto"
16690 found=true
16691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16692$as_echo "yes" >&6; }
16693 break
16694 else
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16696$as_echo "no" >&6; }
16697 fi
16698 done
16699
16700 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16701 # it will just work!
16702 fi
16703
16704 # try the preprocessor and linker with our new flags,
16705 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16706
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16708$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16709 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16710 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16711
16712 save_LIBS="$LIBS"
16713 save_LDFLAGS="$LDFLAGS"
16714 save_CPPFLAGS="$CPPFLAGS"
16715 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16716 LIBS="$OPENSSL_LIBS $LIBS"
16717 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16719/* end confdefs.h. */
16720#include <openssl/ssl.h>
16721int
16722main ()
16723{
16724SSL_new(NULL)
16725 ;
16726 return 0;
16727}
16728_ACEOF
16729if ac_fn_c_try_link "$LINENO"; then :
16730
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16732$as_echo "yes" >&6; }
16733 have_openssl=yes
16734
16735else
16736
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16738$as_echo "no" >&6; }
16739 have_openssl=no
16740
16741fi
16742rm -f core conftest.err conftest.$ac_objext \
16743 conftest$ac_exeext conftest.$ac_ext
16744 CPPFLAGS="$save_CPPFLAGS"
16745 LDFLAGS="$save_LDFLAGS"
16746 LIBS="$save_LIBS"
16747
16748
16749
16750
16751
16752
16753if test "$have_openssl" = yes; then
16754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16755$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16756
16757 save_LIBS="$LIBS"
16758 save_LDFLAGS="$LDFLAGS"
16759 save_CPPFLAGS="$CPPFLAGS"
16760 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16761 LIBS="$OPENSSL_LIBS $LIBS"
16762 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16763
16764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16765/* end confdefs.h. */
16766
16767 #include <openssl/x509_vfy.h>
16768
16769int
16770main ()
16771{
16772
16773 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16774 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16775 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16776 X509_VERIFY_PARAM_set_hostflags(p, 0);
16777
16778 ;
16779 return 0;
16780}
16781
16782_ACEOF
16783if ac_fn_c_try_link "$LINENO"; then :
16784
16785 ac_cv_has_x509_verify_param_set1_host=yes
16786
16787else
16788
16789 ac_cv_has_x509_verify_param_set1_host=no
16790
16791fi
16792rm -f core conftest.err conftest.$ac_objext \
16793 conftest$ac_exeext conftest.$ac_ext
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16795$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16796 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16797
16798$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16799
16800 fi
16801
16802 CPPFLAGS="$save_CPPFLAGS"
16803 LDFLAGS="$save_LDFLAGS"
16804 LIBS="$save_LIBS"
16805fi
16806
Christian Heimes892d66e2018-01-29 14:10:18 +010016807# ssl module default cipher suite string
16808
16809
16810
16811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16812$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16813
16814# Check whether --with-ssl-default-suites was given.
16815if test "${with_ssl_default_suites+set}" = set; then :
16816 withval=$with_ssl_default_suites;
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16818$as_echo "$withval" >&6; }
16819case "$withval" in
16820 python)
16821 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16822
16823 ;;
16824 openssl)
16825 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16826
16827 ;;
16828 *)
16829 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16830
16831 cat >>confdefs.h <<_ACEOF
16832#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16833_ACEOF
16834
16835 ;;
16836esac
16837
16838else
16839
16840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16841$as_echo "python" >&6; }
16842$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16843
16844
16845fi
16846
16847
16848
Guido van Rossum627b2d71993-12-24 10:39:16 +000016849# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016850ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016851
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016852ac_config_files="$ac_config_files Modules/ld_so_aix"
16853
Martin v. Löwis11437992002-04-12 09:54:03 +000016854cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016855# This file is a shell script that caches the results of configure
16856# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016857# scripts and configure runs, see configure's option --config-cache.
16858# It is not useful on other systems. If it contains results you don't
16859# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016860#
Martin v. Löwis11437992002-04-12 09:54:03 +000016861# config.status only pays attention to the cache file if you give it
16862# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863#
Skip Montanaro6dead952003-09-25 14:50:04 +000016864# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016865# loading this file, other *unset* `ac_cv_foo' will be assigned the
16866# following values.
16867
16868_ACEOF
16869
Guido van Rossumf78abae1997-01-21 22:02:36 +000016870# The following way of writing the cache mishandles newlines in values,
16871# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016873# Ultrix sh set writes to stderr and can't be redirected directly,
16874# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875(
16876 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16877 eval ac_val=\$$ac_var
16878 case $ac_val in #(
16879 *${as_nl}*)
16880 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016881 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16882$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883 esac
16884 case $ac_var in #(
16885 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16887 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888 esac ;;
16889 esac
16890 done
16891
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16894 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 # `set' does not quote correctly, so add quotes: double-quote
16896 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016898 "s/'/'\\\\''/g;
16899 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 *)
16902 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 esac |
16906 sort
16907) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16913 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16915 :end' >>confcache
16916if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16917 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016918 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16920$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016921 if test ! -f "$cache_file" || test -h "$cache_file"; then
16922 cat confcache >"$cache_file"
16923 else
16924 case $cache_file in #(
16925 */* | ?:*)
16926 mv -f confcache "$cache_file"$$ &&
16927 mv -f "$cache_file"$$ "$cache_file" ;; #(
16928 *)
16929 mv -f confcache "$cache_file" ;;
16930 esac
16931 fi
16932 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016933 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016934 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16935$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016936 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016937fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016938rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016939
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016940test "x$prefix" = xNONE && prefix=$ac_default_prefix
16941# Let make expand exec_prefix.
16942test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016943
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016944DEFS=-DHAVE_CONFIG_H
16945
Skip Montanaro6dead952003-09-25 14:50:04 +000016946ac_libobjs=
16947ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016948U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016949for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16950 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16954 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016955 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16956 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016957done
16958LIBOBJS=$ac_libobjs
16959
16960LTLIBOBJS=$ac_ltlibobjs
16961
16962
Martin v. Löwis11437992002-04-12 09:54:03 +000016963
Matthias Kloseb9621712010-04-24 17:59:49 +000016964
Victor Stinnere0be4232011-10-25 13:06:09 +020016965: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016966ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016967ac_clean_files_save=$ac_clean_files
16968ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016969{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16970$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16971as_write_fail=0
16972cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016973#! $SHELL
16974# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016975# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016976# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016977# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016980ac_cs_recheck=false
16981ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016982
Matthias Kloseb9621712010-04-24 17:59:49 +000016983SHELL=\${CONFIG_SHELL-$SHELL}
16984export SHELL
16985_ASEOF
16986cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16987## -------------------- ##
16988## M4sh Initialization. ##
16989## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991# Be more Bourne compatible
16992DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016993if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 emulate sh
16995 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016996 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016997 # is contrary to our usage. Disable this feature.
16998 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017000else
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 case `(set -o) 2>/dev/null` in #(
17002 *posix*) :
17003 set -o posix ;; #(
17004 *) :
17005 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017007fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017008
17009
Matthias Kloseb9621712010-04-24 17:59:49 +000017010as_nl='
17011'
17012export as_nl
17013# Printing a long string crashes Solaris 7 /usr/bin/printf.
17014as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17015as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17016as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17017# Prefer a ksh shell builtin over an external printf program on Solaris,
17018# but without wasting forks for bash or zsh.
17019if test -z "$BASH_VERSION$ZSH_VERSION" \
17020 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17021 as_echo='print -r --'
17022 as_echo_n='print -rn --'
17023elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17024 as_echo='printf %s\n'
17025 as_echo_n='printf %s'
17026else
17027 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17028 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17029 as_echo_n='/usr/ucb/echo -n'
17030 else
17031 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17032 as_echo_n_body='eval
17033 arg=$1;
17034 case $arg in #(
17035 *"$as_nl"*)
17036 expr "X$arg" : "X\\(.*\\)$as_nl";
17037 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17038 esac;
17039 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17040 '
17041 export as_echo_n_body
17042 as_echo_n='sh -c $as_echo_n_body as_echo'
17043 fi
17044 export as_echo_body
17045 as_echo='sh -c $as_echo_body as_echo'
17046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017047
17048# The user is always right.
17049if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 PATH_SEPARATOR=:
17051 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17052 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17053 PATH_SEPARATOR=';'
17054 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057
17058# IFS
17059# We need space, tab and new line, in precisely that order. Quoting is
17060# there to prevent editors from complaining about space-tab.
17061# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17062# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063IFS=" "" $as_nl"
17064
17065# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017066as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017067case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068 *[\\/]* ) as_myself=$0 ;;
17069 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017070for as_dir in $PATH
17071do
17072 IFS=$as_save_IFS
17073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17075 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078 ;;
17079esac
17080# We did not find ourselves, most probably we were run as `sh COMMAND'
17081# in which case we are not to be found in the path.
17082if test "x$as_myself" = x; then
17083 as_myself=$0
17084fi
17085if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17087 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088fi
17089
Matthias Kloseb9621712010-04-24 17:59:49 +000017090# Unset variables that we do not need and which cause bugs (e.g. in
17091# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17092# suppresses any "Segmentation fault" message there. '((' could
17093# trigger a bug in pdksh 5.2.14.
17094for as_var in BASH_ENV ENV MAIL MAILPATH
17095do eval test x\${$as_var+set} = xset \
17096 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097done
17098PS1='$ '
17099PS2='> '
17100PS4='+ '
17101
17102# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017103LC_ALL=C
17104export LC_ALL
17105LANGUAGE=C
17106export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107
Matthias Kloseb9621712010-04-24 17:59:49 +000017108# CDPATH.
17109(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17110
17111
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017112# as_fn_error STATUS ERROR [LINENO LOG_FD]
17113# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017114# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17115# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017117as_fn_error ()
17118{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017119 as_status=$1; test $as_status -eq 0 && as_status=1
17120 if test "$4"; then
17121 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17122 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017124 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 as_fn_exit $as_status
17126} # as_fn_error
17127
17128
17129# as_fn_set_status STATUS
17130# -----------------------
17131# Set $? to STATUS, without forking.
17132as_fn_set_status ()
17133{
17134 return $1
17135} # as_fn_set_status
17136
17137# as_fn_exit STATUS
17138# -----------------
17139# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17140as_fn_exit ()
17141{
17142 set +e
17143 as_fn_set_status $1
17144 exit $1
17145} # as_fn_exit
17146
17147# as_fn_unset VAR
17148# ---------------
17149# Portably unset VAR.
17150as_fn_unset ()
17151{
17152 { eval $1=; unset $1;}
17153}
17154as_unset=as_fn_unset
17155# as_fn_append VAR VALUE
17156# ----------------------
17157# Append the text in VALUE to the end of the definition contained in VAR. Take
17158# advantage of any shell optimizations that allow amortized linear growth over
17159# repeated appends, instead of the typical quadratic growth present in naive
17160# implementations.
17161if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17162 eval 'as_fn_append ()
17163 {
17164 eval $1+=\$2
17165 }'
17166else
17167 as_fn_append ()
17168 {
17169 eval $1=\$$1\$2
17170 }
17171fi # as_fn_append
17172
17173# as_fn_arith ARG...
17174# ------------------
17175# Perform arithmetic evaluation on the ARGs, and store the result in the
17176# global $as_val. Take advantage of shells that can avoid forks. The arguments
17177# must be portable across $(()) and expr.
17178if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17179 eval 'as_fn_arith ()
17180 {
17181 as_val=$(( $* ))
17182 }'
17183else
17184 as_fn_arith ()
17185 {
17186 as_val=`expr "$@" || test $? -eq 1`
17187 }
17188fi # as_fn_arith
17189
17190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191if expr a : '\(a\)' >/dev/null 2>&1 &&
17192 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17193 as_expr=expr
17194else
17195 as_expr=false
17196fi
17197
17198if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17199 as_basename=basename
17200else
17201 as_basename=false
17202fi
17203
Matthias Kloseb9621712010-04-24 17:59:49 +000017204if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17205 as_dirname=dirname
17206else
17207 as_dirname=false
17208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210as_me=`$as_basename -- "$0" ||
17211$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17212 X"$0" : 'X\(//\)$' \| \
17213 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017214$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215 sed '/^.*\/\([^/][^/]*\)\/*$/{
17216 s//\1/
17217 q
17218 }
17219 /^X\/\(\/\/\)$/{
17220 s//\1/
17221 q
17222 }
17223 /^X\/\(\/\).*/{
17224 s//\1/
17225 q
17226 }
17227 s/.*/./; q'`
17228
Matthias Kloseb9621712010-04-24 17:59:49 +000017229# Avoid depending upon Character Ranges.
17230as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17231as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17232as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17233as_cr_digits='0123456789'
17234as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235
17236ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017237case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017239 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017241 xy) ECHO_C='\c';;
17242 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17243 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244 esac;;
17245*)
17246 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017248
Martin v. Löwis11437992002-04-12 09:54:03 +000017249rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250if test -d conf$$.dir; then
17251 rm -f conf$$.dir/conf$$.file
17252else
17253 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017254 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017256if (echo >conf$$.file) 2>/dev/null; then
17257 if ln -s conf$$.file conf$$ 2>/dev/null; then
17258 as_ln_s='ln -s'
17259 # ... but there are two gotchas:
17260 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17261 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017262 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017264 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 elif ln conf$$.file conf$$ 2>/dev/null; then
17266 as_ln_s=ln
17267 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017268 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017269 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017270else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017271 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17274rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017275
Matthias Kloseb9621712010-04-24 17:59:49 +000017276
17277# as_fn_mkdir_p
17278# -------------
17279# Create "$as_dir" as a directory, including parents if necessary.
17280as_fn_mkdir_p ()
17281{
17282
17283 case $as_dir in #(
17284 -*) as_dir=./$as_dir;;
17285 esac
17286 test -d "$as_dir" || eval $as_mkdir_p || {
17287 as_dirs=
17288 while :; do
17289 case $as_dir in #(
17290 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17291 *) as_qdir=$as_dir;;
17292 esac
17293 as_dirs="'$as_qdir' $as_dirs"
17294 as_dir=`$as_dirname -- "$as_dir" ||
17295$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17296 X"$as_dir" : 'X\(//\)[^/]' \| \
17297 X"$as_dir" : 'X\(//\)$' \| \
17298 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17299$as_echo X"$as_dir" |
17300 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17301 s//\1/
17302 q
17303 }
17304 /^X\(\/\/\)[^/].*/{
17305 s//\1/
17306 q
17307 }
17308 /^X\(\/\/\)$/{
17309 s//\1/
17310 q
17311 }
17312 /^X\(\/\).*/{
17313 s//\1/
17314 q
17315 }
17316 s/.*/./; q'`
17317 test -d "$as_dir" && break
17318 done
17319 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017320 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017321
17322
17323} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017324if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017326else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017327 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017328 as_mkdir_p=false
17329fi
17330
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017331
17332# as_fn_executable_p FILE
17333# -----------------------
17334# Test if FILE is an executable regular file.
17335as_fn_executable_p ()
17336{
17337 test -f "$1" && test -x "$1"
17338} # as_fn_executable_p
17339as_test_x='test -x'
17340as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017341
17342# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343as_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 +000017344
17345# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017346as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017347
17348
Martin v. Löwis11437992002-04-12 09:54:03 +000017349exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017350## ----------------------------------- ##
17351## Main body of $CONFIG_STATUS script. ##
17352## ----------------------------------- ##
17353_ASEOF
17354test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017355
Matthias Kloseb9621712010-04-24 17:59:49 +000017356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17357# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017358# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359# values after options handling.
17360ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017361This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017362generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017363
17364 CONFIG_FILES = $CONFIG_FILES
17365 CONFIG_HEADERS = $CONFIG_HEADERS
17366 CONFIG_LINKS = $CONFIG_LINKS
17367 CONFIG_COMMANDS = $CONFIG_COMMANDS
17368 $ $0 $@
17369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370on `(hostname || uname -n) 2>/dev/null | sed 1q`
17371"
17372
Martin v. Löwis11437992002-04-12 09:54:03 +000017373_ACEOF
17374
Matthias Kloseb9621712010-04-24 17:59:49 +000017375case $ac_config_files in *"
17376"*) set x $ac_config_files; shift; ac_config_files=$*;;
17377esac
17378
17379case $ac_config_headers in *"
17380"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17381esac
17382
17383
17384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017385# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017386config_files="$ac_config_files"
17387config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017390
Matthias Kloseb9621712010-04-24 17:59:49 +000017391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017392ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017393\`$as_me' instantiates files and other configuration actions
17394from templates according to the current configuration. Unless the files
17395and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017398
17399 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017401 --config print configuration, then exit
17402 -q, --quiet, --silent
17403 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 -d, --debug don't remove temporary files
17405 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017406 --file=FILE[:TEMPLATE]
17407 instantiate the configuration file FILE
17408 --header=FILE[:TEMPLATE]
17409 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017410
17411Configuration files:
17412$config_files
17413
17414Configuration headers:
17415$config_headers
17416
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017417Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17421ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017422ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017423python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017424configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017425 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017426
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017427Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017428This config.status script is free software; the Free Software Foundation
17429gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430
17431ac_pwd='$ac_pwd'
17432srcdir='$srcdir'
17433INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017434MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017435test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
17437
Matthias Kloseb9621712010-04-24 17:59:49 +000017438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17439# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017440ac_need_defaults=:
17441while test $# != 0
17442do
17443 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017444 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17446 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017447 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017449 --*=)
17450 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17451 ac_optarg=
17452 ac_shift=:
17453 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017455 ac_option=$1
17456 ac_optarg=$2
17457 ac_shift=shift
17458 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 esac
17460
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017463 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17464 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 $as_echo "$ac_cs_version"; exit ;;
17467 --config | --confi | --conf | --con | --co | --c )
17468 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 debug=: ;;
17471 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017472 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 case $ac_optarg in
17474 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017475 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 esac
17477 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 ac_need_defaults=false;;
17479 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017480 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017481 case $ac_optarg in
17482 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17483 esac
17484 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017485 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486 --he | --h)
17487 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017488 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017489Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017491 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017492 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17493 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17494 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
17496 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017497 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017498Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017502
17503 esac
17504 shift
17505done
17506
Skip Montanaro6dead952003-09-25 14:50:04 +000017507ac_configure_extra_args=
17508
17509if $ac_cs_silent; then
17510 exec 6>/dev/null
17511 ac_configure_extra_args="$ac_configure_extra_args --silent"
17512fi
17513
17514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017515cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017516if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017517 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 shift
17519 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17520 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017522 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017523fi
17524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527exec 5>>config.log
17528{
17529 echo
17530 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17531## Running $as_me. ##
17532_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017539
Matthias Kloseb9621712010-04-24 17:59:49 +000017540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541
17542# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017543for ac_config_target in $ac_config_targets
17544do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 case $ac_config_target in
17546 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17547 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17548 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017549 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17550 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017552 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017553 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017554 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555
Victor Stinnere0be4232011-10-25 13:06:09 +020017556 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 esac
17558done
17559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560
Martin v. Löwis11437992002-04-12 09:54:03 +000017561# If the user did not use the arguments to specify the items to instantiate,
17562# then the envvar interface is used. Set only those that are not.
17563# We use the long form for the default assignment because of an extremely
17564# bizarre bug on SunOS 4.1.3.
17565if $ac_need_defaults; then
17566 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17567 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17568fi
17569
Skip Montanaro6dead952003-09-25 14:50:04 +000017570# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017572# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573# Hook for its removal unless debugging.
17574# Note that there is a small window in which the directory will not be cleaned:
17575# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017576$debug ||
17577{
Victor Stinnere0be4232011-10-25 13:06:09 +020017578 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017580 : "${ac_tmp:=$tmp}"
17581 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017583 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017584}
Martin v. Löwis11437992002-04-12 09:54:03 +000017585# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017586
Martin v. Löwis11437992002-04-12 09:54:03 +000017587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017589 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017590} ||
17591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592 tmp=./conf$$-$RANDOM
17593 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017594} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017595ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017596
Matthias Kloseb9621712010-04-24 17:59:49 +000017597# Set up the scripts for CONFIG_FILES section.
17598# No need to generate them if there are no CONFIG_FILES.
17599# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
Matthias Kloseb9621712010-04-24 17:59:49 +000017602
17603ac_cr=`echo X | tr X '\015'`
17604# On cygwin, bash can eat \r inside `` if the user requested igncr.
17605# But we know of no other shell where ac_cr would be empty at this
17606# point, so we can use a bashism as a fallback.
17607if test "x$ac_cr" = x; then
17608 eval ac_cr=\$\'\\r\'
17609fi
17610ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17611if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017613else
17614 ac_cs_awk_cr=$ac_cr
17615fi
17616
Victor Stinnere0be4232011-10-25 13:06:09 +020017617echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017618_ACEOF
17619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620
Matthias Kloseb9621712010-04-24 17:59:49 +000017621{
17622 echo "cat >conf$$subs.awk <<_ACEOF" &&
17623 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17624 echo "_ACEOF"
17625} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17627ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628ac_delim='%!_!# '
17629for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17634 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635 break
17636 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 else
17639 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641done
Matthias Kloseb9621712010-04-24 17:59:49 +000017642rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643
Matthias Kloseb9621712010-04-24 17:59:49 +000017644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017645cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017647sed -n '
17648h
17649s/^/S["/; s/!.*/"]=/
17650p
17651g
17652s/^[^!]*!//
17653:repl
17654t repl
17655s/'"$ac_delim"'$//
17656t delim
17657:nl
17658h
17659s/\(.\{148\}\)..*/\1/
17660t more1
17661s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17662p
17663n
17664b repl
17665:more1
17666s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17667p
17668g
17669s/.\{148\}//
17670t nl
17671:delim
17672h
17673s/\(.\{148\}\)..*/\1/
17674t more2
17675s/["\\]/\\&/g; s/^/"/; s/$/"/
17676p
17677b
17678:more2
17679s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17680p
17681g
17682s/.\{148\}//
17683t delim
17684' <conf$$subs.awk | sed '
17685/^[^""]/{
17686 N
17687 s/\n//
17688}
17689' >>$CONFIG_STATUS || ac_write_fail=1
17690rm -f conf$$subs.awk
17691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17692_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017693cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017694 for (key in S) S_is_set[key] = 1
17695 FS = ""
17696
17697}
17698{
17699 line = $ 0
17700 nfields = split(line, field, "@")
17701 substed = 0
17702 len = length(field[1])
17703 for (i = 2; i < nfields; i++) {
17704 key = field[i]
17705 keylen = length(key)
17706 if (S_is_set[key]) {
17707 value = S[key]
17708 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17709 len += length(value) + length(field[++i])
17710 substed = 1
17711 } else
17712 len += 1 + keylen
17713 }
17714
17715 print line
17716}
17717
17718_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17721if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17722 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17723else
17724 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017725fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017726 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017727_ACEOF
17728
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017729# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17730# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731# trailing colons and then remove the whole line if VPATH becomes empty
17732# (actually we leave an empty line to preserve line numbers).
17733if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017734 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17735h
17736s///
17737s/^/:/
17738s/[ ]*$/:/
17739s/:\$(srcdir):/:/g
17740s/:\${srcdir}:/:/g
17741s/:@srcdir@:/:/g
17742s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017744x
17745s/\(=[ ]*\).*/\1/
17746G
17747s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748s/^[^=]*=[ ]*$//
17749}'
17750fi
17751
Matthias Kloseb9621712010-04-24 17:59:49 +000017752cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017753fi # test -n "$CONFIG_FILES"
17754
Matthias Kloseb9621712010-04-24 17:59:49 +000017755# Set up the scripts for CONFIG_HEADERS section.
17756# No need to generate them if there are no CONFIG_HEADERS.
17757# This happens for instance with `./config.status Makefile'.
17758if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017759cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017760BEGIN {
17761_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762
Matthias Kloseb9621712010-04-24 17:59:49 +000017763# Transform confdefs.h into an awk script `defines.awk', embedded as
17764# here-document in config.status, that substitutes the proper values into
17765# config.h.in to produce config.h.
17766
17767# Create a delimiter string that does not exist in confdefs.h, to ease
17768# handling of long lines.
17769ac_delim='%!_!# '
17770for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017771 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17772 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 break
17774 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017775 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 else
17777 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17778 fi
17779done
17780
17781# For the awk script, D is an array of macro values keyed by name,
17782# likewise P contains macro parameters if any. Preserve backslash
17783# newline sequences.
17784
17785ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17786sed -n '
17787s/.\{148\}/&'"$ac_delim"'/g
17788t rset
17789:rset
17790s/^[ ]*#[ ]*define[ ][ ]*/ /
17791t def
17792d
17793:def
17794s/\\$//
17795t bsnl
17796s/["\\]/\\&/g
17797s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17798D["\1"]=" \3"/p
17799s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17800d
17801:bsnl
17802s/["\\]/\\&/g
17803s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17804D["\1"]=" \3\\\\\\n"\\/p
17805t cont
17806s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17807t cont
17808d
17809:cont
17810n
17811s/.\{148\}/&'"$ac_delim"'/g
17812t clear
17813:clear
17814s/\\$//
17815t bsnlc
17816s/["\\]/\\&/g; s/^/"/; s/$/"/p
17817d
17818:bsnlc
17819s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17820b cont
17821' <confdefs.h | sed '
17822s/'"$ac_delim"'/"\\\
17823"/g' >>$CONFIG_STATUS || ac_write_fail=1
17824
17825cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17826 for (key in D) D_is_set[key] = 1
17827 FS = ""
17828}
17829/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17830 line = \$ 0
17831 split(line, arg, " ")
17832 if (arg[1] == "#") {
17833 defundef = arg[2]
17834 mac1 = arg[3]
17835 } else {
17836 defundef = substr(arg[1], 2)
17837 mac1 = arg[2]
17838 }
17839 split(mac1, mac2, "(") #)
17840 macro = mac2[1]
17841 prefix = substr(line, 1, index(line, defundef) - 1)
17842 if (D_is_set[macro]) {
17843 # Preserve the white space surrounding the "#".
17844 print prefix "define", macro P[macro] D[macro]
17845 next
17846 } else {
17847 # Replace #undef with comments. This is necessary, for example,
17848 # in the case of _POSIX_SOURCE, which is predefined and required
17849 # on some systems where configure will not decide to define it.
17850 if (defundef == "undef") {
17851 print "/*", prefix defundef, macro, "*/"
17852 next
17853 }
17854 }
17855}
17856{ print }
17857_ACAWK
17858_ACEOF
17859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017860 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017861fi # test -n "$CONFIG_HEADERS"
17862
17863
17864eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17865shift
17866for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867do
17868 case $ac_tag in
17869 :[FHLC]) ac_mode=$ac_tag; continue;;
17870 esac
17871 case $ac_mode$ac_tag in
17872 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017873 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 :[FH]-) ac_tag=-:-;;
17875 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17876 esac
17877 ac_save_IFS=$IFS
17878 IFS=:
17879 set x $ac_tag
17880 IFS=$ac_save_IFS
17881 shift
17882 ac_file=$1
17883 shift
17884
17885 case $ac_mode in
17886 :L) ac_source=$1;;
17887 :[FH])
17888 ac_file_inputs=
17889 for ac_f
17890 do
17891 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017892 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893 *) # Look for the file first in the build tree, then in the source tree
17894 # (if the path is not absolute). The absolute path cannot be DOS-style,
17895 # because $ac_f cannot contain `:'.
17896 test -f "$ac_f" ||
17897 case $ac_f in
17898 [\\/$]*) false;;
17899 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17900 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017901 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17904 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 done
17906
17907 # Let's still pretend it is `configure' which instantiates (i.e., don't
17908 # use $as_me), people would be surprised to read:
17909 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017910 configure_input='Generated from '`
17911 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17912 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913 if test x"$ac_file" != x-; then
17914 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17916$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017918 # Neutralize special characters interpreted by sed in replacement strings.
17919 case $configure_input in #(
17920 *\&* | *\|* | *\\* )
17921 ac_sed_conf_input=`$as_echo "$configure_input" |
17922 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17923 *) ac_sed_conf_input=$configure_input;;
17924 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925
17926 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017927 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17928 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929 esac
17930 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 esac
17932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017934$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017935 X"$ac_file" : 'X\(//\)[^/]' \| \
17936 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017938$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17940 s//\1/
17941 q
17942 }
17943 /^X\(\/\/\)[^/].*/{
17944 s//\1/
17945 q
17946 }
17947 /^X\(\/\/\)$/{
17948 s//\1/
17949 q
17950 }
17951 /^X\(\/\).*/{
17952 s//\1/
17953 q
17954 }
17955 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017956 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 ac_builddir=.
17958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959case "$ac_dir" in
17960.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17961*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017964 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 case $ac_top_builddir_sub in
17966 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17967 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17968 esac ;;
17969esac
17970ac_abs_top_builddir=$ac_pwd
17971ac_abs_builddir=$ac_pwd$ac_dir_suffix
17972# for backward compatibility:
17973ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017974
17975case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 ac_top_srcdir=$ac_top_builddir_sub
17979 ac_abs_top_srcdir=$ac_pwd ;;
17980 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017981 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 ac_top_srcdir=$srcdir
17983 ac_abs_top_srcdir=$srcdir ;;
17984 *) # Relative name.
17985 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17986 ac_top_srcdir=$ac_top_build_prefix$srcdir
17987 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017988esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017990
Martin v. Löwis11437992002-04-12 09:54:03 +000017991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992 case $ac_mode in
17993 :F)
17994 #
17995 # CONFIG_FILE
17996 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
17998 case $INSTALL in
17999 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018001 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018002 ac_MKDIR_P=$MKDIR_P
18003 case $MKDIR_P in
18004 [\\/$]* | ?:[\\/]* ) ;;
18005 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18006 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018007_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008
Matthias Kloseb9621712010-04-24 17:59:49 +000018009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010# If the template does not know about datarootdir, expand it.
18011# FIXME: This hack should be removed a few years after 2.60.
18012ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018013ac_sed_dataroot='
18014/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015 p
18016 q
18017}
18018/@datadir@/p
18019/@docdir@/p
18020/@infodir@/p
18021/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018022/@mandir@/p'
18023case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024*datarootdir*) ac_datarootdir_seen=yes;;
18025*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18027$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030 ac_datarootdir_hack='
18031 s&@datadir@&$datadir&g
18032 s&@docdir@&$docdir&g
18033 s&@infodir@&$infodir&g
18034 s&@localedir@&$localedir&g
18035 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018036 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037esac
18038_ACEOF
18039
18040# Neutralize VPATH when `$srcdir' = `.'.
18041# Shell code in configure.ac might set extrasub.
18042# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18044ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018045$extrasub
18046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018048:t
18049/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018050s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018052s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053s&@srcdir@&$ac_srcdir&;t t
18054s&@abs_srcdir@&$ac_abs_srcdir&;t t
18055s&@top_srcdir@&$ac_top_srcdir&;t t
18056s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18057s&@builddir@&$ac_builddir&;t t
18058s&@abs_builddir@&$ac_abs_builddir&;t t
18059s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18060s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018061s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018063"
Victor Stinnere0be4232011-10-25 13:06:09 +020018064eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18065 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018068 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18069 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18070 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018072which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018073$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018074which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018075
Victor Stinnere0be4232011-10-25 13:06:09 +020018076 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018078 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18079 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018080 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018081 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 ;;
18083 :H)
18084 #
18085 # CONFIG_HEADER
18086 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018088 {
18089 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018090 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18091 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018092 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018093 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18095$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018098 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018099 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018100 fi
18101 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018102 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018103 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018104 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018105 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108
18109 esac
18110
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018111
18112 case $ac_file$ac_mode in
18113 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18114
18115 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116done # for ac_tag
18117
Guido van Rossum627b2d71993-12-24 10:39:16 +000018118
Matthias Kloseb9621712010-04-24 17:59:49 +000018119as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018120_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018121ac_clean_files=$ac_clean_files_save
18122
Matthias Kloseb9621712010-04-24 17:59:49 +000018123test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018124 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018125
Martin v. Löwis11437992002-04-12 09:54:03 +000018126
18127# configure is writing to config.log, and then calls config.status.
18128# config.status does its own redirection, appending to config.log.
18129# Unfortunately, on DOS this fails, as config.log is still kept open
18130# by configure, so config.status won't be able to write to it; its
18131# output is simply discarded. So we exec the FD to /dev/null,
18132# effectively closing config.log, so it can be properly (re)opened and
18133# appended to by config.status. When coming back to configure, we
18134# need to make the FD available again.
18135if test "$no_create" != yes; then
18136 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018137 ac_config_status_args=
18138 test "$silent" = yes &&
18139 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018140 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018141 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018142 exec 5>>config.log
18143 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18144 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018145 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018146fi
18147if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18149$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018150fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018151
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018152
Christian Heimes75ed8902013-11-20 01:11:18 +010018153echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018154if test ! -f Modules/Setup
18155then
18156 cp $srcdir/Modules/Setup.dist Modules/Setup
18157fi
18158
Christian Heimes75ed8902013-11-20 01:11:18 +010018159echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018160if test ! -f Modules/Setup.local
18161then
18162 echo "# Edit this file for local setup changes" >Modules/Setup.local
18163fi
18164
Christian Heimes75ed8902013-11-20 01:11:18 +010018165echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018166$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018167 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018168 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018169mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018170
18171if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18172 echo "" >&6
18173 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018174 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 +000018175 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018176 echo "" >&6
18177 echo "" >&6
18178fi
18179